Page 8 of 9

Re: [Fuse] Suck Less Audio File Modifier

Posted: Sun May 03, 2020 11:03 am
by SecondMan
DimaS wrote:
Thu Apr 30, 2020 11:43 am
I do with the picture, it works, with video no
That seems very odd indeed.

When I asked to post your setup, I didn't mean screenshots. In Fusion you can copy nodes from the Flow View and paste them in a text editor, or in a forum.

When you do, post them inbetween [code][/code] tags. Or you can look for Forum Utilities in Reactor to make posting even simpler.

Additional info here: viewtopic.php?f=2&t=275

Re: [Fuse] Suck Less Audio File Modifier

Posted: Sun May 03, 2020 11:12 am
by SecondMan
panospc wrote:
Fri May 01, 2020 5:12 pm
Is there any way to make the modifier smoother/less sensitive?
There sure is. You can chain Modifiers together in Fusion. So once you have your initial (too sharp) motion set up, right click on the parameter again and insert another Modifier, like a filter:

Image

What this does essentially is Suck Less Audio -> Filter -> Parameter. Adjust to your liking and you're all set!

Re: [Fuse] Suck Less Audio File Modifier

Posted: Sun May 03, 2020 1:12 pm
by ShadowMaker SdR
SecondMan wrote:
Sun May 03, 2020 11:12 am
Insert another Modifier, like a filter:
In all these years I've never known about this specific filter. It had a difficult name, so I didn't bother.
This is great, Pieter! Thanks!

Added in 7 minutes 36 seconds:
Ehhh... wait a minute. This filter doesn't show up in my modifiers menu. Do I need to install something for that?

Re: [Fuse] Suck Less Audio File Modifier

Posted: Sun May 03, 2020 1:59 pm
by SecondMan
ShadowMaker SdR wrote:
Sun May 03, 2020 1:20 pm
Do I need to install something for that?
Ohhh yes indeed. They used to ship with Fusion, so I didn't think of that.

You can find them here: https://www.steakunderwater.com/VFXPedi ... arty_Fuses

Someone should pack those up for Reactor...

Re: [Fuse] Suck Less Audio File Modifier

Posted: Tue May 05, 2020 3:14 am
by DimaS
SecondMan wrote:
Sun May 03, 2020 11:11 am
When you do, post them inbetween tags. Or you can look for Forum Utilities in Reactor to make posting even simpler.

Code: Select all

{
	Tools = ordered() {
		BrightnessContrast1 = BrightnessContrast {
			CtrlWZoom = false,
			Inputs = {
				Gain = Input {
					SourceOp = "AudioWAV1",
					Source = "Output",
				},
				Contrast = Input { Value = -0.08, },
				Saturation = Input { Value = 1.5, },
				Input = Input {
					SourceOp = "MediaIn1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 475, 39.8029 } },
		},
		AudioWAV1 = Fuse.SuckLessAudio {
			CtrlWZoom = false,
			Inputs = {
				WaveFile = Input { Value = "H:\\A2-0001_Untitled00086400.wav", },
				Mode = Input { Value = FuID { "UnsignedMedian" }, },
				AmplitudeScale = Input { Value = 4.659, },
				AmplitudeOffset = Input { Value = 1, },
			},
			Version = 250
		},
		MediaIn1 = MediaIn {
			ExtentSet = true,
			CustomData = { MediaProps = {
					MEDIA_FORMAT_TYPE = "QuickTime",
					MEDIA_HEIGHT = 1530,
					MEDIA_MARK_IN = 866,
					MEDIA_MARK_OUT = 1090,
					MEDIA_NAME = "DJI_0222.MP4",
					MEDIA_NUM_FRAMES = 3502,
					MEDIA_NUM_LAYERS = 1,
					MEDIA_PAR = 1,
					MEDIA_PATH = "H:\\Проект ДР Вити\\ДР_Вити\\ДР_Вити\\DJI_0222.MP4",
					MEDIA_SRC_FRAME_RATE = 29.97002997003,
					MEDIA_START_FRAME = 0,
					MEDIA_WIDTH = 2720
				}, },
			Inputs = {
				GlobalIn = Input { Value = 866, },
				GlobalOut = Input { Value = 1090, },
				Layer = Input { Value = "0", },
				ClipTimeStart = Input { Value = 866, },
				ClipTimeEnd = Input { Value = 1090, },
				["Gamut.ColorSpaceNest"] = Input { Value = 1, },
				["Gamut.GammaSpaceNest"] = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
			},
			ViewInfo = OperatorInfo { Pos = { 357, 54.3484 } },
		},
		MediaOut1 = MediaOut {
			Inputs = {
				Index = Input { Value = "0", },
				Input = Input {
					SourceOp = "BrightnessContrast1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 710.666, 49.5 } },
		}
	}
}

Re: [Fuse] Suck Less Audio File Modifier

Posted: Tue May 05, 2020 4:19 am
by SecondMan
@DimaS I will need the .wav file as well, please.

Re: [Fuse] Suck Less Audio File Modifier

Posted: Tue May 05, 2020 5:19 am
by DimaS
SecondMan wrote:
Tue May 05, 2020 4:19 am
@DimaS I will need the .wav file as well, please.
A2-0001_Untitled00086400.wav

Re: [Fuse] Suck Less Audio File Modifier

Posted: Tue May 05, 2020 9:59 am
by SecondMan
Oh, I see what's wrong. In Suck Less Audio, set your Sample Start Frame to your comp's Render Start Time. That would be 866 according to your screenshot. You've simply run out of sample :)

Re: [Fuse] Suck Less Audio File Modifier

Posted: Wed May 06, 2020 10:07 am
by DimaS
SecondMan wrote:
Tue May 05, 2020 9:59 am
Oh, I see what's wrong. In Suck Less Audio, set your Sample Start Frame to your comp's Render Start Time. That would be 866 according to your screenshot. You've simply run out of sample
Thank you so much

Re: [Fuse] Suck Less Audio File Modifier

Posted: Thu Jun 04, 2020 2:51 pm
by drm_aylward
Well, this is great. I will read the entire thread later this evening, but I wonder if the topic of Davinci Resolve comes up, so that we can pipe the audio from the mixer/bus, vs. a dedicated wav file on the hard drive?

In DaVinci Resolve this would allow me to drop the fusion comp onto the timeline, and link to a mixer/bus. the visual modification in the comp would simply monitor the bus and use this... for one thing the comp would never be out of sync with the audio coming from the timeline...

Re: [Fuse] Suck Less Audio File Modifier

Posted: Thu Jun 04, 2020 6:09 pm
by SecondMan
drm_aylward wrote:
Thu Jun 04, 2020 2:51 pm
so that we can pipe the audio from the mixer/bus, vs. a dedicated wav file on the hard drive?
No, that's not what the Fuse does at all. It's a WAV reader, plain and simple.

Re: [Fuse] Suck Less Audio File Modifier

Posted: Fri Jun 05, 2020 2:14 pm
by JiiPii
A really great fuse. I did the great tutorial from A Blackbird called Sue and of course caught a PCM file that didn't work. The reason for this is the junk chunk (great tongue twister) in the header. This is also generated by the DR renderer. With a few small changes you can make this possible.

First of all, the header must be larger and adjusted. Then the start of the sample data can be found (data_pos).
  1. .
  2. .
  3.     -- create a table containing the header of the file. This will then be used to get file type, sample rate etc. In wave file the header is stored in the first 44 bytes of the file.
  4.     local header = getHeader(filedata, 104) -- Org 44 - Junk 104
  5.    
  6.     --get some vital information out of the header, to do some form of file format checking
  7.     if header[3] == header[4] and header[17] == "16" then
  8.         format = "WAV"
  9.    
  10.         bitrate = sampleRead(filedata, 26, 25, 0)
  11.         channels = header[23]
  12.     else
  13.         -- Suche data      
  14.         data_pos = string.find(filedata, "data")
  15.         data_pos = data_pos + 8                   -- 4 bytes "data" und 4 byte Size
  16.        
  17.         if header[13] == "74" and data_pos ~= nil then
  18.             -- Junk-Format
  19.             format = "WAV"
  20.             bitrate = sampleRead(filedata, 62, 61, 0)
  21.             channels = header[59]
  22.            
  23.             print ("########JUNK#########")        
  24.         else
  25.             print ("Unsupported file type.\nPlease only load of type WAV (Microsoft) signed 16-bit PCM.")
  26.             return nil
  27.         end
  28.     end
  29. .
  30. .
Then adjust the generation of the sample data
  1. .
  2. .
  3.     -- create sampledata table for MS WAV (little endian)
  4.     if format == "WAV" then
  5.         for pos = (data_pos+sampleoffset)+((currenttime-startframe)*spf*samplestep), ((data_pos+sampleoffset)+((currenttime-startframe)+1)*spf*samplestep)-samplestep, samplestep*proxy do
  6.             if pos > data_pos-1 then
  7.                
  8.                 local deb_werte = {}
  9. .
  10. .

And finally the change for the ModifyChanged
  1. .
  2. .
  3.     if inp == InFile then  
  4.             local filedata = readAll(param.Value)
  5.             if not filedata then
  6.                 return
  7.             else
  8.                 local header = getHeader(filedata, 104)       -- Anpassen
  9.                 if header[13] == "74" then
  10.                     temp_channel = header[59]                 -- Junk-Format
  11.                 else
  12.                     temp_channel = header[23]                 -- Wave Format
  13.                 end    
  14.                    
  15.                 if temp_channel == "2" then
  16. .
  17. .

I haven't tested it extensively, but it works fine.

Re: [Fuse] Suck Less Audio File Modifier

Posted: Sat Jun 06, 2020 12:42 am
by SecondMan
Oh nice, thanks for the pointers! I haven't looked at that code in a very long time. Would you be willing to send me your working version?

Welcome to WSL, by the way. Great first post ;)

Re: [Fuse] Suck Less Audio File Modifier

Posted: Tue Aug 11, 2020 5:22 pm
by BrainSmashR
This thing is just AMAZING...


Re: [Fuse] Suck Less Audio File Modifier

Posted: Tue Aug 18, 2020 10:58 am
by bentraje
Hi,

Thanks for sharing.
Just wondering, does this work with Resolve's Fusion Adjustment Clip?
It works with Resolve's Fusion Composition but not with Adjustment Clip.

Are there additional steps for the Adjustment Clip?

I'd prefer to do it in the AC as it will affect every video below it.

Added in 1 minute 3 seconds:
Just for clarification, It doesn't error out. It's just when you scrubbed in Adjustment Clip nothing is happening. But if you scrub in Fusion Composition, the parameter is properly affected.