summaryrefslogtreecommitdiff
path: root/muse2/synti
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/synti')
-rw-r--r--muse2/synti/deicsonze/deicsonze.cpp2
-rw-r--r--muse2/synti/fluid/fluidgui.cpp2
-rw-r--r--muse2/synti/fluidsynth/fluidsynti.cpp3
-rw-r--r--muse2/synti/libsynti/CMakeLists.txt2
-rw-r--r--muse2/synti/organ/CMakeLists.txt2
-rw-r--r--muse2/synti/simpledrums2/CMakeLists.txt10
-rw-r--r--muse2/synti/simpledrums2/simpledrums.cpp2
-rw-r--r--muse2/synti/simpledrums2/ssplugin.cpp29
8 files changed, 39 insertions, 13 deletions
diff --git a/muse2/synti/deicsonze/deicsonze.cpp b/muse2/synti/deicsonze/deicsonze.cpp
index 9048b727..7d3f8995 100644
--- a/muse2/synti/deicsonze/deicsonze.cpp
+++ b/muse2/synti/deicsonze/deicsonze.cpp
@@ -1318,7 +1318,7 @@ void DeicsOnze::loadSutulaPresets()
file = fopen (presetPath.toLatin1().constData(), "rt");
if (file == NULL) {
printf("can't open ");
- printf(presetPath.toLatin1().constData());
+ printf("%s", presetPath.toLatin1().constData());
printf("\n");
}
else
diff --git a/muse2/synti/fluid/fluidgui.cpp b/muse2/synti/fluid/fluidgui.cpp
index ec1c77b7..c9477b6b 100644
--- a/muse2/synti/fluid/fluidgui.cpp
+++ b/muse2/synti/fluid/fluidgui.cpp
@@ -79,7 +79,7 @@ void FLUIDGui::loadFont()
}
QByteArray ba = pathEntry->text().toLatin1();
const char* path = ba.constData();
- int len = strlen(path) + 1 + 3;
+ int len = ba.length() + 1 + 3;
unsigned char buffer[len];
int k = 0;
buffer[k++] = MUSE_SYNTH_SYSEX_MFG_ID;
diff --git a/muse2/synti/fluidsynth/fluidsynti.cpp b/muse2/synti/fluidsynth/fluidsynti.cpp
index a42954f3..ab00606e 100644
--- a/muse2/synti/fluidsynth/fluidsynti.cpp
+++ b/muse2/synti/fluidsynth/fluidsynti.cpp
@@ -417,7 +417,7 @@ void FluidSynth::parseInitData(int n, const byte* d)
chptr+=strlen(lastdir.c_str())+1;
- FluidSoundFont fonts[nrOfSoundfonts]; //Just a temp one
+ FluidSoundFont* fonts = new FluidSoundFont[nrOfSoundfonts]; //Just a temp one
//Fonts:
for (int i=0; i<nr_of_fonts; i++) {
fonts[i].filename = (char*)(chptr);
@@ -470,6 +470,7 @@ void FluidSynth::parseInitData(int n, const byte* d)
for (int i=0; i<nrOfSoundfonts; i++) {
pushSoundfont(fonts[i].filename.c_str(), fonts[i].extid);
}
+ delete[] fonts;
}
diff --git a/muse2/synti/libsynti/CMakeLists.txt b/muse2/synti/libsynti/CMakeLists.txt
index adfb4bec..2b8e7441 100644
--- a/muse2/synti/libsynti/CMakeLists.txt
+++ b/muse2/synti/libsynti/CMakeLists.txt
@@ -41,7 +41,7 @@ file (GLOB synti_source_files
## Define target
##
add_library(synti ${MODULES_BUILD}
- ${PROJECT_BINARY_DIR}/all-pic.h.pch
+ ${PROJECT_BINARY_DIR}/all-pic.h
${synti_source_files}
)
diff --git a/muse2/synti/organ/CMakeLists.txt b/muse2/synti/organ/CMakeLists.txt
index b22a924b..e0f8b29a 100644
--- a/muse2/synti/organ/CMakeLists.txt
+++ b/muse2/synti/organ/CMakeLists.txt
@@ -72,7 +72,7 @@ set (FILES_TO_TRANSLATE
#
set_target_properties ( organ
PROPERTIES PREFIX ""
- COMPILE_FLAGS "-fvisibility=hidden -O2 -include ${PROJECT_BINARY_DIR}/all-pic.h"
+ COMPILE_FLAGS "-fvisibility=hidden -include ${PROJECT_BINARY_DIR}/all-pic.h"
)
##
diff --git a/muse2/synti/simpledrums2/CMakeLists.txt b/muse2/synti/simpledrums2/CMakeLists.txt
index 172ce616..744023ea 100644
--- a/muse2/synti/simpledrums2/CMakeLists.txt
+++ b/muse2/synti/simpledrums2/CMakeLists.txt
@@ -75,13 +75,15 @@ set (FILES_TO_TRANSLATE
# - use precompiled header files
#
-if ( x${CMAKE_BUILD_TYPE} STREQUAL xrelease )
- SET(SIMPLEDRUMS_OPTFLAGS "-O6")
-endif ( x${CMAKE_BUILD_TYPE} STREQUAL xrelease )
+# Don't override the default optimization. Can be reconsidered
+# according to Mathias' feedback. - Orcan 2012-05-20
+#if ( x${CMAKE_BUILD_TYPE} STREQUAL xrelease )
+# SET(SIMPLEDRUMS_OPTFLAGS "-O6")
+#endif ( x${CMAKE_BUILD_TYPE} STREQUAL xrelease )
set_target_properties ( simpledrums
PROPERTIES PREFIX ""
- COMPILE_FLAGS "${SIMPLEDRUMS_OPTFLAGS} -fvisibility=hidden -include ${PROJECT_BINARY_DIR}/all-pic.h"
+ COMPILE_FLAGS "-fvisibility=hidden -include ${PROJECT_BINARY_DIR}/all-pic.h"
)
##
diff --git a/muse2/synti/simpledrums2/simpledrums.cpp b/muse2/synti/simpledrums2/simpledrums.cpp
index 945abbb0..12e4fd18 100644
--- a/muse2/synti/simpledrums2/simpledrums.cpp
+++ b/muse2/synti/simpledrums2/simpledrums.cpp
@@ -1768,8 +1768,8 @@ bool SimpleSynth::initSendEffect(int id, QString lib, QString name)
QString errorString = "Error loading plugin \"" + plugin->label() + "\"";
guiSendError(errorString.toLatin1().constData());
}
- return success;
SS_TRACE_OUT
+ return success;
}
diff --git a/muse2/synti/simpledrums2/ssplugin.cpp b/muse2/synti/simpledrums2/ssplugin.cpp
index cebf97c7..881594d7 100644
--- a/muse2/synti/simpledrums2/ssplugin.cpp
+++ b/muse2/synti/simpledrums2/ssplugin.cpp
@@ -324,9 +324,11 @@ float LadspaPlugin::defaultValue(int k) const
double val = 1.0;
if (LADSPA_IS_HINT_DEFAULT_MINIMUM(rh))
val = range.LowerBound;
+ else if (LADSPA_IS_HINT_DEFAULT_MAXIMUM(rh))
+ val = range.UpperBound;
else if (LADSPA_IS_HINT_DEFAULT_LOW(rh))
if (LADSPA_IS_HINT_LOGARITHMIC(range.HintDescriptor))
- val = exp(fast_log10(range.LowerBound) * .75 +
+ val = exp(log(range.LowerBound) * .75 +
log(range.UpperBound) * .25);
else
val = range.LowerBound*.75 + range.UpperBound*.25;
@@ -342,8 +344,6 @@ float LadspaPlugin::defaultValue(int k) const
log(range.UpperBound) * .75);
else
val = range.LowerBound*.25 + range.UpperBound*.75;
- else if (LADSPA_IS_HINT_DEFAULT_MAXIMUM(rh))
- val = range.UpperBound;
else if (LADSPA_IS_HINT_DEFAULT_0(rh))
val = 0.0;
else if (LADSPA_IS_HINT_DEFAULT_1(rh))
@@ -352,6 +352,29 @@ float LadspaPlugin::defaultValue(int k) const
val = 100.0;
else if (LADSPA_IS_HINT_DEFAULT_440(rh))
val = 440.0;
+ // No default found. Make one up...
+ else if (LADSPA_IS_HINT_BOUNDED_BELOW(rh) && LADSPA_IS_HINT_BOUNDED_ABOVE(rh))
+ {
+ if (LADSPA_IS_HINT_LOGARITHMIC(rh))
+ val = exp(log(range.LowerBound) * .5 +
+ log(range.UpperBound) * .5);
+ else
+ val = range.LowerBound*.5 + range.UpperBound*.5;
+ }
+ else if (LADSPA_IS_HINT_BOUNDED_BELOW(rh))
+ val = range.LowerBound;
+ else if (LADSPA_IS_HINT_BOUNDED_ABOVE(rh))
+ {
+ // Hm. What to do here... Just try 0.0 or the upper bound if less than zero.
+ //if(range.UpperBound > 0.0)
+ // val = 0.0;
+ //else
+ // val = range.UpperBound;
+ // Instead try this: Adopt an 'attenuator-like' policy, where upper is the default.
+ val = range.UpperBound;
+ return true;
+ }
+
SS_TRACE_OUT
return val;
}