summaryrefslogtreecommitdiff
path: root/muse2/synti/libsynti
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-06-19 01:26:26 +0000
committerTim E. Real <termtech@rogers.com>2011-06-19 01:26:26 +0000
commit02941424387a064301372c12bda3e8c3ab3fee45 (patch)
treee4cdea4400d8a34060a1c4d2b32da8e7ef46ab90 /muse2/synti/libsynti
parent448d81436ed8c2bc501506c2663a9bdb8c0dd023 (diff)
Major work, all synthesizers. Other fixes. Please see ChangeLog.
Diffstat (limited to 'muse2/synti/libsynti')
-rw-r--r--muse2/synti/libsynti/evdata.h.OLD2
-rw-r--r--muse2/synti/libsynti/mess.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/muse2/synti/libsynti/evdata.h.OLD b/muse2/synti/libsynti/evdata.h.OLD
index 4e529bec..8c8b77c9 100644
--- a/muse2/synti/libsynti/evdata.h.OLD
+++ b/muse2/synti/libsynti/evdata.h.OLD
@@ -57,6 +57,8 @@ class EvData {
}
}
void setData(const unsigned char* p, int l) {
+ if(data)
+ delete[] data; // p4.0.27
data = new unsigned char[l];
memcpy(data, p, l);
dataLen = l;
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; }