Bind a UI control to emit MIDI through a pulp::midi::MidiControlBus. More...
#include <algorithm>#include <cmath>#include <cstdint>#include <pulp/midi/midi_control_bus.hpp>#include <pulp/view/widgets.hpp>Go to the source code of this file.
Namespaces | |
| namespace | pulp |
| namespace | pulp::view |
| Hover-cursor tracking for platform window hosts. | |
| namespace | pulp::view::detail |
Functions | |
| uint8_t | pulp::view::detail::to_cc_value (float normalized) |
| void | pulp::view::bind_midi_cc (Knob &knob, midi::MidiControlBus &bus, uint8_t channel, uint8_t cc) |
| Knob → MIDI CC. | |
| void | pulp::view::bind_midi_cc (Fader &fader, midi::MidiControlBus &bus, uint8_t channel, uint8_t cc) |
| Fader → MIDI CC. | |
| void | pulp::view::bind_midi_cc (RangeSlider &slider, midi::MidiControlBus &bus, uint8_t channel, uint8_t cc) |
| Range slider → MIDI CC. | |
| void | pulp::view::bind_midi_cc (ToggleButton &button, midi::MidiControlBus &bus, uint8_t channel, uint8_t cc) |
| Toggle button → MIDI CC (0 / 127). | |
| void | pulp::view::bind_midi_cc (Toggle &toggle, midi::MidiControlBus &bus, uint8_t channel, uint8_t cc) |
| Toggle → MIDI CC (0 / 127). | |
| void | pulp::view::bind_midi_note (ToggleButton &button, midi::MidiControlBus &bus, uint8_t channel, uint8_t note, uint8_t velocity=100) |
| Toggle button → MIDI note: note-on while on, note-off when off. | |
| void | pulp::view::bind_midi_note (Toggle &toggle, midi::MidiControlBus &bus, uint8_t channel, uint8_t note, uint8_t velocity=100) |
| Toggle → MIDI note: note-on while on, note-off when off. | |
Bind a UI control to emit MIDI through a pulp::midi::MidiControlBus.
bind_midi_cc(knob, bus, channel, cc) makes the control send a MIDI Control Change as the user moves it; bind_midi_note(button, …) plays a note while a toggle is on. The plugin's processor drains the bus into its MIDI-out buffer each block, so the moves land in the host's MIDI lane. This complements bind_parameter (which drives plugin parameters); a control can do either, or — by binding both — both.
One-way (UI → MIDI). UI-thread only.