3.25.2013

Make the SEGA GENESIS Talk : CSM control

Finally I have made it :)
For the final stage of development of my sega genesis sound chip emulator F-MDRIVE 2612 Vsti, I was trying to give more usable control of this speech synthesis thing aka CSM mode.
Now we can :
  • Control the 3 supplementary YM2612 CH3 frequencies and separate key on/off my different MIDI channels(MIDI channel 11,12,13). pitch bend included
  • CSM on/off is internally controlled by key on/off to bypass the original behavior.
  • Timer A speed can now be controlled by MIDI notes !(MIDI channel 14).pitch bend included

So it means that combining 4 MIDI channels of control we can change the formants and tone and keep control over the actual frequency with Timer A tied to MIDI notes. (in the limit of timer A speed, still there is a quite usable range!)
The CSM mode could now be used to make some robot vocal noise, talk or play notes with formant control over the sound...kind of virtual robot singing tone ^^

If the user find a way to make a word it is easily saved or reloaded just by saving the appropriate MIDI channels in the project. This way one could save some "words midi data" and use them again in another project.

I recorded a raw preview of this as i was testing it in ableton live...
(also a snippet of the DAC custom waveform..)
Next I will post the full specs of the F-MDRIVE 2612 Vsti.
It should be out in 10 Days more or less for people who already knows about the baby and a few weeks after for the rest of the world.
Keep watching the news.
++

3.22.2013

Music, Experiment & Audio Dev : SEGA YM2612 CSM Speech synthesis

Music, Experiment & Audio Dev : 

SEGA YM2612 CSM Speech synthesis

This is going to be a simple blog where I will share some news, infos and how-to regarding my funky adventure in the world of Synthesis, Signal Processing, Vintage Hardware Emulation, DIY Electronics audio projects and things..
I can answer or post some help in french when I am around if needed :)

Actually, I am about to release a VSTi Emulation of the SEGA MEGADRIVE/GENESIS CONSOLE SOUND CHIP, aka YM2612. The Software is called F-MDRIVE2612.

I will post everything about that when it will be out!

For a start;
here is some infos on programing some writes to the SEGA MEGADRIVE YM2612 fm sound chip.
In order to test the infamous CSM mode aka "Composite Sine Wave Modeling" or "Speech Mode"
There is not much information regarding this technique and it was barely used in past sega megadrive games,
I can even say never.. why? because it is quite hard to program from scratch...well we will see.

You will need: (google it)
  1. -Basic C++ knowledge
  2. -SGDK (to program a rom binary file for the SEGA MD)
  3. -IDE: Codeblocks

A good understanding of how the ym2612 works ( see the link below for a start.)

--------------------------------------------------------------
HOW TO WRITE TO YM2612 : PART1  //SET THE TIMER
--------------------------------------------------------------
//REGISTER MAP http://www.smspower.org/maxim/Documents/YM2612

//ym2612 mode selection
// disable timer & set channel 3 to normal mode
    YM2612_writeSafe(0, 0x27);
    YM2612_writeSafe(1, 0x00);

// disable timer & set channel 3 to special mode
    YM2612_writeSafe(0, 0x27);
    YM2612_writeSafe(1, 0x40);   

// enable timer A & set channel 3 to csm mode
    YM2612_writeSafe(0, 0x27);
    YM2612_writeSafe(1, 0x81); 

The CSM mode will perform auto KEY ON/OFF at Timer A speed.
First test with only one Operator OP4 (C2) Carrier/ Channel 3.

The frequency of the sine wave and the rapid phase sync by timer A will act as a kind of filter to emphasis certain frequencies.
Using different frequencies (SUP CH3 FNUMBERS) for each OP with appropriate timing and different TL (volume), it becomes some vocal formant synthesis, you define f1, f2, f3...(google formant)

In this mode you can also mask certain Operator in sequence to produce interesting effects.
Last but not least with appropriate programing you can sort of play the timer like a series of notes.
Timer A period ms>> to hz >> to note.
ex: Timer A = 18.4ms = 54.347826087 hz, near 55 hz  note A octave 0 for the lowest period (NTSC)
for the (PAL) megadrive the Timer A is closest to 19.4ms (G# /Bb).


Registers 24H and 25H are ganged together to form 10-bit Timer A, with register 25H containing the least significant bits. They should be set in the order 24H, 25H.
The timer lasts:
                       18 × (1024 - Timer A) microseconds

Timer A = all 1′s -> 18 µs = 0.018 ms
Timer A = all 0′s -> 18,400 µs = 18.4 ms

Registers 24H & 25H - Timer A
            D7     D6     D5     D4     D3     D2     D1     D0
24H     Timer A MSBs
25H                                                               Timer A LSBs 

// set timer A to the longest period for csm mode test
   

    YM2612_writeSafe(0, 0x24);
    YM2612_writeSafe(1, 0x00);  //8Bit from 0x00 to 0xFF
    YM2612_writeSafe(0, 0x25);
    YM2612_writeSafe(1, 0x00);   //2Bit from 0x00 to 0x03
//example values:
                  24 0xFF 25 0x00 = 1020
                  24 0xF0 25 0x00 = 960
                  24 0x78 25 0x00 =480