mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
compact
This commit is contained in:
parent
8c3cf53c67
commit
ea529b7734
5 changed files with 91 additions and 91 deletions
|
|
@ -16,23 +16,23 @@ impl Track {
|
|||
) -> Usually<Self> {
|
||||
let sequencer = Sequencer::new(&name, tempo, phrases)?;
|
||||
let chain = Chain::new(&name, devices)?;
|
||||
let (client, _status) = Client::new("init", ClientOptions::NO_START_SERVER)?;
|
||||
{
|
||||
if let (Some(output), Some(input)) = (
|
||||
sequencer.midi_outs()?.get(0).clone(),
|
||||
if let Some(item) = chain.items.get(0) {
|
||||
if let Some(port) = item.midi_ins()?.get(0) {
|
||||
Some(port.clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
) {
|
||||
client.connect_ports_by_name(&output, &input)?;
|
||||
}
|
||||
}
|
||||
//let (client, _status) = Client::new("init", ClientOptions::NO_START_SERVER)?;
|
||||
//{
|
||||
//if let (Some(output), Some(input)) = (
|
||||
//sequencer.midi_outs()?.get(0).clone(),
|
||||
//if let Some(item) = chain.items.get(0) {
|
||||
//if let Some(port) = item.midi_ins()?.get(0) {
|
||||
//Some(port.clone())
|
||||
//} else {
|
||||
//None
|
||||
//}
|
||||
//} else {
|
||||
//None
|
||||
//}
|
||||
//) {
|
||||
//client.connect_ports_by_name(&output, &input)?;
|
||||
//}
|
||||
//}
|
||||
Ok(Self { name: name.to_string(), sequencer, chain })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue