Frequency cuts to waveforms

Thu Dec 15, 2016 8:47 pm

Hey Magic Users,
I Really like what has been done in Magic 2.0, But one feature that i feel is sorely missed in this release is the option to do basic EQ cuts from the audio window.

This would be a fantastic addition from my standpoint, however I may just be missing out on an already existing feature.
Is it possible to make waveforms respond to certain frequency ranges? if so how is this achieved?
Colin Gale
 
Posts: 1
Joined: Thu Dec 15, 2016 8:29 pm

Re: Frequency cuts to waveforms

Fri Dec 16, 2016 1:25 am

Colin Gale wrote:...Is it possible to make waveforms respond to certain frequency ranges? ...

Not in Magic - but it would be really cool if one could (I may have already requested this - I certainly intended to). You must filter the audio outside Magic before feeding it the Waveform module. For real-time use I have a graphic EQ on the mic input to my sound card (although a parametric EQ would probably be better). If I'm working with audio files I pre-filter in Audacity if I only have a mix rather than separate stems.

It would be very cool to be able to filter within Magic - perhaps use the same filtering as is available for the "Freq. Range" audio feature, also to have some tuning on the timebase so one could arrange for a stationary waveform for any desired frequency.

Perhaps of interest: I've been experimenting with an XY oscilloscope shader, a slight variant on https://www.shadertoy.com/view/4tdXzX. Because it's fed with audio in the form of an image texture, a blur module in that feed has the effect of an audio low-pass filter. The beauty of the plotting technique is that a waveform is plotted against a time-shifted version of itself, giving a pattern that is static if the harmonic content of the wave is static. This video contrasts that with Magic's native waveform display modes, which have an inherent timebase ("Overwrite" is checked for the upper waveforms, unchecked for the lower).
[media]

I've certainly put in a feature request for XY display https://magicmusicvisuals.com/forums/viewtopic.php?f=4&t=919
Terry Payman
 
Posts: 597
Joined: Sun Sep 14, 2014 8:15 am
Location: UK

Re: Frequency cuts to waveforms

Fri Dec 16, 2016 11:34 am

In this graph I select frequencies from the input audio using a polygon - you have to pass this on the a GL or ISF visualiser though. You can do other things to the input audio too - like brightness and contrast.
Frequency select.png
Frequency select.png (30.92 KiB) Viewed 5674 times
Sadler
 
Posts: 795
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Frequency cuts to waveforms

Fri Dec 16, 2016 11:51 am

Sadler wrote:In this graph I select frequencies from the input audio using a polygon...

That's a neat way of selecting a frequency range from a spectrum input, but without an inverse transform I struggle to see how it can produce a frequency-filtered waveform, although I can see it would broadly modulate the amplitude.

Must do some experiments when time permits, as clearly it's a useful modulation technique regardless of the actual waveform - thanks for sharing.
Terry Payman
 
Posts: 597
Joined: Sun Sep 14, 2014 8:15 am
Location: UK

Re: Frequency cuts to waveforms

Fri Dec 16, 2016 4:35 pm

one feature that i feel is sorely missed in this release is the option to do basic EQ cuts from the audio window.

I agree :). It would be a very useful feature, and it's something I'm planning to do.

Because it's fed with audio in the form of an image texture, a blur module in that feed has the effect of an audio low-pass filter

In the meantime, this is a good solution. Generally when people want to filter a waveform, they want to do a low-pass filter because low frequencies produce more interesting visual patterns than high frequencies. So if you use audio data in the form of an image texture (using the AudioToImage module), and you feed this image into a shader (similar to the one Terry posted), you can blur the image beforehand to get the low-pass effect.
Eric
Site Admin
 
Posts: 3036
Joined: Wed Apr 09, 2014 9:28 pm

Re: Frequency cuts to waveforms

Fri Dec 16, 2016 6:50 pm

I think the suggestion of adding a complementary inverse "AudioImage to Waveform" function to Magic would be fantastic from a new user experience perspective. I've used the method he describes, with that exact same shader, but it was non-obvious as a beginning user. I did look for an opposite to "Audio to Image" before stumbling on the method later on.
artnik
 
Posts: 264
Joined: Tue Jan 05, 2016 5:33 pm

Re: Frequency cuts to waveforms

Sat Dec 17, 2016 5:08 pm

That would actually be a fairly simple shader for you to write :), because it's almost identical to this one: https://www.shadertoy.com/view/Xds3Rr. It draws the waveform based on the second row of input image data (which happens to be how Shadertoy provides the sound waves), but you could change it to an arbitrary row (or column, or whatever). Then all you have to do is hook up an input module in Magic -- Image, VideoFile, etc.
Eric
Site Admin
 
Posts: 3036
Joined: Wed Apr 09, 2014 9:28 pm

Re: Frequency cuts to waveforms

Sat Dec 17, 2016 8:22 pm

Here's a converted version of that shader, with a couple of toggles for drawing each element.

https://www.interactiveshaderformat.com/sketches/1590

For input use the AudioToImage module with both boxes checked.

Cheers!
artnik
 
Posts: 264
Joined: Tue Jan 05, 2016 5:33 pm

Re: Frequency cuts to waveforms

Sat Dec 17, 2016 11:39 pm

Hey Nik - perhaps in your port you could parameterise the second value in the smoothstep with a range of 0.002 to 0.2?
Sadler
 
Posts: 795
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Frequency cuts to waveforms

Sun Dec 18, 2016 5:01 am

Hey Sadler,

Done. It's been added.

Lately I've been trying to keep true to a 0-1 range, so it runs from that, with an offset of .001 to ensure the line doesn't disappear. You can always use modifiers to limit the range to what you want.

It also struck me it would be handy to add controls to define which rows the Frequency and Waveform data are being sampled from.

Cheers!
artnik
 
Posts: 264
Joined: Tue Jan 05, 2016 5:33 pm

Re: Frequency cuts to waveforms

Thu Dec 29, 2016 8:05 am


Perhaps of interest: I've been experimenting with an XY oscilloscope shader...



@Terry Payman: Did you manage to create an oscilloscope fully in Magic? If yes, how do you do it?
tongleiter
 
Posts: 7
Joined: Sat Dec 17, 2016 11:04 am

Re: Frequency cuts to waveforms

Mon Jan 02, 2017 12:34 pm

@tongleiter:
Sorry for my delay in responding.

No, I haven't been able to create a full oscilloscope. Following your question I did try to add a timebase to my XY display (with a brightness ramp on the X-axis) but the overall system ran far too slowly to be of any use.
Terry Payman
 
Posts: 597
Joined: Sun Sep 14, 2014 8:15 am
Location: UK

Re: Frequency cuts to waveforms

Tue Jan 03, 2017 9:11 am

Thank you very much Terry - no worries.

How did you manage to create the centered-animation (in red) from the video you have posted on vimeo - it looks much like an oscilloscope to me.. (in the external application "Shadertoy" I guess)?

I'll create a new topic to reach out to the whider community - mabey someone else has managed to create a full oscilloscope.

Best,
Silvan
tongleiter
 
Posts: 7
Joined: Sat Dec 17, 2016 11:04 am

Re: Frequency cuts to waveforms

Thu Jan 05, 2017 9:14 am

tongleiter wrote:How did you manage to create the centered-animation (in red) from the video you have posted on vimeo...?

I'll respond in your handy new topic https://magicmusicvisuals.com/forums/viewtopic.php?f=2&t=1126
Terry Payman
 
Posts: 597
Joined: Sun Sep 14, 2014 8:15 am
Location: UK

Return to Feature Requests

© 2021 Color & Music, LLC • This web site is mobile-friendly