diff -ruN TiMidity++-2.9.2/ChangeLog TiMidity++-2.9.3/ChangeLog --- TiMidity++-2.9.2/ChangeLog Mon Apr 10 13:52:58 2000 +++ TiMidity++-2.9.3/ChangeLog Mon May 8 15:26:08 2000 @@ -1,3 +1,43 @@ +2000-05-08 Masanao Izumo + + * Version 2.9.3 released. + +2000-05-08 Masanao Izumo + + * interface/{Makefile.am,Makefile.in}: Changed target dependancy for + tclIndex not to change tclIndex unless the tcl-sources are changed. + +2000-04-20 Eric A. Welsh + + * timidity/{resample.c,recache.c,playmidi.c}: Fix the previous patch. + - Drum & Sample pan fix. + - Remove pre_resampling(). + - And else... + +2000-04-15 Eric A. Welsh + + * timidity/playmidi.c: Fixed voice reduction control. + * timidity/{instrum.c,sndfont.c}: Removed the pre_resampling() calls + in order to enable drum pitch bends. + * timidity/readmidi.c: Remove duplicated code. + * timidity/playmidi.c: Enable to get chorus level in drum channel. + +2000-04-14 Eric A. Welsh + + * timidity/playmidi.c: Fixed pan pot + +2000-04-12 Masanao Izumo + + * timidity/alsa_a.c(PF_BUFF_FRAGM_OPT): Added the flag. + +2000-04-12 Eric A. Welsh + + * timidity/recache.c: Bug fixed. + +2000-04-11 Takashi SHIRAI + + * timidity/oss_a.c: Fixed for OSS version of !defined(SNDCTL_DSP_GETODELAY). + 2000-04-10 Masanao Izumo * Version 2.9.2 released. diff -ruN TiMidity++-2.9.2/INSTALL TiMidity++-2.9.3/INSTALL --- TiMidity++-2.9.2/INSTALL Thu Sep 2 23:48:45 1999 +++ TiMidity++-2.9.3/INSTALL Wed Apr 12 12:54:14 2000 @@ -3,10 +3,10 @@ Installation guide Masanao Izumo - Last updated on Sep.2.1999 + Last updated on Apr.4.2000 ============================================================================== - This document describes how to install TiMidity++(version 2.6.0 or + This document describes how to install TiMidity++(version 2.9.2 or later) for your UNIX-like machine. Methods for Macintosh are not described in this document. @@ -42,14 +42,15 @@ --prefix=PREFIX Specifies the base of installing directory. By default, PREFIX is "/usr/local/". - Any files are installed in : - PREFIX/bin : executable file - PREFIX/lib/timidity : configuration files and patches - PREFIX/man : online manual + Any files are installed in: + PREFIX/bin: executable files + PREFIX/share/timidity: configuration files and patches + PREFIX/lib/timidity: libraries and dynamic link interfaces. + PREFIX/man: online manuals Example: % sh configure --prefix=/opt/gnu - # installs to /opt/gnu/bin, /opt/gnu/lib/timidity, /opt/gnu/man + # installs to /opt/gnu/bin, /opt/gnu/man, /opt/gnu/... --x-includes=DIR Specifies include directory of X library. @@ -83,10 +84,23 @@ Specifies library directory of Tk. (If you fail to detect it automatically, try to specify this.) - --enable-audio + --enable-audio[=mode_list] Enables TiMidity++ to play MIDI files. If --enable-audio=no, TiMidity++ is only the MIDI-to-WAVE - converter. + converter. You can specify multi-audio device from follows + (specify comma separated list): + default: Automatically select audio device. (default) + oss: OSS /dev/dsp + sun: SunOS /dev/audio + hpux: HPUX /dev/audio + irix: IRIX audio library + mme: OSF/1 MME + sb_dsp: BSD/OS 2.0 /dev/sb_dsp + w32: Windows MMS + alsa: ALSA pcm device + alib: HPUX network audio (Alib) + nas: NAS - Network Audio System + esd: EsounD --enable-nas Enables TiMidity++ to play MIDI files using NAS (Network Audio System). @@ -94,8 +108,21 @@ --enable-esd Enables TiMidity++ to play MIDI files using EsounD. - --enable-dynamic - Enables the feature of dynamic loading interface. + --enable-interface=[Comma separated interface list] + Specifies interface list (Comma separated). Choose interfaces + from follows. + ncurses,slang,motif,tcltk,emacs,vt100,xaw,xskin,gtk,w32gui,server + Note that + --enable-interface=INTERFACE1,INTERFACE2,... + equals as + --enable-INTERFACE1=yes --enable-INTERFACE2=yes ... + + --enable-dynamic[=Comma separated interface list] + Specifies dynamic link interface list. + Note that + --enable-dynamic=INTERFACE1,INTERFACE2,... + equals as + --enable-INTERFACE1=dynamic --enable-INTERFACE2=dynamic ... --enable-ncurses Includes Ncurses interface. If you build this interface as dinamic @@ -185,8 +212,7 @@ ------------------------------ If configure failed or compile not complete successfully, edit common.makefile, Makefile, and timidity.h to appropriate value. - - +All of definition of variables are orverwrited by common.makefile. 3. make ------- diff -ruN TiMidity++-2.9.2/INSTALL.jp TiMidity++-2.9.3/INSTALL.jp --- TiMidity++-2.9.2/INSTALL.jp Sun Sep 5 21:09:17 1999 +++ TiMidity++-2.9.3/INSTALL.jp Tue Apr 11 16:45:25 2000 @@ -370,7 +370,7 @@ #define MAX_VOICES 256 となっています。DEFAULT_VOICES は起動時の同時発音数で、この値は -p オプション -を用いて 1〜MAX_VOICES の数を設定することができます。-iN インターフェースでは +を用いて 1〜MAX_VOICES の数を設定することができます。-in インターフェースでは 実行時に変化させることもできます。 パワーのあるマシンなら、デフォルトの同時発音数を増やして @@ -436,7 +436,7 @@ となっています。これはこのままでいいでしょう。 補足: TiMidity では、音の音程変換に浮動小数点数を用いずに、32 bit 固定小数点数 - +を用いて計算しています。 次に、自動 GUS/patch 音量調節の設定です。デフォルトでは diff -ruN TiMidity++-2.9.2/NEWS TiMidity++-2.9.3/NEWS --- TiMidity++-2.9.2/NEWS Mon Apr 10 13:36:12 2000 +++ TiMidity++-2.9.3/NEWS Mon May 8 13:29:58 2000 @@ -1,3 +1,8 @@ +05/08, 2000 + * Version 2.9.3 released. + * Enable drum bends. This fix also enables drum chorus, mod-wheel, + portament, and other drum bend controls. + 04/10, 2000 * Version 2.9.2 released. diff -ruN TiMidity++-2.9.2/configs/msc-config.h TiMidity++-2.9.3/configs/msc-config.h --- TiMidity++-2.9.2/configs/msc-config.h Mon Apr 10 13:53:46 2000 +++ TiMidity++-2.9.3/configs/msc-config.h Mon May 8 15:27:00 2000 @@ -261,7 +261,7 @@ /* In VDS Macro AAA=BBB is not available. */ #define __W32__ -#define TIMID_VERSION "2.9.2" +#define TIMID_VERSION "2.9.3" #define DEFAULT_PATH ".\\" #define AU_W32 #define WINSOCK diff -ruN TiMidity++-2.9.2/configure TiMidity++-2.9.3/configure --- TiMidity++-2.9.2/configure Mon Apr 10 13:33:10 2000 +++ TiMidity++-2.9.3/configure Wed Apr 26 14:07:02 2000 @@ -884,7 +884,7 @@ PACKAGE=TiMidity++ -VERSION=2.9.2 +VERSION=2.9.3 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } diff -ruN TiMidity++-2.9.2/configure.in TiMidity++-2.9.3/configure.in --- TiMidity++-2.9.2/configure.in Tue Apr 4 11:24:16 2000 +++ TiMidity++-2.9.3/configure.in Wed Apr 26 14:06:56 2000 @@ -55,7 +55,7 @@ AC_INIT(timidity/timidity.c) SHELL=${CONFIG_SHELL-/bin/sh} AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(TiMidity++, 2.9.2, no-define) +AM_INIT_AUTOMAKE(TiMidity++, 2.9.3, no-define) dnl To use CONTAINS() macro (See acinclude.m4) CONTAINS_INIT diff -ruN TiMidity++-2.9.2/interface/Makefile.am TiMidity++-2.9.3/interface/Makefile.am --- TiMidity++-2.9.2/interface/Makefile.am Mon Mar 20 15:10:14 2000 +++ TiMidity++-2.9.3/interface/Makefile.am Mon May 8 15:24:32 2000 @@ -175,7 +175,7 @@ rm -f *.o rm -f *.$(so) -tclIndex: $(TCLF) +tclIndex: $(TCLSRCS) rm -f tclIndex echo 'auto_mkindex . *.tcl; exit' | $(WISH) diff -ruN TiMidity++-2.9.2/interface/Makefile.in TiMidity++-2.9.3/interface/Makefile.in --- TiMidity++-2.9.2/interface/Makefile.in Mon Apr 10 13:53:21 2000 +++ TiMidity++-2.9.3/interface/Makefile.in Mon May 8 15:26:35 2000 @@ -578,7 +578,7 @@ rm -f *.o rm -f *.$(so) -tclIndex: $(TCLF) +tclIndex: $(TCLSRCS) rm -f tclIndex echo 'auto_mkindex . *.tcl; exit' | $(WISH) diff -ruN TiMidity++-2.9.2/timidity/Makefile.in TiMidity++-2.9.3/timidity/Makefile.in --- TiMidity++-2.9.2/timidity/Makefile.in Mon Apr 10 13:53:35 2000 +++ TiMidity++-2.9.3/timidity/Makefile.in Mon May 8 15:26:49 2000 @@ -315,7 +315,8 @@ playmidi.o: playmidi.c ../config.h timidity.h ../utils/support.h \ common.h ../libarc/url.h ../utils/mblock.h instrum.h playmidi.h \ readmidi.h output.h mix.h controls.h miditrace.h recache.h \ - ../libarc/arc.h reverb.h wrd.h aq.h tables.h + ../libarc/arc.h reverb.h wrd.h aq.h ../interface/soundspec.h \ + tables.h raw_a.o: raw_a.c ../config.h timidity.h ../utils/support.h output.h \ controls.h rcp.o: rcp.c ../config.h timidity.h ../utils/support.h common.h \ @@ -351,8 +352,8 @@ timidity.o: timidity.c ../config.h ../interface.h timidity.h \ ../utils/support.h common.h ../libarc/url.h ../utils/mblock.h \ instrum.h playmidi.h readmidi.h output.h controls.h tables.h \ - miditrace.h reverb.h recache.h ../libarc/arc.h \ - ../utils/strtab.h wrd.h mid.defs aq.h mix.h \ + miditrace.h reverb.h ../interface/soundspec.h recache.h \ + ../libarc/arc.h ../utils/strtab.h wrd.h mid.defs aq.h mix.h \ ../libunimod/unimod.h wave_a.o: wave_a.c ../config.h timidity.h ../utils/support.h output.h \ controls.h diff -ruN TiMidity++-2.9.2/timidity/alsa_a.c TiMidity++-2.9.3/timidity/alsa_a.c --- TiMidity++-2.9.2/timidity/alsa_a.c Mon Feb 7 15:29:27 2000 +++ TiMidity++-2.9.3/timidity/alsa_a.c Wed Apr 12 12:23:37 2000 @@ -76,7 +76,7 @@ #define dpm alsa_play_mode PlayMode dpm = { - DEFAULT_RATE, PE_16BIT|PE_SIGNED, PF_PCM_STREAM|PF_CAN_TRACE, + DEFAULT_RATE, PE_16BIT|PE_SIGNED, PF_PCM_STREAM|PF_CAN_TRACE|PF_BUFF_FRAGM_OPT, -1, {0}, /* default: get all the buffer fragments you can */ "ALSA pcm device", 's', diff -ruN TiMidity++-2.9.2/timidity/instrum.c TiMidity++-2.9.3/timidity/instrum.c --- TiMidity++-2.9.2/timidity/instrum.c Thu Feb 17 20:40:18 2000 +++ TiMidity++-2.9.3/timidity/instrum.c Wed Apr 26 14:27:20 2000 @@ -723,8 +723,10 @@ /* If this instrument will always be played on the same note, and it's not looped, we can resample it now. */ +#ifdef DISALLOW_DRUM_BENDS if (sp->note_to_use && !(sp->modes & MODES_LOOPING)) pre_resample(sp); +#endif #ifdef LOOKUP_HACK /* Squash the 16-bit data into 8 bits. */ diff -ruN TiMidity++-2.9.2/timidity/oss_a.c TiMidity++-2.9.3/timidity/oss_a.c --- TiMidity++-2.9.2/timidity/oss_a.c Mon Feb 7 07:57:35 2000 +++ TiMidity++-2.9.3/timidity/oss_a.c Tue Apr 11 17:50:12 2000 @@ -282,6 +282,12 @@ static int acntl(int request, void *arg) { +#ifndef SNDCTL_DSP_GETODELAY +# ifdef SNDCTL_DSP_GETOSPACE + audio_buf_info info; +# endif /* SNDCTL_DSP_GETOSPACE */ + count_info cinfo; +#endif /* SNDCTL_DSP_GETODELAY */ int i; switch(request) @@ -329,6 +335,37 @@ if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETODELAY, &i) == -1) return -1; i = output_counter - i; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; +#else /* SNDCTL_DSP_GETODELAY */ +# ifdef SNDCTL_DSP_GETOSPACE + case PM_REQ_GETFILLABLE: + if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETOSPACE, &info) == -1) + return -1; + if (info.bytes > total_bytes) i = total_bytes; + else i = info.bytes; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; + + case PM_REQ_GETFILLED: + if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETOSPACE, &info) == -1) + return -1; + if (info.bytes > total_bytes) i = 0; + else i = total_bytes - info.bytes; + if(!(dpm.encoding & PE_MONO)) i >>= 1; + if(dpm.encoding & PE_16BIT) i >>= 1; + *((int *)arg) = i; + return 0; + +# endif /* SNDCTL_DSP_GETOSPACE */ + case PM_REQ_GETSAMPLES: + if(total_bytes <= 0 || ioctl(dpm.fd, SNDCTL_DSP_GETOPTR, &cinfo) == -1) + return -1; + i = cinfo.bytes; if(!(dpm.encoding & PE_MONO)) i >>= 1; if(dpm.encoding & PE_16BIT) i >>= 1; *((int *)arg) = i; diff -ruN TiMidity++-2.9.2/timidity/playmidi.c TiMidity++-2.9.3/timidity/playmidi.c --- TiMidity++-2.9.2/timidity/playmidi.c Mon Mar 20 16:29:20 2000 +++ TiMidity++-2.9.3/timidity/playmidi.c Wed Apr 26 15:19:21 2000 @@ -738,7 +738,7 @@ if(voice[j].status & VOICE_FREE || voice[j].cache != NULL) continue; /* skip notes that don't need resampling (most drums) */ - if (!voice[j].sample->sample_rate) + if (voice[j].sample->note_to_use) continue; if(voice[j].status & ~(VOICE_ON | VOICE_DIE | VOICE_SUSTAINED)) { @@ -777,7 +777,7 @@ if(voice[j].status & ~(VOICE_ON | VOICE_SUSTAINED)) { /* continue protecting non-resample decays */ - if (voice[j].status & ~(VOICE_DIE) && !voice[j].sample->sample_rate) + if (voice[j].status & ~(VOICE_DIE) && voice[j].sample->note_to_use) continue; /* choose note which has been on the shortest amount of time */ @@ -950,7 +950,7 @@ for(j = 0; j < i; j++) { if(voice[j].status & VOICE_FREE || - (!voice[j].sample->sample_rate && ISDRUMCHANNEL(voice[j].channel))) + (voice[j].sample->note_to_use && ISDRUMCHANNEL(voice[j].channel))) continue; if(voice[j].status & ~(VOICE_ON | VOICE_DIE | VOICE_SUSTAINED)) @@ -991,7 +991,7 @@ { /* continue protecting drum decays */ if (voice[j].status & ~(VOICE_DIE) && - (!voice[j].sample->sample_rate && ISDRUMCHANNEL(voice[j].channel))) + (voice[j].sample->note_to_use && ISDRUMCHANNEL(voice[j].channel))) continue; /* find lowest volume */ v = voice[j].left_mix; @@ -1087,7 +1087,7 @@ for(j = 0; j < i; j++) { if(voice[j].status & VOICE_FREE || - (!voice[j].sample->sample_rate && ISDRUMCHANNEL(voice[j].channel))) + (voice[j].sample->note_to_use && ISDRUMCHANNEL(voice[j].channel))) continue; /* find lowest volume */ @@ -1218,7 +1218,7 @@ for(i = 0; i < nv; i++) { if(voice[i].status & ~(VOICE_ON | VOICE_DIE) && - !(!voice[i].sample->sample_rate && ISDRUMCHANNEL(voice[i].channel))) + !(voice[i].sample->note_to_use && ISDRUMCHANNEL(voice[i].channel))) { v = voice[i].left_mix; if((voice[i].panned==PANNED_MYSTERY) && (voice[i].right_mix>v)) @@ -1387,7 +1387,7 @@ static void start_note(MidiEvent *e, int i, int vid, int cnt) { - int j, ch, note; + int j, ch, note, pan; ch = e->channel; @@ -1449,14 +1449,17 @@ voice[i].vibrato_sample_increment[j]=0; /* Pan */ + if(channel[ch].panning != NO_PANNING) pan = channel[ch].panning; + else pan = 64; if(ISDRUMCHANNEL(ch) && channel[ch].drums[note] != NULL && channel[ch].drums[note]->drum_panning != NO_PANNING) - voice[i].panning = channel[ch].drums[note]->drum_panning; - else if(channel[ch].panning != NO_PANNING) - voice[i].panning = channel[ch].panning; + pan += channel[ch].drums[note]->drum_panning - 64; else - voice[i].panning = voice[i].sample->panning; + pan += voice[i].sample->panning - 64; + if (pan > 127) pan = 127; + if (pan < 0) pan = 0; + voice[i].panning = pan; voice[i].porta_control_counter = 0; if(channel[ch].portamento && !channel[ch].porta_control_ratio) @@ -1724,8 +1727,7 @@ ctl_mode_event(CTLE_PANNING, 1, ch, channel[ch].panning); } start_note(e, v, vid, nv - i - 1); - if((channel[ch].chorus_level || opt_surround_chorus) && - voice[v].sample->sample_rate) + if((channel[ch].chorus_level || opt_surround_chorus)) { if(opt_surround_chorus) new_chorus_voice_alternate(v, channel[ch].chorus_level); @@ -1877,9 +1879,18 @@ if ((voice[i].channel==c) && (voice[i].status & (VOICE_ON | VOICE_SUSTAINED))) { + /* adjust pan to include drum/sample pan offsets */ + if(ISDRUMCHANNEL(c) && + channel[c].drums[i] != NULL && + channel[c].drums[i]->drum_panning != NO_PANNING) + pan += channel[c].drums[i]->drum_panning - 64; + else + pan += voice[i].sample->panning - 64; + if (pan > 127) pan = 127; + if (pan < 0) pan = 0; + /* Hack to handle -EFchorus=2 in a "reasonable" way */ if((channel[c].chorus_level || opt_surround_chorus) && - voice[i].sample->sample_rate && voice[i].chorus_link != i) { int v1, v2; @@ -1947,6 +1958,12 @@ if(pan == 0xFF) return; + /* slide the pan by the channel pan offset */ + if(channel[ch].panning != NO_PANNING) + pan += channel[ch].panning - 64; + if (pan > 127) pan = 127; + if (pan < 0) pan = 0; + for(i = 0; i < uv; i++) if(voice[i].channel == ch && voice[i].note == note && @@ -2011,8 +2028,10 @@ int get_chorus_level(int ch) { +#ifdef DISALLOW_DRUM_BENDS if(ISDRUMCHANNEL(ch)) return 0; /* Not supported drum channel chorus */ +#endif if(opt_chorus_control == 1) return channel[ch].chorus_level; return -opt_chorus_control; @@ -2950,7 +2969,7 @@ for(j = 0; j < voices; j++) { if(voice[j].status & ~(VOICE_ON | VOICE_DIE) && - !(!voice[j].sample->sample_rate && + !(voice[j].sample->note_to_use && ISDRUMCHANNEL(voice[j].channel))) { v = voice[j].left_mix; @@ -3681,7 +3700,7 @@ if((voice[i].status & ~(VOICE_ON|VOICE_SUSTAINED) && !(voice[i].status & ~(VOICE_DIE) && - !voice[i].sample->sample_rate))) + voice[i].sample->note_to_use))) kill_nv++; } diff -ruN TiMidity++-2.9.2/timidity/readmidi.c TiMidity++-2.9.3/timidity/readmidi.c --- TiMidity++-2.9.2/timidity/readmidi.c Tue Apr 4 11:58:14 2000 +++ TiMidity++-2.9.3/timidity/readmidi.c Wed Apr 26 14:20:08 2000 @@ -606,33 +606,6 @@ } } - /* GS program change */ - /* I could not find any documentation on this, so I reverse engineered - which bytes do what from midi I have. It appears to work correctly. */ - if(len == 11 && - val[0] == 0x41 && /* Roland ID */ - val[1] == 0x10 && /* Device ID */ - val[2] == 0x42 && /* GS Model ID */ - val[3] == 0x12 && /* Data Set Command */ - val[4] == 0x40 && /* I wish I knew what this was... */ - (val[5] >= 0x10 && val[5] < 0x20)) /* channel command */ - { - uint8 p; /* Channel part number [0..15] */ - - p = val[5] & 0x0F; - if(p == 0) - p = 9; - else if(p <= 9) - p--; - p = MERGE_CHANNEL_PORT(p); - - MIDIEVENT(at, ME_TONE_BANK_MSB, p, val[7], 0); - MIDIEVENT(at, ME_TONE_BANK_LSB, p, 1, 0); /* assume SC-55 ??? */ - MIDIEVENT(at, ME_PROGRAM, p, val[8], 0); - - num_events = 2; - } - /* GS bank+program change */ /* I could not find any documentation on this, so I reverse engineered which bytes do what from midi I have. It appears to work correctly. */ diff -ruN TiMidity++-2.9.2/timidity/recache.c TiMidity++-2.9.3/timidity/recache.c --- TiMidity++-2.9.2/timidity/recache.c Tue Mar 28 21:40:12 2000 +++ TiMidity++-2.9.3/timidity/recache.c Wed Apr 26 15:08:05 2000 @@ -68,7 +68,7 @@ v1 = (int32)src[(ofs>>FRACTION_BITS)]; \ v2 = (int32)src[(ofs>>FRACTION_BITS)+1]; \ if(((ofs-(1L<le)){ \ - *dest++ = (sample_t)(v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); \ + dest[i] = (sample_t)(v1 + (((v2-v1) * (ofs & FRACTION_MASK)) >> FRACTION_BITS)); \ }else{ \ ofsd=ofs; \ v0 = (int32)src[(ofs>>FRACTION_BITS)-1]; \ @@ -83,7 +83,7 @@ ofs>>FRACTION_BITS)*(ofs-(2L<>FRACTION_BITS))*((1L< 32767)? 32767: ((v1 < -32768)? -32768: v1); \ + dest[i] = (v1 > 32767)? 32767: ((v1 < -32768)? -32768: v1); \ ofs = ofsd; \ } #elif defined(LAGRANGE_INTERPOLATION) @@ -155,8 +155,9 @@ if(sp->vibrato_control_ratio || (sp->modes & MODES_PINGPONG) || - sp->sample_rate == 0) - return NULL; + (sp->sample_rate == play_mode->rate && + sp->root_freq == freq_table[sp->note_to_use])) + return NULL; addr = sp_hash(sp, note) % HASH_TABLE_SIZE; p = cache_hash_table[addr]; @@ -179,8 +180,9 @@ channel[ch].portamento || (vp->sample->modes & MODES_PINGPONG) || vp->orig_frequency != vp->frequency || - vp->sample->sample_rate == 0) - return; + (vp->sample->sample_rate == play_mode->rate && + vp->sample->root_freq == freq_table[vp->sample->note_to_use])) + return; note = vp->note; @@ -218,7 +220,8 @@ return; sp = p->sp; - if(sp->sample_rate == 0) + if(sp->sample_rate == play_mode->rate && + sp->root_freq == freq_table[sp->note_to_use]) return; sample_start = channel_note_table[ch].on[note]; diff -ruN TiMidity++-2.9.2/timidity/resample.c TiMidity++-2.9.3/timidity/resample.c --- TiMidity++-2.9.2/timidity/resample.c Tue Mar 28 21:40:12 2000 +++ TiMidity++-2.9.3/timidity/resample.c Wed Apr 26 15:07:48 2000 @@ -871,7 +871,9 @@ Voice *vp=&voice[v]; int mode; - if(!(vp->sample->sample_rate)) + if(vp->sample->sample_rate == play_mode->rate && + vp->sample->root_freq == freq_table[vp->sample->note_to_use] && + (vp->frequency == vp->orig_frequency || vp->porta_control_ratio)) { int32 ofs; @@ -993,5 +995,11 @@ sp->loop_end = (int32)(sp->loop_end * a); free(sp->data); sp->data = (sample_t *) newdata; +/* sp->sample_rate = 0; +*/ + sp->root_freq = freq_table[(int) (sp->note_to_use)]; + sp->sample_rate = play_mode->rate; + sp->low_freq = freq_table[0]; + sp->high_freq = freq_table[127]; } diff -ruN TiMidity++-2.9.2/timidity/sndfont.c TiMidity++-2.9.3/timidity/sndfont.c --- TiMidity++-2.9.2/timidity/sndfont.c Mon Feb 7 07:56:07 2000 +++ TiMidity++-2.9.3/timidity/sndfont.c Wed Apr 26 14:27:20 2000 @@ -687,9 +687,11 @@ sample->sample_rate, play_mode->rate); +#ifdef DISALLOW_DRUM_BENDS /* resample it if possible */ if (sample->note_to_use && !(sample->modes & MODES_LOOPING)) pre_resample(sample); +#endif #ifdef LOOKUP_HACK /* squash the 16-bit data into 8 bits. */