mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-11 14:16:42 +01:00
wip: enabling standalone mixer
This commit is contained in:
parent
7685072e4c
commit
1d3d3875fe
11 changed files with 165 additions and 111 deletions
|
|
@ -17,28 +17,6 @@ pub struct Track {
|
|||
pub device: usize,
|
||||
}
|
||||
|
||||
handle!(Track |self, event| handle_keymap(self, event, KEYMAP_CHAIN));
|
||||
|
||||
render!(Track |self, buf, area| TrackView {
|
||||
chain: Some(&self),
|
||||
direction: tek_core::Direction::Right,
|
||||
focused: true,
|
||||
entered: true,
|
||||
//pub channels: u8,
|
||||
//pub input_ports: Vec<Port<AudioIn>>,
|
||||
//pub pre_gain_meter: f64,
|
||||
//pub gain: f64,
|
||||
//pub insert_ports: Vec<Port<AudioOut>>,
|
||||
//pub return_ports: Vec<Port<AudioIn>>,
|
||||
//pub post_gain_meter: f64,
|
||||
//pub post_insert_meter: f64,
|
||||
//pub level: f64,
|
||||
//pub pan: f64,
|
||||
//pub output_ports: Vec<Port<AudioOut>>,
|
||||
//pub post_fader_meter: f64,
|
||||
//pub route: String,
|
||||
}.render(buf, area));
|
||||
|
||||
impl Track {
|
||||
|
||||
pub fn new (name: &str) -> Usually<Self> {
|
||||
|
|
@ -138,31 +116,3 @@ const SYM_NAME: &'static str = ":name";
|
|||
const SYM_GAIN: &'static str = ":gain";
|
||||
const SYM_SAMPLER: &'static str = "sampler";
|
||||
const SYM_LV2: &'static str = "lv2";
|
||||
|
||||
/// Key bindings for chain section.
|
||||
pub const KEYMAP_CHAIN: &'static [KeyBinding<Track>] = keymap!(Track {
|
||||
[Up, NONE, "chain_cursor_up", "move cursor up", |_: &mut Track| {
|
||||
Ok(true)
|
||||
}],
|
||||
[Down, NONE, "chain_cursor_down", "move cursor down", |_: &mut Track| {
|
||||
Ok(true)
|
||||
}],
|
||||
[Left, NONE, "chain_cursor_left", "move cursor left", |app: &mut Track| {
|
||||
//if let Some(track) = app.arranger.track_mut() {
|
||||
//track.device = track.device.saturating_sub(1);
|
||||
//return Ok(true)
|
||||
//}
|
||||
Ok(false)
|
||||
}],
|
||||
[Right, NONE, "chain_cursor_right", "move cursor right", |app: &mut Track| {
|
||||
//if let Some(track) = app.arranger.track_mut() {
|
||||
//track.device = (track.device + 1).min(track.devices.len().saturating_sub(1));
|
||||
//return Ok(true)
|
||||
//}
|
||||
Ok(false)
|
||||
}],
|
||||
[Char('`'), NONE, "chain_mode_switch", "switch the display mode", |app: &mut Track| {
|
||||
//app.chain_mode = !app.chain_mode;
|
||||
Ok(true)
|
||||
}],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue