TigerBalm2
Member
Hello everyone,
In order to organize my code, I'd like to move the entire code block generated from the audio gui into a separate source file. This would help me make my main.cpp neater and also it would help me iterate the audio gui more quickly by facilitating easy copy/paste and getting rid of scrolling.
Here is the method I tried:
-added a audioGui.h file to my src folder
-added the preprocessor directive #include<"audioGui.h"> to my main.cpp
-move auto generated code block to audioGui.h and comment out the same code in main.cpp
When I compile I get the following error:
The funny thing is, that audio object in the error is the PLATE REVERB made by Pio. I added that to my code by copying Pio's .h and .cpp file into my audio library folder, then I edited Audio.h to add a #include for the plate reverb. Finally, I edited the index.html file to get the plate reverb to appear in my audio GUI.
It appears that all the standard audio objects are working OK.
Does anyone have any ideas about how to get out of this tangled web?
If there is a good reference on how to add custom audio objects to my code I can reset to the standard audio library and retry from scratch. I tried to follow the CREATING NEW AUDIO OBJECTS post but that is a bit too advanced for me and it doesn't address how to get the new audio objects to show in the GUI.
Thank you for your help!
In order to organize my code, I'd like to move the entire code block generated from the audio gui into a separate source file. This would help me make my main.cpp neater and also it would help me iterate the audio gui more quickly by facilitating easy copy/paste and getting rid of scrolling.
Here is the method I tried:
-added a audioGui.h file to my src folder
-added the preprocessor directive #include<"audioGui.h"> to my main.cpp
-move auto generated code block to audioGui.h and comment out the same code in main.cpp
When I compile I get the following error:
Code:
Compiling .pio/build/teensy41/src/main.cpp.o
src/main.cpp: In function 'void updateParams()':
src/main.cpp:393:3: error: 'plateRvbStero1' was not declared in this scope
plateRvbStero1.size(reverbSize); // max reverb length
^
src/main.cpp: In function 'void setup()':
src/main.cpp:504:3: error: 'plateRvbStero1' was not declared in this scope
plateRvbStero1.size(reverbSize); // max reverb length
^
*** [.pio/build/teensy41/src/main.cpp.o] Error 1
The funny thing is, that audio object in the error is the PLATE REVERB made by Pio. I added that to my code by copying Pio's .h and .cpp file into my audio library folder, then I edited Audio.h to add a #include for the plate reverb. Finally, I edited the index.html file to get the plate reverb to appear in my audio GUI.
It appears that all the standard audio objects are working OK.
Does anyone have any ideas about how to get out of this tangled web?
If there is a good reference on how to add custom audio objects to my code I can reset to the standard audio library and retry from scratch. I tried to follow the CREATING NEW AUDIO OBJECTS post but that is a bit too advanced for me and it doesn't address how to get the new audio objects to show in the GUI.
Thank you for your help!