Skip to content

Using the AudioEffect.h parameter "set" methods #116

Answered by pschatzmann
jmtalbert asked this question in Q&A
Discussion options

You must be logged in to vote

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...

//Audio Setup
SineWaveGenerator<int16_t> sine;
AudioEffects<SineWaveGenerator<int16_t>> effects(sine);
GeneratedSoundStream<int16_t> in(effects);
Fuzz fuzz;
AudioKitStream out;
StreamCopy copier(out, in);

// ~~~~~~~~~~~~~~~~~~~ SETUP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

void setup(void) {

effects.addEffect(fuzz);

auto config = out.defaultConfig(TX_MODE);
config.sample_rate =…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants