Hi
Sure I'm not the first to think this, but why don't we have DSL for audio that spits out cross platform effects? NIM seems perfect for this.
It looks easy enough to use clap with it being c based but has anyone created a pluggable DSL inc ui for CPU/GPU - full cross platform - that works with all daws?
Design is important for this right?
After my experience seeing the differences all I wanted to write for simple gain is :
Should be able to create effect and ui from something like that.
Are folks waiting for nim3? No point designing with nim2 right?
It looks the industry are trying it with c++ but it doesn't have nims meta programming feature yet.
I'm not thinking of the code, more if we come up with a really good design it might be easier to write the code.
The building blocks look to be there.
https://codeberg.org/SpotlightKid/nim-audio-dev
Or am I missing something else? ie. too many vested interests in status quo. Would probably have to use the industry standard package formats.
Or is it maintenance nightmare? Take so long to do that the world will have moved on? AI can do much of work with a good design.
i'm not seeing the "guilt trip people into spending their free time for you".
People asking questions about why something doesn't exist doesn't necessarily mean they are asking for free labor, or labor at all. Sometimes people are just trying to discuss the current status, get other people's opinions, collaborate on design/code, etc, so efforts aren't duplicated and/or wasted. Even if they weren't planning on contributing code, what's the problem with proposing features, or even whole projects, especially in a discussion forum? They are contributing ideas. Anyone who doesn't feel like reading these ideas can just avoid discussion forums.
Please see this project list here for previous work in this realm:
https://codeberg.org/SpotlightKid/nim-audio-dev
In particular, there is (was) "omni", which is exactly what you describe, i.e. a DSl for audio effects, but it doesn't work with current Nim versions and also it doesn't include any UI support.
UIs for plugin effects in general are a hard problem. Most of the UI frameworks for desktop are not suitable, because:
This is one of the reason, why many use JUCE for developing audio plugins, which is a C++ framework and horrible, but at least it looks pretty.
---
Writing a plugin in Nim isn't that hard, though (if you know DSP). For example, with my 'nymph' library for implementing LV2 plugins, you can easily just copy one of the examples and just change a few lines. BTW, LV2 plugins are not only for Linux, they are cross-platform, although plugin hosts supporting LV2 on non-Linux platforms are scarce.
One of the nymph examples even shows you how to implement the DSP part in FAUST and generate a wrapper plugin for that, complete with parameter definitions etc. This currently only supports audio effects (not synth, or MIDI processors), though.
Thanks for sharing - UX doesn't have to be pretty if the sound is good but not everyone will agree with me. Wayland(x)/Pipewire should be a more stable foundation eventually.
I'm glad I'm on the right side of history, webview is popular for effects but probably need something else for synths. Will do a bit more research into UI.
Hi. (Im a newbie to programming, yet, Im replying here, since it's related to audio UI realted research, which I guess, I've have done to some useful extent)
LVGL UI could be useful (retained UI framework - written in C; it has Nim wrappers, though it seems it works better on Linux, not sure about other platforms - as written in its github repo: https://github.com/mantielero/lvgl.nim ).
Reason for suggestion is... as from the look / forum posts / manuals, LVGL supports various UIs that one may want for audio related UI stuffs, yet in lightweight way. For example, for the need of connection matrix UI, a forum answer suggests a workaround to use their "lv_table" module (https://forum.lvgl.io/t/add-button-matrix-patchbay/7601). Kindly take it cautiously, as I'm not someone who tried this and answering here; I've only researched this previously.
I hope, you'd find the answer to what you're looking for. Let us know.
uirelays was easy to get going with SDL3 on fedora 44. Looks a very handy UI tool - it looked okay on my 4k screen.
Being nim native is big plus too. The research I've done so far, SDL3 seems like a good lib to use with it's 3 different rendering modes. Does anyone know if we can use PNG background with rectangles and lines?
Note that I have no experience with GPU programming :-(
Tending to think I may need to create a specific bridge/tunnel middleware for all the ui libs i.e not using the callbacks.
I imagine the different UI libs all work differently in this way.
AI told me I need to use atomic/ring buffer at least for on-line stuff. Realtime thread could be running with 192K sample rate for audio.
Probably will do something different for offline (batched) work. In the audio world we have realtime time, low latency requirements for recording but for mixing, latency is not an issue.
Buffers usually controlled in the DAW though which can be problematic.
Side note, handling rendering on a separate thread is what FigDraw is designed for. It also doesn't depend on non-Nim stuff like sdl3. ;)
You create a seq of Fig nodes that represent rectangles, or images, etc. Then you can send that list in a channel (aka atomic ring buffer). It pairs well with siwin or windy.
You should use --mm:atomicArc and threading channels.
So a bit more setup work, but also provides a richer API like color gradients.
As always there exists a ready-made solution, that according to a video by David Fowler (producer) might satisfy most basic needs for DSP-hacking [ https://www.youtube.com/watch?v=_UZJw0f1Pb4 ]. Formula is a VST-Plugin and a standalone App for Win/Mac/Unix. It comes with faders and knobs to be used inside a code-UI (for C-code). In the video, the VST-Formula plugin is used alongside another Plugin Plugin-Doctor (paid, but there are similar free ones around) that can provide a graphical view of the resulting signal. The Formula-plugin has been open-sourced by Soundspear in 2022 and lives on github https://github.com/soundspear/formula/tree/develop. It uses the bespoke C++-framework Juce. I'll try to make it work with Nim - but my Cpp is limited - we'll see. Formula can export the plugin-code into a VST3-plugin (maybe other formats, too ?). I like the concept (standalone and VST-plugin-mode) very much and as shown in the video, one can solve real-world problems with that. If one wanted a Nim-only solution using UIRelays one needs to wrap C++/Juce one way or the other. Since this has all been done already, maybe on can add/exchange the Nim compiler. And integrating smth. sweet like Omni would be nice too :).
greetz & beatz, Andreas
Not much advertised here yet, but I'm working on plugin host for Wayland Linux as an experiment.
https://github.com/greenm01/nilrack
I also created wayembed (not Nim), which will enable it to happen. Plugins have been a known problem on Wayland for a long time.
Done more research and there is a tonne of stuff in c++ land ranging from libs to framework like juice and i got inside info on some of the huge plug in builders in windoze and they have their own ui ip.
I’ve just got recoder pedal (from gamechanger) that lets me use any sound with guitar/keyboard - I can plug it into mixer too.
I will focus on nim meta programming in spare time.