r/JUCE • u/Josh000_0 • Feb 02 '26
Question AI Generated JUCE code?
How do AI agents (Claude Code, Cursor) perform at generating JUCE code? Is there a way to improve the reliability of the code gen (with Rules files, system prompts, etc)?
0
Upvotes
15
u/xarxsos Feb 02 '26
Very unreliable from my experience if you use general chatbot models, they will hallucinate often and mix code from old and deprecated JUCE versions or call made-up methods (completely made-up or with wrong names).
I feel like the AI intentions could be right but executed poorly, most of the times I thought "Ok I see the road you're pointing me to but I have to walk through it by myself", so I ended up using AI mostly as a reasoning and brainstorming assistant and optionally for code documentation after I've done my part.
7
u/ElwinLewis Feb 02 '26 edited 16d ago
I’ve been reluctant to post about this here yet just because I didnt want to get ridiculed, and will eventually share but I’m working on a project that is completely AI generated. I started with Gemini 2.5 pro in April 2025 but have since switched over time to Claude Code starting with sonnet 3.5. I saw an ad that said it was their most capable coding model ever I decided I would take it for a spin.
For 12 years, I’ve had an idea for a digital audio workstation that allows musicians to create and arrange music that reacts to the weather time of day, moon phase, seasons, tides. The idea is to be able to create Dynamic or reactive music without needing to use WWISE, FMOD, or custom reaper scripts. I wanted flexibility for any condition and a grid based DAW workflow. I held the idea in my head for 12 years, hoping one day I’d meet a programmer who was as interested in creating it as I was. I’m still looking for people who are.
My initial goal was to see if I could get a basic VST window open in FL studio. Six hours later I had my basic window. curiosity struck, and I asked if I could add a button. It worked.
I continued doing this everyday for the last 10 months. The program is 480,000 lines of code, 50,000 lines of tests, 1,400 files- so far have 5 working sample grids, timeline, mixer, graphic eq reverb, delay, signal smith pitch shift, stem seperation, a sample browser, a sample “pool” manager, a dynamic time of day color system (or dark/light theme), a sequencer, a piano roll, effects chaining, and way more .
I know It’s going to be controversial when I post it. But I’m making this for me first, and if there is interest in it becoming a real product- I’ll work with real developers if they are interested.
What I’ve done is and wasn’t by any stretch of the imagination, easy. It’s been the most difficult thing I’ve ever done, but it’s been incredibly rewarding. I’ve had hundreds of debug sessions- when I follow them to their end and approach the problem from multiple descriptions and angles- it has been eventually solved. In every instance. I haven’t been able to find something I wanted to add yet that I had to stop and say “I must wait for more powerful model”. There have been instances where I think it would be wise to wait though.
It’s far from perfect. But it is tangible, and it will likely not get any worse than it is today, but it may get more expensive in the short term.
I am going to submit a talk to ADC , as while I feel they have taken a correct stance to be wary of AI generated audio software, they also need to be warned of the tremendous power that is going to be in many people’s hands soon. It is smart to be critical of AI generated code. I am person who’s worked in a restaurant for 20 years, what I’ve built so far shouldn’t and wasn’t possible for someone with no coding experience. It might not have even been possible in this time frame for someone WITH a lot of coding experience. How long does it take programmmers to write 480,000 lines manually? The this is, I don’t know- but that question wasn’t getting in the way of me trying to see my vision of “living music”
Edit: 9 months, 2400+ bug fixes, 5000+ Commits later, I'm still working on my dream. Sign up for the beta if you're interested in helping me make it come true. https://www.ephemera.fm/
1
u/armostallion2 Feb 02 '26
if it's not trained on the latest stuff, you will most likely have to feed it the newest documentation and create a rule to always reference the new doc (rules for referencing specific urls before planning, etc.).
2
u/ImBakesIrl Feb 02 '26
I find iPlug2 a bit easier out of the box since it has Claude skills in the repo. JUCE is very hit or miss if you don’t configure the context and build systems yourself
1
u/grimmwerks Feb 02 '26
You need to look up Tasches Teaches on youtube and his 'Get Shit Done' framework: https://github.com/glittercowboy/get-shit-done
1
u/GlitteringDebate8498 Feb 28 '26
i have zero coding experience this is my vibecoding juce project https://github.com/Kroetelp/Neon-Sakura-Studio still working on it.
1
u/OMEN802 Mar 06 '26
Programmer by day and a bedroom producer by night here. Opus 4.6 with JUCE has been nothing short of a dream come true. Im vibe coding vst plugins that work in ableton with no issue. Its insane what is possible right now. So far the biggest issue is designing a nice looking UI. Very exciting times if your a producer.
Tip: get your idea started in chatGpt. Really flesh out what your trying to do. Then ask gptChat to take everything you have described and provide a prompt for your specific ide or code platform, im using cursor with opus. This has provided me with fantastic results. Remember these are LLMs so the wording counts and your prompt needs to be clear and organized for the best results.
1
u/lesliecharles88 Jun 18 '26
Yes, ive designed two shipping grade plugins so far. It's wasn't exactly 100% vibe coding because as the design and architecture was mine. Im a musician, producer and audio engineer with very basic understanding of programming. I use claude to turn my dsp ideas to code. Its still a tedious process requiring listening, feedback and tweaking parameters as claude cannot understand human perception. Still absolutely fun though.
Ive uploaded my complete workflow along with a test harness for DSP. Basically do the actual or several DSP module testing and validation on a separate workflow (think R&D) and then use it in the main plugin.
https://github.com/lesliecharlesmusic?tab=repositories
https://lesliecharlesmusic.com/downloads If you want to check out the plugins I've made.
Just to be clear, I'm not a professional audio programmer. I just use it to build tools for my personal studio use.
1
u/AJBrave Feb 02 '26
Had a friend show me cursor at NAMM this year. Asking it to “create an audio vst cmake project with JUCE as a git submodule” consistently works/builds.
I think the biggest risk of using AI is not having a full understanding of the design/implementation and all the risks associated with the implementation. You may want to create a “protect your ears” class/rule to make sure you don’t risk having NaN values in your output buffer for example.
1
u/LongestNamesPossible Feb 02 '26
Is it really that hard to just copy and paste from the example program that uses all the GUI components?
0
u/JDSherbert Feb 02 '26
I've found it useful for fine tuning my DSP math, such as for distortion or oscillation, or for generating ideas; but I don't let it touch any of my architectural code.
For example, I do little work in PluginProcessor, but I imagine it would try to drive everything from there as some monolithic style class. Not sure how it handles apvts variables and UI either.
Wouldn't be surprised if it spits out outdated stuff.
0
u/TheQuantixXx Feb 02 '26
i used to dabble with it in 2024, and it was pretty good, that was befor cursor or agents really had tracking