mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
it bops
This commit is contained in:
parent
27529da08d
commit
0ba14bf2da
1 changed files with 21 additions and 5 deletions
|
|
@ -11,11 +11,27 @@ impl Track {
|
||||||
devices: Option<Vec<Box<dyn Device>>>,
|
devices: Option<Vec<Box<dyn Device>>>,
|
||||||
phrases: Option<Vec<Phrase>>,
|
phrases: Option<Vec<Phrase>>,
|
||||||
) -> Usually<Self> {
|
) -> Usually<Self> {
|
||||||
Ok(Self {
|
let sequencer = Sequencer::new(&name, tempo, phrases)?;
|
||||||
name: name.to_string(),
|
let chain = Chain::new(&name, devices)?;
|
||||||
sequencer: Sequencer::new(&name, tempo, phrases)?,
|
{
|
||||||
chain: Chain::new(&name, devices)?,
|
if let (Some(output), Some(input)) = (
|
||||||
})
|
sequencer.midi_outs()?.get(0).clone(),
|
||||||
|
if let Some(item) = chain.state().items.get(0) {
|
||||||
|
if let Some(port) = item.midi_ins()?.get(0) {
|
||||||
|
Some(port.clone())
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
if let Some(client) = &sequencer.client {
|
||||||
|
client.as_client().connect_ports_by_name(&output, &input)?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(Self { name: name.to_string(), sequencer, chain })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl PortList for Track {
|
impl PortList for Track {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue