I actually used the fact that a sample's loop point doesn't need to point to an address within the same sample when I created my SNES jukebox project. I set up a couple of buffers and loaded the contents of one while the other played, setting the loop points dynamically as each sample "looped" so that it plays as one continuous "sample." This allowed me to stream an entire song (converted to brr format, of course) from an Arduino.
@HaveYouTriedGuillotines2 жыл бұрын
I suspect this is probably how the MSU-1 works.
@michaelcalvin422 жыл бұрын
@@HaveYouTriedGuillotines Without looking at the source code for the MSU-1 "chip," I couldn't say for sure. But some docs I found online claim that it leaves "... the SNES’ own SPC700 sound chip free to do better sound effects and jingles" so I kind of doubt it. The cartridge port does have pins to externally mix audio into the output, and those pins are probably an easier interface for this if you're rolling your own custom chip. This would also remove the 32KHz sample rate limitation, since you're directly mixing your own analog signal.
@Cubearr2 жыл бұрын
@@michaelcalvin42 I believe you are correct. MSU1 audio comes through at 44.1khz at CD quality. Likely via similar means as the Soundlink system found in the Broadcast Satellaview system.
@YEWCHENGYINMoe Жыл бұрын
Y
@_aitchfactor1882 жыл бұрын
9:37 a number of games rely on this overflow to make some percussion samples have more "pop", and many later konami and squaresoft games combine overflow behaviours with unstable looping for very space-efficient pitchable noise samples. On the other hand, late-era konami games increasingly avoid using any filters, and clamp all "normal" samples to about 90% of the dynamic range seemingly to avoid overflows at any cost.
@Waccoon2 жыл бұрын
Wow, that's an impressive amount of hardware for a device from 1989. Just having a hardware multiplier in audio hardware was a pretty big investment. I did work on a differential audio engine for an 8-bit retro computer, and got something pretty decent with a 9-bit adder, a single-stage funnel shifter, and a 56-bit lookup table.
@T3sl42 жыл бұрын
Can confirm. Did an audio project on AVR XMEGA before: a reverb effect with 6 delay taps and 2 biquad filter sections, 12 bit ADC/DAC, 25kSps. CPU runs at 32MHz. It would hardly handle just one filter, if not for the 8x8 hardware multiply!
@ImSquiggs2 жыл бұрын
This is coming out on the same day I'm trying to figure out how to create .brr samples for Super Mario World ROM hacking... I can't think of a video that would be more relevant to my day today, haha. I'm gonna be trying to make some of my own too so I bet I walk away with a few useful tricks.
@noisecross2 жыл бұрын
Bregalad's "BRRTools" in the romhacking page is a great starting point to create new samples. My own "SNES Sound Editor" in the "FF5 Hacking Wiki" can also ease your life a lot.
@pichonPoP2 жыл бұрын
In my case, I want to know from where the sound came in final fight.
@tiileaf2 жыл бұрын
Pleasure seeing you here again! Good luck with the samples in your hack Squiggs!
@AftercastGames2 жыл бұрын
I love these videos, but it amazes me that anyone else is interested in this stuff. I figured it would be me and like 4 other people watching it.
@benox502 жыл бұрын
Nice to meet more rom hackers here
@impiaaa2 жыл бұрын
It's also worth noting that the PlayStation 1 and CD-i use (mostly) the same ADPCM encoding (which makes sense because Sony designed the audio chips for all 3 🙂)
@vuurniacsquarewave50912 жыл бұрын
It's double the channels, and more ARAM basically, but I'm pretty sure other aspects got improvements too.
@CarbonRollerCaco2 жыл бұрын
Nice. Sony may be run by scummy businessmen (which is why Nintendo ducked out of the CD-ROM deal with them-Sony wanted too much money), but they put out _sound_ tech. *rimshot* Thank you; I'll be here all night.
@BurritoKingdom2 жыл бұрын
PS2 also. Its basically an evolution of the PS1 SPU, which is an evolution of the SNES sound system. With SPU2, it has twice the channels and 4 times the ARAM of SPU.
@BurritoKingdom2 жыл бұрын
3 times as many channels and 8 times the ARAM. 24 audio channels with 512KB of ARAM. SNES had 8 channels with 64KB of ARAM.
@delta32442 жыл бұрын
The timing of this video could not be better for me. I recently started reading "C Language Algorithms for Digital Signal Processing," an old book which talks about the math behind and implementation of a bunch of algorthms, including ones similar to the one discussed in this video. (it was written around the time digital techniques were becoming the standard way to process signals, and was written for engineers who needed to learn C/DSP fundamentals to keep doing their jobs effectively). Having an easily understood explanation of one of the kinds of algorthms the book describes will be invaluable for understanding the math/implementation behind it, and as always, your explanation is excellent. Thank you for making these videos with consistantly excellent quality, and thank you a second time for the timing of this video being so coincidentally good.
@JohnGames-gz7ue2 жыл бұрын
The fact that you can make people understand this stuff is astounding. I learned assembly from you. Good job and thank you.
@ThePerfectKiosk2 жыл бұрын
What you're referring to as a "sample cycle"--that is, one of those 32 KHz processing steps--is conventionally called a "frame".
@somerand0mpers0n2 жыл бұрын
🖼
@renakunisaki2 жыл бұрын
I'm sure that doesn't get confusing in the context of game development where you have other kinds of frames to worry about.
@r.pizzamonkey73792 жыл бұрын
@@renakunisaki I mean, 'frames' can already refer to frames of animation, render frames, input frames, iterations through the main game loop, and more. Why not add one more?
@paulsnar2 жыл бұрын
One funny thing, Nintendo has gotten a lot of mileage out of the ADPCM format-a lot of their current games continue to use it to store most, if not all, sounds and music. The BRSTM format also uses ADPCM, with some minor differences like not having explicit end/loop bits in the ADPCM data and listing the loop point in the file header.
@DogsRNice2 жыл бұрын
They also used sequenced music as late as super Mario Galaxy 2 I believe Though sometimes it would just have a long sample of the orchestrated music at some point
@RoadrunnerWMC2 жыл бұрын
I think it's more just that "ADPCM" is a really general category name that can be applied to a wide variety of formats. I was messing around with the version on the Nintendo DS (known as "IMA-ADPCM") recently, and while it does have the same basic idea of encoding the differences between samples and making use of context to change the quantization step sizes, the exact way it works is pretty different from the format described in this video. And the BRSTM version ("DSP-ADPCM") is the same situation: same high-level ideas, but not the same actual format.
@paulsnar2 жыл бұрын
@@RoadrunnerWMC That's fair-I'm not well versed in the particulars beyond having written a BRWAV decoder once and noticing the superficial similarities. Still, the fact that there's a lineage between the SNES and what they pervasively use today felt worth pointing out.
@RushJet12 жыл бұрын
@@DogsRNice Some of the music in Odyssey sounds like the sequenced music from the Galaxy games, though not sure if they actually have it sequenced in the game or just recorded.
@SuperSmashDolls2 жыл бұрын
And yet they forgot to use it for the SNES Virtual Console and instead ripped out all the BRR samples for some reason 🤷
@silent-science2 жыл бұрын
bit rate reduced samples go BRRRRR
@redstonewarrior01522 жыл бұрын
Damn. Stole my comment before I watched the video.
@marti54202 жыл бұрын
Damn it now I have to delete my comment
@dukemagus2 жыл бұрын
Goddamned ninjas!
@JohnGames-gz7ue2 жыл бұрын
BRR Goes BRRRR!!!!!!!!!!
@nyspwastaken22 күн бұрын
get out
@PuglyWont2 жыл бұрын
Thank you so much for making this! I still can barely believe it... it's tailor made to my interest, technical understanding and learning style. Perfect!
@Iroh722 жыл бұрын
Great explanation as usual, but for these topics I feel giving short audio examples to listen to could be useful for those who aren't too familiar with terms like octaves, perfect fifths and so on.
@hobbified2 жыл бұрын
The presence of filter modes 1-3 is what makes it *differential* PCM (we're coding the difference from some predictive model instead of coding the sample itself), and the ability to change the shift and the filter per frame is what makes it *adaptive* differential PCM (the encoder can choose the parameters that give the best match for each little bit of audio). The way the pitch register is integrated (and the fractional portion used for interpolation) basically amounts to "direct digital synthesis" (which has pleasing similarities to Bresenham's line-drawing algorithm, and the way that subpixel math leads to smooth movement in games like Mario). Carrying over all of those fractional bits is important not only for getting good accurate pitches (which many older consoles and computers weren't capable of), but for making vibrato and pitch-bends glitch-free.
@bmartin4272 жыл бұрын
Nice vid! I hope we hear more about filter overflow at some point, since it's critical to some games' sounds like FF3 and CT. Circa 2002, I put a lot of effort into reverse engineering how this worked without getting noise in songs that aren't supposed to have it (e.g. CT's Johnny C Bad). Built my own flash cart, made my own test ROMs to run BRR samples and save the results to echo RAM, read it out and print it in hex on the screen, then undo the gaussian filter to figure out what the actual decoded BRR values were. It still kind of blows my mind that the answer was, it's allowed to overflow *exactly once* before being clamped; basically a hidden 17th bit. 🤔
@johneygd8 күн бұрын
Well i found it strang that 15 sample pointers are added up with 11bit bellcurve, then the top 16bit are summer together and then are cut into a 15bit value and then get fed into those 16bit dac’s? And then this approach could result into error overflow thus causing pop & click in he audio? mmm that sounds pretty strange to me. Just imsgine if those 4bit adpcm samples are upsampled to 16bit but then cut in halve to 15bit just to save on bandwide but then get fed into those 16bit dac’s. Then i consider this to be a very very misoppertunity from nintendo to not think about those longterm decisions to make sure they could stay keep ahead from it’s competitors and to keep their soundchip still relevant against future competitors nack then. Not only that but that means that we actually don’t hear those games as they were made and thus that we have missed aloooot,if that’s the case. I played supermario allstars on zsnes and let me tell you i was shocked what i heard. Those instruments and sound effects seems to have more clearity,more detail and a higher dynamic range in them, those samples are sounding closer from what i heard on the gba, so does it mean that zsnes actually outputs true 16bit audio rather then 15bit? If so then the 16bit sound get’s hidden inside the snes and those games. Unless it is the lowpass filter screwing up all those samples?? Because i have switched off that filter on zsnes.
@GO-tq6hs2 жыл бұрын
hell yea part 3. Can't wait til we get to the Echo and Filter since I just got a Super Midi Pak and I'm still trying to figure out the best way to utilize the echo and filter section.
@livvy942 жыл бұрын
It's so cool to see all of this after having done so much research on it to make my own music tools!
@ExperimentIV2 жыл бұрын
oh wow i just discovered your work last night! i wish i could wrap my head around the kinds of tools you use.
@jammy36622 жыл бұрын
@@ExperimentIV what a coincidence! thats so cool!
@livvy942 жыл бұрын
@@ExperimentIV 💜💜
@bosscrafty2 жыл бұрын
Oh hi Livvy lol
@jojodi2 жыл бұрын
Beautiful! I have been implementing this in Verilog/FPGA and this was a fantastic depiction of the entire process. Yes, the decoders/DSP do A LOT of work!
@saxxonpike2 жыл бұрын
Thank you for this! I've been writing sound tools for all sorts of game consoles and home computers for a long time. This may be SNES specific but is probably the best illustration of ADPCM, a popular staple for all sorts of memory and bus bandwidth limited systems.
@HeadCodeMonkey82 Жыл бұрын
You probably hear it repeatedly, but your animations are clean, simple and really well done. I appreciate the effort you put into them (and your clear explanations!)
@warmCabin2 жыл бұрын
So, when you illustrate the bell curve at 17:26, you show it looking back a sample. So if the counter was $155C, sample 0 would be included. But based on the run-through at 21:20, it looks like the interpolation can't look backwards like that, and the 4th point would always make a vanishingly small contribution. Is it a purely predictive algorithm, then?
@RGMechEx2 жыл бұрын
Correct, in the actual implementation, it doesn't look backwards--this is because old samples can possibly be immediately overwritten by new ones coming from the BRR block.
@Jordan107042 жыл бұрын
It’s almost like the start of the processing is shifted - at the start when the pitch counter is 0, the peak of the interpolation curve is actually data point 1, not data point 0.
@aaendi666110 ай бұрын
You know, I haven't really ever thought of what happens with the Gaussian interpolation when you key on. Does it just clear out the last 4 samples it decoded, or does it process junk that was left over?
@johneygd2 ай бұрын
You cannot predict new samples without old and new ones. If it only could look at new ones, then it can never know what’s the average value in between them. If it only could look at old ones, it again can’t create an average value either. Am mean i can imagine if the predictor litteraly only speculates new samples with only new onss or old old ones, then i can imagine that there will be lots of errors in the shaped sudio waveform.
@Mindthegame2 жыл бұрын
27:23 The exact moment my soul left my body. What a screamer.
@spelwerdzrite2 жыл бұрын
Please never stop making these videos
@fonesrphunny72426 ай бұрын
I tried out a famous 70s sampler keyboard. Even with "modern" tools and SysEx, it's quite the adventure. Without tools, you rely on a 2 digit display for setting memory address, loop points, ADSR ... a project for rainy weekends.
@uintptr_t55852 жыл бұрын
This (BRR/ADPCM) took me about 2 weeks to reverse engineer based on Optiroc/BRRtools . I wish I had this video back then!
@Magus12000BC2 жыл бұрын
I noticed that you mentioned stereo at the end of the video. As I recall it, the Super Nintendo did have a game or two that was supposedly surround sound. I remember Fatal Fury Special having the Dolby Surround logo at the title screen. I don't know how good it was, but maybe you can elaborate on that in your next video if there's any significant difference with how that game mixes samples.
@nyanpasu642 жыл бұрын
Negative audio volume in one but not both speakers.
@maxwelseven2 жыл бұрын
Actually a lot of games uses Surround Sound on SNES, but just some of them uses the Dolby logo (mostly Factor 5 games).
@renakunisaki2 жыл бұрын
I don't know if it's related, but the GameCube supported pseudo-surround sound by having some kind of depth information encoded in the audio stream.
@Aquatarkus962 жыл бұрын
It's probably Dolby Pro Logic, a matrix surround format which is a way to process normal stereo audio into pseudo surround sound. The audio of games does not need to be made specifically for this, which is part of the beauty, but some care can be taken by the devs when crafting audio for the game to make the surround sensation even more apparent. That is why some games have a Dolby Pro Logic logo. It's not the same beast as Dolby Digital, which as a discrete format, contains a dedicated audio stream for all 6 output channels (or however many the program is mixed for.) This requires a specific digital interconnect, either a single coax/RCA cable or a Toslink fiber optic cable.
@nyanpasu642 жыл бұрын
@@Aquatarkus96 Dolby Pro Logic is a speaker system which detects out-of-phase audio coming from the eg. SNES, and routes it to back speakers. I know how it's implemented in games, and it sometimes sounds odd when played on two-speaker headphones or speakers, but I've never had the chance to listen with a Pro Logic decoder. Out-of-phase *echo* sounds good even on stereo speakers though, when tuned well.
@nintendoloverin95672 жыл бұрын
One of the KZbin Channels I hold most dearest. Perfect timing, as I was exactly looking for this topic recently!
@FUZxxl2 жыл бұрын
It's interesting how the Gauss interpolation effectively applies a low-pass filter to the signal. Have samples been preconditioned to undo the effect of this filtering?
@RiedlerMusics2 жыл бұрын
While this was very informative, a few more audio examples would've been nice. For example, the difference in audio quality with and without interpolation or the different interpolation methods.
@MrBizznessMan2 жыл бұрын
Every time one of these videos uploads, I feel like a very excitable dog. I have little understanding of what is actually going on but I'm still happy and onboard with it all.
@wangledteb56712 жыл бұрын
Hey I actually had a pretty easy time understanding this video! Finally my audio engineering diploma is coming in handy lol... Hey have you ever considered making a tutorial video or series for programming for SNES? You clearly have a really great grasp of how it works and you're great at explaining. I think if you did that it'd be really helpful as most of the tutorials I could find online (at least the good ones) were text-only!
@Jordan107042 жыл бұрын
Does that mean interpolation is always affecting the output? Since even if P=$1000, we’re still taking a small part (N[255]) of the surrounding points of the “main point” (N[511]) in calculating the output.
@RGMechEx2 жыл бұрын
Correct!
@DarkAkuma2 жыл бұрын
Always love these vids. This one even more, as it reminds me that I need to finish working my BRRADPCM converter (specifically used with Virtual/Classic Console games), while also informing me a bit. I forget where I left off. But as I recall, I got stuck reverse engineering some unique elements to the format. The games use a unique patching of the ROM to replace 9 byte BRR sample blocks with 9 byte pointers. Included in the pointer are information on the original block, like one of the nibbles of the header byte among other things. But I got stuck figuring out one byte specifically. I figured it was pitch or interpolation related, but lacked the info to actually generate the byte properly. With PCM2BRR conversion, the byte does not need to be referenced to get accurate output (accurate besides the data loss from the right shift of 1). But with BRR2PCM, there's no viable source to draw from to properly set the byte. It may very well be a pitch byte, thus requiring pitch registers that are set from the SPC program. And as a result... not be data that can be properly generated from a command line app.
@renakunisaki2 жыл бұрын
Super NES: patching the binaries to inject higher quality sound samples from an external source to make the games sound sightly better than the real thing. N64: not even bothering to get fog and textures right.
@DarkAkuma2 жыл бұрын
@@renakunisaki One, BRR2PCM isn't a quality upgrade. Its a 1 to 1 format conversion. The reason Nintendo did it was either to save processing time, or due to licensing concerns. The VC phased out use of pre-compiled PCM data, and NSO no longer uses it at all. Two, N64 is a more complex system than NES/SNES. It did 3D back before 3D standards were figured out. As a result, its not always strait forward to emulate different things. Making things harder was the use of unique micro code with different games, making it hard to design once, and catch correct feature support with all games. Making fun of NSO-N64 emulation is just a bandwagon that people jump on without understanding it. It is most certainly a flawed emu, but the default from people is to expect it to be at least as good as fan emu's that have 2 decades of development history. Hiyoko was made for the WiiU, could not use any fan code, and was made by a team thats spread thin over several projects. Finally, the issues like fog in zelda that people cite HAVE been fixed. There are certainly things to complain about of goof on with Nintendo's N64 emu. But generally not what most parrots think.
@SpringySpring042 жыл бұрын
I don't know if anyone else caught this but the pronunciation of the KON register mentioned at 1:13 is the same as the anime about girls in a music club called "K-On!" (really good anime btw) What an interesting coincidence!
@flygonbreloom2 жыл бұрын
Part of me would love to see you cover the Ricoh RF5C164 after this series - it is the non-SONY (and relative potato) contemporary to the SPC700, and it would be interesting to contrast the differences between it and the SPC. I'll never get over just how janky the end-of-sample is in the RF5C164.
@GameDevYal2 жыл бұрын
haha sample go brr (nah but seriously... I've messed around a bit with trackers and it's amazing how complicated this stuff is under the hood! I've clearly underestimated how advanced retro music is despite years of experience with it lol)
@karlosk57732 жыл бұрын
That was an amazing video. Thank you for doing this series!
@nathanisbored2 жыл бұрын
in other words, DSP go brr
@jsd19822 жыл бұрын
Excellent video as always! I'm wondering though why couldn't they implement 4-point interpolation with a sliding window immediately surrounding the BRR sample being processed (-2, +2). It seems they only move the interpolation window in 4-sample increments instead of 1-sample increments.
@IntegerOfDoom2 жыл бұрын
Finally! I now vaguely understand how sampling and all the interpolation nonsense works.
@TS68152 жыл бұрын
8:00 so is the behavior of the loop flag responsible for the behavior of audio during crashes? Like a given sample is looping, waiting indefinitely on the cpu to come by and clear the flag?
@RGMechEx2 жыл бұрын
Sure, if there's nobody to tell the DSP to stop playing a note, it will just let it go on forever.
@DFX2KX2 жыл бұрын
@@RGMechEx my brother and I always called that 'the scream of death' whenever my SNES would crash (which it had an odd habit of doing with a few of my old games) It's funny to actually watch the code being executed that caused it.
@vuurniacsquarewave50912 жыл бұрын
One thing that could intervene in that is if the ADSR or GAIN envelope of the note was definite and would eventually reach 0 volume.
@renakunisaki2 жыл бұрын
@@DFX2KX I always kinda enjoyed the fact that when a SNES crashed, there was a pretty good chance the game would send nonsense to the SPC, which would usually keep on playing but would start a different song and/or a bunch of random sound effects. Most systems you just got the most recent note sustaining forever, or a horrible buzz (repeating the sample buffer that's no longer being filled in).
@DFX2KX2 жыл бұрын
@@renakunisaki I've only ever personally experienced repetitive short loops, often times the FF3 (FF 6 technically) menu confirm sound, I suspect that cart had some.... issues. I'dve been rather creeped out to hear the thing just play music with nothing else going on. lol
@warrioroflight348911 ай бұрын
This guy who made the video is extremely inteligent
@Raikaska Жыл бұрын
That this video exists is beyond amazing. Thank you so much!
@Raikaska Жыл бұрын
I LOVED the example. Really did it for me in terms of clarifying all the steps. Ty so much. Gonna try this as soon as I get home
@Raikaska Жыл бұрын
Done :) tho now im struggling with having good loop points.
@catmacopter85452 жыл бұрын
Wow I sure barely understand what's happening, but what I do get is still amazing 😍!
@zabrak9992 жыл бұрын
This guy is my Bob Ross - cheers 🍺
@Jehezukiel2 жыл бұрын
So this is where the *.bms sequenced audio data starts from. Interesting :D
@Alexs23743 Жыл бұрын
Why such odd bit values? I heard "15-bit", "14-bit", and "11-bit" in this video. D:
@TildaAzrisk3 ай бұрын
Hardware need not be limited by the concept of bytes.
@johneymute3 ай бұрын
But the snes does absolutely output 16bit audio at whether 8khz,22khz or 32khz. It’s absolutely 16bit !!!
@quabanos2 жыл бұрын
Love your vids man, keep up the good work!
@TrueN8-bit2 жыл бұрын
So long story short, SPC700 go BRR? Really good video, BTW.
@guaposneeze2 жыл бұрын
I once scratched a few vague blobs on the back of an envelope, thinking about an audio thing for an FPGA. There's no way I would have bothered doing stuff like gaussian interpolation. Let alone, with late 80's chip design tools and transistor budgets. Especially since seven year olds probably couldn't tell the difference between good and crappy interpolation while they were screaming at their kid brother during a Mario Kart race or whatever.
@renakunisaki2 жыл бұрын
They were also probably playing on a cheap TV with one crummy speaker. But, these chips were made for stereo systems, so they had to sound great.
@davecool422 жыл бұрын
2:10 Yes! A lollipop chart!
@mattb96642 жыл бұрын
Those samples were either cold or drunk. It would be fun to hear about where .brr file extension name came from.
@Lemon_Inspector2 жыл бұрын
just watch the first 5 minutes of the video
@mattb96642 жыл бұрын
Oh, I watched the whole video. I'm used to making acronyms for large programs that fit into the word or joke that only the develop team knows! Bless your soul and have a great day!
@sovdee2 жыл бұрын
Really liked the video, but the example of how the Gaussian interpolation worked around 23:00 was pretty confusing to me. For example, the $4014 pitch counter seems like it should be calculating the point around sample 4 given the red line, but it's actually calculating the point just around sample 5, from what I can tell. To elaborate, the red line is at $4014. The 255-x sample is sample 4, on the left edge of the bell curve, the 511-x is sample 5, at the left center of the curve, and so on. This means the two most relevant samples are 5 and 6, which means the point being calculated is between 5 and 6, just to the right of sample 5 (5014), which is a full sample ahead of the pitch counter. Am I missing something? If not, is there a way you can better demonstrate this offset? It was really confusing to me why the pitch counter wasn't centered in the samples until I paused the video and worked all the points out in my head. It also makes the reasoning for the sample starting with 0s make more sense, as the notes will start being calculated at sample 1 instead of sample 0.
@RGMechEx2 жыл бұрын
Yes, the actual implementation is slightly different than what is explained at 17:30. It's just as you said, everything is shifted by one sample, making it appear to start at sample 1 instead of 0. The reason for this is that since BRR samples are decoded immediately after the pitch counter hits a 4-sample boundary, those old samples are overwritten in the buffer. Therefore, in the interpolation step, you can't get the sample "before" the current index (index-1). So the indices of the sample points used are index+0, +1, +2, and +3, instead of -1, +0, +1, and +2. At 23:00, when the pitch counter is $4014, it's actually sample #5 that is at the peak of the bell curve, while #4 and #6 are half way, and #7 is basically zero. You can see this offset effect at the end of the decoding 27:25, since, even though the sample is stretched by a factor of 2/3, there is only a single output sample that is zero at the start, while the source BRR sample has 3 zero sample points.
@sovdee2 жыл бұрын
@@RGMechEx perfect thanks for the response! It makes a lot more sense now.
@Jordan107042 жыл бұрын
Yeah this confused me at first as well. Thanks for the explanation.
@Jemmysponz12 жыл бұрын
I understood a surprising amount of this! Thanks!
@ChaunceyGardener2 жыл бұрын
Even Koji Kondo couldn't figure this out.
@ssg-eggunner5 ай бұрын
Definitely why smw sounded like ass
@Eunakria2 жыл бұрын
great video as always! have you considered adding a soundtrack to your videos, especially during long animations? this is all incredibly useful information for SNES homebrew devs and I understand that takes precedence over its role as entertainment, but it's easy to think your sound hardware has broken when a video is playing but silent
@Eunakria2 жыл бұрын
admittedly I'm citing my preexisting familiarity with channels like 3blue1brown (similar reference content to yours, about mathematical concepts, but somewhat more emotive) and Sebastian Lague (far more whimsical, but has a similar pacing structure to your videos) and I don't want to make any demands I don't have the right to make, but it's something worth considering imo
@AiOinc12 жыл бұрын
Interestingly this is pretty similar to what the Amiga was doing in 1985
@ssg-eggunner5 ай бұрын
True except amiga paula ended up sounding better cause of better ARAM
@thatdefacer40432 жыл бұрын
Now I know why Koji Kondo said making music for the snes was a nightmare, good lord, he wasn’t kidding.
@Kafaldsbylur2 жыл бұрын
Hehe, samples go BRR
@VinsCool2 жыл бұрын
Ohh yes finally!
@VinsCool2 жыл бұрын
Being currently into audio programming lately, this has been invaluable informations, absolutely fantastic explanation! I'm surprised I actually managed to understand pretty much everything that was explained in the video. I have to admit however, the Gaussian Interpolation details were pretty confusing, but I did grasp the general idea about it, so that's fine to me. I already knew what a Linear Interpolation was about at least, so that's cool to me, at the end the principle remains the same, it's to find intermediate points to smooth out the sample during playback
@ltva87812 жыл бұрын
You better use sinc interpolation, it's slightly better. And remember that lo-fi crunchy samples sound worse with any interpolation
@McBoccher2 жыл бұрын
holy shit the snes predicted k-on 1:12
@johneysupergd77962 ай бұрын
If it is true that the snes can only change the pitch of a sample by speeding it up or slow it down, that means that if i want to down pitch a sample but keep the same speed, then i should play that sample much shorter but if i want to up pitch a sample then i should repeat playing that sample just to get around that. But what if i want to speed up or slow down the tempo of a sample without changing it’s pitch, then i should play that sample much shorter or repeat that sample again to get around those restrictions right? Now i have heard that the snes is also able to change the pitch (through bending it up or down) of that output constructed samples without changing it’s speed or changing it’s speed without changing it’s pitch. If that’s true that would be interesting to know more about it any soon😁
@StuartCGadgetRev2 жыл бұрын
Fascinating!
@YaveYu2 жыл бұрын
Nintendo loves 32000Hz ADPCM yeah, SNES & Wii.
@GolfinhoVoador2 жыл бұрын
oooooooo, you're back. nice
@whamer1002 жыл бұрын
hell yeah, new video hype
@AnotherSeeker2 жыл бұрын
What the heck! If every Directory in these things are $50 's, how the hell did they make money back then??
@oxybrightdark87652 жыл бұрын
ah yiss i love this channel!
@lior_haddad2 жыл бұрын
ooo a new episode
@16Kchn Жыл бұрын
I was wondering if cleaner results could be achieved by drawing a “density map” (frequency shift) for each sample. Apparently, it works, but synchronization is a problem and it generates clicking noises when shifting 🤔
@ssg-eggunner5 ай бұрын
Id like to see a demo Id take clicking over muffled sounds anyday
@MartinGalway2 жыл бұрын
Love this video series 😀
@RicoElectrico2 жыл бұрын
If they went to the trouble of using a LUT, why not use a windowed sinc?
@kaukospots2 жыл бұрын
Probably because this is all done on silicon
@RicoElectrico2 жыл бұрын
@@kaukospots How does it matter if the only thing it would change is values in the lookup table?
@ltva87812 жыл бұрын
Maybe sinc needs more calculations, and you are limited by physical chip size, you can't just put anything you want inside. Or the engineers were not qualified enough to do sinc in silicon
@RicoElectrico2 жыл бұрын
@@ltva8781 Maybe they didn't have expertise, although this must have been shown in signal processing books and IEEE papers by the late 80s. Hell, even Sony did resort to some interpolation tricks when making the first CD player a decade before that. The main disadvantage of Gaussian interpolation is that the Gaussian kernel is not zero-valued for source samples different than the central one. This will make it more low-pass than necessary, compared to windowed sinc or even triangle (i.e. linear). At the very least, they could have left linear interpolation as an option to get crisp sound when the pitch shift was small enough. No ROM needed to store coefficients for that 🙃
@renakunisaki2 жыл бұрын
@@ltva8781 this was Sony in the late 80s. They definitely knew what they were doing.
@accountname10472 жыл бұрын
your videos are legit af
@fluffycritter2 жыл бұрын
I'm really surprised that the pitch table is done using a linear value rather than exponential.
@AftercastGames2 жыл бұрын
Agreed. But exponential values are pretty much useless, since most hardware in this era couldn’t calculate exponents or logarithms in hardware, and resorted to a linear to exponential lookup table anyway. So, for what it’s worth, I think they made the right choice. Makes it easier in the software, and presumably harder on the hardware.
@NXTangl2 жыл бұрын
Sampled FM synthesis...nice.
@jpjokela12 жыл бұрын
SNES GOES BRR
@josephhall56352 жыл бұрын
You need to make more videos
@musicaldude94295 ай бұрын
Wait just realized does BRR standfor( bit rate reduced) samples
@CoolDudeClem2 жыл бұрын
Is the SNES ADPCM similar to Microsoft/IMA ADPCM? In the past I've come across several WAV files that use this.
@renakunisaki2 жыл бұрын
ADPCM is a pretty broad concept. You'll find it in just about all digital audio processing.
@AliceErishech2 жыл бұрын
Does that bit about pops and clicks in audio explain why emulators often have a lot of popping and clicking?
@Lemon_Inspector2 жыл бұрын
Well, do you now know why emulators often have a lot of popping and clicking?
@skipfred2 жыл бұрын
I've never noticed this in an emulator, but I would guess if it happens that it's probably more related to the emulator struggling to process the audio quickly enough than anything else. Just a guess though.
@AliceErishech2 жыл бұрын
@@Lemon_Inspector I don't know if this is the explanation or not. That's why I'm asking.
@AliceErishech2 жыл бұрын
@@skipfred It happens on a lot of emulators and often even on powerful computers and when the emulator seems to be keeping up with the game just fine. Interestingly enough, I actually notice it less on emulators for more modern systems.
@Lemon_Inspector2 жыл бұрын
@@AliceErishech If you don't know, then it obviously didn't explain enough.
@digitalhare45162 жыл бұрын
My brain is dumb, but... 11:23 Process go brr
@zoie31092 жыл бұрын
Very cool
@johneymute2 жыл бұрын
If the snes has to skip parts of a sample in order to get beyond the 32khz pitch limit to enable repitch it beyond 32khz, then how does it still sound smooth at it’s original speed and not getting sound like to be shredded???
@intron92 жыл бұрын
1st) Max sound pitch is 15.999 kHz , by the Nyquist theorem. 2nd) it doesn't skip all samples in between, the interpolation process will capture some of those samples and make them weigh a bit in each output sample.
@Aquatarkus962 жыл бұрын
Why do you have 2 completely, but not entirely, identical channels lol?
@johneymute2 жыл бұрын
@@Aquatarkus96 well that’s because when i bought a tablet back in 2012, i couldn’t loggin on youtube so i had to create a second account and that’s why i got 2 channels( i actually got 3 since i somehow accidentally created another account back in 2014 or so, so that’s why.
@magneticflux-2 жыл бұрын
19:26 Just intonation instead of 12-TET? Now my SNES is out-of-tune by 2 cents!
@thezipcreator2 жыл бұрын
it's not "out-of-tune", it's just using a different tuning system. now this is tempting me to make music for the SNES in 17edo...
@cmyk89642 жыл бұрын
If anything, just intonation is MORE in-tune than 12-TET as long as the piece stays in the intended key.
@bootmii982 жыл бұрын
No 0AAE is the correct 12-TET value, 0AAB would be the Pythagorean (just) fifth
@ricarleite6 ай бұрын
How did they architecture all of this in less than 2 years?
@thewhitefalcon85392 жыл бұрын
Alternate title: sound chip go BRR
@jco9972 жыл бұрын
Unrelated but, how could someone implement a N-point gaussian interpolation on a 1 bit (DSD) signal? Imagine I have a 1 bit sample and I need to change its pitch rate. I assume that any method, either explicit or internally, converts that signal into a N-bit PCM signal, and then perform the interpolation.
@Aquatarkus962 жыл бұрын
You're perhaps more right than you know AFAIK, there is no way to natively change *anything* about a DSD stream, not the the pitch or even the gain, without conversion to PCM. Theres like one DAC that claims to be able to do it, but they don't disclose their methods and I don't understand mathematically how they could change anything about that stream without some demodulation....
@MaNameizJeff2 жыл бұрын
no doubt an amazing trove of information. I do miss though that in the past you used plenty of actual game sprites and animation to visually show what you are describing. I find the lack of using any ongoing audio sample examples just makes the video far less entertaining.
@dreamywise88182 жыл бұрын
brr samples goes brrrrr
@alejandroalzatesanchez2 жыл бұрын
Finally :D
@jansenart02 жыл бұрын
PCM go BRR
@redstonewarrior01522 жыл бұрын
SNES sound chip go BRR
@elinimitable89322 жыл бұрын
we know SPC700 is the heart of SNES, but we all dream of a SNES with Yamaha FM synthesis pure sounds chip built-in like the Genesis that has like a Sound Blaster inside
@ssg-eggunner5 ай бұрын
You can simply sample fm patches if adsr values deconstructed are reconstructed The issue is ARAM
@johneygd2 жыл бұрын
So the snes does contain 3 filter modes ? Also i wonder that if the snes has to play a sample faster or slower to change a pitch, then how could it maintain the same speed of a sound sample?? Or what if you want to play a sample slower or faster, then how does the snes maintain it’s original pitch???? BTW i tout that 32khz more has to do with sample rate but not with pitch , And if the snes can only reach a full chromatical scale of all the pitches by skipping those parts inside a sample in order to get past that 32khz limit if needed,then how could it still play those samples at full length’s??? It just sounds all weird to me with no logical sense,all the hard things they tried to get around things just to be enable cut corners wherever they could,just unbelievible.
@renakunisaki2 жыл бұрын
You can't play a sample at a different speed but the same pitch, without some kind of complex "stretching" algorithm. What you _can_ do is play the samples at the same speed but for different amounts of time, to get music in a different tempo with the same pitch. Each sample is a very short recording of something like a single note played on an instrument, so changing the tempo is like playing the instrument faster or slower. You still play the same notes but you switch between them faster.
@johneygd2 жыл бұрын
@@renakunisaki so in other words, the snes cannot change the pitch of a sample without speeding it up or slow it down and the snes can also not changing the speed of a sample without changing it’s pitch right?? If so then that means that for a full chromatical scale of pitches for each instrument, that means that each instrument needs to be recorded at a different pitch wich would only take extra space on the cartride wich i consider very very dummy especially for 1990 when memory was expensive plus back then they couldn’t yet swap samples in & out of the 64KB audio wich means that they had to store all those wanted samples per song into that 64KB ram including those instructions and optional echo ,what were they thinking?,why could they not have just made the snes soundchip just more flexible with more audio ram,sure costs played also a big role in this but they could,ve saved on cartride space instead if the snes soundchip just was a bit more flexible☹️☹️☹️
@3dmarth2 жыл бұрын
@@johneygd From the listener's perspective, it doesn't usually matter much whether the samples are speeding up and slowing down, as opposed to a fancy time-stretch solution. Aside from certain percussion and sound effects, it's rarely noticeable. Yes, to properly represent the full scale, and to have it sound _really_ good, a separate recording would need to be made for every note- but that's only for high-end stuff, and you're not going to come across that in video games, especially not games from 30 years ago. SNES games just change the speed (or maybe use one sample for high notes and another for low notes, in a few cases), which works fine. As a listener, I imagine you'll notice the limitations of small ROM sizes and over-reliance on cheesy stock samples, long before any oddities from speed-shifted samples start to bother you. Considering how old the SNES is, I think its sound hardware is impressive, and it would've been hard to improve it much without raising the cost (though I seem to remember someone pointing out that the Sega CD's Ricoh chip was cheaper, and did most of the same stuff). But there's only so much that could have been done. The only thing I'd really criticize is the CPU. The manufacturing costs of all those enhancement chips (which Nintendo already started to use from day 1) must have significantly outweighed the cost savings of using a weak CPU.
@dimitribottjen24952 жыл бұрын
Yeah, the super Nintendo really does make sounds
@LeviathanRX2 жыл бұрын
Hehe K-On! register makes SNES sound samples go BRR
@CraftMine10002 жыл бұрын
Samples go brrrr
@heterodoxagnostic80702 жыл бұрын
SNES go Brrrrrr.
@JamesLewis22 жыл бұрын
SPC700 go BRR
@CoderQC2 жыл бұрын
By the way, hearting and pinning comments increase likelihood of more new people watching your video.
@crushermach32632 жыл бұрын
Who here misread the title and thought this was a creepypasta about an abandoned factory with moving graffiti at first? lol