|
| | PulpAUMidiProcessor (AudioComponentInstance ci) |
| | PulpAUMidiProcessor (AudioComponentInstance ci, ProcessorFactory factory) |
| OSStatus | GetParameterList (AudioUnitScope inScope, AudioUnitParameterID *outParameterList, UInt32 &outNumParameters) override |
| OSStatus | GetParameterInfo (AudioUnitScope inScope, AudioUnitParameterID inParameterID, AudioUnitParameterInfo &outParameterInfo) override |
| OSStatus | GetParameterValueStrings (AudioUnitScope inScope, AudioUnitParameterID inParameterID, CFArrayRef *outStrings) override |
| OSStatus | GetParameter (AudioUnitParameterID inID, AudioUnitScope inScope, AudioUnitElement inElement, Float32 &outValue) override |
| OSStatus | SetParameter (AudioUnitParameterID inID, AudioUnitScope inScope, AudioUnitElement inElement, Float32 inValue, UInt32 inBufferOffsetInFrames) override |
| OSStatus | GetPropertyInfo (AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, UInt32 &outDataSize, bool &outWritable) override |
| OSStatus | GetProperty (AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void *outData) override |
| OSStatus | SetProperty (AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, const void *inData, UInt32 inDataSize) override |
| OSStatus | Initialize () override |
| void | Cleanup () override |
| bool | StreamFormatWritable (AudioUnitScope scope, AudioUnitElement element) override |
| bool | CanScheduleParameters () const noexcept override |
| OSStatus | Render (AudioUnitRenderActionFlags &ioActionFlags, const AudioTimeStamp &inTimeStamp, UInt32 inNumberFrames) override |
| OSStatus | GetPresets (CFArrayRef *outData) const override |
| | kAudioUnitProperty_FactoryPresets — the presets bundled with the plug-in, discovered from its Resources/Presets folder.
|
| OSStatus | NewFactoryPresetSet (const AUPreset &inNewFactoryPreset) override |
| | kAudioUnitProperty_PresentPreset carrying a non-negative preset number.
|
| FactoryPresetTable & | factory_preset_table () noexcept |
| | The factory-preset table this instance serves.
|
| OSStatus | SaveState (CFPropertyListRef *outData) override |
| OSStatus | RestoreState (CFPropertyListRef plist) override |
| Float64 | GetLatency () override |
AU v2 adapter for a Pulp Processor whose descriptor declares PluginCategory::MidiEffect — an AU MIDI processor, component type aumi (kAudioUnitType_MIDIProcessor).
MIDI in, MIDI out, no audio processing.
Base class. MusicDeviceBase (AUBase + AUMIDIBase), the same base the instrument adapter uses. AUMIDIEffectBase is not an option: it derives AUEffectBase, which hardwires one audio input element and one audio output element and pulls the input every render — a MIDI processor has no audio input to pull. MusicDeviceBase also supplies the MIDIEvent / SysEx forwarding into AUMIDIBase and the MIDI-mapping property delegation, which a hand-rolled AUBase + AUMIDIBase pairing would have to restate.
Entry factory. Register through ausdk::AUMIDIEffectFactory (AUMIDILookup = base selectors + MusicDeviceMIDIEvent + MusicDeviceSysEx) via PULP_AU_MIDI_EFFECT. The class implementing HandleMIDIEvent is not enough — a factory only dispatches the selectors its lookup table carries, so the plain AUBaseFactory makes every host MIDI delivery return -4 (unimpErr). AUMusicDeviceFactory would additionally carry StartNote / StopNote, which a MIDI processor is not: AUMIDILookup is the exact selector set.
Element shape. Zero audio input elements and ONE audio output element. The output element carries no musical signal — the render path zeroes it and flags the block silent — but it has to exist: an AU v2 host advances a plugin by rendering it, and rendering is what drains the inbound MIDI queue, runs process(), and delivers the Processor's outbound MIDI through kAudioUnitProperty_MIDIOutputCallback. With no output element there is no bus for the host to pull and the plugin would never run.
MIDI output is definitional here. Unlike the effect adapter — which gates its MIDI-output property surface on descriptor().produces_midi so a plain audio effect never advertises a MIDI output — an aumi always advertises it. A MIDI processor that could not emit MIDI would have no reason to exist, and gating on the flag turns a forgotten produces_midi = true into silently discarded output with no diagnostic.