WDF Model is not working in Faust
-
I'm new to FAUST and I tried to make a tube amp example with WD models, but I get the following error:
undefined symbol : WDFTriode
What is the mistake? Any help would be appreciated.
import("stdfaust.lib"); import("filters.lib"); import("wdmodels.lib"); drive = hslider("Drive [dB]", 0, 0, 30, 0.1); gain = hslider("Gain", 1, 0.1, 10, 0.1); vol = hslider("Volume", 0.8, 0, 1, 0.01); anode_res = 100000; cathode_res = 1500; grid_res = 1e6; triode = WDFTriode(grid_res, cathode_res, anode_res); input_hp = highpass(50.0); // High-pass filter at 50 Hz output_lp = lowpass(10000.0); // Low-pass filter at 10 kHz process = input_hp : *(drive) : triode : *(gain) : output_lp : *(vol);
-
@resonant you are probably better off asking on the Faust discord.
-
@resonant said in WDF Model is not working in Faust:
I'm new to FAUST and I tried to make a tube amp example with WD models, but I get the following error:
undefined symbol : WDFTriode
What is the mistake? Any help would be appreciated.
import("stdfaust.lib"); import("filters.lib"); import("wdmodels.lib"); drive = hslider("Drive [dB]", 0, 0, 30, 0.1); gain = hslider("Gain", 1, 0.1, 10, 0.1); vol = hslider("Volume", 0.8, 0, 1, 0.01); anode_res = 100000; cathode_res = 1500; grid_res = 1e6; triode = WDFTriode(grid_res, cathode_res, anode_res); input_hp = highpass(50.0); // High-pass filter at 50 Hz output_lp = lowpass(10000.0); // Low-pass filter at 10 kHz process = input_hp : *(drive) : triode : *(gain) : output_lp : *(vol);
but two or three things stick out..
- you should probably prefix your lib functions with the lib id like this:
wd.transformer(x,y)
- I cant see anything in the WD library called Triode
https://faustlibraries.grame.fr/libs/wdmodels/
- I think for WD models you will need to set up some sort of buildtree
-
@Lindon said in WDF Model is not working in Faust:
- I cant see anything in the WD library called Triode
I used ChatGPT for this. So maybe that's the thing
-
@resonant ChatGPT is not your friend - go read the description of what to do on the page I pointed at.
-
check this https://faustlibraries.grame.fr/libs/#wdmodels
As far as i can see there is no such thing as wd.WDFTriode.
Btw i highly suggest to do some tutorials. you can simply state a thing like
input_hp = highpass(...) - there is quite a bit more to itAlso your model like you intend to code it would not work as there is so much more to this topic than simply sending a signal thru a triode. You might check out some basics here as well :)
Best Ben
Links:
https://www.youtube.com/watch?v=VwoPt3h7DWM - on wdModels
https://www.youtube.com/watch?v=hDkur8zOcv0&t=5545s - on Fausthttps://www.aikenamps.com/index.php/designing-common-cathode-triode-amplifiers
-
-
@Lindon @Ben-Catman Thanks, I need to develop my faust knowledge.
Also it looks like the ChatGPT is struggling with this, but just for now :) -
@resonant said in WDF Model is not working in Faust:
@Lindon @Ben-Catman Thanks, I need to develop my faust knowledge.
Also it looks like the ChatGPT is struggling with this, but just for now :) -
@d-healey said in WDF Model is not working in Faust:
Hahah It might seem like we're expecting too much from ChatGPT with this sort of things. But I believe that 5 years from now will be very different.
@resonant said in WDF Model is not working in Faust:
@Lindon @Ben-Catman Thanks, I need to develop my faust knowledge.
Also it looks like the ChatGPT is struggling with this, but just for now :) -
@resonant
Not sure sorry, but I do have a HSIM WDF model that runs natively in Hise which I will be releasing soon.I recommend using gpt to explain concepts, rather than write code. Once you understand WDF, you can meet your goals yourself! Gpt really struggles with any big task, but it does a great job of teaching complex concepts.
Especially if you can give it a large technical pdf document, you can then proceed to ask it questions and break down the technical jargon.
If you need help with WDF let me know, I've been learning it myself the past few months.
-
@d-healey lmao if you're using the free 3.5, you deserve this sort of response :D
Faust (and HISEscript as well) are very niche. I'm honestly surprised it does as well as it does. You should try creating a custom GPT and feeding it with the Faust docs and the library, then adjusting the instructions every time it makes a mistake like this. like "Always include library prefixes".
For HISEscript, you need to mention that standalone functions should always be inline functions, and that these don't have a var, but local, that let does not exist etc.
-
@aaronventure said in WDF Model is not working in Faust:
lmao if you're using the free 3.5
Sadly I'm paying for this
-
@d-healey I love how you can just gaslight the 4o even when it's right
The new one seems a lot more robust
-
@aaronventure said in WDF Model is not working in Faust:
I love how you can just gaslight the 4o even when it's right
Interesting that it gave you the right answer, mine is still stupid
I didn't discover this strawberry thing btw, someone else posted it online a couple of weeks ago.
-
@d-healey said in WDF Model is not working in Faust:
Interesting that it gave you the right answer,
because the 4o is guessing. You can ask it to run a python script that counts rs in a string and you'll get the correct answer. Pure inference in this case is mostly guesswork, because it works with tokens, not letters.
The o1 has reflection so it can catch itself doing this. Plus, this test comes up so often that I wouldn't be surprised it already made its way into the training data.