Equalizer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Equalizer

bartman
Hello,

Could anyone tell me the best way (cleanest sound) to implement an equalizer in UOS? I've been using filters but was just wondering if there is a better way?

example:  FilterInIndex1 := uos_AddFilterIn(audioplay, ind, 20, 44, EQ1, 1, True, nil);
  and doing this for each octave...

Thanks,

Bart
Reply | Threaded
Open this post in threaded view
|

Re: Equalizer

fredvs
Administrator
Hello Bart.

Yes, using filters is the best way to do a equalizer.

The library libmpg123 has built-in equalizer mehtods but i did not (yet) implement it.
This because I want that each library has the same features (libsndfile and libaac and libopus do not have that equalizer method).

> example:  FilterInIndex1 := uos_AddFilterIn(audioplay, ind, 20, 44, EQ1, 1, True, nil);
>  and doing this for each octave...

You may check the FilterPlayer demo.

Fre;D
Reply | Threaded
Open this post in threaded view
|

Re: Equalizer

bartman
Thanks for the quick response...

A couple more questions if you have the time:

1. Will the gain that is passed to the filter accept a negative number? Usually an equalizer adjustment will have a range of 12 to -12.

2. Also, can I use the filters I have defined for the equalizer to include a procedure to display the spectrum or should I add separate filters for that? I know you recommend not using a buffer when displaying the spectrum (previous post).

Thanks again!
Reply | Threaded
Open this post in threaded view
|

Re: Equalizer

fredvs
Administrator
Hello.

> 1. Will the gain that is passed to the filter accept a negative number?

Gain is a float value from 0 to what you want (1 = no change).

So if you want:
less gain, ----> gain < 0
same gain ----> gain = 1
more gain  ----> gain > 1

> Usually an equalizer adjustment will have a range of 12 to -12

So, you have the keys how to create your scale ;)

> 2. Also, can I use the filters I have defined for the equalizer to include a procedure to display the spectrum or should I add separate filters for that?

Sorry, this one I am not sure to understand. Of course you have not to apply the filters you used for spectrum to the buffer (the sound will be horrible).  IMO it should be 2 distinct processes, apply filter to the buffer (change sound-buffer data) and show the spectrum (not change the soud-buffer data).

Fre;D