midi hotplug

This commit is contained in:
Skyler Lehmkuhl
2025-11-03 09:48:38 -05:00
parent 06314dbf57
commit 5320e14745
7 changed files with 158 additions and 23 deletions
+6
View File
@@ -717,6 +717,9 @@ impl Engine {
// Send a live MIDI note on event to the specified track's instrument
self.project.send_midi_note_on(track_id, note, velocity);
// Emit event to UI for visual feedback
let _ = self.event_tx.push(AudioEvent::NoteOn(note, velocity));
// If MIDI recording is active on this track, capture the event
if let Some(recording) = &mut self.midi_recording_state {
if recording.track_id == track_id {
@@ -732,6 +735,9 @@ impl Engine {
// Send a live MIDI note off event to the specified track's instrument
self.project.send_midi_note_off(track_id, note);
// Emit event to UI for visual feedback
let _ = self.event_tx.push(AudioEvent::NoteOff(note));
// If MIDI recording is active on this track, capture the event
if let Some(recording) = &mut self.midi_recording_state {
if recording.track_id == track_id {