Notes on YM2612

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

Moderator: BigEvilCorporation

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

Post by Chilly Willy » Fri Nov 02, 2007 7:52 pm

TmEE co.(TM) wrote:Well, I wasn't born "back these days"... :wink: MD was pretty expensive thing, and they cut costs from everywhere (and the sound part makes me REALLY angry !!! I'd kill that guy who designed the mixing circuits in MD !!!) And in my mind, putting a pair quad flip-flops into the chipset and few more comparators wouldn't have made things more expensive than they already were...
Yeah, not much good at analog design, were they? :) The sound circuitry on the Amiga wasn't much better. There were a number of hacks on Aminet to make the sound better.

A FIFO is more than a few flipflops and comparators, but it doesn't matter. In the end, they took the simple route of just stopping the Z80, and that's what we now have to deal with.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Nov 06, 2007 6:19 am

Hey, my friend wants to know if it's possible to properly pitch bend on the 2612, while a sound is decaying.

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

Post by TmEE co.(TM) » Tue Nov 06, 2007 6:24 am

Yes it is.
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

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Nov 06, 2007 6:35 am

She can't get it to work, or find documentation that shows how it's done.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Tue Nov 06, 2007 6:52 am

You say strange things. Without this knowledge it's impossible to make any notes at all. Registers A0A4+ defines base frequency of channel, these changes applies immediately.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Nov 06, 2007 6:57 am

Simply put, we want the note to pitch bend a whole octave up in 1 second. But smooth.

Then if that register is immediate, I assume we need to make a program then generate a frequency up? The 2612 doesn't just do this automatically?

I don't know how to explain it, I can demonstrate it on my DX7 though, for what she wants.

EDIT: This is what's wanted:
http://blackevilweredragon.spymac.com/sweep.aifc

I'll just let her say it:
So in other words, it's done the same way, for example, Sonic does the jump sound on PSG? Just sweep the note up like that? I was hoping the 2612 had a function that did this by itself.

I'm used to the PSG, so I know what you mean, ED here isn't familiar with either, so I needed to pitch in on the post.
Last edited by evildragon on Tue Nov 06, 2007 7:12 am, edited 1 time in total.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Tue Nov 06, 2007 7:11 am

evildragon wrote:The 2612 doesn't just do this automatically?
Do you know many soundchips, which do this automatically? I know only one, and that's not YM2612.

Every time when you play new note, you always setup these registers, because they defines note pitch (frequency). If you want to make pitch-bend, i.e. change note frequency by small steps from one note to another, you must change these registers many times per second, changing freq. value from one note to another by small steps, that's it.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Nov 06, 2007 7:14 am

Hey, I'm not a genius on the subject.

She edited her post above btw, comparing the pitch bend to the Sonic jump sound on PSG, which seems to be the same as what you described.

And I do know of a sound chip that can do this, but it's wavetable.

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

Post by TmEE co.(TM) » Tue Nov 06, 2007 4:29 pm

These things could have been figured out immediately... the question is, how accurate can you get... If my memory is correct, there's 14 bits of freq number in YM2612... that's enough for some really nice smooth bends, I think... my pitch bend related effects in my tracker will behave something like so :

note on, store its frequency
.... timing and other things ....
increase/decrease stored freq and output it, how smooth it'll go is up to you...

TL and Freq and Pan can be changed anytime, I'm not too sure about other things, but usually there is no need to mess with them (unless you want some really interesting effect....).

Shiru probably knows more on what you can change anytime and what not.
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

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Tue Nov 06, 2007 4:53 pm

Since it's not music we need the bending on, and on a part of the game we are designing, she needed it to be dynamic, and not static.

So over night, she began writing a routine which will generate so many frequencies between the two notes within a second. Simple mathematics I would assume, so no time wasted.

I haven't contacted her yet to know if it's complete or not, probably not though.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Tue Nov 06, 2007 4:56 pm

TmEE co.(TM) wrote:Shiru probably knows more on what you can change anytime and what not.
I already post about that somethere on this forum. Anything can be changed anytime, but only changes of Frequency, TL, Multiple, Detune will be applied immediately. That also means that you can reduce CPU load in some cases by preloading AR/DR/etc before it's actually needed. These changes will be applied after next KeyOn (that actually used in *.tfc compressor/player).

About pitch-bend. In TFM MM I use 'micro-tones' table, where each semi-tone contains 32 micro-tones. Values between semi-tones calculated by simple linear interpolation. When I make any pitch effects, I change micro-tone of note (and octave/block if needed), and then take corresponding precalculated value for A0A4+ registers from table (contains 12*32 values).

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

Post by TmEE co.(TM) » Sun Nov 18, 2007 12:23 pm

2 NOPs isn't always enough... but 3 is
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

Post Reply