recollect edns

This commit is contained in:
🪞👃🪞 2025-04-15 17:52:18 +03:00
parent 664cd8942f
commit 0257aa2b61
21 changed files with 15 additions and 19 deletions

View file

@ -80,3 +80,4 @@
(@lt clip swap-prev) (@lt clip swap-prev)
(@gt clip swap-next) (@gt clip swap-next)
(@l clip loop-toggle)} (@l clip loop-toggle)}

View file

@ -4,11 +4,6 @@ mod keys_ins; pub use self::keys_ins::*;
mod keys_outs; pub use self::keys_outs::*; mod keys_outs; pub use self::keys_outs::*;
mod keys_scene; pub use self::keys_scene::*; mod keys_scene; pub use self::keys_scene::*;
mod keys_track; pub use self::keys_track::*; mod keys_track; pub use self::keys_track::*;
pub const KEYS_APP: &str = include_str!("../edn/keys.edn");
pub const KEYS_CLIP: &str = include_str!("../edn/keys_clip.edn");
pub const KEYS_TRACK: &str = include_str!("../edn/keys_track.edn");
pub const KEYS_SCENE: &str = include_str!("../edn/keys_scene.edn");
pub const KEYS_MIX: &str = include_str!("../edn/keys_mix.edn");
handle!(TuiIn: |self: Tek, input|Ok({ handle!(TuiIn: |self: Tek, input|Ok({
// If editing, editor keys take priority // If editing, editor keys take priority
if self.is_editing() { if self.is_editing() {

View file

@ -96,10 +96,10 @@ impl Cli {
let mut app = Tek { let mut app = Tek {
jack: jack.clone(), jack: jack.clone(),
view: SourceIter(match mode { view: SourceIter(match mode {
Mode::Clock => include_str!("./view_transport.edn"), Mode::Clock => include_str!("./edn/transport.edn"),
Mode::Sequencer => include_str!("./view_sequencer.edn"), Mode::Sequencer => include_str!("./edn/sequencer.edn"),
Mode::Groovebox => include_str!("./view_groovebox.edn"), Mode::Groovebox => include_str!("./edn/groovebox.edn"),
Mode::Arranger { .. } => include_str!("./view_arranger.edn"), Mode::Arranger { .. } => include_str!("./edn/arranger.edn"),
_ => todo!("{mode:?}"), _ => todo!("{mode:?}"),
}), }),
pool: match mode { pool: match mode {
@ -121,11 +121,11 @@ impl Cli {
}, },
color: ItemPalette::random(), color: ItemPalette::random(),
clock: Clock::new(jack, self.bpm)?, clock: Clock::new(jack, self.bpm)?,
keys: SourceIter(KEYS_APP), keys: SourceIter(include_str!("./edn/arranger_keys.edn")),
keys_clip: SourceIter(KEYS_CLIP), keys_clip: SourceIter(include_str!("./edn/arranger_keys_clip.edn")),
keys_track: SourceIter(KEYS_TRACK), keys_track: SourceIter(include_str!("./edn/arranger_keys_track.edn")),
keys_scene: SourceIter(KEYS_SCENE), keys_scene: SourceIter(include_str!("./edn/arranger_keys_scene.edn")),
keys_mix: SourceIter(KEYS_MIX), keys_mix: SourceIter(include_str!("./edn/arranger_keys_mix.edn")),
tracks: match mode { tracks: match mode {
Mode::Sequencer => vec![Track::default()], Mode::Sequencer => vec![Track::default()],
Mode::Groovebox => vec![Track { Mode::Groovebox => vec![Track {

View file

@ -30,11 +30,11 @@ pub(crate) use std::fmt::Debug;
pub use ::midly; pub(crate) use ::midly::{*, num::*, live::*}; pub use ::midly; pub(crate) use ::midly::{*, num::*, live::*};
pub(crate) const KEYS_EDIT: &str = include_str!("keys_edit.edn"); pub(crate) const KEYS_EDIT: &str = include_str!("../edn/keys_edit.edn");
pub(crate) const KEYS_POOL: &str = include_str!("keys_pool.edn"); pub(crate) const KEYS_POOL: &str = include_str!("../edn/keys_pool.edn");
pub(crate) const KEYS_FILE: &str = include_str!("keys_pool_file.edn"); pub(crate) const KEYS_FILE: &str = include_str!("../edn/keys_pool_file.edn");
pub(crate) const KEYS_LENGTH: &str = include_str!("keys_clip_length.edn"); pub(crate) const KEYS_LENGTH: &str = include_str!("../edn/keys_clip_length.edn");
pub(crate) const KEYS_RENAME: &str = include_str!("keys_clip_rename.edn"); pub(crate) const KEYS_RENAME: &str = include_str!("../edn/keys_clip_rename.edn");
/// Add "all notes off" to the start of a buffer. /// Add "all notes off" to the start of a buffer.
pub fn all_notes_off (output: &mut [Vec<Vec<u8>>]) { pub fn all_notes_off (output: &mut [Vec<Vec<u8>>]) {