Arnaud G. GIBERT
8844bd636f
- Implement DR_Kit_Id_Convert() and DR_Bank_Program_Id_Convert(), - Implement UI title label and id_bank_program label update, - Add GPL3 license file & file headers.
319 lines
7.7 KiB
Bash
Executable File
319 lines
7.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# drummer-mkttl #
|
|
#------------------------------------------------------------------------------#
|
|
|
|
#------------------------------------------------------------------------------#
|
|
# This file is part of Drummer. #
|
|
# #
|
|
# Drummer is free software: you can redistribute it and/or modify it #
|
|
# under the terms of the GNU General Public License as published by #
|
|
# the Free Software Foundation, either version 3 of the License, or #
|
|
# (at your option) any later version. #
|
|
# #
|
|
# Drummer is distributed in the hope that it will be useful, #
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
# GNU General Public License for more details. #
|
|
# #
|
|
# You should have received a copy of the GNU General Public License #
|
|
# along with Drummer. If not, see <https://www.gnu.org/licenses/>. #
|
|
#------------------------------------------------------------------------------#
|
|
|
|
manifest_file="manifest.ttl"
|
|
out_file="drummer.ttl"
|
|
owner_email="alkorz3@rx3.net"
|
|
plugin_url="http://rx3.org/AlkorZ3/drummer"
|
|
project_url="https://git.rx3.org/gitea/rx3/drummer"
|
|
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"
|
|
;;
|
|
|
|
"5")
|
|
printf >>${out_file} "$2" "${idx}" "$3" "$4" "$5"
|
|
;;
|
|
esac
|
|
|
|
echo -e >>${out_file} "\n ]$1"
|
|
|
|
idx=$((${idx} + 1))
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
add_group()
|
|
{
|
|
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"
|
|
;;
|
|
|
|
"5")
|
|
printf >>${out_file} "$2" "${idx}" "$3" "$4" "$5"
|
|
;;
|
|
esac
|
|
|
|
echo -e >>${out_file} " $1"
|
|
|
|
idx=$((${idx} + 1))
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
>${out_file}
|
|
|
|
echo -n >>${out_file} '@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
|
|
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
|
|
@prefix doap: <http://usefulinc.com/ns/doap#>.
|
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
|
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
|
|
@prefix ui: <http://lv2plug.in/ns/extensions/ui#>.
|
|
@prefix atom: <http://lv2plug.in/ns/ext/atom#>.
|
|
@prefix urid: <http://lv2plug.in/ns/ext/urid#>.
|
|
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#>.
|
|
@prefix drummer: <'${plugin_url}'#>.
|
|
|
|
<'${plugin_url}'>
|
|
a lv2:InstrumentPlugin, lv2:Plugin;
|
|
lv2:binary <drummer.so>;
|
|
doap:name "Drummer Sampler";
|
|
doap:maintainer [
|
|
foaf:name "AlkorZ3";
|
|
foaf:homepage <'${project_url}'>;
|
|
foaf:mbox <'${owner_email}'>
|
|
] ;
|
|
doap:license <http://usefulinc.com/doap/licenses/gpl>;
|
|
lv2:requiredFeature urid:map;
|
|
ui:ui <'${plugin_url}'#ui>;
|
|
lv2:extensionData <http://lv2plug.in/ns/ext/state#interface>;
|
|
lv2:port'
|
|
|
|
idx=0
|
|
|
|
add_port "," " a lv2:InputPort , atom:AtomPort;
|
|
atom:bufferType atom:Sequence ;
|
|
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent>,
|
|
<http://lv2plug.in/ns/ext/atom#Resource>;
|
|
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\";
|
|
lv2:designation pg:left;
|
|
pg:group drummer:audio_master_out;"
|
|
|
|
add_port "," " a lv2:AudioPort, lv2:OutputPort;
|
|
lv2:index %d;
|
|
lv2:symbol \"master_out_2\";
|
|
lv2:name \"Master - Out 2\";
|
|
lv2:designation pg:right;
|
|
pg:group drummer:audio_master_out;"
|
|
|
|
|
|
|
|
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\";
|
|
lv2:designation pg:left;
|
|
pg:group drummer:audio_%02d_out;" "${out_id}" "${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\";
|
|
lv2:designation pg:right;
|
|
pg:group drummer:audio_%02d_out;" "${out_id}" "${out_id}" "${out_id}"
|
|
|
|
out_id=$((${out_id} + 1))
|
|
done
|
|
|
|
|
|
|
|
add_port "," " a lv2:ControlPort, lv2:InputPort;
|
|
lv2:index %d;
|
|
lv2:symbol \"channel_id\";
|
|
lv2:name \"Midi Channel Id\";
|
|
lv2:minimum 0;
|
|
lv2:maximum 15;
|
|
lv2:default 10;
|
|
lv2:portProperty lv2:integer;"
|
|
|
|
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;"
|
|
|
|
add_port "," " a lv2:ControlPort, lv2:InputPort;
|
|
lv2:index %d;
|
|
lv2:symbol \"velocity_ignore_note\";
|
|
lv2:name \"MIDI Velocity Ignore Note\";
|
|
lv2:minimum 21;
|
|
lv2:maximum 107;
|
|
lv2:default 24;
|
|
lv2:portProperty lv2:integer;"
|
|
|
|
add_port "," " a lv2:ControlPort, lv2:InputPort;
|
|
lv2:index %d;
|
|
lv2:symbol \"note_off_ignore_note\";
|
|
lv2:name \"MIDI Note Off Ignore Note\";
|
|
lv2:minimum 21;
|
|
lv2:maximum 107;
|
|
lv2:default 25;
|
|
lv2:portProperty lv2:integer;"
|
|
|
|
add_port "," " a lv2:ControlPort, lv2:InputPort;
|
|
lv2:index %d;
|
|
lv2:symbol \"velocity_ignore_flag\";
|
|
lv2:name \"Velocity Ignore Flag\";
|
|
lv2:default 0;
|
|
lv2:portProperty lv2:toggled;"
|
|
|
|
add_port "," " a lv2:ControlPort, lv2:InputPort;
|
|
lv2:index %d;
|
|
lv2:symbol \"note_off_ignore_flag\";
|
|
lv2:name \"Note Off Ignore Flag\";
|
|
lv2:default 1;
|
|
lv2:portProperty lv2:toggled;"
|
|
|
|
|
|
|
|
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 <http://lv2plug.in/ns/ext/atom#Resource> ;
|
|
lv2:index %d ;
|
|
lv2:symbol \"core_events\" ;
|
|
lv2:name \"Core Events\""
|
|
|
|
|
|
|
|
|
|
|
|
echo >>${out_file} '
|
|
drummer:audio_master_out
|
|
a pg:StereoGroup, pg:OutputGroup ;
|
|
lv2:name "Audio Master Out" ;
|
|
lv2:symbol "audio_master_out" .'
|
|
|
|
|
|
|
|
|
|
|
|
out_id=0
|
|
idx=0
|
|
|
|
while [[ "${out_id}" -lt "32" ]]
|
|
do
|
|
add_group "." "drummer:audio_%02d_out
|
|
a pg:StereoGroup, pg:OutputGroup ;
|
|
lv2:name \"Audio %02d Out\" ;
|
|
lv2:symbol \"audio_%02d_out\"" "${out_id}" "${out_id}"
|
|
|
|
out_id=$((${out_id} + 1))
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
echo >>${out_file} '
|
|
|
|
<'${plugin_url}'#ui>
|
|
a ui:GtkUI ;
|
|
ui:binary <drummer_ui.so> .'
|
|
|
|
|
|
|
|
|
|
|
|
echo >${manifest_file} '@prefix lv2: <http://lv2plug.in/ns/lv2core#>.
|
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
|
|
<'${plugin_url}'>
|
|
a lv2:Plugin;
|
|
rdfs:seeAlso <'${out_file}'>.'
|