Ardour development and AI

I meant someone “not you”. Someone who thinks: great, i would love to do such, exactly what i want.

But really: it was just one of those things i loosely think about these days. There’s plenty, but it seems Wayland is kind of a bigger problem in general (it even made me switch from fluxbox to kde, to avoid problems in the future).
Yeah, where to draw the line.

My poll was pulled alright, I respect community and staff willing to avoid polarization and oversimplification on the matter, I thought after more than 200 messages where some ideas are starting to repeat themselves we could use some simple and non-binding “state your vote” moment just as a reference point, maybe I missed presenting the option “I don’t know”.

Anyway I think most of the current community just trust the team, a team that has proven before to stand by very reasonable principles, AI or not we’ll stick around.

1 Like

By the way, wanted to share a bit old but very thorough and interesting text about AI environment implications:

A bit of perspective to maybe moderate some extreme positions also found in this thread.

1 Like

Just to be clear, in the very isolated scenario I was presenting, no AI code would be running inside Ardour, and the bug reports themselves would be ours, just like today, the difference being AI sorting and helping us users better communicate and present those bugs to developers, who would then be the ones in charge of working on them, just like today.

@x42 Here’s a technical question…half technical, half paranoid :slight_smile: .

Let’s say you add Wayland support using AI.
You test it, works just fine, no issues noticed. But, on the other hand it contains 10 000 lines, and you realise it’s just to difficult to review it all thoroughly.
Who can say that of all those new lines there isn’t any made for let’s say a simple protocol to, one way or another, “phone home” at any given moment? You’ve seen how poweful AI is even at this very moment. How can you trust that your own programm isn’t making possible to an AI agent on the other side of the wire to read user’s midi data he’s working on, or any other data, for that matter?
Or to reframe the question, how can you trust these companies that run data center based AI worldwide, when they have been proven to not care for general public & their privacy?

OFF - Check this logo out :slight_smile: :slight_smile: :slight_smile: …it’s an old one, i don’t think it’s realy connected to AI and it had many different but similar iterations over the years…but yours definitely existed long before this one (it just crossed my mind as an interesting side note…first time i saw it was trough the bus window, on a billboard…i had a “matrix” feeling :slight_smile: ):

Seems like a solution looking for a problem to me

As long as its happening to someone else I guess.

I live in a nice part of the UK. I like where I live, but our government has decided that an amazon hyperscale data center should be built around ten miles away. I don’t know exactly what the impact of that will be if it goes ahead, but unprecedented temperatures and lack of rainfall this summer already put a strain on local water supplies, we’re being told to save water and that prices will go up to pay for essential infrastructure improvements, including a huge reservoir which will further decimate agricultural land.

And that’s just to cope with present demand, while our politicians who until recently were committed to ‘net zero’ are now talking obscene and laughable nonsense about the UK becoming an “AI super power…” - seemingly unconcerned about the environmental impact of huge amounts of fossil fuels being used to power these monstrosities since our electricity grid is already almost at capacity (and might be one of the reasons the same idiots are making opaque and mind bendingly arrogant threats that we should ensure we have ‘at least three days of supplies’ in case of some unspecified national emergency.)

So I have opinions, my lived experience is directly affected. The companies behind these technologies are selling it on the basis that it will ruin the local environment, damage the economy, and in the worst case pose an existential threat to humanity, but its ok, because at least you get to lose your job.

You couldn’t make it up. But I guess someone already has.

5 Likes

Slightly OT, out of curiosity:

Is it an urgent problem though? I am using Ardour on XWayland exclusively since 6–7 years, thus I cannot compare it to xorg. My experience is (so far) quite OK. The only drawback I can remember was because of the fractional scaling of the screen, not supported by X, but I have solved it with a 4-lines bash script. Not a show-stopper by any means.

Also, X will be around for maybe other 10 years.

According to Paul post, the situation does not look dramatic, and it is slowly improving.

2 Likes

10000 lines is not a lot for that particular feature.

AI struggles with large and complex tasks and can’t foresee architectural issues that might happen down the line. But it is very good at implementing specific and focused tasks.

When you use AI to implement code you start with a spec which you then break into detailed tasks, tests, and benchmarks.

Each task is broken down into subtasks which can be implemented by the AI a bit at a time and checked as you go. The AI can check the code it’s produced matches the spec, the task description, tests and benchmarks. If it finds an issue it will let you know and it can be fixed.

After each task you can check the code and look for issues. If you find any code issues or ran into any problems during the implementation you can get the AI to perform a retrospective of the coding session which documents why the problems occurred and how to prevent them next time.

Then you move on to the next task.

This produces high quality code that is quite easy to review.

This is how you use AI as a code implementer, rather than as a replacement for a lead developer. It’s completely different to vibe-coding, which produces horrible spaghetti code. It’s also a lot slower than vibe-coding, but a lot faster than manual implementation.

3 Likes

This. Thanks Mike.

On the matter of donations and subscriptions, I think that the label “made by humans” has much more value of the “built with rust” or whatever b.s. we see hourly on that other forum. As others already pointed out, I would rather fear a drop in subscriptions if you go the chatbot way.

I guess time will tell.

That would put an end to it right there.

Just like with pull-requests: I may not review it in depth, and there may still be bugs, but if I cannot understand and explain what the code does or if it’s conceptually at odds with Ardour it won’t get merged.

and as @DHealey mentioned, one would develop this in small steps.

2 Likes

The nominal Wayland backend was produced in 22 steps. Claude was actually incredibly impressive at coming up with its own plan, which involved about 5 stages; these were filled in by my actual testing of an Ardour build running directly on Wayland.

Generating “tasks, tests and benchmarks” for such a thing is likely almost as much if not more work than actually doing the implementation (no such tests exist, for example, for any other GDK backend).

The code is simple - most functions are at most a dozen or two dozen lines, and the semantics are clear (because this is just “bridge code” between the GDK API and the Wayland API).

I even asked Claude how similar this implementation was to the ones found in GDK3 and GDK4, and it gave a very detailed (and, AFAICT, accurate answer): not as much as you might think, because the drawing model changed between GDK2 and GDK3 (and then again for GDK4), which alters a lot of the fundamentals. It did note areas where it had used the GDK3 version as inspiration more directly.

2 Likes

I guess the method @DHealey and you are describing is completely fine with me, if it’s fine with you. You’re using it to speed things up, like an advanced auto-complete&correct, and not to do the things you can’t grasp. That’s ok from my point of view.

Now, environmental issues are whole other topic, but if you as a dev think it’s reasonable/ necessary/ inescapable, who am i to judge?
(I mean, i drive a car, use plastic bags&bottles, and haven’t planted a tree for a while… actually i planted some trees recently, but my dad forced me to :slight_smile: ) .

Yes. To some degree, but AI can create the unit tests and benchmarks as you create the tasks.

The workflow I’m using is I create a ticket for feature X, then the AI quizzes me about the feature until we have all the details established - this is a great brainstorming tool by itself as it often makes me aware of things I hadn’t considered. All the details are added to the ticket.

The AI also extracts important parts from this discussion that are relevant to the overall architecture of the program and stores these in a specification document. This builds up over time and can be revised as the program changes and grows.

If necessary the ticket is then broken down into sub-tickets with different tasks, like researching, prototyping, implementing, etc.

After that it implements the tickets, which includes creating unit tests and benchmarks if necessary (the details will have been agreed upon in the quizzing stage).

After the implementation it runs a review pass, comparing the code to the spec and the tickets to make sure everything that was agreed was actually done. If there are mistakes it will ask you what you want to do about it and usually the solution is to run a fix pass.

How the tests and benchmarks are used varies depending on what you want. I have a script that runs clang-tidy and clang-format, all the tests, and then the AI checks that the benchmarks are being hit. I’ll also do profiling now and again and larger codebase reviews.

This workflow comes mostly from Matt Pocock. I’m using his AI skills files with Claude, and I’m using Herdr to manage the agents, which is apt because I feel like I’m an AI shepherd now. Here’s a video explaining the process: https://youtu.be/M6mYodf0dJM?t=504

Additionally I created a delegate skill which lets my Claude session run multiple workers or agents in parallel in separate worktrees and then merges and tests them. This makes it much faster to implement a complex feature that has been split into sub-tickets.

The problem here is that the relevant tests are graphical. Claude already built a test harness to do pixel-level comparisons of the outputs of the wayland and X11 backend, but it can’t run an actual Wayland compositor itself (it built its own compositor for testing :slight_smile:

There were several things I noticed by testing in a “real” compositor that wouldn’t have occured to me (or Claude) to check on until I saw them and had them “hmm …” feeling.

Remember, not violating the Wayland protocol when interacting with the compositor is only a small part of the task here: what is required is for every pixel to be rendered identically, every user input event to be handled identically, and so on. My impression from Claude’s remarks about its own testing was that it is not capable of doing this sort of testing.

In many ways, just running Ardour itself with a reasonably complex session and playing with it for 5-10 mins provides better test coverage for a GDK backend than anything we might ever come up with automatically.

For graphical testing I’m using a virtual X display, I haven’t even thought about Wayland because I don’t use it for my stuff. For some stuff I just have to test it manually - I do this mostly for profiling.

Indeed, and social impact when using models trained by large corporations.

–

As an aside. There is a monthly Berlin Audio Dev Meetup that I frequently attend. Usually around 50 to 75 persons incl. devs from Ableton, u-he, NI,… and some independent persons. The usual Berlin crowd. I’m often the only one there who is not using AI assisted coding. It’s kinda scary, and those are smart persons, who also make fun of vibe-coding.

It seems that soon there won’t be any devs that would want to work without AI.

3 Likes

…aaaahh :slight_smile: …you didn’t have to say exactly this :slight_smile: . If i was a dev on my own application for as long as @paul and @x42 are, i wouldn’t have the heart to do it after reading something like this. The same way i couldn’t insert, let’s say, great sounding background choir made by Suno to any of my own music…i’d just be too sad about it.

1 Like

Yes, i’m vaguely aware of the current state. Some friends of mine are IT guys (mostly sis admins) that work closely with programmers. AI is the talk od the day, every day :slight_smile: .

And what will they do when the cost of AI is no longer being subsidised by billionaires, and they’ve been AI coding for so long that they’ve lost the ability to code using their brain?

(Aside for all the other objections I’ve mentioned, I actually like coding, I like the intellectual challenge, so for me there would be literally no point if all I did was use AI tools. My entire life I’ve always been motivated by a need to know how things work - not just superficially but how they actually work. I would take things apart to figure out how they function, and I’ve built stuff in order to prove that understanding to myself, both in hardware and software)

2 Likes

That’ll doubtfully happen…
Something will change, like, maybe it’ll all get more specific for certain tasks, or become much more locally oriented once the bubble bursts, but i doubt AI as a technology and a tool for programming will ever go away.