Processing real-time streaming audio, controlled by a GUI

I’m a relative newcomer to Julia.

I’d like to build an app that processes an audio stream in real time, with processing parameters controlled from a GUI. I’m looking for suggestions on how to approach this, or better yet, pointers to examples if they exist.

My first thought is:

  • the real-time loop runs in a separate thread, using PortAudio.jl for i/o, with Julia code in the middle to process the stream.
  • the GUI runs in the main Julia thread, and sends control information (eg, “stop”) and changes to processing parameters to the real-time loop through some safe mechanism (RingBuffers.jl looks like a good candidate).



This talk does audio processing

Thanks @jar1. They don’t have a GUI front end so it doesn’t solve my immediate problem. However, they address some questions I will be asking soon so thanks for pointing me to it.

For GUI there are

Thanks. What I was primarily looking for is an example of the multithreading with one thread running a tight real time loop and one (or more) much lower priority such as, but not necessarily, graphics. Sorry I wasn’t more clear.

This will be a good introduction with basics of real time audio in julia all in Pluto and a good testing ground:

I use multihreaded system with main thread for rendering and other thread for handle audio system in GitHub - ashwani-rathee/Miner.jl: Written in Julia, Makie , Miner.jl/Miner.jl at 8b3c4c5dbb7c9cc0d3e7a22d6a536f9f2299849c · ashwani-rathee/Miner.jl · GitHub so I might help with what you might be need if you can describe little more. I also sort of control the music player through GUI only. Example here of control through GUI: Miner.jl Weekend Updates(09-04-2023) - YouTube

1 Like