I've been playing with ValleyBell's midi converter. It fails to convert the midi I want, and it's in VB6 so Windows only.
It fails because the midi is polyphonic, ie playing two notes using the same instrument at the same time. But it never plays more than five notes at any one time.
So, what is the YM instrument setup overhead? Would it be possible to switch the instrument between notes, without any audible issues?
--
I'm also confused on what mid2psg does exactly. I'm guessing it handles drums, but the code is using magic numbers with no explanations.
What's the YM setup overhead?
Moderator: BigEvilCorporation
Re: What's the YM setup overhead?
It's... quite a bunch. Bad enough that Echo loads all instrument values into Z80 RAM before actually using them to reduce the amount of bank switching when PCM is playing. You have to write to 29 registers and each register write is pretty slow (forgot the exact cycle amount, Echo does something absurdly tight that made us double check the timings posted here since it shouldn't have worked according to them - tl;dr Echo is 3 cycles away from breaking hell)cero wrote:So, what is the YM instrument setup overhead? Would it be possible to switch the instrument between notes, without any audible issues?
GEMS does what you say, but final results vary on the developer (it was practically a full blown VM running on the Z80 after all). Though it's not necessarily bad, just look at Jelly Boy, the only giveaway of it being GEMS is that many sound effects can play at the same time which can starve BGM from channels (tends to happen when you grab a lot of notes or fruits at once).
For a moment I misread and thought you were talking about midi2esf ^-^; Though it's also full of magic numbers >.>; (...actually now that I look at it again there are a lot less magic numbers than I recalled, huh)cero wrote:I'm also confused on what mid2psg does exactly. I'm guessing it handles drums, but the code is using magic numbers with no explanations.
Sik is pronounced as "seek", not as "sick".
Re: What's the YM setup overhead?
Ah, crap. Well, no midis for me then.
Re: What's the YM setup overhead?
Well, it's a problem mostly when PCM is involved, since PCM is going to eat up quite a bunch of CPU time for the Z80 - it's doable, but not trivial. If PCM isn't in use then you have lots of free room to do it.
The safest option would be still to preprocess the MIDI somehow to split the notes into other channels though.
EDIT: there's also the question of how many instruments are loaded at the same time. If only one channel needs to get updated at a time it's not a big deal. If you upload instruments to all five channels simultaneously though... (which in your case would be five notes starting to play at the same time all changing the instrument)
The safest option would be still to preprocess the MIDI somehow to split the notes into other channels though.
EDIT: there's also the question of how many instruments are loaded at the same time. If only one channel needs to get updated at a time it's not a big deal. If you upload instruments to all five channels simultaneously though... (which in your case would be five notes starting to play at the same time all changing the instrument)
Sik is pronounced as "seek", not as "sick".
Re: What's the YM setup overhead?
The midi already has five instruments, so splitting would go over the YM five channel limit.