Hi Eric,

I was just about to write you to say that I came up with the same solution!!!

I realized that adding a release envelope on the order of 180-200 or
sometimes more did the trick (it was at first confusing, b/c quicker
envelopes get *higher* numbers (like 255 being fastest), not lower...I
wonder if they are denominators of a fraction in some kind of
non-linear time equation??)

Anyway, the syntax is described on the manpage. Here's an example:

bank 0
0 %font MyFontName.sf2 0 0 rate=:::180 strip=tail

I added the 'strip=tail' option b/c it mentions clicking in the
manpage, but it doesn't seem to be the critical piece...the critical
piece is the 'rate=:::180' option.
Since we are just setting release time, the attack, decay & sustain
portions are left default, and are hence empty with their following
colons.

Thanks for looking into this...everything works really well now!

Best,
AKJ

On Thu, Aug 27, 2009 at 10:56 PM, Eric Welsh<ewe...@biology.wustl.edu> wrote:
> First thing I tried was to load the sf2 bank up in Awave and resave it as
> a PAT.  I could then use the -P flag to force all instruments to be played
> using the specified .pat instrument file.  My standard recorder (the one
> in FreePats) sounds fine.  The pc51d derived recorder pat file clearly
> exhibits the "clicking" noises you described.  This rules out any sf2
> specific envelope problems, since the problem is in the Gravis PAT format
> as well.
>
> Looking at the recorder envelope, it appears that it has no release
> rate at all.  So, when the note ends, the note simply ends abruptly
> without any decaying volume ramp.  This is very likely what is causing the
> clicking sound.  Any extremely rapid change in volume level, such as going
> from a playing note to instantly zero amplitude, will cause an audible
> click in your speakers.
>
> Adding a decent release envelope solved the problem.  This is not a
> problem with timidity, but a problem with the instrument not having any
> kind of sane envelope.  Timidity is behaving as it should and
> ending the note immediately upon a NOTEOFF event, since there is no
> release decay envelope.  Speaking from my experience of looking at many
> many sf2 banks over the years, this is not unusual....  You can fix the
> problem by either resaving the sf2 bank after editing the envelope in an
> instrument editor, or add flags within the timidity .cfg files you are
> using to control that specific instrument's envelope.  Unfortunately, I do
> not remember the syntax for how to do this in the .cfg files :(
>
> Maybe someone else can chime in with how to alter SF2 (or even PAT)
> envelopes from within timidity .cfg files.
>
> -Eric
>
> On Thu, 27 Aug 2009, Aaron Krister Johnson wrote:
>
>>
>>
>> Hi Eric,
>>
>> Attached is a MIDI file of some Medieval music by Machaut that has audible
>> clicks when used with the Personal Copy GM soundfont (using the recorder
>> patch, program 75 in 1-based counting, or 74 in 0-based counting scheme)...
>>
>> I trust you can track down, or already may have the Personal Copy GM
>> soundfont, but in case you can't here's a link to it that I've uploaded to
>> my site:
>>
>> http://www.akjmusic.com/PC51d.sf2 (58mb download!!)
>>
>> Hope this can help Timidity developers track down the click problem! :)
>>
>> Best,
>> AKJ
>>
>> http://www.akjmusic.com
>> http://www.untwelve.org
>> http://www.nabble.com/file/p25177354/machaut-b15-gm.mid machaut-b15-gm.mid
>>
>> Eric Welsh wrote:
>> >
>> > On Thu, 27 Aug 2009, Aaron Krister Johnson wrote:
>> >
>> >> I couldn't find the files either...it looks like a file-sharing site
>> >> whose
>> >> links have expired...anyway, are you a developer for Timidity? It would
>> >> be
>> >> great to get to the bottom of this issue!
>> >>
>> >> Best,
>> >> AKJ
>> >
>> > I'm haven't been active in development recently, but I've done some work
>> > with envelopes and associated click problems in the past.  I'm a little
>> > limited in my SF2 knowledge, but I could probably dig a bit into the code
>> > to see if it is an SF2 specific envelope problem, or if it is an envelope
>> > problem at all.  If you have problematic files of your own, send them my
>> > way and I can start taking a look them.
>> >
>> > -Eric
>> >
>> >> http://www.untwelve.org
>> >> http://www.akjmusic.com
>> >>
>> >>
>> >> Eric Welsh wrote:
>> >> >
>> >> > I tried the links below to the problematic files, but they don't appear
>> >> to
>> >> > work anymore.  Could the original author repost them somewhere else?
>> >> >
>> >> > -Eric
>> >> >
>> >> > On Wed, 26 Aug 2009, Aaron Krister Johnson wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> I can confirm that this happens to me too, and can also confirm that
>> >> it
>> >> >> is
>> >> >> indeed annoying!
>> >> >>
>> >> >> I've noticed it for all versions of Timidity as far back as I can
>> >> >> remember
>> >> >> using it, say from 2003....
>> >> >>
>> >> >> Best,
>> >> >> AKJ
>> >> >>
>> >> >>
>> >> >> A. Kalten wrote:
>> >> >> >
>> >> >> > Hello list,
>> >> >> >
>> >> >> > Timidity usually gives good results, but on some soundfonts it will
>> >> >> > produce an annoying clicking sound.  As an example, I have uploaded
>> >> >> > an MP3 of a wave file created with Timidity that contains the
>> >> clicking
>> >> >> > noise.  Also uploaded are the MIDI file and the soundfont used
>> >> (there
>> >> >> > is only a single instrument involved).
>> >> >> >
>> >> >> > http://firstbooks.biz/midi/beatgen.mp3   (MP3 file is about 3.4 Mb)
>> >> >> >
>> >> >> > http://firstbooks.biz/midi/beatgen.mid
>> >> >> >
>> >> >> > http://firstbooks.biz/midi/WT_Clarinet.sf2  (SF2 file is about 330
>> >> kB)
>> >> >> >
>> >> >> > Note: This is a microtonal composition, so if the tuning sounds a
>> >> bit
>> >> >> > off it is deliberate.
>> >> >> >
>> >> >> > If I render this file with fluidsynth the clicking noise does not
>> >> >> > occur.  Also, if I tweak the attack or decay rates in the Timidity
>> >> >> > configuration file, I can mitigate the clicking noise somewhat but
>> >> >> > cannot eliminate it entirely.
>> >> >> >
>> >> >> > Could this be a problem with the soundfont or is Timidity just not
>> >> >> > able to process SF2 fonts completely?
>> >> >> >
>> >> >> > Regards,
>> >> >> >
>> >> >> > AK
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> -------------------------------------------------------------------------
>> >> >> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> >> >> > challenge
>> >> >> > Build the coolest Linux based applications with Moblin SDK & win
>> >> great
>> >> >> > prizes
>> >> >> > Grand prize is a trip for two to an Open Source event anywhere in
>> >> the
>> >> >> > world
>> >> >> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> >> >> > _______________________________________________
>> >> >> > Timidity-talk mailing list
>> >> >> > Timidity-talk@lists.sourceforge.net
>> >> >> > https://lists.sourceforge.net/lists/listinfo/timidity-talk
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >> http://www.nabble.com/Clicking-Noise-On-Some-SoundFonts-tp19123503p25164608.html
>> >> >> Sent from the TiMidity++ - General mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> >> ------------------------------------------------------------------------------
>> >> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> >> >> 30-Day
>> >> >> trial. Simplify your report design, integration and deployment - and
>> >> >> focus on
>> >> >> what you do best, core application coding. Discover what's new with
>> >> >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> >> >> _______________________________________________
>> >> >> Timidity-talk mailing list
>> >> >> Timidity-talk@lists.sourceforge.net
>> >> >> https://lists.sourceforge.net/lists/listinfo/timidity-talk
>> >> >>
>> >> >
>> >> >
>> >> ------------------------------------------------------------------------------
>> >> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> >> > 30-Day
>> >> > trial. Simplify your report design, integration and deployment - and
>> >> focus
>> >> > on
>> >> > what you do best, core application coding. Discover what's new with
>> >> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> >> > _______________________________________________
>> >> > Timidity-talk mailing list
>> >> > Timidity-talk@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/timidity-talk
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Clicking-Noise-On-Some-SoundFonts-tp19123503p25171137.html
>> >> Sent from the TiMidity++ - General mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> >> 30-Day
>> >> trial. Simplify your report design, integration and deployment - and
>> >> focus on
>> >> what you do best, core application coding. Discover what's new with
>> >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> >> _______________________________________________
>> >> Timidity-talk mailing list
>> >> Timidity-talk@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/timidity-talk
>> >>
>> >
>> > ------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> > 30-Day
>> > trial. Simplify your report design, integration and deployment - and focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > Timidity-talk mailing list
>> > Timidity-talk@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/timidity-talk
>> >
>> >
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Clicking-Noise-On-Some-SoundFonts-tp19123503p25177354.html
>> Sent from the TiMidity++ - General mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Timidity-talk mailing list
>> Timidity-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/timidity-talk
>>
>



-- 

Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Timidity-talk mailing list
Timidity-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/timidity-talk

Reply via email to