Looking for a simple example - Audio to MIDI


#1

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!


#2

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


#3

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).


#4

Thank you! I’ll give it a try…


#5

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


#6

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