I’ve also thought this would be a nice and natural addition. Currently I’m enjoying that I can open EZ Drummer while using MOD Desktop to provide beats.
Another tool I’ve always liked for exploring or self jamming is https://chordbot.com/ and I think a version of that could exist as a plugin.
Totally agree, it is on the top of my wish list for writing an LV2
If you haven’t tried yet, but the code-writing and explanation features of ChatGPT / CoPilot and the like can be very useful. Being generous, I’d expect at least all the open source LV2 code on the internet to be part of the training data.
Writing LV2 plugins from scratch is not really recommended for beginners imo, even the best developers get confused. I doubt that LLMs would do any better here (they are already pretty confidently stupid as they are).
Better to use a plugin framework like DPF or JUCE to create one.
would a template code repo work perhaps? with documentation from lv2 side directly in the code base and build stuff already done.
needs to be a collaborative effort though.
this part actually worries me, these tools not just spit out a lot of crappy code but also the machine generated output is not copyrightable. we are moving too fast into a legal grey area without understanding all the legalities of such a thing.
it is not the MOD Audio company take, but my own on this.
personally speaking I advise to stay away from such tools for code writing until the legal side catches up, and also find it hard to take any project seriously that uses its code output directly.
Absolutely!
Some of the basic LV2 examples from Programming LV2 Plugins MOD-ified
with great inline dox and build stuff (Cross platform of course) that can target either MOD Desktop or a MOD Device.
The most basic example being a HelloWorld equiv to test build/deploy toolchain, and then more complex examples that bring in more LV2 functionality. The focus not being on super sexy audio processing algorithms, but more on how to best structure the code and interact with the LV2 environment (Including MOD extensions) and the MOD UI/HMI stuff; perhaps some key principles to build safe and performant LV2 plugins.
Sam x
I’m aware of the legal and ethical concerns and it’s good to call those out. There’s quite a lot of nuance in whether these tools are good or bad and in what context they’re being used in that can’t be discussed tidily in a paragraph. I think you’re reading too deeply into the “code-writing” part in the context of suggesting whether an LLM can be useful for helping someone understand how something works.
This is hyperbole. Code quality can be judged and tested, irrespective of whether it was produced by hand-typing, cut-and-pasting, code generation tools, build scripts, macros, auto-completion features, or LLMs. I think you might be saying this from a stance of someone typed in ‘make me an LV2 distortion using {sophisticated sampling} and {hot new non-linear technique}’ and published the result straight to the internet. That’s far removed from what these tools are capable of and far removed from the use cases I’m suggesting here.
My colleagues and I are using CoPilot/ChatGPT regularly to get real work done for clients who pay us a lot of money to produce stable and secure software. We’re building LLM based services for well-known US academic institutions. So I feel at least as qualified as the other internet quarterbacks to comment here.
I’ve worked on a hundred different sets of code in my years as contractor/consultant, many of which were in production at money making companies, all of which were written by humans. I think you might be truly amazed at some of the things I’ve seen in terms of engineering decisions, code quality, security… Rube Goldberg would have blushed many times over.
As per my point of view, it might be the opposite.
LLM generated code may take care of quite a loе of boring boilerplate and primitives, when supervised properly, leaving more resources to invest into proper high-level app design and cleaning code. At least that works fine for my not-so-hardcore programming needs. With LLM augmentation I just do not get exhausted a long before it comes to refactoring point.
However, LLM is inclined to hallucinate in cases when there was not a lot of publically available sources to learn from on the topic, or tends to provide outdated solutions when things are changing rapidly. Unfortunately, as result, in case of LV2 I found LLM to be not that useful, just because LV2 programming is too niche thing with too few examples to give LLM opportunity to shine, like it does with some routine well known stuff.
Probably LLM’s lack of LV2 knowledge could be compensated by using some langchain augmentation, however I have no experience with that approach so far, so it’s just a guess.
As for ethical side, I do not have much to say. We all learn from other people’s source code, and LLMs are not an exception, I do not see much difference. Actual effect on the industry would be caused by laws, precedents and court judgments, and not my opinion anyway. So far I have not heard anybody to be charged for using LLM output, except for those lawyers who used GPT hallucinated fake references to unexisting cases in their lawyer paperwork, but it is far from our usecase.
to each their own, and I dont want to derail this topic into AI/LLM things, so will say a final thought on my side.
I really do not appreciate a decade of work done in very clear and restrictive licensing terms to be simply license-washed away by chat bots.
back to the topic at hand, here is an idea for an LV2 + MOD focused template:
project setup via cmake, so it nicely integrates in existing IDEs
codebase in C-style C++, trying to make it usable for both C and C++ people
define the IO, parameter count and other minor meta-data on the cmake side
have the C/C++ code use compiler macros so it can use the data from step 3
add some cmake utilities (within the repo but outside the main entry file) that can generate the LV2 ttl for us based on that data (later we can see how to still allow customization)
we can start simple and just have a very basic simple template that gives the setup for an FX plugin.
then we see if this macro stuff is still usable or gets too ugly.
it is hard to know in advance without seeing directly. best is just to try and start it I think. it will have limitations and that is okay, anything more complex can and should always be done by hand.
Nice! For those who prefer Eclipse/VSCode IDEs this will be lovely. I presume it would also integrate well into some of the vim based ‘IDE’ such as LunarVim or NvChar and also usable for command line junkies. I’ve seen some take the approach of using CMake plus Ninja … of value?
My OO/C++ bias pokes me here, my first successful attempt at a plugin was in C but my next step was to move to C++; it helps me better understand what is going on …
Like the sound of this, I wonder if it would be viable to have all the plugin metadata in a header file and then use this to emit the ttl files with all the adornment they need?
I want to purposefully avoid it at first and keep all meta-data on the cmake side. Mostly because any data that is in source code form requires building both for host and target, making cross-compilation difficult. (we need host build for running the ttl generator and target build to get binaries for MOD units)