mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
wip: unpetrify, tryna dodge 4000
This commit is contained in:
parent
ea529b7734
commit
b4fdddc0aa
7 changed files with 161 additions and 78 deletions
|
|
@ -5,17 +5,20 @@ pub struct Track {
|
|||
pub name: String,
|
||||
pub sequencer: Sequencer,
|
||||
pub chain: Chain,
|
||||
pub midi_out: Port<MidiOut>,
|
||||
}
|
||||
|
||||
impl Track {
|
||||
pub fn new (
|
||||
name: &str,
|
||||
tempo: &Arc<Timebase>,
|
||||
devices: Option<Vec<Box<dyn Device>>>,
|
||||
phrases: Option<Vec<Phrase>>,
|
||||
name: &str,
|
||||
jack: &Client,
|
||||
timebase: &Arc<Timebase>,
|
||||
devices: Option<Vec<Box<dyn Device>>>,
|
||||
phrases: Option<Vec<Phrase>>,
|
||||
) -> Usually<Self> {
|
||||
let sequencer = Sequencer::new(&name, tempo, phrases)?;
|
||||
let chain = Chain::new(&name, devices)?;
|
||||
let sequencer = Sequencer::new(&name, timebase, phrases)?;
|
||||
let chain = Chain::new(&name, devices)?;
|
||||
let midi_out = jack.register_port(name, MidiOut)?;
|
||||
//let (client, _status) = Client::new("init", ClientOptions::NO_START_SERVER)?;
|
||||
//{
|
||||
//if let (Some(output), Some(input)) = (
|
||||
|
|
@ -33,7 +36,7 @@ impl Track {
|
|||
//client.connect_ports_by_name(&output, &input)?;
|
||||
//}
|
||||
//}
|
||||
Ok(Self { name: name.to_string(), sequencer, chain })
|
||||
Ok(Self { name: name.to_string(), sequencer, chain, midi_out })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue