all in one (audiokit, faust, Encoder, espnow) ... too much ? #337
-
Hello, `/**
*/ #include "AudioTools.h" AudioKitStream kit; ESPNowStream now; const char *peers[] = {"A8:48:FA:0B:93:01"}; FaustStream faust(kit); // final output of Faust is encoder // Arduino Setup // Setup Faust // Tube Screemer // start I2S // start encoder kit.begin(cfg_i2s); } // Arduino loop - copy sound to kit copier1.copy(); //kit to faust } |
Beta Was this translation helpful? Give feedback.
Replies: 17 comments 1 reply
-
I just wanted to emphasize: if this is possible, all on one MCU, with this few lines of code, that would be more than awesome! :-) |
Beta Was this translation helpful? Give feedback.
-
yes, i forgot to un-comment encoder.begin(cfg); |
Beta Was this translation helpful? Give feedback.
-
My recommendation would be to build complex sketches step by step. I am not 100% sure what you try to do but but I guess the processing chain should be something like the following
Not sure if this will fit into the ESP32. If you don't get a stable signal you might need to decrease the sampling rate... |
Beta Was this translation helpful? Give feedback.
-
Hi Phil, thanks for looking into this.
In simple words: I want to transmit processed audio data from a guitar
(line in) wirelessly in good quality to a receiver.
so the chain would be:
AudioKit -> Faust (as effect processor) -> Encoder -> ESPNow?
This is what I tried to achieve in the code. Does that make sense ?
Am Mo., 5. Sept. 2022 um 15:33 Uhr schrieb Phil Schatzmann <
***@***.***>:
… My recommendation would be to build complex sketches step by step.
Otherwise you have no chance to figure out what went wrong!
I am not 100% sure what you try to do but but I guess the processing chain
should be something like the following
FaustStream - Copy-> MultiOutput -> AudioKit
-> EncodedAudioStream -> ESPNowStream
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMD7KQQMIJBAKM423CFGDV4XZDHANCNFSM6AAAAAAQE3XWK4>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/337/comments/3559924@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
AudioKit -> Faust (as effect processor) -> Encoder -> ESPNow would give:
|
Beta Was this translation helpful? Give feedback.
-
ah, ok. I got the faust constructor wrong. |
Beta Was this translation helpful? Give feedback.
-
AudioCopy.h : 256 - write to target has failed! |
Beta Was this translation helpful? Give feedback.
-
`/**
*/ #include "AudioTools.h" ///// ///// AudioKitStream kit; ESPNowStream now; const char *peers[] = {"A8:48:FA:0B:93:01"}; FaustStream faust(encoder); // final output of Faust is encoder // Arduino Setup // Setup Faust // Tube Screemer // start I2S // start encoder kit.begin(cfg_i2s); } // Arduino loop - copy sound to kit copier.copy(); } |
Beta Was this translation helpful? Give feedback.
-
The log might give a clue what is wrong. FaustStream faust(encoder); // final output of Faust is encoder To identify if the issue is with the encoder. Or replace the final output and use e.g. a HexDumpStream instead ESPNowStream to figure out if the issue is related to ESPNow... |
Beta Was this translation helpful? Give feedback.
-
Thanks, I will keep trying and keep you posted.
Phil Schatzmann ***@***.***> schrieb am Mo., 5. Sept. 2022,
20:23:
… The log might give a clue what is wrong.
In addition you can play around by replacing some output classes.
FaustStream faust(encoder); // final output of Faust is encoder
with
FaustStream faust(now); // final output of Faust is encoder
To identify if the issue is with the encoder.
Replace the final output and use e.g. a HexDumpStream instead ESPNowStream
to figure out if the issue is related to ESPNow...
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMD7I3HNMU2KUM7YCLYDTV4Y3DDANCNFSM6AAAAAAQE3XWK4>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/337/comments/3562966@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
when faust is bypassed, it works fine.
When I write:
*FaustStream<mydsp> faust(encoder); // final output of Faust is encoder*
I get this in the start up log:
[E] AudioFaust.h : 252 - Faust expects *input* - you need to provide and
AudioStream in the constructor
which is confusing since the constructor parameter is for the 'out'
stream ?
Thanks...
Am Di., 6. Sept. 2022 um 07:37 Uhr schrieb Michael Könings <
***@***.***>:
… Thanks, I will keep trying and keep you posted.
Phil Schatzmann ***@***.***> schrieb am Mo., 5. Sept. 2022,
20:23:
> The log might give a clue what is wrong.
> In addition you can play around by replacing some output classes.
>
> FaustStream faust(encoder); // final output of Faust is encoder
> with
> FaustStream faust(now); // final output of Faust is encoder
>
> To identify if the issue is with the encoder.
>
> Replace the final output and use e.g. a HexDumpStream instead
> ESPNowStream to figure out if the issue is related to ESPNow...
>
> —
> Reply to this email directly, view it on GitHub
> <#337 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADMD7I3HNMU2KUM7YCLYDTV4Y3DDANCNFSM6AAAAAAQE3XWK4>
> .
> You are receiving this because you authored the thread.Message ID:
> <pschatzmann/arduino-audio-tools/repo-discussions/337/comments/3562966@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
that has not the desired outcome.
If I put *kit* in the constructor of the FaustStream, it asks for RXTX_MODE
( error if only RX is enabled) , and if RXTX_MODE is set, it plays to the
lineout of the kit, not to the encoder and espnow.
So there is a knot somewhere :-)
Thanks, Michael
Am Di., 6. Sept. 2022 um 13:05 Uhr schrieb Phil Schatzmann <
***@***.***>:
… Oh, so Faust expect the input in the constructor:
ESPNowStream now;
EncodedAudioStream encoder(&now, new SBCEncoder()); // encode and write to
ESP-now
FaustStream faust(kit); // final output of Faust is encoder
StreamCopy copier(encoder, faust); // copy data from kit to faust
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADMD7IWVEXYAJVTAWT7RN3V44QOBANCNFSM6AAAAAAQE3XWK4>
.
You are receiving this because you authored the thread.Message ID:
<pschatzmann/arduino-audio-tools/repo-discussions/337/comments/3568278@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
ok, So the question is: how can we provide a different input (kit) AND output (encoder) to faust. Faust seems to work with kit only because kit has two |
Beta Was this translation helpful? Give feedback.
-
I will double check tomorrow: but somehow this can't really be: You can double check this in the FaustStream class: this message only comes when p_out is null and p_out gets assigned from the AudioStream that you pass in the constructor. There is also no logic to clear p_out. |
Beta Was this translation helpful? Give feedback.
-
I adapted the constructor slightly to accept a more generic Print object: Please use the latest version.
kit.defaultConfig(RX_MODE) is also working fine. |
Beta Was this translation helpful? Give feedback.
-
Hi Phil, it works now! the whole chain: kit->faust->encoder-espnow , and I can receive it with the decoder espnow example on a second kit. This is simply amazing! Thank you very much. I can now create my own faust files ans start playing with that. |
Beta Was this translation helpful? Give feedback.
-
Cool: I am interested in your results. |
Beta Was this translation helpful? Give feedback.
I adapted the constructor slightly to accept a more generic Print object: Please use the latest version.
After this change I adapted the example to output to CsvStream
kit.defaultConfig(RX_MODE) is also working fine.
So, I can't reproduce your issue...