summaryrefslogtreecommitdiff
path: root/muse2/synti/libsynti/mess.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-06-28 12:38:56 +0000
committerFlorian Jung <flo@windfisch.org>2011-06-28 12:38:56 +0000
commit1ee2c8cb621fdc9b165b891f6d8d4607dadabf9b (patch)
tree27174350316c57d48f8ecaad54f7919f0ba106e1 /muse2/synti/libsynti/mess.h
parent2f4a98c62adf7241944ea7949d4b6a50d4b4af36 (diff)
parent933aeb536f3d90eb38bc96308de628eeedd81755 (diff)
merged with current trunk. i hope this works...
Diffstat (limited to 'muse2/synti/libsynti/mess.h')
-rw-r--r--muse2/synti/libsynti/mess.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/muse2/synti/libsynti/mess.h b/muse2/synti/libsynti/mess.h
index bf9ad0de..81a3fe96 100644
--- a/muse2/synti/libsynti/mess.h
+++ b/muse2/synti/libsynti/mess.h
@@ -37,6 +37,10 @@ struct MidiPatch {
// Mess
// MusE experimental software synth
// Instance virtual interface class
+// NOTICE: If implementing sysex support, be sure to make a unique ID and use
+// it to filter out unrecognized sysexes. Headers should be constructed as:
+// MUSE_SYNTH_SYSEX_MFG_ID The MusE SoftSynth Manufacturer ID byte (0x7C) found in midi.h
+// 0xNN The synth's unique ID byte
//---------------------------------------------------------
class Mess {
@@ -49,6 +53,9 @@ class Mess {
Mess(int channels);
virtual ~Mess();
+ // This is only a kludge required to support old songs' midistates. Do not use in any new synth.
+ virtual int oldMidiStateHeader(const unsigned char** /*data*/) const { return 0; }
+
int channels() const { return _channels; }
int sampleRate() const { return _sampleRate; }
void setSampleRate(int r) { _sampleRate = r; }
@@ -62,9 +69,9 @@ class Mess {
virtual bool processEvent(const MidiPlayEvent&);
virtual bool setController(int, int, int) { return false; }
virtual bool playNote(int, int, int) { return false; }
- virtual bool sysex(int, const unsigned char*) { return false; }
+ virtual bool sysex(int, const unsigned char*) { return false; }
- virtual void getInitData(int*, const unsigned char**) const {}
+ virtual void getInitData(int* n, const unsigned char**) /*const*/ { *n = 0; } // No const: Synths may need to allocate member pointers. p4.0.27 Tim
virtual int getControllerInfo(int, const char**, int*, int*, int*, int*) const {return 0;}
virtual const char* getPatchName(int, int, int, bool) const { return "?"; }
virtual const MidiPatch* getPatchInfo(int, const MidiPatch*) const { return 0; }