From f77c154c6906a71718ba16fa6d685f8a94ae01fb Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Wed, 11 Jan 2017 14:34:51 +0100 Subject: [PATCH] Fixed installation path in Makefile. Fixed several smaller problems in SYSEX-converter script. --- bin/dx7sysex2lv2 | 26 +++++++++++++++++++------- src/Makefile | 2 +- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/bin/dx7sysex2lv2 b/bin/dx7sysex2lv2 index 18fd5da..9afe86d 100755 --- a/bin/dx7sysex2lv2 +++ b/bin/dx7sysex2lv2 @@ -29,8 +29,7 @@ $DXSYX="/usr/local/bin/dxsyx"; $LV2_BUNDLE_NAME="dexed.lv2"; $LV2_URI="https://github.com/dcoredump/".$LV2_BUNDLE_NAME; -#$LV2_INSTALL_PATH=$ENV{'HOME'}."/.lv2"; -$LV2_INSTALL_PATH="/zynthian/zynthian-plugins/lv2/".$LV2_BUNDLE_NAME; +$LV2_INSTALL_PATH=$ENV{'HOME'}."/.lv2"; $SYSEX=$ARGV[0]; $BANK=$SYSEX; @@ -51,8 +50,15 @@ while($s=) my($voice)=$1; $voice=~s/\s+$//; # right trim my($voice_name)=$voice; - $voice=~tr/ /_/; - $voice=~tr/-/_/; + $voice=~tr/[ &-*+\"\'`\?\/\<\>\[\]\^\{\}]\|/_/; + $voice=~s/%3c/_/i; + $voice=~s/%3e/_/i; + $voice=~s/%5b/_/i; + $voice=~s/%5d/_/i; + $voice=~s/%5e/_/i; + $voice=~s/%7b/_/i; + $voice=~s/%7d/_/i; + $voice=~s/%7c/_/i; if($deeaxe_voice) { @@ -61,13 +67,18 @@ while($s=) } my($path)=$LV2_INSTALL_PATH."/".$_LV2_BUNDLE_NAME."-".$BANK."_".$voice.".lv2"; - print "Writing ".$path."/".$BANK."_".$voice.".ttl\n"; + if(!-d $LV2_INSTALL_PATH) + { + mkdir($LV2_INSTALL_PATH) || die("Cannot create dir \'$LV2_INSTALL_PATH\':$!\n"); + } if(!-d $path) { mkdir($path) || die("Cannot create dir \'$path\':$!\n"); } + print "Writing ".$path."/".$BANK."_".$voice.".ttl\n"; + write_manifest($path,$voice); open($deeaxe_voice,">".$path."/".$BANK."_".$voice.".ttl") || die ("Cannot open \'".$path."/".$BANK."_".$voice.".ttl\': $!"); @@ -106,7 +117,7 @@ sub write_preset_header print $deeaxe_voice "<>\n"; print $deeaxe_voice " a pset:Preset ;\n"; print $deeaxe_voice " lv2:appliesTo <".$LV2_URI."> ;\n"; - print $deeaxe_voice " rdfs:label \"".$voice_name."\" ;\n"; + #print $deeaxe_voice " rdfs:label \"".$voice_name."\" ;\n"; print $deeaxe_voice " lv2:port [\n"; print_lv2_port("cutoff","1.0"); print $deeaxe_voice " ] , [\n"; @@ -114,7 +125,7 @@ sub write_preset_header print $deeaxe_voice " ] , [\n"; print_lv2_port("output","1.0"); print $deeaxe_voice " ] , [\n"; - print_lv2_port("engine","2"); + print_lv2_port("engine","0"); print $deeaxe_voice " ] , [\n"; print_lv2_port("polymono","0"); print $deeaxe_voice " ] , [\n"; @@ -160,6 +171,7 @@ sub write_manifest print MANIFEST " lv2:appliesTo <".$LV2_URI."> ;\n"; #print MANIFEST " a pset:Bank $BANK ;\n"; print MANIFEST " a pset:Preset ;\n"; + print MANIFEST " rdfs:label \"".$voice."\" ;\n"; print MANIFEST " rdfs:seeAlso <".$BANK."_".$voice.".ttl> .\n"; close(MANIFEST); } diff --git a/src/Makefile b/src/Makefile index 298d3ba..d9d57b7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ BUNDLE=dexed.lv2 -INSTALL_DIR=/zynthian/zynthian-plugins/mod-lv2 +INSTALL_DIR=/zynthian/zynthian-plugins/lv2 TARGET=dexed.so OBJ=fm_core.o env.o lfo.o dx7note.o sin.o pitchenv.o fm_op_kernel.o freqlut.o exp2.o EngineMkI.o EngineOpl.o PluginFx.o trace.o CFLAGS=-fPIC -DPIC -std=c++11 -I. -I/usr/local/include/lvtk-2 -DLVTK_DEBUG=false