YM2151 LFO - Does my interpretation sound right?

Chat about anything CX16 related that doesn't fit elsewhere
BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

YM2151 LFO - Does my interpretation sound right?

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

 

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

YM2151 LFO - Does my interpretation sound right?

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

Kalvan
Posts: 115
Joined: Mon Feb 01, 2021 10:05 pm

YM2151 LFO - Does my interpretation sound right?

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

ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

YM2151 LFO - Does my interpretation sound right?

Post 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



 

Post Reply