diff options
-rw-r--r-- | apps/plugins/midi/guspat.c | 15 | ||||
-rw-r--r-- | apps/plugins/midi/guspat.h | 15 | ||||
-rw-r--r-- | apps/plugins/midi/midiutil.h | 1 | ||||
-rw-r--r-- | apps/plugins/midi/sequencer.c | 2 | ||||
-rw-r--r-- | apps/plugins/midi/synth.c | 5 | ||||
-rw-r--r-- | apps/plugins/midi/synth.h | 5 |
6 files changed, 23 insertions, 20 deletions
diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c index f44e542e2d..c7ae6e1928 100644 --- a/apps/plugins/midi/guspat.c +++ b/apps/plugins/midi/guspat.c | |||
@@ -22,6 +22,21 @@ | |||
22 | 22 | ||
23 | extern struct plugin_api * rb; | 23 | extern struct plugin_api * rb; |
24 | 24 | ||
25 | /* This came from one of the Gravis documents */ | ||
26 | const uint32_t gustable[]= | ||
27 | { | ||
28 | 8175, 8661, 9177, 9722, 10300, 10913, 11562, 12249, 12978, 13750, 14567, 15433, | ||
29 | 16351, 17323, 18354, 19445, 20601, 21826, 23124, 24499, 25956, 27500, 29135, 30867, | ||
30 | 32703, 34647, 36708, 38890, 41203, 43653, 46249, 48999, 51913, 54999, 58270, 61735, | ||
31 | 65406, 69295, 73416, 77781, 82406, 87306, 92498, 97998, 103826, 109999, 116540, 123470, | ||
32 | 130812, 138591, 146832, 155563, 164813, 174614, 184997, 195997, 207652, 219999, 233081, 246941, | ||
33 | 261625, 277182, 293664, 311126, 329627, 349228, 369994, 391995, 415304, 440000, 466163, 493883, | ||
34 | 523251, 554365, 587329, 622254, 659255, 698456, 739989, 783991, 830609, 880000, 932328, 987767, | ||
35 | 1046503, 1108731, 1174660, 1244509, 1318511, 1396914, 1479979, 1567983, 1661220, 1760002, 1864657, 1975536, | ||
36 | 2093007, 2217464, 2349321, 2489019, 2637024, 2793830, 2959960, 3135968, 3322443, 3520006, 3729316, 3951073, | ||
37 | 4186073, 4434930, 4698645, 4978041, 5274051, 5587663, 5919922, 6271939, 6644889, 7040015, 7458636, 7902150 | ||
38 | }; | ||
39 | |||
25 | unsigned int readWord(int file) | 40 | unsigned int readWord(int file) |
26 | { | 41 | { |
27 | return (readChar(file)<<0) | (readChar(file)<<8); // | (readChar(file)<<8) | (readChar(file)<<0); | 42 | return (readChar(file)<<0) | (readChar(file)<<8); // | (readChar(file)<<8) | (readChar(file)<<0); |
diff --git a/apps/plugins/midi/guspat.h b/apps/plugins/midi/guspat.h index 3f858cd909..fecf2245fa 100644 --- a/apps/plugins/midi/guspat.h +++ b/apps/plugins/midi/guspat.h | |||
@@ -17,20 +17,7 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | /* This came from one of the Gravis documents */ | 20 | extern const uint32_t gustable[]; |
21 | static const unsigned int gustable[]= | ||
22 | { | ||
23 | 8175, 8661, 9177, 9722, 10300, 10913, 11562, 12249, 12978, 13750, 14567, 15433, | ||
24 | 16351, 17323, 18354, 19445, 20601, 21826, 23124, 24499, 25956, 27500, 29135, 30867, | ||
25 | 32703, 34647, 36708, 38890, 41203, 43653, 46249, 48999, 51913, 54999, 58270, 61735, | ||
26 | 65406, 69295, 73416, 77781, 82406, 87306, 92498, 97998, 103826, 109999, 116540, 123470, | ||
27 | 130812, 138591, 146832, 155563, 164813, 174614, 184997, 195997, 207652, 219999, 233081, 246941, | ||
28 | 261625, 277182, 293664, 311126, 329627, 349228, 369994, 391995, 415304, 440000, 466163, 493883, | ||
29 | 523251, 554365, 587329, 622254, 659255, 698456, 739989, 783991, 830609, 880000, 932328, 987767, | ||
30 | 1046503, 1108731, 1174660, 1244509, 1318511, 1396914, 1479979, 1567983, 1661220, 1760002, 1864657, 1975536, | ||
31 | 2093007, 2217464, 2349321, 2489019, 2637024, 2793830, 2959960, 3135968, 3322443, 3520006, 3729316, 3951073, | ||
32 | 4186073, 4434930, 4698645, 4978041, 5274051, 5587663, 5919922, 6271939, 6644889, 7040015, 7458636, 7902150 | ||
33 | }; | ||
34 | 21 | ||
35 | struct GWaveform | 22 | struct GWaveform |
36 | { | 23 | { |
diff --git a/apps/plugins/midi/midiutil.h b/apps/plugins/midi/midiutil.h index 26e46b98b8..f5a369700c 100644 --- a/apps/plugins/midi/midiutil.h +++ b/apps/plugins/midi/midiutil.h | |||
@@ -141,7 +141,6 @@ int printf(const char *fmt, ...); | |||
141 | int midimain(void * filename); | 141 | int midimain(void * filename); |
142 | unsigned char readChar(int file); | 142 | unsigned char readChar(int file); |
143 | inline void setPoint(struct SynthObject * so, int pt); | 143 | inline void setPoint(struct SynthObject * so, int pt); |
144 | struct Event * getEvent(struct Track * tr, int evNum); | ||
145 | int readTwoBytes(int file); | 144 | int readTwoBytes(int file); |
146 | int readFourBytes(int file); | 145 | int readFourBytes(int file); |
147 | int readVarData(int file); | 146 | int readVarData(int file); |
diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c index 2819c12a6a..27d960ccdb 100644 --- a/apps/plugins/midi/sequencer.c +++ b/apps/plugins/midi/sequencer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "plugin.h" | 19 | #include "plugin.h" |
20 | #include "midiutil.h" | 20 | #include "midiutil.h" |
21 | #include "guspat.h" | 21 | #include "guspat.h" |
22 | #include "synth.h" | ||
22 | 23 | ||
23 | void setVolScale(int a); | 24 | void setVolScale(int a); |
24 | 25 | ||
@@ -320,6 +321,7 @@ static void sendEvent(struct Event * ev) | |||
320 | } | 321 | } |
321 | } | 322 | } |
322 | 323 | ||
324 | int tick(void) ICODE_ATTR; | ||
323 | int tick(void) | 325 | int tick(void) |
324 | { | 326 | { |
325 | if(mf==NULL) | 327 | if(mf==NULL) |
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c index bcfd79499b..d053ebf535 100644 --- a/apps/plugins/midi/synth.c +++ b/apps/plugins/midi/synth.c | |||
@@ -23,11 +23,6 @@ | |||
23 | 23 | ||
24 | extern struct plugin_api * rb; | 24 | extern struct plugin_api * rb; |
25 | 25 | ||
26 | struct Event * getEvent(struct Track * tr, int evNum) | ||
27 | { | ||
28 | return tr->dataBlock + (evNum*sizeof(struct Event)); | ||
29 | } | ||
30 | |||
31 | void readTextBlock(int file, char * buf) | 26 | void readTextBlock(int file, char * buf) |
32 | { | 27 | { |
33 | char c = 0; | 28 | char c = 0; |
diff --git a/apps/plugins/midi/synth.h b/apps/plugins/midi/synth.h index daaf26d5f6..f85e3d1cef 100644 --- a/apps/plugins/midi/synth.h +++ b/apps/plugins/midi/synth.h | |||
@@ -48,3 +48,8 @@ static inline void synthSample(int * mixL, int * mixR) | |||
48 | return; /* No more ghetto lowpass filter.. linear intrpolation works well. */ | 48 | return; /* No more ghetto lowpass filter.. linear intrpolation works well. */ |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline struct Event * getEvent(struct Track * tr, int evNum) | ||
52 | { | ||
53 | return tr->dataBlock + (evNum*sizeof(struct Event)); | ||
54 | } | ||
55 | |||