• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).


Commit MetaInfo

Revisionede6f20d8c5858c026366aeb59d444401a72a5eb (tree)
Time2008-04-20 06:36:53
AuthorRandy Heit <rheit@zdoo...>
CommiterRandy Heit

Log Message

- Added the writewave command to write the internal TiMidity's output to a

wave file.

- Changed the default channel velocity for MUS files from 64 to 100 to

better match apparent MIDI practice. (Would like to know what this is
supposed to be.)

- Changed the mus2midi channel assignments to match the internal player's.
- Fixed: apply_envelope_to_amp() should clamp the mix levels to 0.

SVN r926 (trunk)

Change Summary

Incremental Difference

diff -r f0df227f3079 -r ede6f20d8c58 docs/rh-log.txt
--- a/docs/rh-log.txt Sat Apr 19 05:57:09 2008 +0000
+++ b/docs/rh-log.txt Sat Apr 19 21:36:53 2008 +0000
@@ -1,3 +1,12 @@
1+April 19, 2008
2+- Added the writewave command to write the internal TiMidity's output to a
3+ wave file.
4+- Changed the default channel velocity for MUS files from 64 to 100 to
5+ better match apparent MIDI practice. (Would like to know what this is
6+ supposed to be.)
7+- Changed the mus2midi channel assignments to match the internal player's.
8+- Fixed: apply_envelope_to_amp() should clamp the mix levels to 0.
9+
110 April 18, 2008
211 - Made the maximum number of TiMidity voices configurable through the
312 timidity_voices cvar.
diff -r f0df227f3079 -r ede6f20d8c58 src/mus2midi.cpp
--- a/src/mus2midi.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/mus2midi.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -33,10 +33,7 @@
3333 ** MUS files are essentially format 0 MIDI files with some
3434 ** space-saving modifications. Conversion is quite straight-forward.
3535 ** If you were to hook a main() into this that calls ProduceMIDI,
36-** you could create a self-contained MUS->MIDI converter. However, if
37-** you want to do that, you would be better off using qmus2mid, since
38-** it creates multitrack files that usually maintain running status
39-** better than single track files and are thus smaller.
36+** you could create a self-contained MUS->MIDI converter.
4037 */
4138
4239
@@ -52,9 +49,7 @@
5249 0, 70, // 70 divisions
5350 'M','T','r','k', 0, 0, 0, 0,
5451 // The first event sets the tempo to 500,000 microsec/quarter note
55-0, 255, 81, 3, 0x07, 0xa1, 0x20,
56-// Set the percussion channel to full volume
57-0, 0xB9, 7, 127
52+0, 255, 81, 3, 0x07, 0xa1, 0x20
5853 };
5954
6055 static const BYTE MUSMagic[4] = { 'M','U','S',0x1a };
@@ -122,9 +117,8 @@
122117 int deltaTime;
123118 const MUSHeader *musHead = (const MUSHeader *)musBuf;
124119 BYTE status;
120+ BYTE chanUsed[16];
125121 BYTE lastVel[16];
126- SBYTE chanMap[16];
127- int chanCount;
128122 long trackLen;
129123
130124 // Do some validation of the MUS file
@@ -143,10 +137,8 @@
143137 maxmus_p = LittleShort(musHead->SongLen);
144138 mus_p = 0;
145139
146- memset (lastVel, 64, 16);
147- memset (chanMap, -1, 15);
148- chanMap[15] = 9;
149- chanCount = 0;
140+ memset (lastVel, 100, 16);
141+ memset (chanUsed, 0, 16);
150142 event = 0;
151143 deltaTime = 0;
152144 status = 0;
@@ -163,21 +155,27 @@
163155 t = musBuf[mus_p++];
164156 }
165157 channel = event & 15;
158+ if (channel == 15)
159+ {
160+ channel = 9;
161+ }
162+ else if (channel >= 9)
163+ {
164+ channel++;
165+ }
166166
167- if (chanMap[channel] < 0)
167+ if (!chanUsed[channel])
168168 {
169169 // This is the first time this channel has been used,
170170 // so sets its volume to 127.
171+ chanUsed[channel] = 1;
171172 outFile.Push(0);
172- outFile.Push(0xB0 | chanCount);
173+ outFile.Push(0xB0 | channel);
173174 outFile.Push(7);
174175 outFile.Push(127);
175- chanMap[channel] = chanCount++;
176- if (chanCount == 9)
177- ++chanCount;
178176 }
179177
180- midStatus = channel = chanMap[channel];
178+ midStatus = channel;
181179 midArgs = 0; // Most events have two args (0 means 2, 1 means 1)
182180
183181 switch (event & 0x70)
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/fmodsound.cpp
--- a/src/sound/fmodsound.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/fmodsound.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -72,7 +72,6 @@
7272
7373 #define SPECTRUM_SIZE 256
7474
75-
7675 // TYPES -------------------------------------------------------------------
7776
7877 struct FEnumList
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/i_music.cpp
--- a/src/sound/i_music.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/i_music.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -151,6 +151,11 @@
151151 return NULL;
152152 }
153153
154+MusInfo *MusInfo::GetWaveDumper(const char *filename, int rate)
155+{
156+ return NULL;
157+}
158+
154159 void I_InitMusic (void)
155160 {
156161 static bool setatterm = false;
@@ -629,3 +634,41 @@
629634 Printf ("Usage: writeopl <filename>");
630635 }
631636 }
637+
638+//==========================================================================
639+//
640+// CCMD writewave
641+//
642+// If the current song can be represented as a waveform, dump it to
643+// the specified file on disk. The sample rate parameter is merely a
644+// suggestion, and the dumper is free to ignore it.
645+//
646+//==========================================================================
647+
648+CCMD (writewave)
649+{
650+ if (argv.argc() >= 2 && argv.argc() <= 3)
651+ {
652+ if (currSong == NULL)
653+ {
654+ Printf ("No song is currently playing.\n");
655+ }
656+ else
657+ {
658+ MusInfo *dumper = currSong->GetWaveDumper(argv[1], argv.argc() == 3 ? atoi(argv[2]) : 0);
659+ if (dumper == NULL)
660+ {
661+ Printf ("Current song cannot be saved as wave data.\n");
662+ }
663+ else
664+ {
665+ dumper->Play(false);
666+ delete dumper;
667+ }
668+ }
669+ }
670+ else
671+ {
672+ Printf ("Usage: writewave <filename> [sample rate]");
673+ }
674+}
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/i_musicinterns.h
--- a/src/sound/i_musicinterns.h Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/i_musicinterns.h Sat Apr 19 21:36:53 2008 +0000
@@ -49,6 +49,7 @@
4949 virtual void Update();
5050 virtual FString GetStats();
5151 virtual MusInfo *GetOPLDumper(const char *filename);
52+ virtual MusInfo *GetWaveDumper(const char *filename, int rate);
5253
5354 enum EState
5455 {
@@ -225,6 +226,7 @@
225226 {
226227 public:
227228 TimidityMIDIDevice();
229+ TimidityMIDIDevice(int rate);
228230 ~TimidityMIDIDevice();
229231
230232 int Open(void (*callback)(unsigned int, void *, DWORD, DWORD), void *userdata);
@@ -268,6 +270,20 @@
268270 DWORD Position;
269271 };
270272
273+// Internal TiMidity disk writing version of a MIDI device ------------------
274+
275+class TimidityWaveWriterMIDIDevice : public TimidityMIDIDevice
276+{
277+public:
278+ TimidityWaveWriterMIDIDevice(const char *filename, int rate);
279+ ~TimidityWaveWriterMIDIDevice();
280+ int Resume();
281+ void Stop();
282+
283+protected:
284+ FILE *File;
285+};
286+
271287 // Base class for streaming MUS and MIDI files ------------------------------
272288
273289 // MIDI device selection.
@@ -297,7 +313,7 @@
297313 FString GetStats();
298314
299315 protected:
300- MIDIStreamer(const char *dumpname);
316+ MIDIStreamer(const char *dumpname, EMIDIDevice type);
301317
302318 void OutputVolume (DWORD volume);
303319 int FillBuffer(int buffer_num, int max_events, DWORD max_time);
@@ -363,9 +379,10 @@
363379 ~MUSSong2();
364380
365381 MusInfo *GetOPLDumper(const char *filename);
382+ MusInfo *GetWaveDumper(const char *filename, int rate);
366383
367384 protected:
368- MUSSong2(const MUSSong2 *original, const char *filename); //OPL dump constructor
385+ MUSSong2(const MUSSong2 *original, const char *filename, EMIDIDevice type); // file dump constructor
369386
370387 void DoInitialSetup();
371388 void DoRestart();
@@ -388,9 +405,10 @@
388405 ~MIDISong2();
389406
390407 MusInfo *GetOPLDumper(const char *filename);
408+ MusInfo *GetWaveDumper(const char *filename, int rate);
391409
392410 protected:
393- MIDISong2(const MIDISong2 *original, const char *filename); // OPL dump constructor
411+ MIDISong2(const MIDISong2 *original, const char *filename, EMIDIDevice type); // file dump constructor
394412
395413 void CheckCaps();
396414 void DoInitialSetup();
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/music_midi_midiout.cpp
--- a/src/sound/music_midi_midiout.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/music_midi_midiout.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -891,17 +891,28 @@
891891
892892 MusInfo *MIDISong2::GetOPLDumper(const char *filename)
893893 {
894- return new MIDISong2(this, filename);
894+ return new MIDISong2(this, filename, MIDI_OPL);
895895 }
896896
897897 //==========================================================================
898898 //
899-// MIDISong2 OPL Dumping Constructor
899+// MIDISong2 :: GetWaveDumper
900900 //
901901 //==========================================================================
902902
903-MIDISong2::MIDISong2(const MIDISong2 *original, const char *filename)
904-: MIDIStreamer(filename)
903+MusInfo *MIDISong2::GetWaveDumper(const char *filename, int rate)
904+{
905+ return new MIDISong2(this, filename, MIDI_Timidity);
906+}
907+
908+//==========================================================================
909+//
910+// MIDISong2 File Dumping Constructor
911+//
912+//==========================================================================
913+
914+MIDISong2::MIDISong2(const MIDISong2 *original, const char *filename, EMIDIDevice type)
915+: MIDIStreamer(filename, type)
905916 {
906917 SongLen = original->SongLen;
907918 MusHeader = new BYTE[original->SongLen];
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/music_midistream.cpp
--- a/src/sound/music_midistream.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/music_midistream.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -97,12 +97,12 @@
9797 //
9898 //==========================================================================
9999
100-MIDIStreamer::MIDIStreamer(const char *dumpname)
100+MIDIStreamer::MIDIStreamer(const char *dumpname, EMIDIDevice type)
101101 :
102102 #ifdef _WIN32
103103 PlayerThread(0), ExitEvent(0), BufferDoneEvent(0),
104104 #endif
105- MIDI(0), Division(0), InitialTempo(500000), DeviceType(MIDI_OPL), DumpFilename(dumpname)
105+ MIDI(0), Division(0), InitialTempo(500000), DeviceType(type), DumpFilename(dumpname)
106106 {
107107 #ifdef _WIN32
108108 BufferDoneEvent = NULL;
@@ -196,7 +196,14 @@
196196 assert(MIDI == NULL);
197197 if (DumpFilename.IsNotEmpty())
198198 {
199- MIDI = new OPLDumperMIDIDevice(DumpFilename);
199+ if (DeviceType == MIDI_OPL)
200+ {
201+ MIDI = new OPLDumperMIDIDevice(DumpFilename);
202+ }
203+ else if (DeviceType == MIDI_Timidity)
204+ {
205+ MIDI = new TimidityWaveWriterMIDIDevice(DumpFilename, 0);
206+ }
200207 }
201208 else switch(DeviceType)
202209 {
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/music_mus_midiout.cpp
--- a/src/sound/music_mus_midiout.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/music_mus_midiout.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -150,7 +150,7 @@
150150 {
151151 for (int i = 0; i < 16; ++i)
152152 {
153- LastVelocity[i] = 64;
153+ LastVelocity[i] = 100;
154154 ChannelVolumes[i] = 127;
155155 }
156156 }
@@ -340,7 +340,18 @@
340340
341341 MusInfo *MUSSong2::GetOPLDumper(const char *filename)
342342 {
343- return new MUSSong2(this, filename);
343+ return new MUSSong2(this, filename, MIDI_OPL);
344+}
345+
346+//==========================================================================
347+//
348+// MUSSong2 :: GetWaveDumper
349+//
350+//==========================================================================
351+
352+MusInfo *MUSSong2::GetWaveDumper(const char *filename, int rate)
353+{
354+ return new MUSSong2(this, filename, MIDI_Timidity);
344355 }
345356
346357 //==========================================================================
@@ -349,8 +360,8 @@
349360 //
350361 //==========================================================================
351362
352-MUSSong2::MUSSong2(const MUSSong2 *original, const char *filename)
353-: MIDIStreamer(filename)
363+MUSSong2::MUSSong2(const MUSSong2 *original, const char *filename, EMIDIDevice type)
364+: MIDIStreamer(filename, type)
354365 {
355366 int songstart = LittleShort(original->MusHeader->SongStart);
356367 MaxMusP = original->MaxMusP;
diff -r f0df227f3079 -r ede6f20d8c58 src/sound/music_timidity_mididevice.cpp
--- a/src/sound/music_timidity_mididevice.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/sound/music_timidity_mididevice.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -44,6 +44,27 @@
4444
4545 // MACROS ------------------------------------------------------------------
4646
47+// TYPES -------------------------------------------------------------------
48+
49+struct FmtChunk
50+{
51+ DWORD ChunkID;
52+ DWORD ChunkLen;
53+ WORD FormatTag;
54+ WORD Channels;
55+ DWORD SamplesPerSec;
56+ DWORD AvgBytesPerSec;
57+ WORD BlockAlign;
58+ WORD BitsPerSample;
59+ WORD ExtensionSize;
60+ WORD ValidBitsPerSample;
61+ DWORD ChannelMask;
62+ DWORD SubFormatA;
63+ WORD SubFormatB;
64+ WORD SubFormatC;
65+ BYTE SubFormatD[8];
66+};
67+
4768 // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
4869
4970 // PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
@@ -79,6 +100,26 @@
79100
80101 //==========================================================================
81102 //
103+// TimidityMIDIDevice Constructor with rate parameter
104+//
105+//==========================================================================
106+
107+TimidityMIDIDevice::TimidityMIDIDevice(int rate)
108+{
109+ // Need to support multiple instances with different playback rates
110+ // before we can use this parameter.
111+ rate = (int)GSnd->GetOutputRate();
112+ Stream = NULL;
113+ Tempo = 0;
114+ Division = 0;
115+ Events = NULL;
116+ Started = false;
117+ Renderer = NULL;
118+ Renderer = new Timidity::Renderer((float)rate);
119+}
120+
121+//==========================================================================
122+//
82123 // TimidityMIDIDevice Destructor
83124 //
84125 //==========================================================================
@@ -509,7 +550,7 @@
509550 { // end of song
510551 if (numsamples > 0)
511552 {
512- Renderer->ComputeOutput(samples1, samplesleft);
553+ Renderer->ComputeOutput(samples1, numsamples);
513554 }
514555 res = false;
515556 break;
@@ -521,6 +562,10 @@
521562 }
522563 }
523564 }
565+ if (Events == NULL)
566+ {
567+ res = false;
568+ }
524569 CritSec.Leave();
525570 return res;
526571 }
@@ -596,3 +641,124 @@
596641 }
597642 return out;
598643 }
644+
645+//==========================================================================
646+//
647+// TimidityWaveWriterMIDIDevice Constructor
648+//
649+//==========================================================================
650+
651+TimidityWaveWriterMIDIDevice::TimidityWaveWriterMIDIDevice(const char *filename, int rate)
652+{
653+ File = fopen(filename, "wb");
654+ if (File != NULL)
655+ { // Write wave header
656+ DWORD work[3];
657+ FmtChunk fmt;
658+
659+ work[0] = MAKE_ID('R','I','F','F');
660+ work[1] = 0; // filled in later
661+ work[2] = MAKE_ID('W','A','V','E');
662+ if (3 != fwrite(work, 4, 3, File)) goto fail;
663+
664+ fmt.ChunkID = MAKE_ID('f','m','t',' ');
665+ fmt.ChunkLen = LittleLong(sizeof(fmt) - 8);
666+ fmt.FormatTag = LittleShort(0xFFFE); // WAVE_FORMAT_EXTENSIBLE
667+ fmt.Channels = LittleShort(2);
668+ fmt.SamplesPerSec = LittleLong((int)Renderer->rate);
669+ fmt.AvgBytesPerSec = LittleLong((int)Renderer->rate * 8);
670+ fmt.BlockAlign = LittleShort(8);
671+ fmt.BitsPerSample = LittleShort(32);
672+ fmt.ExtensionSize = LittleShort(2 + 4 + 16);
673+ fmt.ValidBitsPerSample = LittleShort(32);
674+ fmt.ChannelMask = LittleLong(3);
675+ fmt.SubFormatA = LittleLong(0x00000003); // Set subformat to KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
676+ fmt.SubFormatB = LittleShort(0x0000);
677+ fmt.SubFormatC = LittleShort(0x0010);
678+ fmt.SubFormatD[0] = 0x80;
679+ fmt.SubFormatD[1] = 0x00;
680+ fmt.SubFormatD[2] = 0x00;
681+ fmt.SubFormatD[3] = 0xaa;
682+ fmt.SubFormatD[4] = 0x00;
683+ fmt.SubFormatD[5] = 0x38;
684+ fmt.SubFormatD[6] = 0x9b;
685+ fmt.SubFormatD[7] = 0x71;
686+ if (1 != fwrite(&fmt, sizeof(fmt), 1, File)) goto fail;
687+
688+ work[0] = MAKE_ID('d','a','t','a');
689+ work[1] = 0; // filled in later
690+ if (2 != fwrite(work, 4, 2, File)) goto fail;
691+
692+ return;
693+fail:
694+ Printf("Failed to write %s: %s\n", filename, strerror(errno));
695+ fclose(File);
696+ File = NULL;
697+ }
698+}
699+
700+//==========================================================================
701+//
702+// TimidityWaveWriterMIDIDevice Destructor
703+//
704+//==========================================================================
705+
706+TimidityWaveWriterMIDIDevice::~TimidityWaveWriterMIDIDevice()
707+{
708+ if (File != NULL)
709+ {
710+ long pos = ftell(File);
711+ DWORD size;
712+
713+ // data chunk size
714+ size = LittleLong(pos - 8);
715+ if (0 == fseek(File, 4, SEEK_SET))
716+ {
717+ if (1 == fwrite(&size, 4, 1, File))
718+ {
719+ size = LittleLong(pos - 12 - sizeof(FmtChunk) - 8);
720+ if (0 == fseek(File, 4 + sizeof(FmtChunk) + 4, SEEK_CUR))
721+ {
722+ if (1 == fwrite(&size, 4, 1, File))
723+ {
724+ fclose(File);
725+ return;
726+ }
727+ }
728+ }
729+ }
730+ Printf("Could not finish writing wave file: %s\n", strerror(errno));
731+ fclose(File);
732+ }
733+}
734+
735+//==========================================================================
736+//
737+// TimidityWaveWriterMIDIDevice :: Resume
738+//
739+//==========================================================================
740+
741+int TimidityWaveWriterMIDIDevice::Resume()
742+{
743+ float writebuffer[4096];
744+
745+ while (ServiceStream(writebuffer, sizeof(writebuffer)))
746+ {
747+ if (fwrite(writebuffer, sizeof(writebuffer), 1, File) != 1)
748+ {
749+ Printf("Could not write entire wave file: %s\n", strerror(errno));
750+ return 1;
751+ }
752+ }
753+ return 0;
754+}
755+
756+//==========================================================================
757+//
758+// TimidityWaveWriterMIDIDevice Stop
759+//
760+//==========================================================================
761+
762+void TimidityWaveWriterMIDIDevice::Stop()
763+{
764+}
diff -r f0df227f3079 -r ede6f20d8c58 src/timidity/mix.cpp
--- a/src/timidity/mix.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/timidity/mix.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -82,8 +82,8 @@
8282 env_vol *= v->envelope_volume / float(1 << 30);
8383 }
8484 // Note: The pan offsets are negative.
85- v->left_mix = (float)calc_gf1_amp(env_vol + v->left_offset) * final_amp;
86- v->right_mix = (float)calc_gf1_amp(env_vol + v->right_offset) * final_amp;
85+ v->left_mix = MAX(0.f, (float)calc_gf1_amp(env_vol + v->left_offset) * final_amp);
86+ v->right_mix = MAX(0.f, (float)calc_gf1_amp(env_vol + v->right_offset) * final_amp);
8787 }
8888
8989 static int update_envelope(Voice *v)
@@ -440,7 +440,7 @@
440440 {
441441 return;
442442 }
443- if (v->left_offset == 0) // All the way to the left
443+ if (v->right_mix == 0) // All the way to the left
444444 {
445445 if (v->envelope_increment != 0 || v->tremolo_phase_increment != 0)
446446 {
@@ -451,7 +451,7 @@
451451 mix_single_left(sp, buf, v, count);
452452 }
453453 }
454- else if (v->right_offset == 0) // All the way to the right
454+ else if (v->left_mix == 0) // All the way to the right
455455 {
456456 if (v->envelope_increment != 0 || v->tremolo_phase_increment != 0)
457457 {
diff -r f0df227f3079 -r ede6f20d8c58 src/timidity/playmidi.cpp
--- a/src/timidity/playmidi.cpp Sat Apr 19 05:57:09 2008 +0000
+++ b/src/timidity/playmidi.cpp Sat Apr 19 21:36:53 2008 +0000
@@ -215,6 +215,17 @@
215215
216216 void Renderer::compute_pan(int panning, float &left_offset, float &right_offset)
217217 {
218+ // Round the left- and right-most positions to their extremes, since
219+ // most songs only do coarse panning.
220+ if (panning < 128)
221+ {
222+ panning = 0;
223+ }
224+ else if (panning > 127*128)
225+ {
226+ panning = 32767;
227+ }
228+
218229 if (panning == 0)
219230 {
220231 left_offset = 0;
@@ -355,6 +366,12 @@
355366 /* Only one instance of a note can be playing on a single channel. */
356367 void Renderer::note_on(int chan, int note, int vel)
357368 {
369+ if (vel == 0)
370+ {
371+ note_off(chan, note, 0);
372+ return;
373+ }
374+
358375 int i = voices, lowest = -1;
359376 float lv = 1e10, v;
360377
@@ -574,14 +591,7 @@
574591 switch (command)
575592 {
576593 case ME_NOTEON:
577- if (parm2 == 0)
578- {
579- note_off(chan, parm1, 0);
580- }
581- else
582- {
583- note_on(chan, parm1, parm2);
584- }
594+ note_on(chan, parm1, parm2);
585595 break;
586596
587597 case ME_NOTEOFF:
diff -r f0df227f3079 -r ede6f20d8c58 src/timidity/timidity.h
--- a/src/timidity/timidity.h Sat Apr 19 05:57:09 2008 +0000
+++ b/src/timidity/timidity.h Sat Apr 19 21:36:53 2008 +0000
@@ -66,7 +66,7 @@
6666 /* For some reason the sample volume is always set to maximum in all
6767 patch files. Define this for a crude adjustment that may help
6868 equalize instrument volumes. */
69-#define ADJUST_SAMPLE_VOLUMES
69+//#define ADJUST_SAMPLE_VOLUMES
7070
7171 /* The number of samples to use for ramping out a dying note. Affects
7272 click removal. */