AU midi in? (instrument)


#1

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:


#2

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


#3

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


#4

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:

http://164.11.131.73/svn/CEMS/mt/msc/gp/trunk/src/

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.


#5

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!


#6

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??


#7

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.


#8

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


#9

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


#10

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…


#11

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,

Pete


#12

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=3194

did u try this?


#13

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

With best wishes,

Pete


#14

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?