AU midi in? (instrument)

Hi Guys!

I’m bouncing my head around this for quite a while.
im sure im just missing something here.

My PC vst version works great with midi. however the audio unit version receives no midi from the hosts (logic, aulab, synthtest). and also seems to not produce any audio.

everything seems to be set right in JucePluginCharacteristics.h

i tried compiling the au “filter demo” and the keyboard on it doesn’t show any midi coming in. i tried the tip (v.520) and it behaves the same. the only thing i changed is :

#define JucePlugin_IsSynth                          1

in JucePluginCharacteristics.h

and i included jucelib from that tip (amalgamated did not compile).
and the keyboard shows no midi input.

what am i missing? is there something special to be done for making an audio-unit instrument receive midi from the host?

any help is greatly appreciated :slight_smile:

what is your input/output config in JucePluginCharacteristics.h, I seem to remember this making a difference.

i have tried several combinations including { 0, 1 }, { 0, 2 }

all act the same way

i have tried several combinations including { 0, 1 }, { 0, 2 }

all act the same way

I’m using:

#define JucePlugin_MaxNumInputChannels 0 #define JucePlugin_MaxNumOutputChannels 2 #define JucePlugin_PreferredChannelConfigurations { 0, 1 }, { 0, 2 } #define JucePlugin_IsSynth 1 #define JucePlugin_WantsMidiInput 1

which I think are the critical ones, and have you implemented:

bool acceptsMidi() const;

to return true?

You can browse the source for my AU instrument at:

Perhpas you’ll find some clues there? The AudioProcessor is in MyJuceAudioPlugin.cpp/h. It receives MIDI (note and controller 1) and produces audio. Works in AULab and was working in Logic although I haven’t tested it lately.

Hi Martin!

the lines you mentioned are defined right in my code. however i couldnt get it to work.
ill check your code, and post the results.
Thanks a bunch!

Ola Martin!

i compiled your synth using juce build 520, and it doesnt respond to midi aswell. so this brings me to the idea that the problem is with the build…

however here is a small detail that might be of relevance:
when i compiled your synth i got an error:

/Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h:119: error: cannot allocate an object of abstract type 'JuceAU'
/Users/assafdar/Cpp/test synth/build/AudioUnit/MyAudioUnitWrapper.cpp:73: note:   because the following virtual functions are pure within 'JuceAU':
/Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h:76: note:  virtual ComponentResult MusicDeviceBase::StartNote(MusicDeviceInstrumentID, MusicDeviceGroupID, NoteInstanceID*, UInt32, const MusicDeviceNoteParams&)

which came from a modified audiounit wrapper.
i just added this

    ComponentResult StartNote (MusicDeviceInstrumentID, MusicDeviceGroupID, NoteInstanceID*, UInt32, const MusicDeviceNoteParams&) { return noErr; }

and it compiled. my guess is that its just a 10.5 thing, but since it is called “StartNote” it smells fishy…

I do get sync input from the host tho…
anyone had such experience??

ok, I’m using rev 515 and I’m building on 10.4 for 10.4 at the moment. And it works so it may be a 10.5 issue.

The StartNote thing looks like one of those cases where Apple decided to change a ref for a pointer (or is it the other way round…!) in the API.

after further debugging , i found out that i cant get my device to generate sound or to recieve midi. i have some leads, hopfully tomorow uill be able to give a nice report

BTW you should be able to use the standard AU wrapper with my synth. My custom wrapper just deals with parameter units not being normalised 0-1. But the AudioProcessor is written in such a way to still be able to use normalised params (obviously so it will work with other plugin APIs).

hi, i have the same problem with my AU.
when i checked the AU warper i saw that the functions:
StartNote & StopNote have no implementation and they just return no error value.

now, the big question is how the AU plugin get his midi messages.
i can see in the code:

juceFilter->processBlock (buffer, midiEvents);

but who fills midiEvents with data ?
is it HandleMidiEvent ? but it is a private function ???

i’m confused…

Hi Jules!

The last bit of my new plug-in development is to get our AU Plug-in responding to incoming MIDI events. It works fine as a VSTi on Mac/Windows, but the AU doesn’t receive MIDI events!

FTAOD, I can generate sounds of course; but those can’t be generated in response to incoming MIDI events.

That sounds like an identical problem to the others reported on this thread; none of which seem to actually describe exactly what the solution is. :slight_smile:

I’m stuck, and was hoping you could give some suggestions!

I’m on 10.5, Juce SVN tip from 28th September.

With best wishes,


did u try this?

Oh, wow - yes, that fixed it. That is very kind of you to have helped … many thanks! :slight_smile:

With best wishes,


Hi. I’m having the same problem. The VST version works fine, but the AU isn’t receiving any MIDI from host.
The link above seems to be dead. What was the solution?