Mixing down two generated streams #1449
-
I would like to mix down two generated streams with the GeneratorMixer class. I couldn't find an example, so I tried to go from https://github.com/pschatzmann/arduino-audio-tools/wiki/Introduction and https://pschatzmann.github.io/arduino-audio-tools/group__generator.html. However, with the following code, I get the error «no matching function for call to 'audio_tools::StreamCopy::StreamCopy(audio_tools::I2SStream&, audio_tools::GeneratorMixer&)'». What do I do wrong? Thank you for pointing it out. Dani `/**
#include "AudioTools.h" AudioInfo info(44100, 1, 16); // Unbedingt auf 1 setzen mit MAX 89357A, sonst gibt's ein Klickedicklick. I2SStream out; int button_a_pin = 16; int button_b_pin = 4; // Arduino Setup // Define streams to be mixed together // start I2S // Standard-I2S-Pins stehen unter: https://github.com/pschatzmann/arduino-audio-tools/blob/main/src/AudioConfig.h config.copyFrom(info); pinMode(button_a_pin,INPUT_PULLUP); // Arduino loop - copy sound to out // -------- BUTTON B ---------- copier.copy(); |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Why don't you just read the chapter about mixing in the Wiki? |
Beta Was this translation helpful? Give feedback.
-
I suggest that you have a look at the different streams-synth examples in the examples-audiokit folder. I wasn't aware that the InputMixer even existed and reviewing the logic of the implementation did not make any sense to me, so I needed to correct it: You would combine multiple generators into a combined generator and then wrap this into a GeneratedSoundStream. |
Beta Was this translation helpful? Give feedback.
-
Actually the class you are looking for is AudioActions! AudioActions actions;
actions.add(17, actionKeyOn, actionKeyOff, ActiveLow, &(note[0]));
actions.processActions();
|
Beta Was this translation helpful? Give feedback.
-
There is a chapter about volume management in the Wiki |
Beta Was this translation helpful? Give feedback.
Why don't you just read the chapter about mixing in the Wiki?