SNES audio

Discussion in 'Technical Discussion' started by JaredAFX, Jul 30, 2013.

  1. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,898
    35
    28
    USA
    rom-properties
    Worse: It's PWM, not PCM. That's why so many games have horribly scratchy music.
     
  2. Flygon

    Flygon

    Member
    Doesn't the DS also use PWM? Or have I been wrong all these years?
     
  3. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    GBA CPU is dedicated to sound management in the DS. The scratchiness in GBA games has exactly the same reasons why most MD games have shit PCM - inability to maintain jitter free sample playback.
     
  4. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
    The Gameboy can be made to sound like the FDS or 2A03, but it is an entirely different beast. The two are extremely different, considering the Gameboy has only three (technically 4) pulse width options, a FM-like subtractive synth waveform channel which can also do low-fidelity WAV file playback, and a noisechannel that is very different from the one of the NES. Also, the NES saw various expansion chips and enhanced audio options, the Gameboy saw (and to this day, but that may change in the coming year) no audio expansion.

    On the topic of the SNES not being "chipmusic," the deal with it is that a) it isn't really capable of synthesizing its own sounds b) it plays back and manipulates exclusively samples. Despite the Amiga computers being very popular with sample-based music, they can (and still are) used to synthesize unique sounds to the hardware. Aside from the playback means, the SNES is currently "useless" chipmusic production hardware because of its history as being sample-only, the CPU architecture being a bit difficult to work with (8 bit processor and 16 bit addressing and registers is not "smart"), and being a mainly sample-based machine, it is easily outclassed by Amigas and other sample-friendly family computers from the 80's.

    The real question to ask is: is chipmusic simply music made from specialized sound chips that generate waveforms? Or is it music made from teeny tiny samples on chips, cassettes, and other small-storage medias? Yes. Is SNES in line with the NES, Gameboy and Genesis? No. The SNES bridged an interesting gap along with the N64 and PSX between the end of tracker-or-MIDI generated music and the playback of actual recordings, like highly-capable Amiga music and other sample-oriented computers.

    EDIT: I guess it's worth mentioning that I am an undergraduate student studying composition and I am working with a professor on a research project that includes chipmusic under its umbrella topic "computer music." It may be also worth mentioning that I have been making chipmusic actively for 3 years and I have spent 1 year learning assembly language quirks for Gameboy and NES. And I am a fairly active LSDJ user. If you have questions about Nintendo hardware let me know.
     
  5. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    Amiga has no synthesis capability, all the synthesized stuff there is done by softsynths and those you can do an any machine capable of running a user program, even on SNES (but it is much harder than on Amiga, but still possible).
     
  6. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
    Thanks for stating those points, those were somewhat glossed over in my post. Correct, there is no true hardware-based synthesis with the Amiga family, and yes, soft synths for the SNES could exist but are unlikely to ever be made (due to lack of demand and programming difficulty).
     
  7. dsrb

    dsrb

    Member
    3,149
    0
    0
    Can you explain what you mean here? Maybe it's technically accurate somehow, but right now, it just looks like a bunch of disparate terms mashed together in a way that makes no sense whatsoever.

    Firstly, FM is very different from subtractive, so I'm not sure what equivalence you're trying to paint there. And as far as I knew, the GB's third channel was simply a low-res PCM channel (not WAV, and people need to stop implying the two are equivalent), nothing more, with the fact that it's often used for triangle bass not implying any real subtractive nature.
     
  8. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    0
    0
    Writing my own MD/Genesis sound driver :D
  9. Chilly Willy

    Chilly Willy

    Tech Member
    746
    0
    0
    Doom 32X
    Actually, it does. Channel 0 can modulate either the volume or frequency of channel 1, and channel 2 can modulate either the volume or frequency of channel 3. Now those were meant to allow tremolo or vibrato, but can and have been used for more than that. The primary use turned out to be modulating the volume at the SAME FREQUENCY as channel being modulated - that allows the volume to be changed at the exact same time as the sample, allowing for higher resolution on the sample (14 bits raw, but those other 6 bits are non-linear... if you adjust them, it's between 12 and 13 bits effective). Most music players allow for using the Amiga sound that way. So do some games and emulators.

    And for others, there's nothing inherently bad about PWM. The vast majority of DAC are a combination of resistive ladders and PWM as making a ladder for a full 16/18/20-ish bits requires resistors of too high a precision. So you make a smaller ladder and feed that to a PWM circuit to make the full resolution of the DAC.
     
  10. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    I forgot about the modulation part, but its not really capable - you waste a whole channel on something that you can record and use as a sample on 2 or more channels :P.
    Best use is what you described though hehe.
     
  11. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
    It is a WAV channel. It plays back uncompressed WAV files, it can also do synthesis that is additive or subtractive, it depends on how you construct your waveforms. You can do many kinds of waveforms (sine, saw, square, with filters such as highpass, lowpass, resonance, bandpass, etc) and cycle through frames of waveforms. You can also modify cutoff, phase, playback speed, looping, and vertical shift of the waveform. This allows for all kinds of colorful sounds similar to FM.

    It's definitely not just triangle bass or PCM, you can do some crazy things with the WAV channel.
     
  12. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,898
    35
    28
    USA
    rom-properties
    Here's a hint: Uncompressed WAV *is* PCM. Calling it a "WAV" channel just makes you look like a brainwashed Microsoft lacky who thinks Microsoft invented everything.

    The fact that the PCM channel has modulation effects doesn't mean it's "WAV" format. It means it has modulation effects.
     
  13. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    0
    0
    Writing my own MD/Genesis sound driver :D
    GB channel 3 plays a loop of 32 4-bit samples (appears to be PCM, but pandocs is unclear) at various frequencies and four volume levels.
     
  14. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
  15. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,898
    35
    28
    USA
    rom-properties
    "Wave" there refers to waveform. It does *not* refer to the Microsoft WAV format.
     
  16. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    Mr. Astley is right here.
     
  17. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
    Rereading on what a wav is, I now agree as well with Rick.

    Sorry for derailing the thread.
     
  18. dsrb

    dsrb

    Member
    3,149
    0
    0
    "similar to FM", ehhh maybe through intentional simulation or coincidence, but it's not at all FM-like by nature. It's just (as myself and, in more depth, GerbilSoft already corrected) a PCM channel.

    Similarly, calling it "subtractive" or "additive" is also incorrect since it's simply a PCM channel. People can simulate other types of synthesis using samples, and do it all the time, but that's all it is: simulation. For it actually to be subtractive, it would have to offer its own, separate (read: not built into the sample/s or on the global outputs) filter and whatnot. For it to be additive, it would have to offer multiple sine oscillators to create a composite timbre from scratch. And so on.

    I think this illustrates the dangers of only half-knowing what one is talking about.
     
  19. Maxd

    Maxd

    Member
    661
    0
    0
    Alabama
    Mixin'
    Perhaps, along with the dangers of going off of old homebrew docs from 1998 that were also incorrect. And the main reason I say it is "additive" or "subtractive" in nature as those are the most common kinds of synthesis you see in games and homebrew. And there are filters for the PCM channel alone, not sure how well it qualifies as being "subtractive" that way. It *can* be additive in nature through manipulation of resonance and high-vibrato (pitch bend) commands that act as oscillators. Combine that with a trick that causes the channel to play to multiple sine waves at once and you have not-quite-real-but-close-enough additive synthesis. But enough of me trying to validate my hacky workarounds, you are correct that at its core it is a low-quality PCM channel, and unless it is pushed to extremes it's basically a triangle wave and sample playing channel.
     
  20. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    0
    16
    Estonia, Rapla City
    T-04YBSC-A !
    Your computer has a timer driven DAC to create a PCM channel as the sole sound hardware. When you listen some kind of music that plays synth stuff or run some music program that does a softsynth it does not make that PCM channel any kind of synthesizer, its still a PCM channel. Well, there's also a filter attached to that channel, to kill all freqs that the sample rate is not supposed to allow to be produced.