Page 2 of 2

Posted: Thu Mar 06, 2014 8:12 pm
by r57shell
Mixers can be different.
Ok, then I ask in different way:
Total = x*YM2612 + y*PSG
where x, y some constant and YM2612 and PSG is chips output.
Is it correct?

Posted: Thu Mar 06, 2014 8:15 pm
by TmEE co.(TM)
YM + (PSG / 6) seems to be roughly what most machines have going on. MD2 VA2 has much quieter PSG compared to others for example.

Posted: Thu Mar 06, 2014 8:35 pm
by r57shell
Can you please test this rom:
http://elektropage.ru/r57shell/madtest.bin
Don't be scared from such distorsion :D
It was weird for me.
It's ALGO 0 with first slots much less release rate than attack.
They still "rotating" during key off at high levels.
I just wondering, is it supposed to work in that way?
Because it's such pain in ass to somehow reset attenuation to HIGH (lowest volume) of frequency molulator, before key-on of other instrument or same.
It's just weird for me.

Thanks for PSG info.

Posted: Fri Mar 07, 2014 4:14 pm
by Aly James
If it can help,
Here is the same thing recorded in mono (only FM);
Original Megadrive model 1 Headphone filtered output:
MD1
Original Megadrive model 1 Direct YM2612 (output pins) unfiltered output:
MD1 YM2612 PIN DIRECT

As Tiido stated you can clearly hear some simple lowpass filtering.
Also note the classic DAC "ladder effect" which is no more present in the later ASIC version of the soundchip.
btw, this happens EVEN if the FM voice is muted.

Posted: Fri Mar 07, 2014 5:08 pm
by Aly James
r57shell wrote:Can you please test this rom:
http://elektropage.ru/r57shell/madtest.bin
Don't be scared from such distorsion :D
It was weird for me.
It's ALGO 0 with first slots much less release rate than attack.
They still "rotating" during key off at high levels.
I just wondering, is it supposed to work in that way?
Because it's such pain in ass to somehow reset attenuation to HIGH (lowest volume) of frequency molulator, before key-on of other instrument or same.
It's just weird for me.

Thanks for PSG info.
Yes this is normal behavior, the attenuation will be reset only if it has a proper key off and the notes are not close to one another, if not the attenuation will start to the point where it was before the new key on occurs.
Try to decrease the release time in your example and you will see that the attack will be reset correctly.

Posted: Fri Mar 07, 2014 5:17 pm
by r57shell
Aly James wrote:Yes this is normal behavior, the attenuation will be reset only if it has a proper key off and the notes are not close to one another, if not the attenuation will start to the point where it was before the new key on occurs.
What means "proper key off"? I know only one key off: 0x28 register 4 highest bits all to 0.
Aly James wrote:Try to decrease the release time in your example and you will see that the attack will be reset correctly.
Yes, but assuming if my driver is changing instruments frequently, it can't guarantee that release rate is enough to reset volume to lowest, when I change instrument. So I can get unexpected behavior when some instrument with low release rate was changed to some instrument that assume all TL at lowest volume at start of KEY ON event.
I hope you understand.
Aly James wrote:If it can help,
Here is the same thing recorded in mono (only FM);
It would help better if we have rom :S

Posted: Sat Mar 08, 2014 10:51 am
by foobat
"Proper key off" as opposed to decay/sustain expiry.

There comes a point after which you start getting limited returns. The MegaDrive is kind of noisy, and it's hard to get perfect output from a real ym2612 in the first place (ask me how I know, I was working on an amplifier and a mixing circuit to combine 2 of them operating off of the same oscillator all night). Even if you emulate to theoretical perfection your speakers, the room your in, ground loops in your computer case, etc. are going to filter the output. Close enough is close enough, and if it's not go get some hardware.

Posted: Sat Mar 08, 2014 4:28 pm
by Gigasoft
Yes, but assuming if my driver is changing instruments frequently, it can't guarantee that release rate is enough to reset volume to lowest, when I change instrument.
The attenuation is reset automatically regardless of the release rate setting, as long as you have enough spacing between key off and key on. In my sound code I also set all the SL/RR registers to $ff a little while before a new note starts, to avoid a 'pop' as the attenuation suddenly resets.

Posted: Sat Mar 08, 2014 5:05 pm
by Aly James
What happens is that the Phase is reset during KEY ON but not the current attenuation level !
That means that although you KEY OFF with all 4 bits to 0 , the attenuation will start where it was.
This simply because when you KEY OFF you force the envelope to the release stage directly.
The release stage will start from where was the attenuation the moment of KEY OFF and falls down to 0 at RR rate.
In your example you make new KEY ON to fast for your tone settings.

Simply reduce the RR rates so the envelopes find the time to reach 0 again before the next KEY ON if you want the sound starting again at -48 db
that's all :)

PS: if you need the rom for the sound example I have posted, I will dig to find that one in my messy archive ASAP.

Posted: Sat Mar 08, 2014 9:23 pm
by Aly James
r57shell wrote:Yes, but assuming if my driver is changing instruments frequently, it can't guarantee that release rate is enough to reset volume to lowest, when I change instrument. So I can get unexpected behavior when some instrument with low release rate was changed to some instrument that assume all TL at lowest volume at start of KEY ON event.
I hope you understand
Not necessary because the Release rate will also be updated as soon as you change the settings :)
So if you change instruments from a low RR one to a new one with a long attack but a RR of for example 0x0F, the release stage will be updated instantly and your tone will behave like it should with TL at minimum level.

Hope that helps