Page 1 of 2

Yamaha internal waveform info

Posted: Fri Apr 25, 2008 2:12 am
by tomaitheous
Hey guys,

Not sure if this is the correct forum (or place) for this, but I'm looking for the resolution and length of the internal sine wave used by the YM2612, OPL2, and some other Yamaha FM chips. I *think* I remember TmEE mentioning the 2612 had a 9bit resolution on the sine wave, but no mention of length.

Also looking for more info on phase distortion synthesis by Casio. This is for a synth emulation project on a non PC platform.

Thanks,
Tom

Posted: Fri Apr 25, 2008 10:42 am
by TmEE co.(TM)
AFAIK, the sampling rate is around 52KHz (53203424(PAL) / something), accuracy 9 or 10 bits on discrete Yamaha YM2612 and about 12 bits on Sega internal YM2612. The bit count is an estimate, which I estimated by listening the amount of aliasing noise produced and comparing with WAV files degraded to some bit count.

OPL2/3 is 49KHz... I don't know about accuracy, it can't be less than 12 bits I think, my sound card sound very clean.

Posted: Fri Apr 25, 2008 2:11 pm
by tomaitheous
TmEE co.(TM) wrote:AFAIK, the sampling rate is around 52KHz (53203424(PAL) / something), accuracy 9 or 10 bits on discrete Yamaha YM2612 and about 12 bits on Sega internal YM2612. The bit count is an estimate, which I estimated by listening the amount of aliasing noise produced and comparing with WAV files degraded to some bit count.

OPL2/3 is 49KHz... I don't know about accuracy, it can't be less than 12 bits I think, my sound card sound very clean.
Hmm but that doesn't tell me anything about the digital sine waveform stored on the internal rom. Couldn't you silence all but one channel and silence all but one operator to get a clean/unmodified carrier output? Setting it to some like 40-80hz and record that. One could figure out the length of one the sine wave and possibly the resolution of it (assuming the DAC is equal or higher res than the internal waveform). That or decap the chip.

Posted: Fri Apr 25, 2008 7:33 pm
by TmEE co.(TM)
OK, I'll run some tests when I've finished my exam tomorrow.

Posted: Sat Apr 26, 2008 3:36 am
by tomaitheous
TmEE co.(TM) wrote:OK, I'll run some tests when I've finished my exam tomorrow.
Awesome :D

Posted: Sat Apr 26, 2008 1:25 pm
by TmEE co.(TM)
I recorded form my MD2 and MD1, and MD2 looks way nicer... I'm waiting when my friend uploads it on his site... I'll give a link when its done.

Posted: Sat Apr 26, 2008 3:09 pm
by TmEE co.(TM)
http://www.epicgaming.us/tiido/MD_Sine.rar

Kindly done by Epicenter :)
Image

I hope this sheds some light on YM2612's internals

Each WAV has 5 or 6 samples in it, First with Total Level at 00h, and each following has it incremented. 0, 1, 2... notice how the wave gets better with lower TLs... and they should be 27.5Hz...

Posted: Sat Apr 26, 2008 3:39 pm
by Sik
Is it me or the MD1 fails to do the peaks properly? Also it seems to have a lower volume.

Posted: Sat Apr 26, 2008 3:57 pm
by TmEE co.(TM)
The graph of MD1 is bigger than MD2.... and I recorded the sound both having about same level. and MD1 does have bad peaks, on all TL values.

Posted: Sat Apr 26, 2008 5:10 pm
by Shiru
This recordings was taken directly from YM2612 output or from amp output?

Posted: Sat Apr 26, 2008 5:38 pm
by TmEE co.(TM)
directly

Posted: Sat Apr 26, 2008 6:54 pm
by HardWareMan
TmEE co.(TM) wrote:directly
So, that's means it is not true signal. Because YM2612's output more complex - all 6 channels is separated in time with gaps between them. The channel change speed is about 120kHz, so one channel discretization is about 20kHz. If you got normal oscilloscope, please make a record YM2612 output at 120-200kHz samplerate.
I had made very deep analysis of analog output of YM2612 at one russian forum, but now this forum is dead. I can rebuild that job, if you want it.

Posted: Sat Apr 26, 2008 7:15 pm
by TmEE co.(TM)
Unfortunately I have no access to oscilloscope... actually my friend has one, 2ch 50MHz, but its non digital and I have no idea how would I record its output... my sound card can record at 500KHz(according to chip datasheet) but Win drivers don't allow it...

It would be nice if you rebuild your job. MD1 and MD2 sound different, MD2 seems to have more accuracy (less aliasing noise) and better sine output (at least according to the recordings above)... MD1 used is same what HardWareMan has, just less modded.

Posted: Sat Apr 26, 2008 7:57 pm
by Sik
The different peaks are enough to make it sound more aliased. Those sudden changes make it sound like noisy, in fact sudden changes are the reason for clicks in sounds.

And I think you should take a photo of the oscilloscope output :P

Posted: Sat Apr 26, 2008 8:17 pm
by Shiru
Such small and same changes can only change timbre slightly, they can't make clicks or noise - they have same frequency like carrier tone.