Skip to content

Add Onset2Midi plugin: Onset detector to MIDI note trigger#11

Open
federico-de-lellis wants to merge 3 commits into
MTG:masterfrom
federico-de-lellis:master
Open

Add Onset2Midi plugin: Onset detector to MIDI note trigger#11
federico-de-lellis wants to merge 3 commits into
MTG:masterfrom
federico-de-lellis:master

Conversation

@federico-de-lellis

Copy link
Copy Markdown

Summary

Adds Onset2Midi plugin that uses Essentia's OnsetDetection to convert audio onsets into MIDI note events in real time, that can be creatively used to drive a sampler on the next track from a live or recorded percussive signal.

The plugin is a CMake plugin and follows the same structure and visual style as the existing plugins in the repo.

What it does

  • Detects percussive onsets per frame and emits a fixed MIDI note, with velocity derived from the hit strength.
  • DSP chain (1024-sample frame, 512 hop): mono frame → Windowing (Hann) → FFTCartesianToPolarOnsetDetection → onset-detection function → adaptive peak-picking → MIDI.
  • Produces MIDI output (NEEDS_MIDI_OUTPUT), so route it to an instrument/sampler track.
  • A live activity LED in the UI flashes on every detected onset.

Controls

Detection

  • Onset Method selectable Essentia onset-detection function: HFC / Complex / Flux / MelFlux / RMS / Complex Phase
  • Sensitivity (0-1) adaptive peak-pick threshold
  • Min Inter-Onset (5-500 ms) debounce window to avoid double-triggers

MIDI

  • MIDI Note (0-127, default 60)
  • MIDI Channel (1-16, default 10 GM drum channel)
  • Velocity Sensitivity (0.1-4.0) scales hit strength to MIDI velocity
  • Note Hold (5-1000 ms) gate length before the scheduled note-off

Tested on

  • macOS (VST3)
  • Essentia built from source (build_external/)
  • Built via CMake

Demo

Link to the video demo running in Ableton Live

UI

Onset2Midi_ui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant