Page 2 of 2

YM2151 LFO - Does my interpretation sound right?

Posted: Sat Jul 17, 2021 6:09 am
by BruceMcF


3 hours ago, Greg King said:




The language in the description doesn't make it clear whether or not the LFO can do both modulations at the same time.  Maybe, the F bit controls the output Function of the LFO (either it changes the frequency of another oscillator, or it changes the volume of that oscillator, but not both).



That is a possible interpretation. It  does, however, refer to them as distinct items controlled by distinct circuits, so the two 7bit registers / extra address bit reading fits the language most closely.

So I did a search, and found this in the VOPM Unofficial User Guide:


Quote




LFO




VOPM has a single LFO which can be used to modulate pitch, amplitude, or both.



So it's an extra address bit.

 


YM2151 LFO - Does my interpretation sound right?

Posted: Sat Jul 17, 2021 6:37 pm
by SlithyMatt


22 hours ago, Elektron72 said:




Do we have a feel for which we should be targeting?



Target whichever one you are more comfortable with. Both are going to be on the X16. The PSG is going to give you something more like the C64 SID (but not quite) while the YM2151 will give you something like the AdLib or Sound Blaster FM synthesis (but not quite). The PSG can be programmed much more easily, but you can use commercial software (namely Deflemask) as a tracker for the YM2151 and get all the register writes and timing that you need to do. I made videos about both so you can see how they work:

PSG:





 

YM2151:





I will also be making a video on how to use the PCM in the future, as well. 


YM2151 LFO - Does my interpretation sound right?

Posted: Sun Jul 18, 2021 11:39 pm
by Kalvan

I realize that this suggestion is at least two years late, but...

The Microsoft-Fujitsu FM-8/7/77 BASIC, which itself was a fork of Microsoft-Tandy CoCo BASIC, had three major divergences from its basis.  Obviously, the toggleable option for Japanese kanji and kana reserved words, and the BLOCK reserved word (for drawing objects onscreen) wouldn't be particularly useful for the Commander X16.  That leaves the BEAT and NOTE reserved words, which were used for accessing the registers of various Yamaha sound chips.*

Obviously, hand-coding the PCM channel from the BASIC prompt, complete with selective garbage collection and reloading would be painful in the extreme, but those two reserved words should be usable with the YM2151 and VERA PSG.

Or maybe the development team already has its own solution, in which case I'll get out the pudding mix, heavy cream, and Graham cracker pie crust to prepare the perfect pie to shove in my face.  ?

 

*First the YM2149 SSG, then various Yamaha sound chips, ending in the YM2608 OPNA.


YM2151 LFO - Does my interpretation sound right?

Posted: Mon Jul 19, 2021 4:42 pm
by ZeroByte

I once suggested that a bank of unused ROM space be loaded up with a bunch of stock YM instruments, and that a BASIC command like FMPATCH voice#,patch# and FMNOTE voice#,keycode  be done. I think those 2 primatives would be quite useful for FM. I also made a suggestion that the kernal's init routine could install some kind of basic default instrument to all 8 YM voices, making it dead simple to poke some dings on the chip.

If the YM were pre-initialized by the boot sequence, this is all it would take to play a concert A note on voice 0:

POKE $9F40,$28 : POKE $9F41,$4A  // put $4A --> YM $28  (concert A into voice 0 freq select)

POKE $9F40,8 // select KeyUP/KeyDN register on YM

POKE $9F41,0 : POKE $9F41,$78  // keyUP voice 0, keyDN voice 0