From d352fa75a31a5908e7a71b651853c9ac02b2a30d Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Sat, 7 Jan 2017 18:59:50 +0000 Subject: [PATCH] Added new parameters to bin/dx7sysex2lv2. Changed Dexed.ttl: enumeration-list instead of integers. Optimized the audio output-leveling. --- bin/dx7sysex2lv2 | 27 ++++++++- src/Dexed.ttl | 140 +++++++++++++++++++++++++++++++++++++++++++++-- src/dexed.cpp | 4 +- src/dexed.h | 2 +- 4 files changed, 164 insertions(+), 9 deletions(-) diff --git a/bin/dx7sysex2lv2 b/bin/dx7sysex2lv2 index 4831d6d..18fd5da 100755 --- a/bin/dx7sysex2lv2 +++ b/bin/dx7sysex2lv2 @@ -29,7 +29,8 @@ $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=$ENV{'HOME'}."/.lv2"; +$LV2_INSTALL_PATH="/zynthian/zynthian-plugins/lv2/".$LV2_BUNDLE_NAME; $SYSEX=$ARGV[0]; $BANK=$SYSEX; @@ -115,7 +116,29 @@ sub write_preset_header print $deeaxe_voice " ] , [\n"; print_lv2_port("engine","2"); print $deeaxe_voice " ] , [\n"; - print_lv2_port("unisono","0"); + print_lv2_port("polymono","0"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("pitch_bend_range","1"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("pitch_bend_step","0"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("mod_wheel_range","99"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("mod_wheel_assign","0"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("foot_ctrl_range","99"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("foot_ctrl_assign","0"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("breath_ctrl_range","99"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("breath_ctrl_assign","0"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("aftertouch_range","99"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("aftertouch_assign","0"); + print $deeaxe_voice " ] , [\n"; + print_lv2_port("master_tune","0.0"); } sub write_manifest diff --git a/src/Dexed.ttl b/src/Dexed.ttl index 65c4ae9..0cc6f39 100644 --- a/src/Dexed.ttl +++ b/src/Dexed.ttl @@ -130,7 +130,40 @@ lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 7 ; - lv2:portProperty lv2:integer ; + lv2:portProperty lv2:enumeration, lv2:integer ; + lv2:scalePoint [ + rdf:value 0 ; + rdfs:label "Off" ; + rdfs:comment "Off" ; + ], [ + rdf:value 1 ; + rdfs:label "Pitch" ; + rdfs:comment "Pitch" ; + ], [ + rdf:value 2 ; + rdfs:label "Amp" ; + rdfs:comment "Amp" ; + ], [ + rdf:value 3 ; + rdfs:label "Amp+Pitch" ; + rdfs:comment "Amp+Pitch" ; + ], [ + rdf:value 4 ; + rdfs:label "EG" ; + rdfs:comment "EG" ; + ], [ + rdf:value 5 ; + rdfs:label "EG+Pitch" ; + rdfs:comment "EG+Pitch" ; + ], [ + rdf:value 6 ; + rdfs:label "EG+Amp" ; + rdfs:comment "EG+Amp" ; + ], [ + rdf:value 7 ; + rdfs:label "EG+Pitch+Amp" ; + rdfs:comment "EG+Pitch+Amp" ; + ]; ] , [ a lv2:InputPort, lv2:ControlPort ; @@ -150,7 +183,40 @@ lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 7 ; - lv2:portProperty lv2:integer ; + lv2:portProperty lv2:enumeration, lv2:integer ; + lv2:scalePoint [ + rdf:value 0 ; + rdfs:label "Off" ; + rdfs:comment "Off" ; + ], [ + rdf:value 1 ; + rdfs:label "Pitch" ; + rdfs:comment "Pitch" ; + ], [ + rdf:value 2 ; + rdfs:label "Amp" ; + rdfs:comment "Amp" ; + ], [ + rdf:value 3 ; + rdfs:label "Amp+Pitch" ; + rdfs:comment "Amp+Pitch" ; + ], [ + rdf:value 4 ; + rdfs:label "EG" ; + rdfs:comment "EG" ; + ], [ + rdf:value 5 ; + rdfs:label "EG+Pitch" ; + rdfs:comment "EG+Pitch" ; + ], [ + rdf:value 6 ; + rdfs:label "EG+Amp" ; + rdfs:comment "EG+Amp" ; + ], [ + rdf:value 7 ; + rdfs:label "EG+Pitch+Amp" ; + rdfs:comment "EG+Pitch+Amp" ; + ]; ] , [ a lv2:InputPort, lv2:ControlPort ; @@ -170,7 +236,40 @@ lv2:default 0; lv2:minimum 0 ; lv2:maximum 7 ; - lv2:portProperty lv2:integer ; + lv2:portProperty lv2:enumeration, lv2:integer ; + lv2:scalePoint [ + rdf:value 0 ; + rdfs:label "Off" ; + rdfs:comment "Off" ; + ], [ + rdf:value 1 ; + rdfs:label "Pitch" ; + rdfs:comment "Pitch" ; + ], [ + rdf:value 2 ; + rdfs:label "Amp" ; + rdfs:comment "Amp" ; + ], [ + rdf:value 3 ; + rdfs:label "Amp+Pitch" ; + rdfs:comment "Amp+Pitch" ; + ], [ + rdf:value 4 ; + rdfs:label "EG" ; + rdfs:comment "EG" ; + ], [ + rdf:value 5 ; + rdfs:label "EG+Pitch" ; + rdfs:comment "EG+Pitch" ; + ], [ + rdf:value 6 ; + rdfs:label "EG+Amp" ; + rdfs:comment "EG+Amp" ; + ], [ + rdf:value 7 ; + rdfs:label "EG+Pitch+Amp" ; + rdfs:comment "EG+Pitch+Amp" ; + ]; ] , [ a lv2:InputPort, lv2:ControlPort ; @@ -190,7 +289,40 @@ lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 7 ; - lv2:portProperty lv2:integer ; + lv2:portProperty lv2:enumeration, lv2:integer ; + lv2:scalePoint [ + rdf:value 0 ; + rdfs:label "Off" ; + rdfs:comment "Off" ; + ], [ + rdf:value 1 ; + rdfs:label "Pitch" ; + rdfs:comment "Pitch" ; + ], [ + rdf:value 2 ; + rdfs:label "Amp" ; + rdfs:comment "Amp" ; + ], [ + rdf:value 3 ; + rdfs:label "Amp+Pitch" ; + rdfs:comment "Amp+Pitch" ; + ], [ + rdf:value 4 ; + rdfs:label "EG" ; + rdfs:comment "EG" ; + ], [ + rdf:value 5 ; + rdfs:label "EG+Pitch" ; + rdfs:comment "EG+Pitch" ; + ], [ + rdf:value 6 ; + rdfs:label "EG+Amp" ; + rdfs:comment "EG+Amp" ; + ], [ + rdf:value 7 ; + rdfs:label "EG+Pitch+Amp" ; + rdfs:comment "EG+Pitch+Amp" ; + ]; ] , [ a lv2:InputPort, lv2:ControlPort ; diff --git a/src/dexed.cpp b/src/dexed.cpp index 4f58df7..d9d77de 100644 --- a/src/dexed.cpp +++ b/src/dexed.cpp @@ -130,7 +130,7 @@ void Dexed::set_params(void) bool polymono=bool(*p(p_polymono)); uint8_t engine=uint8_t(*p(p_engine)); - float f_gain=*p(p_output); + float f_gain=*p(p_output)*scaler; float f_cutoff=*p(p_cutoff); float f_reso=*p(p_resonance); @@ -441,7 +441,7 @@ void Dexed::GetSamples(uint32_t n_samples, float* buffer) if(f<-1.0) f=-1.0; sumbuf[j]+=f; */ - sumbuf[j]+=static_cast(audiobuf.get()[j])*scaler; + sumbuf[j]+=static_cast(audiobuf.get()[j]); audiobuf.get()[j]=0; } } diff --git a/src/dexed.h b/src/dexed.h index 8223a4f..8073fe7 100644 --- a/src/dexed.h +++ b/src/dexed.h @@ -51,7 +51,7 @@ enum DexedEngineResolution { }; // GLOBALS -static const float scaler = 0.0000000025; +float scaler = 0.0000000025; //==============================================================================