Extreme High Quality Sound Emulation

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

r57shell
Very interested
Posts: 475
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Thu Mar 06, 2014 8:12 pm

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?
Image

User avatar
TmEE co.(TM)
Very interested
Posts: 2286
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Mar 06, 2014 8:15 pm

YM + (PSG / 6) seems to be roughly what most machines have going on. MD2 VA2 has much quieter PSG compared to others for example.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

r57shell
Very interested
Posts: 475
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Thu Mar 06, 2014 8:35 pm

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.
Image

User avatar
Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Fri Mar 07, 2014 4:14 pm

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.

User avatar
Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Fri Mar 07, 2014 5:08 pm

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.

r57shell
Very interested
Posts: 475
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Fri Mar 07, 2014 5:17 pm

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
Image

foobat
Very interested
Posts: 92
Joined: Fri Sep 14, 2012 1:06 pm

Post by foobat » Sat Mar 08, 2014 10:51 am

"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.

Gigasoft
Very interested
Posts: 88
Joined: Fri Jan 01, 2010 2:24 am

Post by Gigasoft » Sat Mar 08, 2014 4:28 pm

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.

User avatar
Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Sat Mar 08, 2014 5:05 pm

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.

User avatar
Aly James
Very interested
Posts: 74
Joined: Sun Mar 31, 2013 11:34 pm
Location: FRANCE
Contact:

Post by Aly James » Sat Mar 08, 2014 9:23 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests