Class AVAudioUnitMIDIInstrument

  • All Implemented Interfaces:
    NSObject
    Direct Known Subclasses:
    AVAudioUnitSampler

    public class AVAudioUnitMIDIInstrument
    extends AVAudioUnit
    AVAudioUnitMIDIInstrument Base class for sample synthesizers. This base class represents audio units of type kAudioUnitType_MusicDevice or kAudioUnitType_RemoteInstrument. This can be used in a chain that processes realtime input (live) and has general concept of music events i.e. notes. API-Since: 8.0
    • Constructor Detail

      • AVAudioUnitMIDIInstrument

        protected AVAudioUnitMIDIInstrument​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • initWithAudioComponentDescription

        public AVAudioUnitMIDIInstrument initWithAudioComponentDescription​(AudioComponentDescription description)
        initWithAudioComponentDescription: initialize the node with the component description
        Parameters:
        description - audio component description structure that describes the audio component of type kAudioUnitType_MusicDevice or kAudioUnitType_RemoteInstrument.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • sendControllerWithValueOnChannel

        public void sendControllerWithValueOnChannel​(byte controller,
                                                     byte value,
                                                     byte channel)
        sendController:withValue:onChannel: send a MIDI controller event to the instrument.
        Parameters:
        controller - a standard MIDI controller number. Range: 0 -> 127
        value - value for the controller. Range: 0 -> 127
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • sendMIDIEventData1

        public void sendMIDIEventData1​(byte midiStatus,
                                       byte data1)
        sendMIDIEvent:data1: sends a MIDI event which contains one data byte to the instrument.
        Parameters:
        midiStatus - the STATUS value of the MIDI event
        data1 - the first data byte of the MIDI event
      • sendMIDIEventData1Data2

        public void sendMIDIEventData1Data2​(byte midiStatus,
                                            byte data1,
                                            byte data2)
        sendMIDIEvent:data1:data2: sends a MIDI event which contains two data bytes to the instrument.
        Parameters:
        midiStatus - the STATUS value of the MIDI event
        data1 - the first data byte of the MIDI event
        data2 - the second data byte of the MIDI event.
      • sendMIDISysExEvent

        public void sendMIDISysExEvent​(@NotNull
                                       @NotNull NSData midiData)
        sendMIDISysExEvent: sends a MIDI System Exclusive event to the instrument.
        Parameters:
        midiData - a NSData object containing the complete SysEx data including start(F0) and termination(F7) bytes.
      • sendPitchBendOnChannel

        public void sendPitchBendOnChannel​(char pitchbend,
                                           byte channel)
        sendPitchBend:onChannel: sends MIDI Pitch Bend event to the instrument.
        Parameters:
        pitchbend - value of the pitchbend Range: 0 -> 16383
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • sendPressureOnChannel

        public void sendPressureOnChannel​(byte pressure,
                                          byte channel)
        sendPressure:onChannel: sends MIDI channel pressure event to the instrument.
        Parameters:
        pressure - value of the pressure. Range: 0 -> 127
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • sendPressureForKeyWithValueOnChannel

        public void sendPressureForKeyWithValueOnChannel​(byte key,
                                                         byte value,
                                                         byte channel)
        sendPressureForKey:withValue:onChannel: sends MIDI Polyphonic key pressure event to the instrument
        Parameters:
        key - the key (note) number to which the pressure event applies Range: 0 -> 127
        value - value of the pressure Range: 0 -> 127
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • sendProgramChangeBankMSBBankLSBOnChannel

        public void sendProgramChangeBankMSBBankLSBOnChannel​(byte program,
                                                             byte bankMSB,
                                                             byte bankLSB,
                                                             byte channel)
        sendProgramChange:bankMSB:bankLSB:onChannel: sends a MIDI Program Change and Bank Select events to the instrument
        Parameters:
        program - specifies the program (preset) number within the bank to load. Range: 0 -> 127
        bankMSB - specifies the most significant byte value for the bank to select. Range: 0 -> 127
        bankLSB - specifies the least significant byte value for the bank to select. Range: 0 -> 127
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • sendProgramChangeOnChannel

        public void sendProgramChangeOnChannel​(byte program,
                                               byte channel)
        sendProgramChange:onChannel: sends MIDI Program Change event to the instrument the instrument will be loaded from the bank that has been previous set by MIDI Bank Select controller messages (0 and 31). If none has been set, bank 0 will be used.
        Parameters:
        program - the program number. Range: 0 -> 127
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • startNoteWithVelocityOnChannel

        public void startNoteWithVelocityOnChannel​(byte note,
                                                   byte velocity,
                                                   byte channel)
        startNote:withVelocity:onChannel: sends a MIDI Note On event to the instrument
        Parameters:
        note - the note number (key) to play. Range: 0 -> 127
        velocity - specifies the volume with which the note is played. Range: 0 -> 127
        channel - the channel number to which the event is sent Range: 0 -> 15
      • stopNoteOnChannel

        public void stopNoteOnChannel​(byte note,
                                      byte channel)
        stopNote:onChannel: sends a MIDI Note Off event to the instrument
        Parameters:
        note - the note number (key) to stop Range: 0 -> 127
        channel - the channel number to which the event is sent. Range: 0 -> 15
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • sendMIDIEventList

        public void sendMIDIEventList​(@NotNull
                                      @NotNull MIDIEventList eventList)
        sendMIDIEventList:eventList: sends a MIDI event list to the instrument.
        Parameters:
        eventList - the MIDIEventList API-Since: 16.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.