LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.18k stars 1.01k forks source link

Native Eq plugin #1376

Closed curlymorphic closed 9 years ago

curlymorphic commented 10 years ago

Im planning a parametric eq plugin,

below is my initial layout, mainly to get the controls onto the screen. layouts, colours, fonts, backgrounds were not of priority.

Image of Initial UI

The large black box in the middle, with be a dual spectrum analyser, showing before/ after in different colours, There will also be drag-able handles for each of the filters. The Fader to the left and right are input and output gain. Below this is the old school knobs (undecided if this is needed at all, but will leave in until testing ). The Hp and Lp bands only have frequency and resonance controls, all the other eqs, have there gain controlled by the fader. My goal is for the meters on each fader show the spectrum data for the filter frequency.

Now i have an initial concept, I would be grateful for any feedback.

tresf commented 10 years ago

@curlymorphic, I've been following your conversations on the list and I'm happy to see progress so far! Thanks for sharing!

I wanted to copy and paste some conversation from the mailing list into this thread for historical purposes:

On 11/30/2014 12:39 AM, Vesa wrote:

On 11/30/2014 12:24 AM, Dave French wrote:

You want me pull to code into a class? No, I can do that...

Ok, it is now done (in master branch).

BasicFilters.h now contains the class BiQuad<ch_cnt_t channels>, where ch_cnt_t is a typedef for int that signifies channel count. There's also a convenience typedef StereoBiQuad which resolves to BiQuad<2>. That's likely what you'll want to use (unless you want your EQ to have separate controls for each channel, but I personally find that fairly pointless in an EQ...)

To use a StereoBiQuad, #include "BasicFilters.h" and simply construct your filter like thus:

    StereoBiQuad sbq = StereoBiQuad();
    StereoBiQuad * psbq = new StereoBiQuad();

To set coefficients:

    sbq.setCoeffs( a1, a2, b0, b1, b2 );

Both channels will use the same coeffs. To run the filter for one sampleframe, you have to call each channel separately:

    sampleFrame src, dst;
    dst[0] = sbq.update( src[0], 0 );
    dst[1] = sbq.update( src[1], 1 );

Now as for calculating coefficients, I'll leave that up to you, but here's a decent-looking algorithm for calculating peak filter coeffs that I found, adapted for LMMS:

// peak filter coefficients:
        // input values (all should be floats):
        // Fc = center freq
        // Fs = sample rate
        // Q = Q/resonance
        // peakGain = peak gain in dBV
        float a1, a2, b0, b1, b2; // coeffs to calculate
        const float V = dbvToAmp( qAbs( peakGain ) ); // convert dBV to absolute linear amp
        const float K = tanf( F_PI * Fc / Fs );
        const float norm = 1 / (1 + V/Q * K + K * K);
        if ( peakGain >= 0.0f ) // >=0dBV gain
        {
                b0 = (1 + V/Q * K + K * K) * norm;
                b1 = 2 * (K * K - 1) * norm;
                b2 = (1 - V/Q * K + K * K) * norm;
                a1 = b1;
                a2 = (1 - 1/Q * K + K * K) * norm;
        }
        else // negative gain
        {
                b0 = (1 + 1/Q * K + K * K) * norm;
                b1 = 2 * (K * K - 1) * norm;
                b2 = (1 - 1/Q * K + K * K) * norm;
                a1 = b1;
                a2 = (1 - V/Q * K + K * K) * norm;
        }

Let me know if you need shelf filters as well. Or you can just use your own algorithms, if you find better/faster ones...

Sti2nd commented 10 years ago

It looks awesome, I think the faders are kind of big... Possibly re-size them? So the idea of using faders is to see how much signal goes trough those frequencies... neat!

rubiefawn commented 10 years ago

Also, change "Analise" to "Analyze" and "Peek" to "Peak". Otherwise, great! I've been waiting for a native graphic EQ. Good work!

curlymorphic commented 10 years ago

@cubician Thanks for the spell check, :)

rubiefawn commented 10 years ago

Also, don't get rid of the knobs, we need those for automation. However, having a 'show/hide knobs' toggle button would be nice if the knobs are kept.=

curlymorphic commented 10 years ago

@cubician a show hide button is a good idea.

Umcaruje commented 10 years ago

Oh my god, I have waited so long for this. So glad you are making this happen @curlymorphic :smile:

rubiefawn commented 10 years ago

I don't know how a show/hide would work though, you might just want to put knobs in a separate window like the VST controls.

Preferably a show/hide but only if its realistic...=

tresf commented 10 years ago

@cubician, why do you feel knobs are necessary for automation? Anything that inherits automatable-model can be automated (check boxes, led spinners, sliders).

Also, minor but "analyse" is much like "colour".... spelling should be verified against our codebase standard (I'd assume we use formal british non-american spelling, Vesa may know) per http://grammarist.com/spelling/analyse-analyze/

Spekular commented 10 years ago

@tresf We use colorize, not colourize. That might not be regional though, I'm not sure. Maybe we should have en_gb and en_us translation files?

diizy commented 10 years ago

On 11/30/2014 11:51 PM, Ian Sannar wrote:

Also, don't get rid of the knobs, we need those for automation.

No we don't. Knobs aren't the only automatable widget in LMMS. Pretty much everything can be automated (with little regard if automation even makes sense for a control...)

The slight problem with sliders is that our only slider class currently only works with IntModels. Someone would have to make a variant of the AutomatableSlider class that uses FloatModel instead. That, or possibly it could be possible to subclass the FX faders, will have to look into that.

curlymorphic commented 10 years ago

Automation, Now that's not something i really considered. I have a lot to learn about custom widgets but luckily for me this codebase is full of examples i can learn from.

tresf commented 10 years ago

Automation, Now that's not something i really considered.

Fortunately, most of the models will be hooked up when you mimic code from another plugin. :+1:

curlymorphic commented 10 years ago

Already have automation working, just naming the controls now, so they show up properly in automation editor, The basic eq funactionality is there now as well, not 100% finished but working.

p.s i feel stupid for asking, how do you quote a post?

diizy commented 10 years ago

On 12/01/2014 09:39 AM, Dave wrote:

Automation, Now that's not something i really considered. I have a lot to learn about custom widgets but luckily for me this codebase is full of examples i can learn from.

The knobs and FX-faders are all already automatable so that's not something you have to worry about. In the case of the FX-faders, there may be some tweaking or subclassing needed in order to use them outside the mixer context, I'll have to look into that.

curlymorphic commented 10 years ago

Just Expermenting with automation on them now, but the Fx-faders seem to be automating fine.

diizy commented 9 years ago

@curlymorphic

I added a 4th-order Linkwitz-Riley filter to BasicFilters.h. If you want to add LP/HP filters to your EQ, that might be useful for you... it has no resonance control, but it's similar to Butterworth in that it has very flat passband and is very transparent, so should be pretty well suited for an EQ.

Could also be used for shelves... you'll need 2 filters per shelf though, because you have to separate the bands and then adjust the gain of the shelf-side band.

Haven't really tested it yet myself though so please let me know if you find any problems in it...

curlymorphic commented 9 years ago

@diizy spent the whole day tueday trying out variuos filters, and decided to use the ones here

http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt as they sound cleanest, and the varius functions (lp,hp, peak and shelfs) sounds like they fitted together.

Your BiQuad class made life really easy for me there :) so easy just to change the coefficients to try out different types.

What's your thoughts on upsampling, I am thinking about it , then filtering with a lp before downsampling again, to reduce aliasing.

I am just having a tidy up, but later on today im hoping to show pics and maybe video of what i currently have. There is no spectrum analysis yet, but other than that, is all functional, including the drag and drop widget.

once i have this up, I think it would be a good time for me to leave this alone for a couple of days, clear my ears and head, accept any feedback. Then on monday start trying out any suggestions.

dizzy commented 9 years ago

Oops, you referred the wrong git account (that is Dizzy), try again and make sure the right account gets your comment

diizy commented 9 years ago

On 12/04/2014 07:35 PM, Dave wrote:

@Dizzy https://github.com/Dizzy spent the whole day tueday trying out variuos filters, and decided to use the ones here

http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt as they sound cleanest, and the varius functions (lp,hp, peak and shelfs) sounds like they fitted together.

Yeah, the Audio cookbook... those should be good. Used in lots of synths/fx I hear, even commercial ones.

Your BiQuad class made life really easy for me there :) so easy just to change the coefficients to try out different types.

What's your thoughts on upsampling, I am thinking about it , then filtering with a lp before downsampling again, to reduce aliasing.

Are you thinking of doing oversampling for every filter individually, or just oversampling/filtering once after other processing? You have to also consider the CPU cost here... there's not much point in cramming in too much features if it makes your filter so heavy that people can't use your EQ.

If you introduce aliasing in your peak/shelf/etc. filters, then oversampling afterwards won't do a lot of good - the aliased frequencies will still be there... if you want to get rid of that aliasing, you have to oversample in those filters themselves. But again, there's a CPU cost that increases linearily with every x of oversampling... so you might want to make it a switchable feature.

In order to do oversampling with the BiQuad class, simply run it X times for each sampleFrame - then mix the outputs of each iteration. Note that you'll also have to consider the oversampling ratio when you calculate the coeffs.

curlymorphic commented 9 years ago

Hmm, maybe i have miss understood. my plan was to up sample using cubic interpolation, at the start of the chain, then the eq filters, then a lp filter to remove frequencies above original sample rate / 2 , then downsample back to original rate at the end of the chain.

Will have to experiment with this next week

so you might want to make it a switchable feature.

good thought

diizy commented 9 years ago

On 12/04/2014 08:20 PM, Dave wrote:

Hmm, maybe i have miss understood. my plan was to up sample using cubic interpolation, at the start of the chain, then the eq filters, then a lp filter to remove frequencies above original sample rate / 2 , then downsample back to original rate at the end of the chain.

Well, you can do that, sure. And it will improve quality, sure. But... the user can already choose to oversample when exporting, so it's not likely to give that much of an additional benefit...

Anyway, if you make it switchable (or maybe even so that the user can set the oversampling rate, from 1x to whatever) then all should be good.

I'm not sure if cubic is really useful here though. Linear will probably be good enough for this kind of use, since you're filtering out the aliasing frequencies anyway - you could probably even get away with sample & hold. Cubic uses a lot more CPU with not much benefits...

What are you planning to use for the final LP filtering? The best result would be gained by a good FIR filter such as sinc, but that also creates latency and uses lots of CPU... another option is to just use a very steep IIR filter with a flat passband, such as Butterworth or Linkwitz-Riley.

curlymorphic commented 9 years ago

@diizy

Anyway, if you make it switchable (or maybe even so that the user can set the oversampling rate, from 1x to whatever) then all should be good.

will be trying this out.

I'm not sure if cubic is really useful here though. Linear will probably be good enough for this kind of use, since you're filtering out the aliasing frequencies anyway - you could probably even get away with sample & hold. Cubic uses a lot more CPU with not much benefits...

Cheers for the heads up :)

What are you planning to use for the final LP filtering? The best result would be gained by a good FIR filter such as sinc, but that also creates latency and uses lots of CPU... another option is to just use a very steep IIR filter with a flat passband, such as Butterworth or Linkwitz-Riley.

now would be a good time to try your new filters out :)

curlymorphic commented 9 years ago

Well, finally, screen shots

Image of Small eq ui

Image of Large eq ui

if anyone wishes to try it out, it is in the eq branch on my fork.

https://github.com/curlymorphic/lmms/

The ui now comes in 2 sizes, simply double clicking on the plugin background toggles between the two. The large black widget contains handles to each of the bands, double clicking on a handle activates that filter. One active a handle can be dragged with the left mouse button to control the frequency and gain, and with the right button for resonance.

I am sort of happy with the sound, but am thinking about increasing the maximum gain on each band from 6dB to 12dB,

I am looking for feedback as i feel there could be lots of improvements. I am currently aware of a few bugs and have some ideas, but want to have more of a open mind so any comments welcome.

Depending on the feedback i may implement the spectrum analyser next week, but would like to refine what we have already first.

rubiefawn commented 9 years ago

I like this! You even did the whole 'hide knobs' thing... As far as the small UI goes, it is fantastic! I do have a couple suggestions, though...

-Make the band indicator circles have a smaller outline -Have a curve representing the actual modification of the spectrtum (look up EQ Eight) -Label the In and Out gain faders -Modify the background and stuff to match the rest of LMMS a bit

Besides that, the UI is perfect, as far as I'm concerned. :D Keep up the great work! I am so excited for this to be released!

On Fri, Dec 5, 2014 at 2:58 PM, Dave notifications@github.com wrote:

Well, finally, screen shots

[image: Image of Small eq ui] https://camo.githubusercontent.com/07008fe0c4939a17fd3fe20f0bbea75ff5e613ad/687474703a2f2f7777772e73747564696f36706c7573312e636f6d2f696d616765732f536d616c6c457144656d6f312e706e67

[image: Image of Large eq ui] https://camo.githubusercontent.com/9c6a4eb8c29ec47a7181ea3b36f6dc66bbfd73ca/687474703a2f2f7777772e73747564696f36706c7573312e636f6d2f696d616765732f426967457144656d6f312e706e67

if anyone wishes to try it out, it is in the eq branch on my fork.

https://github.com/curlymorphic/lmms/

The ui now comes in 2 sizes, simply double clicking on the plugin background toggles between the two. The large black widget contains handles to each of the bands, double clicking on a handle activates that filter. One active a handle can be dragged with the left mouse button to control the frequency and gain, and with the right button for resonance.

I am sort of happy with the sound, but am thinking about increasing the maximum gain on each band from 6dB to 12dB,

I am looking for feedback as i feel there could be lots of improvements. I am currently aware of a few bugs and have some ideas, but want to have more of a open mind so any comments welcome.

Depending on the feedback i may implement the spectrum analyser next week, but would like to refine what we have already first.

— Reply to this email directly or view it on GitHub https://github.com/LMMS/lmms/issues/1376#issuecomment-65861270.

diizy commented 9 years ago

On 12/05/2014 11:58 PM, Dave wrote:

Well, finally, screen shots

  • What exactly are the circles/ellipses representing? This isn't immediately obvious.
  • Are you going to use the led backgrounds on the faders? If not, they should be removed.
  • The knobs need labels.
  • Do the faders use dBV units? This is very important in an EQ...
curlymorphic commented 9 years ago

Thanks for taking the time to look. This is exactly the sort of comments i wanted :)

-Make the band indicator circles have a smaller outline

Yeah they currently look at bit cumbersome atm.

@cubician

-Have a curve representing the actual modification of the spectrtum (look up EQ Eight)

I was initial not going to do this, as I personally find them misleading, But i can see many users expecting them. I am hoping that seeing the effect on the spectrum analyser to be a more realistic visual feedback. However if this turn out not to be the case, then curves it is.

-Label the In and Out gain faders

good point, will do

-Modify the background and stuff to match the rest of LMMS a bit

Agreed, my graphics skills are limited, I did try and make it to look like other plugins, but my efforts failed, so i went with what i currently have. Looking at it now, i could make it look like the other windows in lmms, rather than trying to look like a seperate plugin.

@diizy

  • What exactly are the circles/ellipses representing? This isn't immediately obvious.

Its my attempt at representing resonance, suggestions for improvement are welcome here, as this could probably be represented better.

  • Are you going to use the led backgrounds on the faders? If not, they should be removed.

yes, currently the vu meters work on the input,output faders, i'm planning on using the ones on the filter gains to show the signal effected by this band, this still needs some thinking about as i want this to be frequency and resonance dependant.

  • The knobs need labels.

agreed.

  • Do the faders use dBV units? This is very important in an EQ...

yes.

diizy commented 9 years ago

On 12/06/2014 02:08 PM, Dave wrote:

-Modify the background and stuff to match the rest of LMMS a bit

I don't think this is necessary... We can't expect plugins to all match the style of LMMS. I think it's totally fine that a plugin UI somewhat shows the "personal touch" of the plugin author.

  * What exactly are the circles/ellipses representing? This isn't
    immediately obvious.

Its my attempt at representing resonance, suggestions for improvement are welcome here, as this could probably be represented better.

There is no actual resonance in peak filters... the Q value in a peak filter translates inversely to peak bandwidth. If you have frequency on the horizontal axis, then lower Q should make the circle wider, and higher Q should make it narrower. Your ellipses are elongated on the vertical axis though, I'm not sure why...?

A curve of the summed frequency responses of all the filters would work better here, as it's a common way to show filter response. It gets a bit tricky to implement, probably requiring some FFT magic... you could do an approximation with bell curves for the peak filters, but that may not work so well for the shelves and passes...

Here's a good page that shows visually how different biquads translate to frequency response: http://www.earlevel.com/main/2013/10/13/biquad-calculator-v2/

  * Are you going to use the led backgrounds on the faders? If
    not, they should be removed.

yes, currently the vu meters work on the input,output faders, i'm planning on using the ones on the filter gains to show the signal effected by this band, this still needs some thinking about as i want this to be frequency and resonance dependant.

That's pretty much impossible, since peak filters don't really separate their affected band into a separate signal, they just work directly on the input signal... you'd need a completely different type of EQ for that kind of thing.

  * Do the faders use dBV units? This is very important in an EQ...

yes.

What's the scale of the faders? Usually, +20 is the max. while the min. is somewhere around -60 to -80...

curlymorphic commented 9 years ago

@diizy

I don't think this is necessary... We can't expect plugins to all match the style of LMMS. I think it's totally fine that a plugin UI somewhat shows the "personal touch" of the plugin author.

I am flexible on this, tbh this could be a separate issue coving all plugins.

There is no actual resonance in peak filters... the Q value in a peak filter translates inversely to peak bandwidth. If you have frequency on the horizontal axis, then lower Q should make the circle wider, and higher Q should make it narrower. Your ellipses are elongated on the vertical axis though, I'm not sure why...?

Your statement I am in total agreement with. I personally feel that the resonance controls on the peaking filters should be replaced by bandwidth controls, because that is what they are, However this would lead to inconsistent controls because resonance would be the correct parameter in the case of lp/hp, and slope would be the correct parameter in the case of a shelving filter.

Having taken a look at other eq plugins, resonance dials does seem to be standard, i'm now thinking using your suggestion of showing bandwidth horizontally for the shelves and peaking filters, but vertically for the lp/hp as this would be a closer visual representation of what is happening.

A curve of the summed frequency responses of all the filters would work better here

My personal feeling was not to show the curve of the transposition, as my experience shows this to be confusing, users often take this curve to be a representation of what the spectrum will look like after processing. I was hoping that showing the difference in in/out signals would be a better visual feedback. I can see however that many users will expect to see a curve so implementing one with possibly the option to show/hide is the way forward. I shall be investigating your above pointers on this when i come to implement this.

That's pretty much impossible, since peak filters don't really separate their affected band into a separate signal, they just work directly on the input signal... you'd need a completely different type of EQ for that kind of thing.

My current thoughts on this was not to use separate fft on each filter, but to display information calculated from the output fft, using a weighted window to calculate the peek value. The center fft band would be based on the filter frequency, and the window width based on bandwidth. This is currently no more than an idea in my head, and i will need to disprove this to myself before i give up on the idea.

What's the scale of the faders? Usually, +20 is the max. while the min. is somewhere around -60 to -80...

Atm +6 -40dB is the current scale, but this is open to change. I have done some research on current eq plugins and there ranges are as follows.

Ableton -12 +12 Sonnox -20 +20 Waves H EQ -20 +20 FabFilter pro Q -30 + 30

I can see that my current scale needs to change.

Cheers for the input, definitely food for thought, and will lead to a much better addition to lmms :)

Sti2nd commented 9 years ago

You two sure knows a little something, I don't understand any of the above sentences, haha. Looking forward to trying this (Y)

diizy commented 9 years ago

@curlymorphic

Ok, a bit of bad news, but you'll probably have to forget using the FxFader class in your plugin.

I took a look at the code, and the problem is, the FxFader as it is now is hardcoded to assume that the values used by it are in the 0-1 linear amp range. It then converts this to either percentages or dBV for display, so if you use the FxFader with values that are already in dBV (as is required for the peak filters), they're going to be displayed to the user as completely wrong... either that or you'll have to do a reverse conversion, but then that'd also be stupid because automation would still show the raw 0-1 values, which would again be confusing for the user, and also, the fader movement would be in linear scale which would be really horrible for an EQ. EQ's really need dBV scale controls to be useful...

I'm also not wanting to change/fix this for 1.2 (master), because the whole thing will have to be overhauled in 2.0 anyway since the plan is to move to use dBV in all volume controls (and not just for display, but so the models actually use dBV). Also the FxMixer, as it is currently in master, depends on the FxFader to be in the 0-1 scale. It'd get messy...

So in order to not completely crap up your plans, what I'm going to do now is create a variant of AutomatableSlider which you should be able to use instead. You won't get to use led backgrounds, but maybe that idea can be revisited in the future, in the 2.0 timeframe.

diizy commented 9 years ago

Hm, more problems, AutomatableSlider is based on QSlider which only works on int ranges...

I'll have to see if I can solve the problem with FxFader in some way.

diizy commented 9 years ago

Ok, now you should be able to use the Fader class... I added some things to it:

Firstly, you can now construct a Fader with custom pixmaps by passing 3 pointers to QPixmap in the constructor. The required pixmaps are the background, active leds, and the knob. You'll have to provide all the pixmaps if you use it this way.

Also, you can now switch off the display conversion by calling setDisplayConversion( false ). This way, you can set the range of the fader in dBV, and you can then use those values directly in the peak filter.

curlymorphic commented 9 years ago

@diizy

Also, you can now switch off the display conversion by calling setDisplayConversion( false ). This way, you can set the range of the fader in dBV, and you can then use those values directly in the peak filter.

Thanks so much, I spent hours yesterday trying to work out how to solve the display label on the Fader. I have not tried it yet but i looks like setDisplayConversion( false ) would solve all the problems. I was at the point of thinking about recoding a custom widget, or asking if I could move a few bit from private to protected, so i could subclass it better.

curlymorphic commented 9 years ago

@diizy Thats helped so much, :)

But i do have another request. Would it be possible to have a way to set the hint text please?

gainfaderhinttext

Currently when the gain fader is in the +20dB position the hint reads as Volume 20%.

would you mind if i implemented a setHintText() function in Fader, that used the current values as default?

curlymorphic commented 9 years ago

Screen shot of progress

image

image

It all works :), well needs tweaking and tidying A LOT.

as usual all comments welcome.

Sti2nd commented 9 years ago

Looks awesome. I have no clue what the flying circles with a line trough does.. And you should probably label the knobs. If all of the upper are Q and all the lower are f, you should probably divide the two rows logically in the GUI (background image I assume?) Could be a line in between for example, a box around both the rows.

mikobuntu commented 9 years ago

I'm guessing the circles represent gain and the horizontal lines are frequency range ( possibly allowing overlapping? ).The plugin is looking good to me so far ;)

thanks Mikobuntu ;)

diizy commented 9 years ago

On 12/10/2014 11:25 AM, Dave wrote:

@diizy https://github.com/diizy Thats helped so much, :)

But i do have another request. Would it be possible to have a way to set the hint text please?

Yeah I already thought of that actually. Unfortunately I was seeing some friends today so no coding got done...

would you mind if i implemented a setHintText() function in Fader, that used the current values as default?

Sure, just put it in a separate commit so you can file a pull request on it right away...

rubiefawn commented 9 years ago

As far as the spectrum analyzer goes, having both before/after transparently filled might look better. That way you can see the contrast better.

On Wed, Dec 10, 2014 at 3:05 PM, Vesa V notifications@github.com wrote:

On 12/10/2014 11:25 AM, Dave wrote:

@diizy https://github.com/diizy Thats helped so much, :)

But i do have another request. Would it be possible to have a way to set the hint text please?

Yeah I already thought of that actually. Unfortunately I was seeing some friends today so no coding got done...

would you mind if i implemented a setHintText() function in Fader, that used the current values as default?

Sure, just put it in a separate commit so you can file a pull request on it right away...

— Reply to this email directly or view it on GitHub https://github.com/LMMS/lmms/issues/1376#issuecomment-66541500.

curlymorphic commented 9 years ago

@cubician

As far as the spectrum analyzer goes, having both before/after transparently filled might look better. That way you can see the contrast better.

That will make it far easier to see :) adding to my todo list.

tresf commented 9 years ago

Oh this is so cool! I feel like a kid in a candy shop!

image

So as far as the knob labels... I wonder if it would benefit from a generic label over all of them....

Here's a basic "offset shelf" idea... (sorry for terrible gimpshop work here) the point is to differentiate the center knobs from the outtter knobs a bit. Using some sort of depressed, shaded or colored shelf for all resonance knobs (for example) would illustrate that the knobs are all for adjusting the same thing: resonance. I assume we could do the same for frequency but without adding clutter with additional labels under all of them.

image

P.S..... This is awesome!!!

curlymorphic commented 9 years ago

@tresf

Liking your mock up, my gimp skills are not all that, but im sure with the aid of a few youtube vids i should be able to do something like that.

This is awesome.

Cheers, I needed some encouragement, after having a hard drive failure last night, and spending a while reinstalling.

diizy commented 9 years ago

On 12/10/2014 11:48 PM, Dave wrote:

Screen shot of progress

image https://cloud.githubusercontent.com/assets/7412852/5384915/71e22a92-80b5-11e4-9f57-cff4723859b5.png

Out of curiosity, is the frequency axis linear or logarithmic on the display? Log10 scale is what's usually used for such displays, and probably the easiest to read... also, what does the analyze switch do? Does it just switch off the curve display?

curlymorphic commented 9 years ago

Out of curiosity, is the frequency axis linear or logarithmic on the display? Log10 scale is what's usually used for such displays, and probably the easiest to read...

The Frequency axis is indeed Log10

also, what does the analyze switch do? Does it just switch off the curve display?

yes.

I have been working on displaying the spectrum data, and the current version is much better than the screen shot above. working mainly in gimp this afternoon on the ui, so hopefully more screen shots later on today.

diizy commented 9 years ago

Btw, the Linkwitz-Riley filter had a slight bug that I just fixed (a missing division in a coeff) so if you're still planning on using it, better rebase your branch...

curlymorphic commented 9 years ago

@diizy

Linkwitz-Riley filter had a slight bug that I just fixed

I am using the Linkwitz-Riley as the filter before down sampling, spent a while last night balancing it so as not to mess with the high end.. looks like i will be rebaseing in a bit as that will be critical to the sound.

diizy commented 9 years ago

On 12/13/2014 05:18 PM, Dave wrote:

@diizy https://github.com/diizy

Linkwitz-Riley filter had a slight bug that I just fixed

I am using the Linkwitz-Riley as the filter before down sampling, spent a while last night balancing it so as not to mess with the high end.. looks like i will be rebaseing in a bit as that will be critical to the sound.

Yeah there was a bug with the coeffs, the filter didn't actually set the cutoff where it should have, this is fixed now. Now setting the cutoff should be accurate, as long as samplerate is also set accurately.

Remember that in Linkwitz-Riley, the gain at the cutoff freq is -6dB, and it rolls off at 24dB/oct from there. So if you want to use it as an anti-aliasing filter, you'll need to position it a bit below nyquist. In Bitcrush, I'm using it in a similar way, there I've set the cutoff to about 0.7 * nyquist, although the use case is a bit different, since a bitcrusher doesn't need to be transparent... for the Eq, you'll probably have to figure out the best cutoff freq by trial-and-error - any way you do it, it's a tradeoff between aliasing and attenuated high-end.

If you need real brickwall filtering, your best bet would be to use a FIR sinc filter, but that has its own problems: mainly, it always causes some latency, which may not be very suitable for us since we don't have any kind of latency compensation mechanism implemented yet... also, probably uses more CPU (depending on the quality of the impulse).

curlymorphic commented 9 years ago

for the Eq, you'll probably have to figure out the best cutoff freq by trial-and-error - any way you do it, it's a tradeoff between aliasing and attenuated high-end.

yeah, that was what i was finding last night, im sure that may be some tinkering needed, but at least i have a better idea now.

diizy commented 9 years ago

On 12/13/2014 06:02 PM, Dave wrote:

for the Eq, you'll probably
have to figure out the best cutoff freq by trial-and-error - any
way you
do it, it's a tradeoff between aliasing and attenuated high-end.

yeah, that was what i was finding last night, im sure that may be some tinkering needed, but at least i have a better idea now.

You'll probably need to set the cutoff much higher now, since the bug probably caused the actual cutoff to be higher than what was specified.

I'd say start from nyquist and work your way down until you hit the sweet spot...