collect edns under config/

This commit is contained in:
🪞👃🪞 2025-04-27 17:54:02 +03:00
parent efd182f302
commit a2f27dac90
30 changed files with 19 additions and 19 deletions

View file

@ -1,24 +0,0 @@
(@esc menu)
(@f1 help)
(@u undo 1)
(@shift-u redo 1)
(@space clock toggle)
(@shift-space clock toggle 0)
(@t select :track 0)
(@tab edit :clip)
(@c color)
(@q launch)
(@shift-I input add)
(@shift-O output add)
(@shift-S scene add)
(@shift-T track add)
(@up select :scene-prev)
(@w select :scene-prev)
(@down select :scene-next)
(@s select :scene-next)
(@left select :track-prev)
(@a select :track-prev)
(@right select :track-next)
(@d select :track-next)

View file

@ -1,8 +0,0 @@
(@g clip get)
(@p clip put)
(@delete clip del)
(@comma clip prev)
(@period clip next)
(@lt clip swap-prev)
(@gt clip swap-next)
(@l clip loop-toggle)

View file

@ -1,7 +0,0 @@
(@q scene launch :scene)
(@c scene color :scene)
(@comma scene prev)
(@period scene next)
(@lt scene swap-prev)
(@gt scene swap-next)
(@delete scene delete)

View file

@ -1,12 +0,0 @@
(@q track launch :track)
(@c track color :track)
(@comma track prev)
(@period track next)
(@lt track swap-prev)
(@gt track swap-next)
(@delete track delete)
(@r track rec)
(@m track mon)
(@p track play)
(@P track solo)

View file

@ -1,14 +0,0 @@
(@esc menu)
(@f1 help)
(@u undo 1)
(@shift-u redo 1)
(@space clock toggle)
(@shift-space clock toggle 0)
(@c color)
(@q launch)
(@r sampler record/begin :pitch)

View file

@ -1,13 +0,0 @@
(@up select :sample-up)
(@w select :sample-up)
(@down select :sample-down)
(@s select :sample-down)
(@left select :sample-left)
(@a select :sample-left)
(@right select :sample-right)
(@d select :sample-right)
(@r record/toggle :sample)

View file

@ -1,8 +0,0 @@
(@u undo 1)
(@shift-u redo 1)
(@space clock toggle)
(@shift-space clock toggle 0)
(@c color)
(@q launch)
(@shift-I input add)
(@shift-O output add)

View file

@ -1,12 +0,0 @@
(mixer
(track
(name "Drums")
(sampler
(dir "/home/user/Lab/Music/pak")
(sample (midi 34) (name "808 D") (file "808.wav"))))
(track
(name "Lead")
(lv2
(name "Odin2")
(path "file:///home/user/.lv2/Odin2.lv2"))
(gain 0.0)))

View file

@ -1,18 +0,0 @@
(arranger
(track
(name "Drums")
(phrase
(name "4 kicks")
(beats 4)
(steps 16)
(:00 (36 128))
(:04 (36 100))
(:08 (36 100))
(:12 (36 100))))
(track
(name "Bass")
(phrase
(beats 4)
(steps 16)
(:04 (36 100))
(:12 (36 100)))))

View file

@ -14,7 +14,7 @@ pub fn handle_arranger (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
}
}
// Handle from root keymap
if let Some(command) = SourceIter(include_str!("../edn/arranger_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/arranger_keys.edn"))
.command::<_, TekCommand, _>(app, input)
{
if let Some(undo) = command.execute(app)? { app.history.push(undo); }
@ -22,10 +22,10 @@ pub fn handle_arranger (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
}
// Handle from selection-dependent keymaps
if let Some(command) = match app.selected() {
Selection::Clip(_, _) => SourceIter(include_str!("../edn/arranger_keys_clip.edn")),
Selection::Track(_) => SourceIter(include_str!("../edn/arranger_keys_track.edn")),
Selection::Scene(_) => SourceIter(include_str!("../edn/arranger_keys_scene.edn")),
Selection::Mix => SourceIter(include_str!("../edn/arranger_keys_mix.edn")),
Selection::Clip(_, _) => SourceIter(include_str!("../../../config/arranger_keys_clip.edn")),
Selection::Track(_) => SourceIter(include_str!("../../../config/arranger_keys_track.edn")),
Selection::Scene(_) => SourceIter(include_str!("../../../config/arranger_keys_scene.edn")),
Selection::Mix => SourceIter(include_str!("../../../config/arranger_keys_mix.edn")),
}.command::<_, TekCommand, _>(app, input) {
if let Some(undo) = command.execute(app)? {
app.history.push(undo);
@ -39,7 +39,7 @@ pub fn handle_sequencer (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
if app.editor.handle(input)? == Some(true) {
return Ok(Some(true))
}
if let Some(command) = SourceIter(include_str!("../edn/sequencer_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/sequencer_keys.edn"))
.command::<_, TekCommand, _>(app, input)
{
if let Some(undo) = command.execute(app)? {
@ -54,7 +54,7 @@ pub fn handle_groovebox (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
if app.editor.handle(input)? == Some(true) {
return Ok(Some(true))
}
if let Some(command) = SourceIter(include_str!("../edn/groovebox_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/groovebox_keys.edn"))
.command::<_, TekCommand, _>(app, input)
{
if let Some(undo) = command.execute(app)? {
@ -67,7 +67,7 @@ pub fn handle_groovebox (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
pub fn handle_sampler (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
let sampler = app.tracks[0].sampler_mut(0).expect("no sampler");
if let Some(command) = SourceIter(include_str!("../edn/sampler_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/sampler_keys.edn"))
.command::<_, SamplerCommand, _>(sampler, input)
{
if let Some(undo) = command.execute(sampler)? {

View file

@ -868,7 +868,7 @@ impl Modal {
Bsp::s(Tui::bold(true, "tek!"), Bsp::s("", Map::south(1, options, option)))
}
fn view_help (&self) -> impl Content<TuiOut> {
let bindings = ||TokenIter::new(include_str!("../edn/groovebox_keys.edn"))
let bindings = ||TokenIter::new(include_str!("../../../config/groovebox_keys.edn"))
.filter_map(|x|if let Value::Exp(_, iter)=x.value{
Some(iter)
} else {