Music delay.

I have ESP8266 and arduino nano i would like to know if it is possible to create a music delay up to 1 sec with adjustable delay or if it is too much for arduino to handle basicly you would take 3 input wires (left channel right and ground) sample it i guess and then delay it with variable time set with potentiometer or button action for a set increments of time ex 50 ms and then you would output it in same way 3 wires analog just plug it in amplifier and done.

What i would use this for is bluetooth transmiter reciver combo that has dealy in it self so if i use one bluetooth speaker connect to it then it transmits to another bt speaker the second one has a delay up to 1s so i need to put delay before the first speaker amplifier and after that there will be no delay of the second speaker cant be used for movies but for music will be pretty decent.

If there is already existing project i would appreciate if you point me there thanks.

That sounds more Raspberry Pi than Arduino - not enough CPU and not enough memory.

The Nano doesn't have a DAC, it doesn't have enough memory, and its ADC is only 10-bits.

I don't know anything about the ESP8266... If it has an ADC and DAC (x2 for stereo) and enough memory (or if you can add memory) , and if it can sample fast enough, it can probably do it. Since you already have the chip it should be easy enough to test by reading the ADC and writing DAC (if it has both). For that experiment you don't need to know the exact sample rate. You can just read & write as fast as possible.

You'll have to bias the input (for AC audio) and filter the bias from the output. For good quality, the input should have a low-pass anti-aliasing filter (blocking everything below half the sample rate before digitizing) and another low-pass smoothing filter at the output, although you can usually get-away without the output-smoothing filter as long as the sample rate is above audibility.

If that works you just need a circular buffer as a delay (plus program a know sample rate). 1 second of CD quality mono audio requires about 176,400 bytes (16 bits x t 44.1kHz x 2 channels).

Okey thanks for suggestions i guess arduino is not made for this kind of stuff its too much hassle to get it runnig :smiley: