Closed zappfinger closed 6 years ago
Got it! In process.
OK, I did this. Example of the generated code is bellow. Also added a notion to the tutorial: https://github.com/gleb812/pch2csd/wiki/Making-a-new-module
; --------------------
; VOICE AREA
instr 1
; Module Parameters Modes Inlets Outlets
LfoC 62.9,0,4,1,1, 0, 1, 0
LfoC 59.4,0,4,1,1, 1, 1, 0
LfoC 56.0,0,4,1,1, 2, 1, 0
LfoC 52.9,0,4,1,1, 3, 1, 0
LfoC 49.9,0,4,1,1, 4, 1, 0
LfoC 47.1,0,4,1,1, 5, 1, 0
LfoC 44.5,0,4,1,1, 6, 1, 0
LfoC 42.0,0,4,1,1, 7, 1, 0
endin
I am not sure how to use this. I extended the template for LfoC with an extra 'parameter' and now I get:
RMA:NMpatches richard$ pch2csd lfoC2OscA.pch2 warning: template 'UdoTemplate(LfoC, 24.txt)' has different number of parameters than it was found in the parsed module 'Module(type=24, modes=[1], location=Location.VOICE_AREA, type_name=LfoC, id=1)'. Returning -1s for now. RMA:NMpatches richard$ pch2csd -p lfoC2OscA.pch2 Patch file: lfoC2OscA.pch2
Modules Name ID Type Parameters Modes Area ------ ---- ------ ----------------------- ------- ------ LfoC 1 24 [57, 0, 5, 1, 1] [1] VOICE OscA 2 97 [62, 64, 1, 0, 2, 0, 1] [] VOICE Out2 3 4 [0, 1, 0] [] VOICE
How do I get the 'mode' value?
On 04/03/18 18:39, Eugene Cherny wrote:
OK, I did this. Example of the generated code is bellow. Also added a notion to the tutorial: https://github.com/gleb812/pch2csd/wiki/Making-a-new-module
|; -------------------- ; VOICE AREA instr 1 ; Module Parameters Modes Inlets Outlets LfoC 62.9,0,4,1,1, 0, 1, 0 LfoC 59.4,0,4,1,1, 1, 1, 0 LfoC 56.0,0,4,1,1, 2, 1, 0 LfoC 52.9,0,4,1,1, 3, 1, 0 LfoC 49.9,0,4,1,1, 4, 1, 0 LfoC 47.1,0,4,1,1, 5, 1, 0 LfoC 44.5,0,4,1,1, 6, 1, 0 LfoC 42.0,0,4,1,1, 7, 1, 0 endin |
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gleb812/pch2csd/issues/7#issuecomment-370247899, or mute the thread https://github.com/notifications/unsubscribe-auth/AFkYZymvW7zxTh4m15z6bQE-mWw_qVJBks5tbCbYgaJpZM4SbS5r.
@zappfinger Did you include “modes” as arguments to the ;@ args
annotation? I made modes special and they don’t need to be included there. You only need to modify the opcode
definition to accomodate modes --- they will be included as typical arguments.
E.g. if you have your annotation like this: ;@ args kkk,k,k
and you have two mode variables, then your opcode annotation should be like this: opcode SomeName, 0, iiiiiii
(seven i’s).
The motivation for this was to not have to include ;@ map
annotation for modes. Do you think this solution is counter-intuitive?
Ok, i got it now, thanks! On 04/03/18 22:12, Eugene Cherny wrote:
@zappfinger https://github.com/zappfinger Did you include “modes” as arguments to the |;@ args| annotation? I made modes special and they don’t need to be included there. You only need to modify the |opcode| definition to accomodate modes --- they will be included as typical arguments.
E.g. if you have your annotation like this: |;@ args kkk,k,k| and you have two mode variables, then your opcode annotation should be like this: |opcode SomeName, 0, iiiiiii| (seven i’s).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gleb812/pch2csd/issues/7#issuecomment-370264492, or mute the thread https://github.com/notifications/unsubscribe-auth/AFkYZ-ln5FNE3InElhd0f-Y_L6wW-gTCks5tbFi7gaJpZM4SbS5r.
The wave selection in LfoC is not a parameter, but a mode (according to ModelDef.xml). It is not picked up by the parser