mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-01-31 16:36:40 +01:00
This commit is contained in:
parent
573534a9a6
commit
447638ee71
30 changed files with 824 additions and 548 deletions
|
|
@ -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]>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue