Audio input / output ideas

Hello everyone.

I’m fresh from the excitement from talking to folks at the 2024 NervesConf and ElixirConf in Chattanooga and want to open a thread about using audio on Nerves.

I chatted with FrankH about experiments I’ve made in C using a header-file-only library called miniaudio which makes it super easy to get audio frames into/out-of your system (works on Linux/Windows/macOS), and he encouraged me to find like-minded Nerves folks here for support and collaboration…

Anyway… while I’ve only lightly tried to get miniaudio working on Nerves, I have used this library extensively on my Mac and Linux desktop/laptop hardware for synthesizer/sequencing toys I’m working on…

The summary of miniaudio is that for my cases, it allows me to enumerate audio input and output devices attached to my systems, then attach a callback to the selected devices where I then receive audio frames and/or send audio frames to the selected hardware… all in about 30 lines of C.

I’ve used this in conjunction with C/Go code interacting with a few synth/waveform engines (AMY and PureData / libpd), but I’m still new enough with Nerves that I haven’t fully gotten my C/port application to run there (I suspect it’s a lack of shared library for pulseaudio/ALSA/pipewire/etc there).

(warning messy code AMY here and libpd here)

Nonetheless, I think this is very solvable and I wanted to open a conversation for people here who might be doing things in Nerves that need audio input / output.


While my existing stuff is only loosely Elixir/Nerves adjacent, I’ve put a few notes on my rarely updated blog here and here.

If you want to see some unexplained demos of my WIP sound playground, I’ve got a few videos on YT showing off the prototypes at various points in time here… someone described this tool as it looks like brainf*ck and PureData mated and had a very ugly and noisy child, LOL.

Cheers and BEEP/BOOP/BANG (text sound effects :wink: )



Hi, just FYI :slight_smile:

I’ve ported Nerves to Zybo Z7-10 before, nerves_system_zybo_z7_10.
I don’t know much about music or audio and FPGA. But at that time, I thought that this board seemed to be suitable for playing with sound. There are audio input/output and FPGA, so we are possible to convert the waves.

I also found the intelesting youtube, you may have already watched.
Geoffrey Lessel - Controlling MIDI Devices in Real Time with Elixir and Nerves

beep/boop/bang !

1 Like