Some beginner questions concerning YM2612

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

Moderator: BigEvilCorporation

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

Re: Some beginner questions concerning YM2612

Post by TmEE co.(TM) » Mon Apr 29, 2019 2:15 am

Most of the info is found in this post and this thread in general : viewtopic.php?p=5716#p5716
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

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Some beginner questions concerning YM2612

Post by tryphon » Mon Apr 29, 2019 8:53 am

THANK YOU !

I knew this thread, but since it's very technical (and, as I said before, I have absolutely no knowledge in music nor FM synthesis - and generally speaking very few when it comes to hardware), I progressed slowly in reading it and hadn't come to this post. I have to digest all the informations, but it seems to answer most of my questions about Envelope (envelop? enveloppe ?) Generator !

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Some beginner questions concerning YM2612

Post by tryphon » Wed May 01, 2019 8:35 am

Something I can't find in the above thread (but it may have overlooked it) :

In the Envelop Generator, how is the attenuation initialized in the attack phase ?

is it 1023 ? if so it means that if TL isn't 0 dB (maximal volume), then operator will remain silent for some time ?

or is it initialized at TL ?

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

Re: Some beginner questions concerning YM2612

Post by TmEE co.(TM) » Wed May 01, 2019 8:46 am

There is no initialization, the attack begins wherever last state left off. Only way to get maximum attenuation is to wait out the envelope, using fastest release to reduce the time needed. Only on chip reset the internal attenuation is at max attenuation, once first note begins all bets are off.
Last edited by TmEE co.(TM) on Wed May 01, 2019 11:58 am, edited 1 time in total.
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

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Some beginner questions concerning YM2612

Post by tryphon » Wed May 01, 2019 9:50 am

Stupid me. Of course it makes sense ! Thanks :)

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Some beginner questions concerning YM2612

Post by tryphon » Thu May 02, 2019 4:03 pm

Another question : when I translate decibel coordinates to linear ones (whatever they are), I did :

attenuation_in_dB = 10*log(I_max/I)

where I is my linear amplitude and I_max the maximum amplitude (since I use 16 bits integer, I_max = 32767), which led to :

I = I_max*10^(-attenuation_in_dB/10) = I_max*10^(-attenuation*9.6/1024)

where attenuation is the attenuation computed by the envelope generator.

Am I right ? Because if so, it means that any value of attenuation >= 482 results in an amplitude of 0...

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Some beginner questions concerning YM2612

Post by Sik » Thu May 02, 2019 4:15 pm

Isn't decibels-to-linear something like pow(2,dB/6)? (in the case of attenuation the decibels would be negative) That returns a multiplier (in floating point), mind you, but should give you a clue of where to go.

I may or may not be misunderstanding your question.
Sik is pronounced as "seek", not as "sick".

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Some beginner questions concerning YM2612

Post by tryphon » Thu May 02, 2019 4:40 pm

Your formula is an approximation of mine (with a division by 3 rather than 6, unless I missed something, like efficace value or something like that, which is quite possible).

10^(db/10) = (2^1/log(2))^(db/10) = 2^(db/(10log(2))

and 10log(2) = 3.0103...

Unless the true formula is 10^(db/20) ?

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: Some beginner questions concerning YM2612

Post by Chilly Willy » Thu May 02, 2019 8:08 pm

This page seems pretty good to me.

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Some beginner questions concerning YM2612

Post by tryphon » Thu May 02, 2019 8:31 pm

So, according to this page, it seems that in audio we use the dB for tensions (why ?), which is different (why ?).

So it's indeed 10^(dB/20), which indeed equals roughly 2^(dB/6).

Thanks :)

Post Reply