## [Fuse] Suck Less Audio File Modifier

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### [Fuse] Suck Less Audio File Modifier

Hurray! With Suck Less Audio you can modify parameters in Fusion and Fusion Studio with a 16 bit WAV file!

## Please note that a newer version of Suck Less Audio is available on Reactor.

SuckLessAudio_1.2_Screenshot.PNG

Wave File - Loads a WAV file. The format has to be WAV (Microsoft) signed 16-bit PCM. If there is interest (perhaps from the Mac side?) I can look into the AIFF structure as well and see if I can manage to add that. MP3 or the likes will never happen
Reload Sample - Reloads the WAV file from disk. Handy when editing audio on-the-fly (thanks ploveday for the tip!)
Select Channel(s) - Will only show when a stereo sample is loaded. Select left, right or both channels as your input
Sample Start Frame - Starts the File Sampling on this frame (so if you want your audio to start at 1001, put 1001 in here)
Mode - how SLA interpolates the samples:
• Max: If sample A is +3 and sample B is -4, SLA will return -4 (because 4 is higher than 3)
• Unsigned Max: If sample A is +3 and sample B is -4, SLA will return +3 (because +3 is higher than -4)
• Min: If sample A is +3 and sample B is -4, SLA will return +3 (because 3 is less than 4)
• Unsigned Min: If sample A is +3 and sample B is -4, SLA will return -4 (because -4 is less than +3)
• Average: If sample A is +3 and sample B is -4, SLA will return -0.5 (because (3-4)/2 = -0.5)
• Unsigned Average: If sample A is +3 and sample B is -4, SLA will return +3.5 (because (3+4)/2 = 3.5)
• Median: If sample A is +3, sample B is -4 and sample C is -2, SLA will return sample C (because sorting returns [-4, -2, 3])
• Unsigned Median: If sample A is +3, sample B is -4 and sample C is -2, SLA will return sample A (because sorting returns [2, 3, 4])
Proxy (for sampling) - A 16 bit WAV files contains a LOT of samples. Typically much more than is needed, so it can put unnecessary strain on processing (a 44100Hz stereo sample contains 3675 samples per frame at 24 fps). So the proxy allows for sampling every [value]th frame, so you can have a nice realtime experience enjoying great results
Amplitude Scale - Multiplies the result by this factor.
Amplitude Offset - Offsets the result by this value.
Time Scale - Scales the length of the result. So a value of 2 in here will stretch the result over twice as many frames.

To use, download the file and put it in your Fuses/modifiers directory. Right-click any parameter in Fusion and select Modify With -> Audio (WAV). That's it!

Let me know if there are any issues or wishes. This thing is spanking new, so not that much testing has gone into it. It should work with all bitrates, mono and stereo. I'd like to hear if it works well on the Mac version of Fusion.

Enjoy!

Suck Less Audio is free to use. Donations are not required, but if you find Suck Less Audio useful, please consider supporting We Suck Less.

Become a Patron!
You do not have the required permissions to view the files attached to this post.

Tags:

Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

wow

Dunn
Moderator
Posts: 474
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 2 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

This is really cool.

Is this Fuse only for Fu8 ?

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

@Tilt

Thanks!

I learned a LOT making this. I'll do a Fuse Box writeup of the internal workings later, there's some really fun stuff in there.

@Dunn

Thank you, too!

Nope, definitely works for Fu7, too and I can't think of a reason why it wouldn't work for earlier versions.

(One thing that I seemed to perceive while making this is that the UI feedback (viewer, slider anims refresh) in Fu8 is slightly faster than Fu7.)

MilosL
Posts: 46
Joined: Thu Feb 12, 2015 10:53 pm
Location: Cologne, Germany
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

Thanks! Works great in Fusion 7.5 / Win7 64bit.

I tried to animate some Text+ parameters - all works perfectly as expected. The only thing - with motion blur drops processing speed/frame rate dramatically.
It would be wonderful to have some frequency filters as additional outputs - something like low pass, high pass... with adjustable frequencies...

Dunn
Moderator
Posts: 474
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 2 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

Just Found out why its not showing up on Fu6.4 ..
You might wanna change the name here ---> FuRegisterClass("TimeMachine", CT_Modifier, { <-----

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

Dunn wrote:Just Found out why its not showing up on Fu6.4 ..
You might wanna change the name here ---> FuRegisterClass("TimeMachine", CT_Modifier, { <-----
Oooh - haha, totally missed that.

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

MilosL wrote:Thanks! Works great in Fusion 7.5 / Win7 64bit.

I tried to animate some Text+ parameters - all works perfectly as expected. The only thing - with motion blur drops processing speed/frame rate dramatically.
It would be wonderful to have some frequency filters as additional outputs - something like low pass, high pass... with adjustable frequencies...
Thanks MilosL!

When using motion blur, I highly recommend baking the animation spline for now. I was testing your comment and it turns out that motion blur is calculated differently between modifier and bake because (I think) the Fuse returns valid values inbetween frames. You can see what I mean when you actually look at the spline editor to the tool using SLA and zooming in.

In fact the Wave Modifier Fuse exhibits the same issue. I don't yet know how to make sure only one value per actual frame exists, or if that's even possible. This could potentially be a performance boost, too.

Other than that, selecting motion blur does require that tools are calculated multiple times per frame. Even a setting of 4 means about 9 times the rendertimes for SLA, plus rendering the actual tool 9 times on top of that.

What frequency filters are concerned, I have been thinking about doing some small modifier Fuses that act like high pass and low pass filters (and others) for parameter values, rather than incorporating those into tools themselves because they can be very useful for other modifiers, too, like Shake or Wave.

Just imagine how powerful this system could be if Modifiers were nodes

However, that still won't mean that you could say things like "get me the volume readings for all low tones" because frequency data isn't stored in the sample. You have to extract that using fourier transforms, which I'd love to learn at some point. I do suspect your render time concerns would then increase pretty substantially

Fusionator
Posts: 1374
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 8 times

### Re: [Fuse] Suck Less Audio File Modifier

If you floor the req.time, you can make a "motion blur proof" output. That's how say, TimeSpeed works. Of course you may not always want that, so probably should be a "discretize time" checkbox. I made a MaterialTimeDiscretizer Fuse that did that. Sometimes you want it, sometimes you don't.

Of course, making a "Request Discretizer (Number)" Fuse would make sense too, and would be only a few lines long, something like...

Code: Select all

function Process(req)
local Enabled = (InDiscretize:GetValue(req).Value > 0.5)
local input

if Enabled then
input = InNumber:GetSource(math.floor(req.Time+0.5), req:GetFlags())
else
input = InNumber:GetSource(req.Time, req:GetFlags())
end

Out:Set(req, input)
end
You just insert it into the modifier stack.

But of course, this would also work well as a slightly smaller node in the flow.

PeterLoveday
Fusioneer
Posts: 143
Joined: Sun Sep 14, 2014 6:09 pm
Been thanked: 12 times

### Re: [Fuse] Suck Less Audio File Modifier

I wouldn't worry too much about processing time... You might find the speed would improve somewhat if you don't reload the whole WAV file every Process() (and therefore every motion blur step).

- Peter

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

ploveday wrote:I wouldn't worry too much about processing time... You might find the speed would improve somewhat if you don't reload the whole WAV file every Process() (and therefore every motion blur step).

- Peter

Thanks Peter!

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

Chad wrote:If you floor the req.time, you can make a "motion blur proof" output.

Moved that idea to the Fuse Box (I'm having some issues with it):

https://www.steakunderwater.com/wesuckle ... ?f=6&t=500

Dunn
Moderator
Posts: 474
Joined: Mon Aug 04, 2014 4:27 am
Location: Hamburg, Germany
Been thanked: 2 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

Now what would it be cool, if we could get to hear the sound. Thinking about a custom script the would updated the selected sound on the timeline. But i have not found out what script does that "speaker" button call. Would be cool thou.
sound.jpg
You do not have the required permissions to view the files attached to this post.

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

That would be neat indeed. And we could then probably add a button to the Fuse that launches that script, so you could have plenty of samples in Modifiers that can be switched at the press of a button.

So far I've just been using a Saver with the sample in there. Very sloppy.

SecondMan
Posts: 3349
Joined: Thu Jul 31, 2014 5:31 pm
Been thanked: 65 times
Contact:

### Re: [Fuse] Suck Less Audio File Modifier

Right now it's more of a vague acquaintance.

I've tried but so far no luck. How can I pass variables from the NotifyChange "area" into the Process "area"?

This, for example:

Code: Select all

function NotifyChanged(inp, param, time)
if inp == InFile then
audiofilechanged = "hello!"
print (audiofilechanged)
end
end
works, but as soon as I put

Code: Select all

print (audiofilechanged)
into Process(req), it returns nil.

I tried following https://www.steakunderwater.com/VFXPedia ... ifyChanged