Web Audio. Real time Guitar EQ

Get help using Construct 2

Post » Sat Sep 07, 2013 7:53 am

Is there any way to implement an equalizer reading real time playing?

So, just imagine I am playing a guitar ( advanced audio supported and request microphone ok routed to "Guitar" Tag.

I have only one signal..... but what I need to EQ my signal is duplicate it as many times as bandwidths I want to use and at the end mix all of them in a final destination.

How to do that? is there anyone who could write a very basic example?..... I can imagine how to do that with pre-recorded and loaded sounds because I can play the same source x times (and manipulate each of these original sources while filtering independently at the same time...but how to do this with real time sources?

Thanks thanks!!!
B
4
G
1
Posts: 4
Reputation: 933

Post » Sun Sep 08, 2013 9:10 pm

I hope this is what you're looking for (or at least close to)?

live demo

Some important notes: I can't work with the microphone (a system higher than XP is needed for that), so instead some music is used. I care more for the eq'ing - it uses just one signal tagged "musik", therefor this should work as is for live input as well.
Hit the play button to start/pause/resume the music. It may take a few seconds before music starts. Then just use the pseudo faders for eq'ing. In this demo it's six bands, but you are not limited on this. You can have as many bands as you like, with whatever frequencies you need.
To not bloat this to a full app, there are only fixed frequencies and bandwidths. They are from left to right per fader: 100 Hz, 300 Hz, 600 Hz, 1.2 kHz, 2.4 kHz and 4.8 kHz, with a narrow bandwidth each.
Range of the faders is +20 dB (top) to -20 dB (bottom). I lowered the music volume by 20 db to prevent to much clipping, when all bands are at max.

IMPORTANT: You need web audio ("advanced audio support") and webGL. I only tested on Chrome with WinXP, and that's working like a charm.
tulamide2013-09-08 21:14:02
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Mon Sep 09, 2013 12:08 pm

hello,
nice to see a lot of examples with audio.
it it possible to get the capx?
B
80
S
29
G
164
Posts: 233
Reputation: 88,117

Post » Mon Sep 09, 2013 12:23 pm

@tulamide

Wow! Awesome! I'd really like to see the capx too! Could you share it with the rest of us?
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon Sep 09, 2013 2:16 pm

Hi @tulamide

Indeed, if you could share the capx or explain a bit how you approached the problem, that would be grand!

Thanks in advance,
Greg
B
18
S
3
G
3
Posts: 83
Reputation: 3,736

Post » Mon Sep 09, 2013 6:06 pm

Sure, a capx is no problem. I just wanted to avoid sharing unwanted solutions.
It's pretty simple, btw. The whole demo is just 8 events. EQ is just a form of filtering, but instead of the standard filters like low pass, high pass or band pass, you need a filter that focuses on a smaller range of frequencies. Web audio offers a filter node which you can apply to the audio stream as often as you like.
Within the filter type list you'll find a peaking filter, boosting or attenuating certain frequencies - exactly what is needed for eq'ing.
You set the peaking filter to a center frequency and a width. If you add this filter a couple of times you effectively build an EQ.
With "set effect parameter" you can change any value like frequency, bandwidth (the "q"-parameter) and gain during runtime.
And that's all^^

Dropbox link: audio.capx
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Mon Sep 09, 2013 9:45 pm

Oh man, @tulamide thank you so much for sharing!!! This is a very elegant solution, I couldn't thought it even in a decade

Thank you again sir



Elias
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Tue Sep 10, 2013 2:48 am

@tulamide

This is really awesome!!! Thanks for sharing
B
29
S
10
G
10
Posts: 97
Reputation: 6,614

Post » Tue Sep 10, 2013 7:03 am

@makotto @eli0s
You're welcome!
Image
B
24
S
8
G
10
Posts: 1,821
Reputation: 8,279

Post » Tue Sep 10, 2013 2:21 pm

thanks for sharing!
B
80
S
29
G
164
Posts: 233
Reputation: 88,117

Next

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 7 guests