3 ms·
I always wanted to do this, I think Julia is a good language to develop audio plugins and virtual instruments. But its currently missing real time tooling and b
by minetest2048 2y ago
I always wanted to do this, I think Julia is a good language to develop audio plugins and virtual instruments. But its currently missing real time tooling and binding to audio plugin frameworks such as CLAP JUCE VST3
There is a way to compile Julia to webassembly: https://tshort.github.io/WebAssemblyCompiler.jl/stable/examples/lorenz/ https://tshort.github.io/WebAssemblyCompiler.jl/stable/examp... , it might be possible for you to run the julia script clientside. I don't know whether FFTW.jl can run though for the spectrogram plot
Another related demo is https://youtu.be/bujv4mxG7mE?si=LMGri56Gzs7mWTN_ https://youtu.be/bujv4mxG7mE?si=LMGri56Gzs7mWTN_ , they solve differential equations of a saxophone
- ssfrr 2y agoOne of the issues with Julia for this kind of thing is that it’s tuned for throughput more than latency, especially the sort of worst-case latency you worry about for realtime systems. You have to be careful to make sure any methods that are called ahead of time so they’re not JIT-compiled in your audio loop. It’s also hard to write zero-allocation code, which is what you need if you don’t want the GC pausing your program at an inopportune time.
- deleted 2y ago[deleted]
- patagurbon 2y agoThese things are all much improved recently, but you are correct not there yet. ‘juliac’ is a new static compilation option which should release around 1.12, and there are others like Cognibotics experimenting with Julia for hard real time applications. Julia was also recently used by WhatsApp for audio codec R&D. Hopefully these use cases will drive better guarantees and tooling.
- ChrisRackauckas 2y agoThere's also the new GC(s) that are almost ready to merge that have different properties that can be tuned.