help with audio effects and espnow receive #565
-
hi everyone I wonder if someone can help me , I want to apply an audio effect on the incoming decoded signal coming from espnow . I cannot seem to get this to work . VolumeStream volume(kit); AudioEffects<GeneratorFromStream<effect_t>> effects(volume,1,1.0); // apply effects on kit EncodedAudioStream decoder(&fx, new SBCDecoder(1256)); // decode and write to I2S - ESP Now is limited to 256 bytes I have tried multiple configurations of this but following the logic this should work, |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 3 replies
-
I think I've confused myself as I've tried to fix this so many times, I'm lost |
Beta Was this translation helpful? Give feedback.
-
ok so lets start again . where should I put the effects in the chain. |
Beta Was this translation helpful? Give feedback.
-
I don't think that currently there is a clean way to implement this. Maybe it might work if you create two separate chains that are connected via a QueueStream. It will be output of the decoder and input for the effects. I will investigate if I can extend the framework somehow to support this in a better way |
Beta Was this translation helpful? Give feedback.
-
I am providing now a proper Stream implementation for the effects with https://pschatzmann.github.io/arduino-audio-tools/html/classaudio__tools_1_1_audio_effect_stream_t.html which should be easier to use. It can be used both, on the input and output side. So this should work in your case as well. I also updated the documentation. |
Beta Was this translation helpful? Give feedback.
-
mmm doesn't seem to work with espnow send or receive. here's the send chain ESPNowStream now; |
Beta Was this translation helpful? Give feedback.
-
it kills the input/output completely so no audio data is send via espnow |
Beta Was this translation helpful? Give feedback.
-
Are you sure that you called begin on AudioEffectStream ? |
Beta Was this translation helpful? Give feedback.
-
yes the sketch works perfectly if take out the effects from the chain |
Beta Was this translation helpful? Give feedback.
-
#include "AudioTools.h" #define AI_THINKER_ES8388_VOLUME_HACK const int sample_rate = 44100; // Effects control input // Effects ESPNowStream now; EncodedAudioStream encoder(&now, new SBCEncoder()); // encode and write to ESP-now } // setup effects updateValues(); auto cfg = now.defaultConfig(); auto cfg1 = kit.defaultConfig(RX_MODE); // start encoder Serial.println("Sender started..."); void loop() { its the same settings at the receiving end |
Beta Was this translation helpful? Give feedback.
-
You do not call begin on AudioEffectStream ! |
Beta Was this translation helpful? Give feedback.
-
how the ...... I'm so far down the rabbit hole I didn't even realise id deleted that... so sorry to waste your time, yes I can confirm that it it works great . thank you so much . ill send some coffee |
Beta Was this translation helpful? Give feedback.
You do not call begin on AudioEffectStream !