Permalink
Browse files

add new sfz sample player: zerberus

  • Loading branch information...
1 parent 9f5fd0d commit 8ffe7531d96ca726fbf40d8ef6bfeb48000980e7 @wschweer wschweer committed Mar 26, 2013
Showing with 2,952 additions and 963 deletions.
  1. +12 −7 CMakeLists.txt
  2. +9 −0 admin
  3. +3 −2 aeolus/aeolus/aeolus.cpp
  4. +3 −3 aeolus/aeolus/aeolus.h
  5. +1 −1 aeolus/aeolus/global.h
  6. +1 −0 build/config.h.in
  7. +9 −16 fluid/fluid.cpp
  8. +3 −4 fluid/fluid.h
  9. +1 −0 libmscore/CMakeLists.txt
  10. +1 −1 libmscore/event.h
  11. +7 −2 libmscore/instrument.cpp
  12. +66 −91 msynth/synti.cpp → libmscore/msynthesizer.cpp
  13. +71 −0 libmscore/msynthesizer.h
  14. +0 −1 libmscore/score.h
  15. +2 −1 libmscore/sparm.h
  16. +12 −2 mscore/CMakeLists.txt
  17. +0 −1 mscore/alsa.cpp
  18. +4 −5 mscore/exportaudio.cpp
  19. +5 −3 mscore/exportmp3.cpp
  20. +57 −1 mscore/file.cpp
  21. +1 −1 mscore/jackaudio.cpp
  22. +0 −1 mscore/mixer.cpp
  23. +5 −2 mscore/musescore.cpp
  24. +2 −0 mscore/musescore.h
  25. +0 −1 mscore/pa.cpp
  26. +24 −1 mscore/preferences.cpp
  27. +1 −0 mscore/preferences.h
  28. +1 −0 mscore/prefsdialog.h
  29. +191 −178 mscore/prefsdialog.ui
  30. +33 −6 mscore/seq.cpp
  31. +1 −3 mscore/seq.h
  32. +74 −6 mscore/synthcontrol.cpp
  33. +3 −1 mscore/synthcontrol.h
  34. +54 −6 mscore/synthcontrol.ui
  35. +0 −51 msynth/CMakeLists.txt
  36. +0 −118 msynth/synti.h
  37. +69 −0 synthesizer/synthesizer.h
  38. +0 −447 thirdparty/portmidi/Makefile
  39. +37 −0 zerberus/CMakeLists.txt
  40. +64 −0 zerberus/channel.cpp
  41. +46 −0 zerberus/channel.h
  42. +252 −0 zerberus/instrument.cpp
  43. +62 −0 zerberus/instrument.h
  44. +137 −0 zerberus/midievent.h
  45. +38 −0 zerberus/sample.h
  46. +367 −0 zerberus/sfz.cpp
  47. +319 −0 zerberus/voice.cpp
  48. +181 −0 zerberus/voice.h
  49. +434 −0 zerberus/zerberus.cpp
  50. +149 −0 zerberus/zerberus.h
  51. +57 −0 zerberus/zone.cpp
  52. +83 −0 zerberus/zone.h
View
@@ -21,7 +21,7 @@
project(mscore)
#minimum tested, report if it works with older
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
cmake_policy(SET CMP0003 NEW)
@@ -41,12 +41,13 @@ set(MSCORE_UNSTABLE TRUE) # mark as unstable
set(USE_SSE TRUE)
set(SCRIPT_INTERFACE TRUE)
-option(AEOLUS "enable pipe organ synthesizer" ON) # pipe organ synthesizer
-option(OSC "enable OSC remote control protocol" ON) # osc remote control
+option(AEOLUS "enable pipe organ synthesizer" ON)
+option(ZERBERUS "enable experimental sfz sampler" ON)
+option(OSC "enable OSC remote control protocol" ON)
option(OMR "enable PDF import" OFF) # OMR - optical music recognition
# for installation see: http://ubuntuforums.org/showthread.php?t=1647350
option(OCR "enable OCR, requires OMR" OFF) # requires tesseract 3.0, needs work on mac/win
-option(SOUNDFONT3 "ogg vorbis compressed fonts" ON) # enable ogg vorbis compressed fonts, require ogg & vorbis
+option(SOUNDFONT3 "ogg vorbis compressed fonts" ON) # enable ogg vorbis compressed fonts, require ogg & vorbis
option(HAS_AUDIOFILE "enable audio export" ON) # requires libsndfile
option(USE_SYSTEM_QTSINGLEAPPLICATION "Use system QtSingleApplication" OFF)
@@ -84,7 +85,7 @@ endif (APPLE)
# Check for gcc compiler >= 4.6
#
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
- if (${CMAKE_CXX_COMPILER_MAJOR} LESS 4
+ if (${CMAKE_CXX_COMPILER_MAJOR} LESS 4
OR ((${CMAKE_CXX_COMPILER_MAJOR} EQUAL 4) AND (${CMAKE_CXX_COMPILER_MINOR} LESS 6)))
message(FATAL_ERROR "bad gcc compiler version " ${CMAKE_CXX_COMPILER_VERSION}
" >= 4.6 required")
@@ -305,7 +306,7 @@ ADD_CUSTOM_TARGET(mops2 DEPENDS ${PCH})
## add subdirs
##
subdirs(mscore awl bww2mxml share
- fluid msynth mstyle libmscore thirdparty/rtf2html thirdparty/diff)
+ fluid mstyle libmscore thirdparty/rtf2html thirdparty/diff)
add_subdirectory(mtest EXCLUDE_FROM_ALL)
add_subdirectory(manual)
@@ -318,6 +319,10 @@ if (AEOLUS)
subdirs (aeolus)
endif (AEOLUS)
+if (ZERBERUS)
+ subdirs (zerberus)
+endif (ZERBERUS)
+
if (OMR)
subdirs (omr)
endif (OMR)
@@ -339,7 +344,7 @@ include_directories(
)
##
-## Include packaging
+## Include packaging
##
include(Packaging)
View
@@ -45,6 +45,15 @@ case $1 in
;;
+ allclean)
+ rm `find . -name cmake_install.cmake`
+ rm `find . -name CTestTestfile.cmake`
+ rm `find mtest thirdparty zerberus share aeolus awl bww2mxml fluid libmscore manual mscore mstyle msynth -name Makefile`
+ rm -rf `find . -name CMakeFiles`
+ rm -rf `find . -name __`
+
+ ;;
+
*)
echo "gitpush -- push libmscore upstream"
echo "gitpull -- pull libmscore from upstream"
@@ -29,12 +29,13 @@ extern QString mscoreGlobalShare;
#include "libmscore/event.h"
#include "xml.h"
#include "libmscore/sparm_p.h"
+#include "libmscore/msynthesizer.h"
//---------------------------------------------------------
// init
//---------------------------------------------------------
-void Aeolus::init(int samplerate)
+void Aeolus::init()
{
setlocale(LC_ALL, "C"); // scanf of floats does not work otherwise
@@ -44,6 +45,7 @@ void Aeolus::init(int samplerate)
strcpy(stopsPath, qPrintable(stops));
QDir dir;
+ int samplerate = MasterSynthesizer::sampleRate();
QString waves = dataPath + QString("/aeolus/waves%1").arg(samplerate);
dir.mkpath(waves);
n = strlen(qPrintable(waves));
@@ -55,7 +57,6 @@ void Aeolus::init(int samplerate)
audio_start();
model->init();
-// printGui();
}
//---------------------------------------------------------
@@ -25,7 +25,7 @@ struct MidiPatch;
class Event;
#include <stdint.h>
-#include "msynth/synti.h"
+#include "synthesizer/synthesizer.h"
#include "libmscore/midipatch.h"
#include "asection.h"
@@ -42,7 +42,7 @@ class M_ifc_init;
// Synth
//---------------------------------------------------------
-class Aeolus : public Synth {
+class Aeolus : public Synthesizer {
Model* model;
QList<MidiPatch*> patchList;
uint16_t _midimap [16];
@@ -92,7 +92,7 @@ class Aeolus : public Synth {
public:
Aeolus();
virtual ~Aeolus();
- virtual void init(int sampleRate);
+ virtual void init();
virtual const char* name() const { return "Aeolus"; }
@@ -91,7 +91,7 @@ enum // GLOBAL LIMITS
#define HOLD_MASK 64
#define ALL_MASK 127
-#include "msynth/synti.h"
+#include "synthesizer/synthesizer.h"
#include "libmscore/midipatch.h"
#endif
View
@@ -36,6 +36,7 @@
#define VERSION "${MUSESCORE_VERSION_FULL}"
#cmakedefine AEOLUS
+#cmakedefine ZERBERUS
#cmakedefine OMR
#cmakedefine OCR
#cmakedefine OSC
View
@@ -26,6 +26,7 @@
#include "chorus.h"
#include "voice.h"
#include "libmscore/sparm_p.h"
+#include "libmscore/msynthesizer.h"
namespace FluidS {
@@ -83,6 +84,7 @@ static SyntiParameter params[] = {
//---------------------------------------------------------
Fluid::Fluid()
+ : Synthesizer()
{
left_buf = new float[FLUID_MAX_BUFSIZE];
right_buf = new float[FLUID_MAX_BUFSIZE];
@@ -95,27 +97,18 @@ Fluid::Fluid()
//---------------------------------------------------------
// init
-// static initialization
-//---------------------------------------------------------
-
-void Fluid::init()
- {
- initialized = true;
- fluid_conversion_config();
- Voice::dsp_float_config();
- }
-
-//---------------------------------------------------------
-// init
// instance initialization
//---------------------------------------------------------
-void Fluid::init(int sr)
+void Fluid::init()
{
- if (!initialized) // initialize all the conversion tables and other stuff
- init();
+ if (!initialized) { // initialize all the conversion tables and other stuff
+ initialized = true;
+ fluid_conversion_config();
+ Voice::dsp_float_config();
+ }
- sample_rate = double(sr);
+ sample_rate = double(MasterSynthesizer::sampleRate());
sfont_id = 0;
_gain = .2;
View
@@ -22,7 +22,7 @@
#ifndef __FLUID_S_H__
#define __FLUID_S_H__
-#include "msynth/synti.h"
+#include "synthesizer/synthesizer.h"
#include "libmscore/midipatch.h"
#include "rev.h"
@@ -313,7 +313,7 @@ enum {
// Fluid
//---------------------------------------------------------
-class Fluid : public Synth {
+class Fluid : public Synthesizer {
static const int SILENT_BLOCKS = 32*5;
int silentBlocks;
@@ -326,7 +326,6 @@ class Fluid : public Synth {
QString _error; // last error message
static bool initialized;
- static void init();
double sample_rate; // The sample rate
float _masterTuning; // usually 440.0
@@ -363,7 +362,7 @@ class Fluid : public Synth {
public:
Fluid();
~Fluid();
- virtual void init(int sampleRate);
+ virtual void init();
virtual const char* name() const { return "Fluid"; }
@@ -75,6 +75,7 @@ add_library (
qzip.cpp audio.cpp splitMeasure.cpp joinMeasure.cpp midifile.cpp
exportmidi.cpp cursor.cpp read114.cpp sparm.cpp paste.cpp
bsymbol.cpp marker.cpp jump.cpp stemslash.cpp ledgerline.cpp
+ msynthesizer.cpp
)
if (SCRIPT_INTERFACE)
set_target_properties (
View
@@ -15,7 +15,6 @@
#define __EVENT_H__
class Note;
-// class MidiFile;
class Xml;
//---------------------------------------------------------
@@ -113,6 +112,7 @@ enum {
CTRL_ALL_SOUNDS_OFF = 0x78, // 120
CTRL_RESET_ALL_CTRL = 0x79, // 121
CTRL_LOCAL_OFF = 0x7a, // 122
+ CTRL_ALL_NOTES_OFF = 0x7b, // 123
// special midi events are mapped to internal
// controller
@@ -375,8 +375,10 @@ void Channel::write(Xml& xml) const
e.write(xml);
}
- if (synti) // HACK
+ if (synti == 1) // HACK
xml.tag("synti", "Aeolus");
+ else if (synti == 2)
+ xml.tag("synti", "Zerberus");
if (mute)
xml.tag("mute", mute);
if (solo)
@@ -451,8 +453,11 @@ void Channel::read(XmlReader& e)
midiActions.append(a);
}
else if (tag == "synti") {
- if (e.readElementText() == "Aeolus")
+ QString s = e.readElementText();
+ if (s == "Aeolus")
synti = 1;
+ else if (s == "Zerberus")
+ synti = 2;
else
synti = 0;
}
Oops, something went wrong.

0 comments on commit 8ffe753

Please sign in to comment.