mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-01-31 16:36:40 +01:00
wip: port: make device
This commit is contained in:
parent
447638ee71
commit
cb7e4f7a95
31 changed files with 602 additions and 865 deletions
|
|
@ -70,17 +70,17 @@ impl Default for Sequencer {
|
|||
impl Sequencer {
|
||||
pub fn new (
|
||||
name: impl AsRef<str>,
|
||||
jack: &Jack,
|
||||
jack: &Jack<'static>,
|
||||
clock: Option<&Clock>,
|
||||
clip: Option<&Arc<RwLock<MidiClip>>>,
|
||||
midi_from: &[PortConnect],
|
||||
midi_to: &[PortConnect],
|
||||
midi_from: &[Connect],
|
||||
midi_to: &[Connect],
|
||||
) -> Usually<Self> {
|
||||
let _name = name.as_ref();
|
||||
let clock = clock.cloned().unwrap_or_default();
|
||||
Ok(Self {
|
||||
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)?, ],
|
||||
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,
|
||||
|
|
@ -101,9 +101,9 @@ impl std::fmt::Debug for Sequencer {
|
|||
}
|
||||
}
|
||||
|
||||
has!(Clock: |self: Sequencer|self.clock);
|
||||
has!(Vec<MidiInput>: |self:Sequencer| self.midi_ins);
|
||||
has!(Vec<MidiOutput>: |self:Sequencer| self.midi_outs);
|
||||
has!(Clock: |self:Sequencer|self.clock);
|
||||
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