Fixed installation path in Makefile.

Fixed several smaller problems in SYSEX-converter script.
pull/1/head
Holger Wirtz 8 years ago
parent 0169790b95
commit f77c154c69
  1. 26
      bin/dx7sysex2lv2
  2. 2
      src/Makefile

@ -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=<SYSEX>)
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=<SYSEX>)
}
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);
}

@ -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

Loading…
Cancel
Save