Midi sequencer - where to beggin?


I want to build a simple midi sequencer with Juice as a standalone application (console), but I struggle to know what to do first.

To learn how the Juice API work I want first to:

  • Loading a midi file (that contain 1 track)
  • Choose the midi port to send midi data
  • Start / Stop the player

I know conceptually how to handle the playback, but how Juice implement it, is still not clear for me.
I read already all tutorials about midi on Juice website, Github projects but it still not clear for me.

Can someone example me how to handle it step by step with Juice or a link that explain it clearly ?

I forgot to mention that I want to use Juice SDK as a static library.

My advice: learn Tracktion as well. The TracktionEdit is the one abstract data structure that will lead you to harmonious MIDI … JUCE is definitely needed for your project, but you’ll proceed much faster once you have grokked Tracktion …

I still didn’t get the difference between Juce and Traktion Engine, I am a complet beginner.

Where could I find a step by step tutorial for this TracktionEdit class you mention ?
I already check the Github repository but the explanation seems targeted experienced developper.

Tracktion Engine is a DAW engine built on top of Juce. If you are planning on a commercial product, you should then take into account that both have their separate licensing fees.

There isn’t much, if any, tutorial material about the Tracktion Engine, but there are some code examples in the Tracktion Engine repo. IMHO, you should know Juce pretty well already before trying to use the Tracktion Engine.

JUCE: handles low-level audio I/O, including interfacing with the operating system to get access to high performance audio features and to expose all of the abstractions involved in Plugin development, across a variety of different SDK’s, in a single unified interfaces. Also provides a GUI framework with which to develop Plugin-style UI’s. Allows you to mostly create plugins, but also manage the low-level abstract audio objects involved in high-performance audio. (And MIDI.)

Tracktion: Sits on top of JUCE and provides a higher-level abstraction for DAW-like transactions, such as recording to tracks, adding effects in a buss, and saving the whole state in an abstract form that can be reloaded/manipulated programmatically, etc: the TracktionEdit class, which encapsulates all of these things into a manageable object for recording/playback/etc. Provides the basic hooks required to implement a UI on top of the TracktionEdit - and when you are done with that, you’ll have your DAW.

You can do everything you basically need to do, to implement a MIDI sequencer/editor, in JUCE only - but when you’re done you’ll have something that looks quite a bit like Tracktion, albeit without the years of developer man-hours thats gone into Tracktion and makes it such a high quality framework, in the first place …

@austrianaudioJV Ok, I get it now, but the only things I find as documentation for TracktionEdit class is an encyclopedia : TracktionEngine: tracktion::engine::Edit Class Reference.
It is interresting but I did see implémentation example.
Did you know one ?

There aren’t a lot of great tutorials for Tracktion yet, the best thing I can advise is to look at some of the other DAW projects that are out there, and read their code - in fact reading the Tracktion code is really the best way to get familiar with it as a framework.

But, if you want to see an existing implementation, check out the LMN-3 DAW:

Its an open-source MIDI-oriented DAW, from which you can probably learn a great deal - its one of my favourite projects for the reason that they also implemented an emulator of the actual hardware, in JUCE, so you can really dig into the DAW and run the emulator, and get things rolling without having to build any hardware. A really great project, worth the time to do some code-reading on it …

1 Like

Interesting but very complex to follow the usage of TracktionEdit.
Searching Daw example, I tried but the most of them are not for didactic purpose.

If you know how to use TracktionEdit, could you explain me what to initialize first ?
I know already that the TracktionEngine have to be start, but what I have to care about for initializing, and to close ?
Where I get the data or how can I manipulate thing that TracktionEdit initialize ?

Get familiar with JUCE.

Then, get the Tracktion Engine code and build the examples. You will learn a lot from going through the examples. Start with the MidiRecordingDemo.

I built an entire fully functional DAW by starting with the Tracktion Engine demo code and combining functionality until I could record audio and midi. From there, as I grew to understand Tracktion Engine better, I added functionality like midi editing, automation, etc.

DAWs are hard. You will have a steep learning curve. But if you are up for a challenge, then it can be very rewarding!

1 Like

If you built “an entire fully functional Daw with the Tracktion Engine”, you can certainly write me a simple code to introduce the use of TracktionEdit ?

Surely, I have to be familiar with Juce, but a simple introduction code from someone who implement it will help me to better understand.

Come now, you can’t expect to have everything handed to you on a plate. Take a look at how tracktionEdit is used in the LMN-3 DAW, and you will gain a lot of the knowledge you need in order to start asking smarter questions …

1 Like

I didn’t ask an entirely code that fit exactly my project, but how you guys implement it in your projects, so that I can “learn” from it, and could have more insight to understand Juce and Tracktion Engine.

Perhaps I missunderstood the utility of this forum, if the answer I get is: “learn by yourself”.
It is exactly because I didn’t find enough informations to learn that I open this topic.

I found in the meantime other SDK with a better documentation that explain “how to do things” that I experiment and work well.
But I still think that Juce and Tracktion Engine provide wider functionnalities, so just help me to have more insight than “learn by yourself”…

The point is, there are no tutorials that we can easily refer you to - and every single one of us has been able to make progress with Tracktion by reading its code, and the code of other open source projects that use it. This is really the best way to learn Tracktion: read its code.

Follow our advice: learn from the LMN-3 DAW (its not that hard to read its code, and it already does a lot of what you will want to learn about), read the code around how it handles Tracktions Edit class, and you will gain a lot of knowledge from that.

If you can’t spend a day or so code-reading an existing DAW to analyze its use of the classes you are interested in, you’re probably not ready to tackle such a huge task, and need to scale back your own expectations.

Or, rise to the occasion, spend some days doing some code-reading, and then come back and tell us how to do things … this forum is a community, none of us are paid to answer questions here - so please, by all means, contribute to the community.

1 Like

In short words, you say: “do what we’ve done and you find out”.
So, what is a point of a helper community if the solely answer is “do what we’ve done”?
If I found how to do things I will certainly not ask questions here, nobody will be. So, what is the point of a “community” if this “community” didn’t provide things that they learnt?

It is note because it was hard top you to learn that it should bé hard for other people to learn.

I know it is free advice, it didn’t plan to make commercial things, I am an amateur. If you didn’t like amateur, say it one for all.

The demo code that I referred you to does exactly what you are asking for. It shows you how to do it.


Indeed, whats the point of asking the same question over and over if you don’t like the answer?

The fact is, you can learn everything you need - from the Tracktion code, and from the LMN-3 DAW code, which is quite good code to be honest.

You have to be very lazy not to gain a great deal of knowledge out of these codebases. Are you admitting to being too lazy to read the source? Because that is what it seems like.

What you’re asking is for us to do your work for you - sorry but thats not what makes a community great.

What makes this community great is that there are a great variety of excellent developers with a variety of experience - and what we are telling you is something you should pay attention to: learn everything you need to learn about Tracktion, from the sources you’ve already been pointed towards. Learn the framework by reading the Tracktion demo’s. Indeed, go through each demo and make your own notes as to what you find and how it works.

Anything less than this is just laziness, and frankly, projecting the workload onto us. Some of us have real jobs and are only helping newbies such as yourself in between compiles, lol …


The “same” question was asked to different person… didn’t take it personally.

For your concern, I ask the same question on an another forum, and I did get an answer. They was helpful and didn’t “first” refer me to another project.

I let you think that I am lazy…

If you represent this community, definitively it is not the kind of community where amateur people can learn.

I don’t represent this community, I am merely a member of it - as are you. Demanding people help you and then insulting them when you don’t get your way is not a great way to become a member of this community, though.

Why don’t you go through the code, and when you’ve gotten some of the basics under your belt, come back here and ask questions? This thread is interesting enough to a few people that you never know - if you make the effort, you may very well get the kind of support you expect …

I’m an amateur since 20 years now. I had/have very helpful advices in that forum when i need.

For your concern, I ask the same question on an another forum, and I did get an answer.

Could you share that in order to see which support you would expect to get?