wip: general overhaul of core and ports
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-05-20 22:05:09 +03:00
parent 573534a9a6
commit 447638ee71
30 changed files with 824 additions and 548 deletions

View file

@ -32,9 +32,9 @@ pub struct Sequencer {
/// Send all notes off
pub reset: bool, // TODO?: after Some(nframes)
/// Record from MIDI ports to current sequence.
pub midi_ins: Vec<JackMidiIn>,
pub midi_ins: Vec<MidiInput>,
/// Play from current sequence to MIDI ports
pub midi_outs: Vec<JackMidiOut>,
pub midi_outs: Vec<MidiOutput>,
/// Notes currently held at input
pub notes_in: Arc<RwLock<[bool; 128]>>,
/// Notes currently held at output
@ -79,8 +79,8 @@ impl Sequencer {
let _name = name.as_ref();
let clock = clock.cloned().unwrap_or_default();
Ok(Self {
midi_ins: vec![JackMidiIn::new(jack, format!("M/{}", name.as_ref()), midi_from)?,],
midi_outs: vec![JackMidiOut::new(jack, format!("{}/M", name.as_ref()), midi_to)?, ],
midi_ins: vec![MidiInput::new(jack, format!("M/{}", name.as_ref()), midi_from)?,],
midi_outs: vec![MidiOutput::new(jack, format!("{}/M", name.as_ref()), midi_to)?, ],
play_clip: clip.map(|clip|(Moment::zero(&clock.timebase), Some(clip.clone()))),
clock,
reset: true,
@ -102,8 +102,8 @@ impl std::fmt::Debug for Sequencer {
}
has!(Clock: |self: Sequencer|self.clock);
has!(Vec<JackMidiIn>: |self:Sequencer| self.midi_ins);
has!(Vec<JackMidiOut>: |self:Sequencer| self.midi_outs);
has!(Vec<MidiInput>: |self:Sequencer| self.midi_ins);
has!(Vec<MidiOutput>: |self:Sequencer| self.midi_outs);
impl MidiMonitor for Sequencer {
fn notes_in (&self) -> &Arc<RwLock<[bool; 128]>> {