Using the AudioEffect.h parameter "set" methods #116
-
In the Main Loop() I would like to use one of the AudioEffect parameter "set" methods, such as setFuzzEffectValue() from the Fuzz class. Haven't been able to hit upon the right way to build this one line. Here is the setup and main loop of my code: //Audio Setup AudioKitStream out; // ~~~~~~~~~~~~~~~~~~~ SETUP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void setup(void) { effects.addEffect(new Fuzz(fuzzEffectValue)); auto config = out.defaultConfig(TX_MODE); out.begin(config); /// ~~~~~~~~~~~~~~~~~~~ MAIN LOOP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ void loop() { if(!digitalRead(KEY1)){ |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
I would expect that the following should work: You create the fuzz as global variable so that you can use it in your sketch. I assume that your pot provides values in the range from 0 to 1023, so I map them to a new value range of 0 and 20. I am not sure what the best value range is however and I let you play with it...
|
Beta Was this translation helpful? Give feedback.
-
Thanks so much, that worked great! I've attached the final sketch if anyone is interested. |
Beta Was this translation helpful? Give feedback.
-
Did you try with multiple effects in a chain ? |
Beta Was this translation helpful? Give feedback.
-
Yes, I got several effects working in a chain with real-time effect parameter adjustments from several attached pots. Since the ESP32 has two processing cores, I assigned the task of updating effect settings to the second core and left the main loop to deal only with copier(). Works like a charm with no extraneous noise. I'll attach my script. The next step is to use the ES8388 input instead of a sinewave. This would be AudioKit to Effects to AudioKit. I'm having trouble setting this up... AudioKitStream kit; |
Beta Was this translation helpful? Give feedback.
-
The GeneratedSoundStream expects a SoundGenerator as input but AudioKitStream implements the Stream interface. ps. I just committed a change that let you pass a stream to the AudioEffects:
So the following should compile now:
Just a small disclaimer. I did not have the time to test this properly... |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for your Audio Libraries and your help. I finished writing
up my project. It includes 5 Arduino sketches based on your Libraries.
You are welcome to use any of it if you think it is helpful.
Check out the downloadable PDF on the "ESP32 ES8388 Codec" project, bottom
of page at https://jtalbert.xyz/ESP32/
I was especially interested in your Effects. Your Delay Effect didn't seem
to do anything. I'm hoping to study that one and try expanding your
Effects Library with some other effects on live signals such as modulation
and granular synthesis.
John Talbert
…On Tue, Mar 8, 2022 at 1:23 AM Phil Schatzmann ***@***.***> wrote:
The GeneratedSoundStream expects a generator as input and AudioKitStream
implments the Stream interface.
You can use the class GeneratorFromStream() to convert a Stream to a
Generator...
—
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATCJ6DTVO5O5XSTMHZNHAY3U63W7LANCNFSM5QANV5VA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/116/comments/2314070@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your feed back. I suggest that you add your project to https://github.com/pschatzmann/arduino-audio-tools/discussions/categories/show-and-tell If you are interrested in effects you might also have a look at Maximilian... |
Beta Was this translation helpful? Give feedback.
I would expect that the following should work: You create the fuzz as global variable so that you can use it in your sketch. I assume that your pot provides values in the range from 0 to 1023, so I map them to a new value range of 0 and 20. I am not sure what the best value range is however and I let you play with it...