From 103f3b8135362988dd3960e1c2e94adff5f25e1d Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Wed, 20 Apr 2022 12:44:27 +0200 Subject: [PATCH] Add drummer-mkttl --- drummer-mkttl | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100755 drummer-mkttl diff --git a/drummer-mkttl b/drummer-mkttl new file mode 100755 index 0000000..5be4522 --- /dev/null +++ b/drummer-mkttl @@ -0,0 +1,165 @@ +#!/bin/bash + + out_file="drummer.ttl" +outport_nb=32 + + + +add_port() +{ + echo -e >>${out_file} " [" + + case "$#" + in + "2") + printf >>${out_file} "$2" "${idx}" + ;; + + "3") + printf >>${out_file} "$2" "${idx}" "$3" + ;; + + "4") + printf >>${out_file} "$2" "${idx}" "$3" "$4" + ;; + esac + + echo -e >>${out_file} "\n ]$1" + + idx=$((${idx} + 1)) +} + + + + + +>${out_file} + +echo -n >>${out_file} '@prefix lv2: . +@prefix foaf: . +@prefix doap: . +@prefix rdf: . +@prefix rdfs: . +@prefix ui: . +@prefix atom: . +@prefix urid: . + + + a lv2:InstrumentPlugin, lv2:Plugin; + lv2:binary ; + doap:name "Drummer Sampler"; + doap:maintainer [ + foaf:name "AlkorZ3"; + foaf:homepage ; + foaf:mbox + ] ; + doap:license ; + lv2:requiredFeature urid:map; + ui:ui ; + lv2:extensionData ; + lv2:port' + +idx=0 + +add_port "," " a lv2:InputPort , atom:AtomPort; + atom:bufferType atom:Sequence ; + atom:supports , + ; + lv2:index %d; + lv2:symbol \"control\"; + lv2:name \"Control\";" + + + +add_port "," " a lv2:AudioPort, lv2:OutputPort; + lv2:index %d; + lv2:symbol \"master_out_1\"; + lv2:name \"Master - Out 1\";" + +add_port "," " a lv2:AudioPort, lv2:OutputPort; + lv2:index %d; + lv2:symbol \"master_out_2\"; + lv2:name \"Master - Out 2\";" + + + +out_id=0 + +while [[ "${out_id}" -lt "${outport_nb}" ]] +do + add_port "," " a lv2:AudioPort, lv2:OutputPort; + lv2:index %d; + lv2:symbol \"audio_%02d_out_1\"; + lv2:name \"Audio %02d - Out 1\";" "${out_id}" "${out_id}" + + add_port "," " a lv2:AudioPort, lv2:OutputPort; + lv2:index %d; + lv2:symbol \"audio_%02d_out_2\"; + lv2:name \"Audio %02d - Out 2\";" "${out_id}" "${out_id}" + + out_id=$((${out_id} + 1)) +done + + + +add_port "," " a lv2:ControlPort, lv2:InputPort; + lv2:index %d; + lv2:symbol \"base_note\"; + lv2:name \"Midi Base Note\"; + lv2:minimum 21; + lv2:maximum 107; + lv2:default 36; + lv2:portProperty lv2:integer;" + + + +out_id=0 + +while [[ "${out_id}" -lt "32" ]] +do + add_port "," " a lv2:ControlPort, lv2:InputPort; + lv2:index %d; + lv2:symbol \"gain_%02d\"; + lv2:name \"Sample Gain %02d\"; + lv2:minimum -60.0; + lv2:maximum 6.0; + lv2:default 0.0; + lv2:scalePoint [ + rdfs:label \"-inf\" ; + rdf:value -60.0; + ]" "${out_id}" "${out_id}" + + out_id=$((${out_id} + 1)) +done + + + +out_id=0 + +while [[ "${out_id}" -lt "32" ]] +do + add_port "," " a lv2:ControlPort, lv2:InputPort; + lv2:index %d; + lv2:symbol \"pan_%02d\"; + lv2:name \"Sample Pan %02d\"; + lv2:minimum -1.0; + lv2:maximum 1.0; + lv2:default 0.0;" "${out_id}" "${out_id}" + + out_id=$((${out_id} + 1)) +done + + + +add_port "." " a lv2:OutputPort , atom:AtomPort ; + atom:bufferType atom:Sequence ; + atom:supports ; + lv2:index %d ; + lv2:symbol \"core_events\" ; + lv2:name \"Core Events\"" + +echo >>${out_file} ' + + + a ui:GtkUI ; + ui:binary .'