• Hi and welcome to the Studio One & Studio Pro User Forum!

    Please note that this is an independent, user-driven forum and is not endorsed by, affiliated with, or maintained by Fender. Learn more in the Welcome thread!

Building A DAW in C#?

Gray Wolf

Active member
Overview:
I've began the adventure of building a Windows DAW using C# / .NET. I know, it sounds crazy right? :LOL:

I thought it might be interesting to share the path here for any other tech nerds lurking who may be interested.

Why C#?
Because C++ is a very difficult language to learn and use, especially for something as complex as a pro daw, and I don't code in C++.

I took some C++ classes a few years back but it became clear to me pretty early on that my current stage of life is well beyond the point of having the patience or motivation to learn something that complex at the level required to do what I wanted to do with it. C# brings the level of coding difficulty down considerably, but of course, it's a managed language that has considerable overhead compared to C++.

I have a very long history with .NET from the VB side of the street, so I do actually understand C# code. This means that I can help with and independently maintain the code base even if it's mostly vibe coded, which it will be. With C++ I would be a total and complete spectator and be tied to an AI agent in perpetuity.

What about the Audio Engine?
That was my main concern when I first started thinking about doing this.

There are audio engine tools out there that work in .NET such as NAudio, which provides the tools to get that done, including VST3 support. It actually works. My alpha daw can play midi, load and play VST instruments, etc, but it's performance is not good enough for a professional multitrack audio workstation. I stress tested it with 5 instances of BBCSO and it failed miserably. Maybe partly because the VST3 support is new and is noted as being a preview, but it's not acceptable for that task by any measure. I think it's threading is not very well done, as it tends to choke with multitrack loads.

What does that mean?
This is where things got interesting.

In order to be viable, the audio engine has to exist in C++. I looked everywhere and there are literally no .NET tools that can handle that job on the level required for a pro workstation. The best path was clearly the free Tracktion engine and Juce.

That does not mean I would then need to write the DAW in C++, on the contrary, I only need the audio engine in C++, while keeping the DAW project in .NET with C# and Avalonia, which is an open-source cross-platform UI framework for .NET. Since I'd already made significant progress with C# and Avalonia, I was not prepared to throw it all away and start over in another language, and become a useless spectator to a vibe coded C++ project.

Connecting The Two Layers
Given the reality of the above, I was faced with two very specific needs:
  1. The daw behaviors, design, UI and graphics and all that need to remain in C# for the reasons and progress previously outlined.
  2. The audio engine needs to be in C++ since there are no .NET libraries up to that job on a professional level.
So how do we get that done, how do we connect those two things? By creating a DLL bridge to the Tracktion engine, whose methods and properties can be called from the .NET project with relatively simple commands.

As stated earier, I don't code in C++ so I obviously cannot create that DLL. What I did was hand that job off to an OpenAI autonomous work agent who is, as I write this post, building the C# -> C++ DLL bridge and sending me Visual Studio projects as milestones to test along the way.

That's where I am now, about to test milestone 4, ASIO driver discovery and configuration.

Once the basic DLL is done, I can go back to the original C# Visual Studio project and continue working on the DAW while the Tracktion engine handles the audio layer via that bridge. Along the way as things come up, automation, whatever else, I can go back to the agent to update the bridge to expose more things that I may need from the Tracktion engine.

Summary
It's a very intersting adventure. I'm only on day 3 and even though I can't show it yet, the UI looks pretty nice and actually works with the "not really up to the job" .NET audio engine that it's currently attached to. I'm looking forward to handing the audio work off to the Tracktion engine when the agent finishes the basic bridge.

At any rate, this path looks to be viable for anyone who might want to do similar without going down a C++ rabbit hole.

I'll update this along the way and eventually post some images once the IP is protected.
 
Last edited:
  • Like
Reactions: AAV
Good luck with your project. It sounds (pun?) like a fun one
 
  • Like
Reactions: AAV
Linked below is an alpha preview PDF that outlines the direction of the new workstation. It doesn't yet have a name because the name(s) I wanted to use or liked all collided with existing trademarks. I'll have to eventually come up with a good original name that doesn't infringe on anything.

Alpha Preview
  • The document makes it clear that this product is not the same as most other workstations. It's very different in some obvious ways.
  • It's running on the Tracktion audio engine now. The transition I spoke of earlier has been completed.
  • The UI is about 80% done, but there is still lots of work to do in general before it gets to a beta stage.
I wanted to share the preview here to get general impressions about the direction and focus from those who may compose orchestral scores.
 
How about 'Senza Nome' or 'Tacet' for a name? Both a play on 'no name' or 'to be decided'!

Looks an interesting project. I do do a little bit of orchestral stuff, but purely for fun.
 
Whow! This piece of software is not for me, so I'll tune out after this comment, but it seems like a fantastic idea. I absolutely love the visual language. Concerning the questions asked in the document:
With the settings box next to the orchestra image, for me it is immediate clear what can be controlled, it's a clear and visual gui so far. Instrument groups seem to follow the convention as I mostly encounter them 'in the wild'. I'm not working with VST instruments, so if controls are missing I couldn't tell and as to what libraries should be included, that's not a question for me either. Good luck with the development!
 
Good luck! I was looking into Rust, as it has quitesome advantages over C++ or C#, and it is the up and coming developer language for audio applications. With nih-plug (VST3 and CLAP hosting) and cpal (audio IO with ASIO/CoreAudio/ALSA/JACK backends) you get two libs that do the heavy lifting. But I know that I won't have the time and patience to build a full production-ready DAW.
I will have a look here from time to time to congratulate on your progress;)
 
Impressive, Gray Wolf. Good luck. I cant help but think while it's an intriguing adventure, you already have quite a serIous DAW that you've found in Studio Pro. I'll guess the end, justifies the mean. FWIW, what I do see as a very usable tool is a very visually oriented sequencer along the lines of Stepic. If done properly, it could serve as an excellent tool for arpegating, both MIDI, VSTi's, and could contain automation, and scales. While Stepic and a few others do exactly that, the real trick is in the GUI, and making that visually useful, and powerful.

Anyhow, have fun! I guess some new DAW will provide you with what it is you need. You'll no doubt have all our support. Adding ARA2 anytime? Yikes. My knees buckle at the thought of such a project.
 
FWIW, what I do see as a very usable tool is a very visually oriented sequencer
Not to derail this thread, but if you are adventurous and like to explore remote from the usual, you might find fun in my own attempt, plexum. It combines properties from both an arpeggiator and a sequencer and I tried to visualize its behavior with a different GUI. Also, you just need left or right click to control everything.
It is no competitor to something like stepic, but then again it's free ;)

(at mod, feel free to delete if inappropriate)
 
@lokeyfly Oh for sure, it definitely won't replace Studio Pro. :) To think so would be delusional.

It's more just something I always wanted to do and it only recently became possible for someone of my skill level.

Anyway, It's running ok so far, especially when I shut down Visual Stuido and run it in release mode. Still a long way to go before all of the features on the todo list are implemented.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
It's more just something I always wanted to do and it only recently became possible for someone of my skill level.
Excellent! From the GUI, it looks like you're moving along. Good luck connecting the two layers, and I hope you find some creative avenues along the way!
Not to derail this thread, but if you are adventurous and like to explore remote from the usual, you might find fun in my own attempt, plexum.
Awesome. TY, tulamide.
Also, look into Stellerizer from Chis at S1gns 0f L1fe.

Back to Gray Wolf's slick project!
 
Back
Top