From 3d516e0811d3b825018b0cb25a670638f577afa0 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Tue, 3 Jan 2017 13:50:39 +0100 Subject: [PATCH] Changed default engine to MODERN. Hope this limitsstrange sound behaviour for some sounds. --- src/Dexed.ttl | 2 +- src/Makefile | 2 ++ src/dexed.cpp | 9 ++----- src/modgui.ttl | 1 + src/presets.ttl | 64 ++++++++++++++++++++++++------------------------- 5 files changed, 38 insertions(+), 40 deletions(-) diff --git a/src/Dexed.ttl b/src/Dexed.ttl index 3057e3b..bcad5c8 100644 --- a/src/Dexed.ttl +++ b/src/Dexed.ttl @@ -66,7 +66,7 @@ lv2:index 5 ; lv2:symbol "engine" ; lv2:name "ENGINE" ; - lv2:default 1 ; + lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 2 ; lv2:portProperty lv2:enumeration, lv2:integer ; diff --git a/src/Makefile b/src/Makefile index 4812348..617e85d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -53,6 +53,8 @@ else CXXFLAGS += $(CFLAGS) $(CFLAGS_OPTIONS) -O3 -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad endif +CXXFLAGS=$(CFLAGS) $(CFLAGS_OPTIONS) -DNON_DEXED_CLIP -O3 + all: $(BUNDLE) Makefile clean: Makefile diff --git a/src/dexed.cpp b/src/dexed.cpp index d8993dc..efa2bcc 100644 --- a/src/dexed.cpp +++ b/src/dexed.cpp @@ -69,7 +69,7 @@ Dexed::Dexed(double rate) : lvtk::Synth(p_n_ports, p_midi_in) memset(&voiceStatus, 0, sizeof(VoiceStatus)); engineType=0xff; - setEngineType(DEXED_ENGINE_MARKI); + setEngineType(DEXED_ENGINE_MODERN); onParam(155,static_cast(0x3f)); // operator on/off => All OPs on @@ -428,15 +428,10 @@ void Dexed::GetSamples(uint32_t n_samples, float* buffer) if (voices[note].live) { voices[note].dx7_note->compute(audiobuf.get(), lfovalue, lfodelay, &controllers); for (uint32_t j=0; j < N; ++j) { -#ifndef NON_DEXED_CLIP int32_t val = audiobuf.get()[j]; - //val = val >> 4; - val = val >> 5; + val = val >> 4; int32_t clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9; float f = static_cast(clip_val)/0x8000; -#else - float f=static_cast(audiobuf.get()[j]<<2)/INT_MAX; -#endif if(f>1.0) f=1.0; if(f<-1.0) diff --git a/src/modgui.ttl b/src/modgui.ttl index 9a4a039..f73c9db 100644 --- a/src/modgui.ttl +++ b/src/modgui.ttl @@ -1,4 +1,5 @@ @prefix modgui: . +@prefix lv2: . modgui:gui [ diff --git a/src/presets.ttl b/src/presets.ttl index 271c9b0..9c951c6 100644 --- a/src/presets.ttl +++ b/src/presets.ttl @@ -17,7 +17,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -473,7 +473,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -929,7 +929,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -1385,7 +1385,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -1841,7 +1841,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -2297,7 +2297,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -2753,7 +2753,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -3209,7 +3209,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -3665,7 +3665,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -4121,7 +4121,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -4577,7 +4577,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -5033,7 +5033,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -5489,7 +5489,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -5945,7 +5945,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -6401,7 +6401,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -6857,7 +6857,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -7313,7 +7313,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -7769,7 +7769,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -8225,7 +8225,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -8681,7 +8681,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -9137,7 +9137,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -9593,7 +9593,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -10049,7 +10049,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -10505,7 +10505,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -10961,7 +10961,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -11417,7 +11417,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -11873,7 +11873,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -12329,7 +12329,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -12785,7 +12785,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -13241,7 +13241,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -13697,7 +13697,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0 @@ -14153,7 +14153,7 @@ pset:value 1.0 ] , [ lv2:symbol "engine" ; - pset:value 1.0 + pset:value 0.0 ] , [ lv2:symbol "unisono" ; pset:value 0.0