Looking for a simple example - Audio to MIDI

Hi,

I recently started working with JUCE. A couple of years ago I developed a VST plugin with the vst 2.4 sdk. Now I’m planning to develop an audio to MIDI converter with JUCE:
As soon as my audio level hits a certain threshold, I want to play a MIDI note. I stepped through the tutorials, which made sense to me, but unfortunately I got stuck realizing my idea.

Maybe someone of you has a small example for me. Thanks in advance!

At which point did you get stuck when looking at the tutorials? What specific step do you need help with?

For VST: Just append MidiMessage's to the incoming MidiBuffer in processBlock, whenever you detect events in the incoming audio. See the Arpeggiator example on how to output MIDI from the audio callback.

Configure your JUCE project with Plugin produces midi output but – in this case – not as a MIDI effect.

But keep in mind, it strongly depends on the host/plugin format whether this will actually work as intended. For example, in Ableton Live/VST it does (MIDI output from audio tracks can be selected as MIDI source in MIDI tracks), in Logic/AU, MIDI output from plugins on audio tracks seems to be ignored. For this to work in AU, set up a custom MidiOutput device and send messages to it instead of filling the incoming MidiBuffer (N.B., directly accessing MIDI devices in a plugin callback has been discouraged in other threads, though I don’t know of any other solution to accomplish the goal here).

1 Like

Thank you! I’ll give it a try…

Thanks for all of your suggestions! I was able to get it to work. If anybody is interested in the code, let me know.

1 Like

Hi MoKoBerlin,

I am trying to do something similar and would love to see your code. I am still learning about JUCE and am having trouble combining Audio and MIDI features.

Thanks so much,
Sasha

Hi @MoKoBerlin, I would really love to see your code, please! I’m looking all over for something like this. I couldn’t find a way to message you directly, please email me at music@mojokid.com

Thanks!

i’d like to take a look at it :slight_smile:

Hi there! Looking to do pretty much this same thing! Please could I take a look at your code? Would be greatly appreciated!

Thanks alot!

Hey! Did you ever get the code? Would love to take a look if you did!

Thanks!

Hi! I would love to take a look at this code too. I would like to do something similar :). If you could please send it to synthchrismusic@gmail.com, I’d really appreciate it.