Re: [Audacity-devel] Bass and Treble effect
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Martyn S. <mar...@gm...> - 2012-12-09 00:47:18
|
Hi Steve Nice piece of work! And thanks to Richard for making it easily accessible. I applied the patch on Windows, added the 2 files to the src/effects section of the Audacity solution and it just compiled and ran! Well, almost. There was an error but changing Pi = 4 * atan(1); to Pi = 4.0 * atan(1.0); fixed that. I always put '1.' or '1.0' if I mean something is a float, and that seems to un-confuse the compiler. I've had a quick look through the code and it looks pretty good. A couple of things that you need to change: * We need to be able to type a minus sign into the boxes but the validator won't let us. I think you can use AddNumericTextBox instead of AddTextBox and then not have any of the Validator code. I see why it's there (copy and paste from BassBoost), but you can allow '+' and '-', which is what AddNumericTextBox does behind the scenes. * I don't think that 'GetEffectCategories' is in use, but if/when it is, is this the right category? Probably not. Other than that, the code looks good to me! On 07/12/2012 20:20, Steve the Fiddle wrote: > This is my first attempt at writing more than a couple of lines of C++ > so I hope you'll be gentle with me :=) > > Although Audacity has a "Bass Boost" effect we quite often get asked > on the forum how to reduce bass, boost treble or reduce treble. It has > also struck me as quite odd that out of these 4, only Bass Boost is > provided. An historical thing, I'm sure. Bass Boost has been around a lot longer than me! I'd be happy to see it replaced with this. This code has one less parameter, the frequency. I'm sure that some will argue that this is a loss. I do not thing that this should be added to this effect, or it will make it more complex than the original idea was looking for. > The Equalization effect can provide these options, but often the power > and complexity of the Equalization effect is way over the top for > someone that just wants to turn the bass/treble up or down a bit. Indeed. > Attached is my attempt at providing a replacement for Bass Boost. It > is a simple Bass/Treble effect - just two sliders, one for bass, one > for treble, like on a hi-fi amp. +/- 15 dB on each. There could be a whole different thread about the actual parameters to use for this effect, but let's keep that off this one and stick to code. I take it that the bi-quad code is taken from previously tested stuff? I didn't look too closely at it. TTFN Martyn > Unlike Bass Boost, if tracks are 32 bit float format the effect does > not clip at 0 dB, making it easier for users to recover from overdoing > the boost. > > I've only provided the .cpp and .h files as I'm not sure what else is > required for building cross-platform. > > Steve > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > > > > _______________________________________________ > audacity-devel mailing list > aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |