audio loopback test

Hi, there is discussion of an audio loopback on an older forum post here [

I downloaded the zip files from the link and they are written in cpp. There is not an arduino sketch.
I just want to loop through each analog audio sample to PWM output, to check anti-aliasing input filter is working and the output filter on PWM.
I do not need the additional analog potentiometer input for effects, and my sample rate would be around 8 kHz. I am intending to be writing the samples to a 128kB sram, alternating play and record between two arduino's, each with it's own sram.

So I would have to make some changes after checking the code works 'as is', first.

I have had great difficulty converting C or CPP files to Arduino wiring files in the past, I just don't have an intimate knowledge have all the subtle but unforgiving differences.

GrumpyMike gave this project the thumbs up, so was there an Arduino sketch that could be uploaded originally at the linked site?

Many thanks.
I found the link to the Arduino forum while looking for audio loop-back, maybe there is something else more recent that does this job on the web, or on this forum, but with a different description I could search.
BTW, I have not used 'Underline' on this entire post! It is showing as so in the preview and there is nothing I can do to change it.
](Arduino Realtime Audio Processing - Development - Arduino Forum)

You've made the whole post a link to the older post.

I just downloaded the file arduino_audio_loopback.zip from the page linked on that thread:

It contains a file named arduino_audio_loopback.pde which is an Arduino sketch. At the time that thread was written, Arduino was still using Processing's .pde extension for sketch files. Although the extension used now is .ino, the Arduino IDE still supports the .pde extension.

That .pde file compiles fine for the Uno.

You need to ignore the files in the applet subfolder. At that time, the Arduino IDE used the applet subfolder as the build folder. The files in that folder are the result of a compilation of the .pde file. I don't know why they left that in the file they published on the website. You can delete the applet folder so that it won't cause you any further confusion.

simplystupid:
I have had great difficulty converting C or CPP files to Arduino wiring files in the past, I just don't have an intimate knowledge have all the subtle but unforgiving differences.

Arduino's .ino or .pde files are compiled as C++. There is no "Arduino Language". There is no "Wiring Language". Any C++ program that is valid for the microcontroller you're using can be compiled as an Arduino sketch. Although .ino and .pde files are compiled as C++, you can also add .c files to your sketch, and these will be compiled as C. A sketch must always contain at least one .ino or .pde file but you are welcome to leave that file blank.

many thanks, all clear now.

I also realise that using analog input to PWM analog output as a loop-back/straight through, is going to be a challenge if I ultimately want to 'slow ramp down' the sample rate on the fly.

Recreating a retro digital version of a cassette very long loop effect which had two heads.
This sketch won't allow that, but I can see Nick Gammon's timer generated interrupt tutorials will be very helpful.

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per