cinera_handmade.network/cmuratori/hero/code/code143.hmml

37 lines
3.3 KiB
Plaintext
Raw Permalink Normal View History

[video output=day143 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Pitch Shifting in the Mixer" vod_platform=youtube id=OOR8A_7JwIY annotator=ZedZull annotator=Miblo annotator=debiatan]
[00:00:26][Recap and plan for today]
[00:01:14][Discussion on using volume changes and pitch-shifting to generate a rich soundscape with few sound assets]
[00:06:59][How to pitch-shift a sound]
[00:09:14][Compromises for minor pitch changes]
[00:11:23][Deciding on linear interpolation for real-time mixing]
[00:13:25][On the importance of linear blending]
[00:17:02][The simple version: choosing the nearest sample]
[00:18:09][Implementing the simple version]
[00:21:47][(intermission) Outputting sound even when the game window loses focus]
[00:27:55][Back to implementing the simple version]
[00:34:01][Debugging the simple version]
[00:38:18][Adding linear blending of samples]
[00:41:40][Comparing sound output with and without linear interpolation between samples]
[00:42:54][Making dSample part of playing_sound]
[00:44:55][Flushing queues before reloading game code]
[00:46:47][Copying strings out of the game code block to avoid crashing after hot code reloading]
[00:48:37][Implementing PushString]
[00:54:43][Q&A][:speech]
[00:55:28][@djonahstag][How would you pan a sample slightly left or right in volume?]
[01:03:07][@kelimion][Would this pitch shift be animated as well, like you enter a time-dilated area and pitch-shifts in a second or two as you cross a barrier]
[01:04:02][@cubercaleb][If you wanted to pitch-shift the music without changing the speed couldn't you just do a quick and dirty linear interpolation between the current sample and the next sample?]
[01:06:10][@melwute][Did you ever cover what would make a good test sound file for this type of mixing work?]
[01:06:30][@guit4rfreak][Do you ever use memcpy from the C standard library?]
[01:06:53][@foxy126][What's the yellow Rectangle?]
[01:07:40][@symbolic_butt][What kind of sound options do you plan to include in the game? Like will the player be able to pause the game and mute the music but keep the sound effects? Or is it going to be a fixed thing like controller settings?]
[01:09:31][@stephenlast][Wouldn't you want to use the alternate way of animating the volume for this feature? By setting a rate, not a length of time?]
[01:10:17][@btngames][With a player running, would you connect speed of the player to pitch or look to add more sounds i.e. more steps in grass?]
[01:10:54][@matttherunner][Once you release this source code, this will allow people to build upon/edit to make their own games. Correct?]
[01:11:42][@hugemang][You may have already covered this, but does the OS alone allocate threads to run on each core, so is it impossible to force a single thread to run on its own unique core?]
[01:14:44][@soggypubes][Is programming just remembering a whole bunch of commands and putting them into sequence?]
[01:16:30][@djonahstag][Is it too complex to add low/high pass filters via code?]
[01:18:03][@insofaras][If a tree falls and the hero is not there to hear it, will it make a sound?]
[01:19:12][@soysaucethekid][Is the next thing you are going to do put the sound code in SIMD?]
[01:19:58][@symbolic_butt][Are you going to use complex numbers? I heard they're useful for sound processing]
[/video]