Play MIDI through Default Analog Audio Output

Hi there!

I need to make a MIDI table editor where user can open a MIDI file, see notes it contains on a table plot and play the notes via standard system analog audio output (not specific MIDI output).

How can I play MIDI notes through standard system analog audio output ?

From the form of your question, I suspect the answer is possible more complex than you are looking for. But, you will need some code (synthesizer/sample playback/etc) which takes midi input and produces audio output. Along with a playback system that sends the midi notes at the correct times to that synth. How you want to achieve that may depend on the larger goals of your endeavor. JUCE has all of the pieces you need, but a good amount of work is required to put them all together. Does your description encapsulate the final goal, or is there more you want to acieve?

I described my final goal here: Audio Plugin to Play MIDI and Process Voice

There were no answers, therefore I’m trying to find any info how to make what I need.

Gotcha. What is your experience with programming? With C++? with audio software? Because I think both of these posts are way to broad for an answer. You are asking high level design and architecture questions, and, generally speaking, the questions here are more specific to the API. I think it would serve you to run through some tutorials, or do some of your own small projects, to get some familiarity with JUCE. Then with that knowledge, and your goal in mind, use the API docs to choose what pieces you need, and how to put them together. Then come to the forum with specific things you get stuck with. As I said, JUCE has the pieces you need. Although something, like your pitch detection, may require a third party library.

I am experienced c++ programmer, but don’t want to reinvent a wheel, want take ready-made components as far as it possible.
My main question is absolutely concrete.

“Why c++?” … people ask so many questions when they don’t know asnwer, and ask nothing when know…

Answer to my question may be: “you can take that piano-roll GUI table class + that MIDI file reader class + that MIDI playback + pitch detection”. As for pitch detection, I can use aubio.

I can describe what I have already found, but then I will answer myself:

Open JUCE audio plugin example + use MidiFile + use Playing a MIDI file (revisited) + use aubio + see Tracktion Engine…

At the start of my search I don’t even know how the main things are called.

At the moment no idea where is Midi Table Editor GUI class…

There is a difference between looking for an answer from scratch and not from scratch. Any answer that help me to go further than scratch will be helpful.

Juce does not provide a MIDI editor/piano roll component. While it would be nice to have one, in practice people would have so many different needs for that, it would become an endless job for the Juce developers to do it.

1 Like

JUCE is not built like that. Again, you are looking for high level components, and while there are some of those in JUCE, it is a cross platform framework that provides all of the low level pieces you need for the majority of app development, with a included focus on audio/midi tasks, but not specific to those. My previous response contains the answer, “you will need to learn and choose”. The tutorials do a decent job of covering certain basics, and there are some more detailed ones from individuals on youttube. Just dive in and start building! :slight_smile:

As for current topic, how can I play midi notes via analog audio output, if I already have MidiMessageSequence ?

Absolute useless answer. The fact JUCE has only basic classes doesn’t mean that people cannot ask how to use the classes to their projects.

Woot! I wonder if the forum has a badge for absolutely useless answers. I’ve set the bar low, so I am sure you will get some better ones. :slight_smile: