Friday, September 11, 2009

Tuning the YM2413 Drums

I have added support for the 'rhythm / drum' mode of the YM2413 chip for the Sega Master System MIDI interface. The SN76489 is mapped to MIDI channels 1 - 4. The YM2413 is mapped to MIDI channels 5 - 13. Normally, the YM2413 has 9 identical, pitched channels. However, the chip also has a mode whereby the resources that make up channels 7, 8 and 9 can be used to form five simultaneous percussive sounds.

Yamaha recommends a predetermined frequency setting for each of the operators that constitute the percussion when in drum mode, but these preset frequencies can sound quite bland and boring. Instead, the mapping that I have chosen using channel 14 to actually trigger the sounds.

Any C received on channel 14 will trigger a kick drum sound. Any D received on channel 14 will trigger a snare drum sound. Any E received on channel 14 will trigger a tom sound. Any F received on channel 14 will trigger a cymbal sound. Any G received on channel 14 will trigger a hi-hat sound.

However, because these sounds are made using the operators that normally make up channels 7, 8 and 9, its still possible to tune the operators to a certain degree by simply sending MIDI pitches to MIDI channels 11, 12 and 13. This then essentially 'tunes' the drum sounds, giving a wider variety of sounds, and even the possibility of playing melodies using the percussive sounds (or at least playing some role in the harmonic structure of a work).

Have a quick listen to an example here: http://milkcrate.com.au/_other/useless/YM2413%20drums.mp3