mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
update Justfile
This commit is contained in:
parent
88ed2c160c
commit
bcdb5f51f5
4 changed files with 70 additions and 21 deletions
|
|
@ -6,31 +6,46 @@ pub struct GrooveboxCli {
|
|||
/// Name of JACK client
|
||||
#[arg(short, long)]
|
||||
name: Option<String>,
|
||||
|
||||
/// Whether to include a transport toolbar (default: true)
|
||||
#[arg(short, long, default_value_t = true)]
|
||||
transport: bool,
|
||||
|
||||
/// MIDI outs to connect to (multiple accepted)
|
||||
/// MIDI outs to connect to MIDI input
|
||||
#[arg(short='i', long)]
|
||||
midi_from: Vec<String>,
|
||||
|
||||
/// MIDI ins to connect to (multiple accepted)
|
||||
/// MIDI ins to connect from MIDI output
|
||||
#[arg(short='o', long)]
|
||||
midi_to: Vec<String>,
|
||||
|
||||
/// Audio ins to connect to (multiple accepted)
|
||||
#[arg(short='I', long)]
|
||||
audio_from: Vec<String>,
|
||||
|
||||
/// Audio outs to connect to (multiple accepted)
|
||||
#[arg(short='O', long)]
|
||||
audio_to: Vec<String>,
|
||||
/// Audio outs to connect to left input
|
||||
#[arg(short='l', long)]
|
||||
l_from: Vec<String>,
|
||||
/// Audio outs to connect to right input
|
||||
#[arg(short='r', long)]
|
||||
r_from: Vec<String>,
|
||||
/// Audio ins to connect from left output
|
||||
#[arg(short='L', long)]
|
||||
l_to: Vec<String>,
|
||||
/// Audio ins to connect from right output
|
||||
#[arg(short='R', long)]
|
||||
r_to: Vec<String>,
|
||||
}
|
||||
impl GrooveboxCli {
|
||||
fn run (&self) -> Usually<()> {
|
||||
Tui::run(JackClient::new("tek_groovebox")?
|
||||
.activate_with(|jack|tek::GrooveboxTui::try_from(jack))?)?;
|
||||
Tui::run(JackClient::new("tek_groovebox")?.activate_with(|jack|{
|
||||
let app = tek::GrooveboxTui::try_from(jack)?;
|
||||
let jack = jack.read().unwrap();
|
||||
|
||||
jack.client().connect_ports(&app.player.midi_outs[0], &app.sampler.midi_in)?;
|
||||
|
||||
connect_from(&jack, &app.player.midi_ins[0], &self.midi_from)?;
|
||||
connect_to(&jack, &app.player.midi_outs[0], &self.midi_to)?;
|
||||
|
||||
connect_audio_from(&jack, &app.sampler.audio_ins[0], &self.l_from)?;
|
||||
connect_audio_from(&jack, &app.sampler.audio_ins[1], &self.r_from)?;
|
||||
connect_audio_to(&jack, &app.sampler.audio_outs[0], &self.l_to)?;
|
||||
connect_audio_to(&jack, &app.sampler.audio_outs[1], &self.r_to)?;
|
||||
|
||||
Ok(app)
|
||||
})?)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue