midiCCNow method

void midiCCNow({
  1. required int ccNumber,
  2. required int ccValue,
})

Handles a MIDI CC event on this track immediately. The event will not be added to this track's events.

Implementation

void midiCCNow({required int ccNumber, required int ccValue}) {
  final nextBeat = sequence.getBeat();
  final event =
      MidiEvent.cc(beat: nextBeat, ccNumber: ccNumber, ccValue: ccValue);

  NativeBridge.handleEventsNow(
      id, [event], Sequence.globalState.sampleRate!, sequence.tempo);
}