CHO SOF
Posted: Thu May 28, 2009 7:40 pm
I'm having some trouble with the CHO SOF instruction. The format of the instruction is inconsistent. The knowledge base section of the Spin Web site lists the format as:
cho sof,rmp1,na ;multiply ACC value by ramp1 crossfade value
If you enter that into the assembler it will complain with:
<0000>[ Pass 2] [ 1002] Line: 100 "cho sof,rmp1,reg " - ERROR:Operand or comma missing - Operand 4
If you feed it:
cho sof,rmp1,na,0
...it will now assemble, but the operation doesn't seem to follow that this is a scale ACC by the value of the LFO instruction. I just found Keith's cheat sheet and it says:
CHO SOF,lfo,param,addrs ACC=ACC*value+ for performing crossfade (pitch transposition)
That shows an address in the instruction at operand 4 and then "ACC=ACC*value+" ends with the question, plus what? Playing with the 4th operand, it is assembled as a floating point value rather than an address, and the values it creates don't seem to make sense. For example:
0115 80000014 :cho sof,sin0, 0,0
0116 80000014 :cho sof,sin0, 0,-1
0117 80019994 :cho sof,sin0, 0,.1
0118 800E6694 :cho sof,sin0, 0,-.1
0119 800FFFF4 :cho sof,sin0, 0,.99999
0120 80000034 :cho sof,sin0, 0,-.99999
Note that you can specify +.99999 which should be out of range, and that 0 and -1 both assemble to zeros.
I'm trying to get the regular and RPTR2 versions of a ramp into ACC.
cho rdal, rmp1 works great but the assembler won't allow specification of the RPTR2 option. How can I extract the LFO value using the CHO SOF variant? I tried replacing the above with:
sof 0,.999
cho sof,rmp1,reg,0
and
clr
or %01111111_11111111_11111111
cho sof,rmp1,reg,0
They don't seem to work as I would assume. Please help. Thank You.
PS: If the above info turns up to be a bug in the assembler and maintenance is required, is there any chance we (the users) could get a new instruction that would simply specify a 32 bit value for that location?, and is there any chance of supporting "cho rdal,rmp1,rptr2"? Pretty please?
cho sof,rmp1,na ;multiply ACC value by ramp1 crossfade value
If you enter that into the assembler it will complain with:
<0000>[ Pass 2] [ 1002] Line: 100 "cho sof,rmp1,reg " - ERROR:Operand or comma missing - Operand 4
If you feed it:
cho sof,rmp1,na,0
...it will now assemble, but the operation doesn't seem to follow that this is a scale ACC by the value of the LFO instruction. I just found Keith's cheat sheet and it says:
CHO SOF,lfo,param,addrs ACC=ACC*value+ for performing crossfade (pitch transposition)
That shows an address in the instruction at operand 4 and then "ACC=ACC*value+" ends with the question, plus what? Playing with the 4th operand, it is assembled as a floating point value rather than an address, and the values it creates don't seem to make sense. For example:
0115 80000014 :cho sof,sin0, 0,0
0116 80000014 :cho sof,sin0, 0,-1
0117 80019994 :cho sof,sin0, 0,.1
0118 800E6694 :cho sof,sin0, 0,-.1
0119 800FFFF4 :cho sof,sin0, 0,.99999
0120 80000034 :cho sof,sin0, 0,-.99999
Note that you can specify +.99999 which should be out of range, and that 0 and -1 both assemble to zeros.
I'm trying to get the regular and RPTR2 versions of a ramp into ACC.
cho rdal, rmp1 works great but the assembler won't allow specification of the RPTR2 option. How can I extract the LFO value using the CHO SOF variant? I tried replacing the above with:
sof 0,.999
cho sof,rmp1,reg,0
and
clr
or %01111111_11111111_11111111
cho sof,rmp1,reg,0
They don't seem to work as I would assume. Please help. Thank You.
PS: If the above info turns up to be a bug in the assembler and maintenance is required, is there any chance we (the users) could get a new instruction that would simply specify a 32 bit value for that location?, and is there any chance of supporting "cho rdal,rmp1,rptr2"? Pretty please?