Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get waveform mid/low/high by its self #44

Open
tegab opened this issue Feb 8, 2022 · 13 comments
Open

Get waveform mid/low/high by its self #44

tegab opened this issue Feb 8, 2022 · 13 comments

Comments

@tegab
Copy link

tegab commented Feb 8, 2022

How to get high, mid, low waveform by its self?

@eljeff
Copy link
Member

eljeff commented Feb 8, 2022

One option is to run your source through a filter first, and then tap the visualizer to that.

If by default you do this:

Source -> Output
    |_Visualiser tap on source

You can modify it like this:

Source ->  Mixer -> Output
    |_> Lowpass filter -> Gain (set to 0) -> Mixer -> Output
                 |_Visualiser tap on filter

The gain 0 is so you can mute the lowpass filter and not have an extra lowpassed signal going into your mix.

@tegab
Copy link
Author

tegab commented Feb 8, 2022

Won't this be for while playing. I just need to get the data.

@eljeff
Copy link
Member

eljeff commented Feb 8, 2022

Same idea... filter the data first, then visualize that.

@tegab
Copy link
Author

tegab commented Feb 8, 2022

I hate to ask. Is there a sample code or a rough draft I can use as reference.

@eljeff
Copy link
Member

eljeff commented Feb 8, 2022

It's ok to ask!
I don't know of any offline-processing examples, but somebody else might.

@Matt54
Copy link
Member

Matt54 commented Feb 8, 2022

This might be overkill but you could check out Apple's Biquadratic filters example:
https://developer.apple.com/documentation/accelerate/applying_biquadratic_filters_to_a_music_loop

@Matt54
Copy link
Member

Matt54 commented Feb 8, 2022

I would also recommend the filter approach - I think that is standard for multi band processing, in general. Doing an FFT, manipulating bins, and then inversing the FFT causes artifacts, from I remember reading about it. Haven't tried it myself though. I'm almost certain it would be more complicated too.

A simplistic outlook to the filter approach:
Lows = Low pass
Mids = bandpass
Highs = High pass

@tegab
Copy link
Author

tegab commented Feb 8, 2022

Looks interesting. I am researching it right now. so, I can accomplish this using vDSP

@Matt54
Copy link
Member

Matt54 commented Feb 8, 2022

Yes, there should be accelerate functions for everything you need to do I imagine.

@Matt54
Copy link
Member

Matt54 commented Feb 8, 2022

Going to share this here too:
https://www.mathworks.com/help/audio/ug/multiband-dynamic-range-compression.html
I had found this resource recently about crossover filters and never saved the bookmark, but luckily it was in my history :)

@eljeff
Copy link
Member

eljeff commented Feb 8, 2022

I agree and thanks Matt for the clear direction.
If you just need basic filtering, and are comfortable w vDSP, do your offline processing there.

@tegab
Copy link
Author

tegab commented Feb 8, 2022

Thank you very mush for pointing me to the right direction. Researching vdsp now, since I have never used it before.

@Matt54
Copy link
Member

Matt54 commented Feb 8, 2022

No problem! Good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants