don't click here

Sound effects are made how?

Discussion in 'Engineering & Reverse Engineering' started by elvisish, Sep 25, 2018.

  1. elvisish

    elvisish

    Member
    6
    1
    3
    I've always been curious how the sound effects were programmed, I understand the opl chip produces the sounds in the same way the music is played, but the sound effects are quite complex by comparison to the music tones. How are, for instance, the rings sounds programmed? How is the spring sound made with the bend? What's going on under the hood if I wanted to recreate these with an opl vst for instance?
     
  2. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    The ring has two SFX slots, each one has a bell sounding instrument playing three notes in succession upwards in pitch, the first is panned to the left speaker and is set to channel 4, the second is panned to the right speaker and is set to channel 5. Internal code suggests them to play in alternation of each other each time the SFX is requested. This allows the ring sound to play left, then right, then left, etc. Them interrupting different channels allows the left to keep playing while the right one can trigger.

    The spring is relatively simple, being a low pitched vibrating sound similar to a guitar sounding instrument, there is a modulation flag (LFO (To clarify, software FM based LFO not the hardware specific LFO before someone tries to act smart and correct me)) for raising/lowering the pitch without triggering the key on. This is used to bend the sound upwards, it'll then hold a single note whilst reducing the volume to make it sound as though it's fading out quicker than the instrument initially intended.

    I have composed a video here of the SFX and the channels used, their notes can be seen, as well as the bending, and the volume by the transparency:

    http://www.youtube.com/watch?v=ZHcQ3-L026A

    Hopefully this will serve to solve a few of the curious questions you may have had.
     
  3. elvisish

    elvisish

    Member
    6
    1
    3
    Wow thank you, that is incredibly useful! I didn't realise they were dependent on actual notes as much as they are, that explains why the soundfx still seem somewhat musical, even if the harmonics or pitch-bend tricks morph them out of all musical recognition, there's still an underlying musical triggering method. So, sounds like the badnik breaking sound, sonic losing rings or skidding are just either clever harmonic clashes, noise waves mixed in with them or other atonal tricks? What else is going on under the hood with some of these in regards to the modulation, bending and such? Some of the patch rips are interesting when thrown into a megadrive opl vst, but even with playing similar notes they sound quite stale but comparison to the game, as if there's some more complicated lfo or fm "automation" happening.
     
  4. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    Well, some tricks involved, such as the pinball bumper, the "ooh" sounding instrument on its own sounds quite flat. However, to give it more of a dynamic sound, they used two channels to play the same instrument, same note, same volume, so the sound is produced twice, but one's frequency/pitch is detuned slightly up/down to create a phasing effect. Here is a recording of all channels of the pinball bumper as individual channels and then together. You'll notice the first two sound similar, this is the "oohing", the third sound is them both together.

    It is possible to detune a single instrument as the operators have detune themselves, the SFX was an example of detuning the frequency, though detuning the operators could (if done in the right way) produce the same sound, here is a recording of an attempt of the "oohing" sound as a single instrument.

    Many sounds (in Sonic especially) use modulation to influence the frequency/pitch up and down to give certain effects, such as the collapsing platforms. This a realtime alteration of the frequency, raising and then dropping it in a linear fashion by software, again, it's not the instrument itself that's responsible for this. This causes an LFO FM vibrato effect in a triangle wave fashion. Many sound effects will use the modulation to move the pitch in one direction, and then stop and hold the note before it reverses direction, such as the spring, or stopping outright as it reaches a point such as the jumping SFX (despite being PSG of course).

    Some channels are set to play on specific speakers to give more depth, the collapsing platforms do this, a central channel, a left channel, and a right channel. The PSG does play its role quite importantly in some of the SFX, as you could probably tell from the video, so not all of it is YM2612 specific.

    Majority of sounds are a combinations of several factors, some hardware controlled by the YM2612, some software controlled by the CPU giving the YM2612 its data. Some instruments can be made that the chip does not do naturally, the YM has a fixed system of; attack, decay, sustain and release (as I suspect you already know), but with software, the total volumes of each operator can be altered in realtime to achieve envelopes not possible naturally. It is possible that some sound drivers for the Mega Drive may have delved into this territory. So the point is, in order to "emulate" some of these SFX you will require control to the YM2612 that the YM2612 alone will not do normally.
     
  5. Hez

    Hez

    Oldbie
    There a tool to utilize this to make new sound effects? That'd be sweet.
     
  6. Lostgame

    Lostgame

    producer/turnablist. homebrew dev. cosplayer. Oldbie
    4,134
    58
    28
    Toronto, ON
    The O.I.C.
    There's a lot of similar FM synth VST plugins for DAW's based on the same chip. I believe if you synthesized a sound in one of those and then manipulated the data to be similar somehow, you could do so, certainly.
     
  7. elvisish

    elvisish

    Member
    6
    1
    3
    Just wanted to thank @MarkeyJester again for the incredible video he posted, I keep referring back to it so much for ideas when making new sounds, it's invaluable!

    The one thing I haven't quite figured out is how to extract the individual sounds from the game for reference (as seen in the video, it cycles through each separate sound) but I've been playing around with individual instruments like cellos and hihats and just learning how to manipulate them with the various operators on the device (fmDrive is extremely good for this once you get going with it).