Closed muranyia closed 4 months ago
Hey @muranyia, could you please attach a patch? I haven’t touched this project for a while, and having a problematic patch at hand will help me greatly to dive in.
I’ll try to take a look at it either next week or a week after.
Hi Eugene, I'm just getting familiar with the project. By "patch" do you mean a fix? I'm very happy to help you in any way but I'm afraid I cannot code a fix as I don't understand the source code.
@muranyia, no problem, I was referring to the quote from your original post:
This happens with every patch that has no invalid UDOs.
I guess you meant a Nord Modular patch?
Ah yes, sorry for misunderstanding.
Basically, as I mentioned, the issue manifests with all the stock patches from NORD.
Attaching one of them: BuzzBass NL2.pch2.zip
Hey folks,
The issue seems to be related to the EnvADSR module (20.txt). The text file contains two opcodes, but their annotations are inconsistent: the first opcode only has @ins
and @outs
annotations, and the second one only has @args
. The code bellow wants to get an @ins
annotation of the second opcode variant but it doesn't exist:
In csdgen.py#L61:
tpl_v1_ins = self.tpl.ins[1].types
@gleb812, is this a polymorphic module?
I've just added validation for this type of error. Now, trying to convert the .pch2 file from above will show the following error:
C:\Python310\python.exe -m pch2csd.app c:/Users/login/Desktop/test.pch2 --debug
error: error (20.txt): the UDO 'EnvADSR' is invalid
please, run 'pch2csd -c 20' for details
And calling the commands for details will show:
C:\Python310\python.exe -m pch2csd.app --check-udo 20
checking module type '20' (20.txt)
module name: EnvADSR
error (20.txt): in polymorphic modules, all opcodes must have 'ins' and/or 'outs' annotation
Thank you for tackling this..
Unfortunately, I'm left with zero of the stock patches converted. Each fails with some kind of (decently handled) error. Any advice...?
Are you a Csound user? If so, maybe you could help fixing the EnvADSR
implementation in 20.txt
file. Otherwise, need to wait till me or Gleb addresses the issue with the module mentioned, as last night I only fixed the converter code.
Guys, I will fix this issues soon. I guess in a couple days or something. Stay cool
Thanks again and in advance too!
As I have barely any CS knowledge, what I can contribute is the frequency distribution of problem UDOs among all the stock NORD patches. This might help you with setting priorities.
Name (num) Freq
----------------------
EnvADSR (20) 134
Operator (180) 63
FltNord (51) 30
OscString (13) 17
OscShpA (163) 16
EnvADR (84) 15
Name (126) 13
FltMulti (49) 6
FltVoice (45) 6
Glide (158) 6
LfoB (190) 6
LfoShpA (25) 5
OscPerc (196) 5
Overdrive (62) 5
MetNoise (29) 4
stChorus (94) 4
Device (30) 3
Mux81X (60) 3
EnvADDSR (119) 2
KeyQuant (152) 2
ModAHD (169) 2
PartQuant (22) 2
PitchTrack (198) 2
Reverb (12) 2
shpExp (34) 2
status (197) 2
Vocoder (108) 2
Compress (150) 1
EnvAHD (46) 1
EnvMulti (52) 1
FltPhase (102) 1
ModADSR (23) 1
sH (53) 1
Much respect for that. Once me back on track for doing models I will use your distribution. Great idea btw
@muranyia I am finally back on track again. Added few more envelope generators (hope to finish the whole section soon) and of course did fix an EnvADSR module. Please check!
Yes, EnvADSR works now, thanks! Only a few errors for EnvADR missing (I guess the template will be a simplified EnvADSR?) All in all, none of the stock patches compile yet, Operator being the next barrier.
Well, EnvADR a bit different due to Trig/Gate selector and Decay/Release mode, but I guess I will beat it up soon. Would do you mean by stock patches? As far as I remember for my Nord, there were several banks, one of which was completely stuffed with DX models, so in that case it needed Operator/DXRouter, though others did not use FM in that case at least. Meanwhile, I have separate model of FM operator in Csound, I guess I can include it here.
This happens with every patch that has no invalid UDOs.