This section explain a “my own special syntax” for add information in "file.asm" and associate parameter control on DSP firmware to a potentiometer on the pedal.
Modification of one parameter, change one or more firmware program code words.
To add these information in "file.asm" without create problem to the assembly process, these special line are putted as “Comment”.
The syntax is:
; #PAR0N #D #T #M #X #I1,I2,I3,…
Where:
N: is the potentiometer number (1,2,3 or 4 from left to right).
D: is the update direction (NORM, COMP, INC, DECR, RANGE):
NORM set an absolute parameter value that increments when the potentiometer is clockwise; COMP is the opposite.
INC set a partial increment of BASE param value that increments starting from value indicated in asm source code when the potentiometer is clockwise; DECR the opposite.
RANGE indicate that the update of this parameter depend on information contained in other parameter; the number of this second parameter is the first instruction to set index. (see example 4)
TAB used when parameter value can assume only a quantized set of values (tabulated values); min and max should have the same value. It’s used for example in pitch effects where the VCO frequency can assume for each pitch tone increment a particular value. (see example 5)
T: is the type of parameter (COEF, DTIME, VCOF, VCOA, VCO_TYPE):
The possible parameter types and values range are related to DSP words instruction specification:
COEF: is the 7bit multiplier coefficient value. (0 - 127)
DTIME: is the 15bit data memory offset value. (0 - 32766) (*)
VCOF: is the 13bit frequency value of an internal VCO. (0 - 8191)
Real frequency value depend of VCO shape:
SIN -> 0.029142*F @ sampling frequency Fs = 48kHz
TRI -> 0.022888*F @ sampling frequency Fs = 48kHz
SAW -> 0.045777*F @ sampling frequency Fs = 48kHz
VCOA: is the 15bit amplitude value of an internal VCO. (0 - 32767)
VCO_TYPE: is the possible shape of internal VCO. This parameter work differently from others because it check the potentiometer position: in the first third part of rotation the shape is SIN, in the second TRI and in the last SAW.
DRANGE: set a delay range of another parameter (see example 4)
CRANGE: set a coefficient range of another parameter.
FRANGE: set a frequency LFO range of another parameter.
ARANGE: set a amplitude LFO range of another parameter.
M: is the min value of the parameter when the potentiometer is 0%.
X: is the max value of the parameter when the potentiometer is 100%.
I1,I2,I3,…: is the list of instruction words numeric indexes that are changed with potentiometer rotation.
(*) You know that in asm language it’s possible to indicate a sample delay in this way:
RAP del+32700 K=.9 ; Acc = Acc + del(n-32700)
If you want to alter with a pot rotation this delay value, you have to set a parameter of type DTIME and update direction INC; in the BASE asm source code the sample offset should be indicated as zero:
RAP del+0 K=.9 ; Acc = Acc + del(n-32700)
Note that rotation on a potentiometer make possible change more than one (max 8) words instruction to alter a DSP parameter. These parameter instruction will have the same type, update direction and maximum value (see example 1).
If a potentiometer should be able to change contemporary more than one parameter with different type, update direction and maximum value, it’s possible to set more than one (max 12) parameters raw related to the same parameter number (see example 3).
Example 1
In a delay firmware is possible to change with potentiometer 1 the instruction 5 that contain the number of sample in memory and with potentiometer 2 the instruction 4,8 and 16 that contain the multiplier coefficient for delay level:
;#PAR01 #INC #DTIME #0 #32766 #5 (32766taps * 21usec (48KHz) = 688msec)
;#PAR02 #NORM #COEF #0 #127 #4,8,16 (a COEF value of 127 is like 0.999)
Example 2
In a chorus firmware is possible to change with potentiometer 1 the chorus speed altering the frequency of internal VCO and with potentiometer 2 the chorus depth altering the amplitude of internal VCO:
;#PAR01 #NORM #VCOF #0 #206 #0 (with SIN VCO, 206*0.029142 = 6Hz)
;#PAR02 #NORM #VCOA #0 #1024 #0
Example 3
Multiple parameters related to the same potentiometer:
;#PAR01 #NORM #VCOF #0 #206 #0 (with SIN VCO, 206*0.029142 = 6Hz)
;#PAR01 #NORM #VCOA #0 #1024 #0
This last example show you how to change the VCO amplitude contemporary to VCO frequency.
Example 4
Using ranges parameter (PAR04) for set a value of another parameter (PAR03)
;Delay time
;#PAR03 #RANGE #DTIME #0 #0 #4
;Delay time range
;1: from 12,5ms to 50ms
;2: from 50ms to 200ms
;3: from 200ms to 800ms
;#PAR04 #INC #DRANGE #500 #2000 #5
;#PAR04 #INC #DRANGE #2000 #8000 #5
;#PAR04 #INC #DRANGE #80000 #32760 #5
This settings is useful in delay where delay time as a large variant. For upgrade the pot resolution in delay time settings is opportune to use fraction of max delay. In this example pot 4 position is fractioned in 3 parts. Pot 4 actual position sets the range and update information for parameter 3 that is the delay value.
Example 5
In this example the parameter is used for change the pitch tone with quantized values of VCO read frequency:
;#PAR04 #TAB #VCOF #15 #15 #5
;#PAR04 #TAB #VCOF #31 #31 #5
;#PAR04 #TAB #VCOF #48 #48 #5
;#PAR04 #TAB #VCOF #66 #66 #5
;#PAR04 #TAB #VCOF #85 #85 #5
;#PAR04 #TAB #VCOF #106 #106 #5
;#PAR04 #TAB #VCOF #127 #127 #5
;#PAR04 #TAB #VCOF #150 #150 #5
;#PAR04 #TAB #VCOF #174 #174 #5
;#PAR04 #TAB #VCOF #200 #200 #5
;#PAR04 #TAB #VCOF #227 #227 #5
;#PAR04 #TAB #VCOF #255 #255 #5