Page 1 of 1

The scope of " CHO SOF ,a,b,c "

Posted: Tue Sep 23, 2025 1:57 am
by Cookie_DonDon
CHO SOF ,RMP0 , SIN , 0

I have a piece of code. When I compiled it, it worked fine. I checked the official forum and found the explanation there was: ";" multiply ACC value by ramp1 crossfade value
", but when I looked at the output waveform, I found that it was a sawtooth wave that crossed the x-axis (with negative values), and then I looked at the relevant points of AN-0001 (I'm not sure if I saw all of them), and I discovered that the difficulty crossfade value seemed to be a special trapezoid, and it was all positive numbers. So I find it quite strange and unsure whether it's a problem with my hardware or if I misunderstood something. :?: :?:
I hope someone kind-hearted can help me clarify this confusion. Thank you.

Re: The scope of " CHO SOF ,a,b,c "

Posted: Tue Sep 23, 2025 7:31 am
by frank
What you get out of the "CHO SOF" instruction depends on which LFO you selected and the settings of the bits in the C field.

But there is an error in your command and I see it is in the SpinAsm PDF as well, the proper format is:
CHO SOF N, C, D
not
CHO SOF ,N, C, D
this is in the example you gave and in the SpinAsm PDF. There should not be a "," in front of "N" it should just be a space. I will need to fix that in the PDF.

But as you are selecting RMP0 you are seeing the ramp not the xfade, to see the xfade you need to set the bit field to $20. See the "CHO RDA" instruction for the bit field values. You currently have the bit field set to $0 (the "SIN" in the parameters) which basically means "show the default waveform" which for RMP0 is a ramp.