Frequency cuts to waveforms
-
- Posts: 1
- Joined: Thu Dec 15, 2016 8:29 pm
Frequency cuts to waveforms
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?
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?
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Frequency cuts to waveforms
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.Colin Gale wrote:...Is it possible to make waveforms respond to certain frequency ranges? ...
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).
I've certainly put in a feature request for XY display viewtopic.php?f=4&t=919
Re: Frequency cuts to waveforms
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.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Frequency cuts to waveforms
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.Sadler wrote:In this graph I select frequencies from the input audio using a polygon...
Must do some experiments when time permits, as clearly it's a useful modulation technique regardless of the actual waveform - thanks for sharing.
Re: Frequency cuts to waveforms
I agree . It would be a very useful feature, and it's something I'm planning to do.one feature that i feel is sorely missed in this release is the option to do basic EQ cuts from the audio window.
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.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
Re: Frequency cuts to waveforms
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.
Re: Frequency cuts to waveforms
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.
Re: Frequency cuts to waveforms
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!
https://www.interactiveshaderformat.com/sketches/1590
For input use the AudioToImage module with both boxes checked.
Cheers!
Re: Frequency cuts to waveforms
Hey Nik - perhaps in your port you could parameterise the second value in the smoothstep with a range of 0.002 to 0.2?
Re: Frequency cuts to waveforms
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!
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!
-
- Posts: 7
- Joined: Sat Dec 17, 2016 11:04 am
Re: Frequency cuts to waveforms
@Terry Payman: Did you manage to create an oscilloscope fully in Magic? If yes, how do you do it?
Perhaps of interest: I've been experimenting with an XY oscilloscope shader...
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Frequency cuts to waveforms
@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.
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.
-
- Posts: 7
- Joined: Sat Dec 17, 2016 11:04 am
Re: Frequency cuts to waveforms
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
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
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Frequency cuts to waveforms
I'll respond in your handy new topic viewtopic.php?f=2&t=1126tongleiter wrote:How did you manage to create the centered-animation (in red) from the video you have posted on vimeo...?