Audio2Midi

standard mode | Pitch category

Inputs

  • frame (vector_real) - the input frame to analyse

Outputs

  • pitch (real) - pitch given in Hz

  • loudness (real) - detected loudness in decibels

  • messageType (vector_string) - the output of MIDI message type, as string, {noteoff, noteon, noteoff-noteon}

  • midiNoteNumber (vector_real) - the output of detected MIDI note number, as integer, in range [0,127]

  • timeCompensation (vector_real) - time to be compensated in the messages

Parameters

  • applyTimeCompensation (bool ∈ {true, false}, default = true) :

    whether to apply time compensation correction to MIDI note detection

  • hopSize (integer ∈ [1, ∞), default = 32) :

    equivalent to I/O buffer size

  • loudnessThreshold (real ∈ [-∞, 0], default = -51) :

    loudness level above/below which note ON/OFF start to be considered, in decibels

  • maxFrequency (real ∈ [10, 20000], default = 2300) :

    maximum frequency to detect in Hz

  • midiBufferDuration (real ∈ [0.005, 0.5], default = 0.05) :

    duration in seconds of buffer used for voting in MidiPool algorithm

  • minFrequency (real ∈ [10, 20000], default = 60) :

    minimum frequency to detect in Hz

  • minNoteChangePeriod (real ∈ (0, 1], default = 0.03) :

    minimum time to wait until a note change is detected (testing only)

  • minOccurrenceRate (real ∈ [0, 1], default = 0.5) :

    rate of predominant pitch occurrence in MidiPool buffer to consider note ON event

  • minOffsetCheckPeriod (real ∈ (0, 1], default = 0.2) :

    minimum time to wait until an offset is detected (testing only)

  • minOnsetCheckPeriod (real ∈ (0, 1], default = 0.075) :

    minimum time to wait until an onset is detected (testing only)

  • pitchConfidenceThreshold (real ∈ [0, 1], default = 0.25) :

    level of pitch confidence above which note ON/OFF start to be considered

  • sampleRate (integer ∈ [8000, ∞), default = 44100) :

    sample rate of incoming audio frames

  • transpositionAmount (integer ∈ (-69, 50), default = 0) :

    Apply transposition (in semitones) to the detected MIDI notes.

  • tuningFrequency (integer ∈ {432, 440}, default = 440) :

    tuning frequency for semitone index calculation, corresponding to A3 [Hz]

Description

Wrapper around Audio2Pitch and Pitch2Midi for real time application. This algorithm has a state that is used to estimate note on/off events based on consequent compute() calls.

Source code

See also

Audio2Pitch (standard) Pitch2Midi (standard)