Source Filmmaker

Source Filmmaker

96 ratings
Audio Peak Analyzer v1.1
   
Award
Favorite
Favorited
Unfavorite
Universe: Original IP
Script
Tags: SFM
File Size
Posted
Updated
33.823 KB
Mar 3, 2019 @ 4:53pm
Nov 7, 2019 @ 7:44pm
3 Change Notes ( view )

Subscribe to download
Audio Peak Analyzer v1.1

Description
This script is used to sync a slider control to the peaks in a wav audio file.
This script works best on lights and can be used to sync eye light to voice files like the robots in portal 2

To install:
You must add numpy to sfm by downloading this: https://www.dropbox.com/s/iigg6x9hntj4rlo/numpy-1.10.1.zip?dl=1
then extract the folders here :'SourceFilmmaker\game\sdktools\python\global\lib\site-packages'



How to Use:
  1. add a .wav clip in sfm
  2. select the wav clip and apply the script on a light
  3. from there you can select which control is effected by the sound clip.
  4. I recommend after it finishes to apply just a small amount of smoothing

options:
  • bookmarks- this will just add bookmarks in the graph editor at each keyframe
  • Override Buffer-size- by default the buffer size is roughly equal to 1 sfm time frame. lowering this will create a more actuate wave but may slow down playback
  • data function- this gives you the option of how the data in each chunk is processed, Note when using Avg set the buffer size below 128 to have meaningful values
  • print freq- when script is done a table of the frequency for each chunk is printed and will show up in the script editor window


Note:
This script is very experimental so play with it in an empty session first, and let me know of any issues. The freq range feature is a bit unfinished and will be fixed in a future update.



feel free to modify the script for your own use
if you find any bugs or have suggestions message me in the comments below.

Includes:
sfm\animset\AudioPeakAnalyzer.py
48 Comments
velojico2021 Feb 20 @ 2:38pm 
so this can fix audios?
gmod dude Dec 2, 2023 @ 10:30pm 
can you make a thing that allows you to add x-rays? I mean as in like a shader test/particle that can make it so you can see inside a prop/ragdoll and in the element viewer you can change if it goes ALL the way through or just in the inside of the prop/ragdoll that has been selected.
OMG Theres A Bear In My Oatmeal!  [author] Jul 10, 2023 @ 4:33pm 
your gameinfo.txt might not be formatted right or has errors in it, it should look like this https://www.dropbox.com/s/2fuduxao1w2en7m/gameinfo.txt?dl=0 , replace yours with this one temporary and try again to see if it works.
Macroli Jul 10, 2023 @ 2:07pm 
It says ERROR : No wave file picked! While selected the wave file, help?
OMG Theres A Bear In My Oatmeal!  [author] Mar 27, 2023 @ 4:50am 
did an error pop up in the console when that happened?
illegitimate-egg Oct 24, 2022 @ 6:34am 
My hard drive died shortly after this, I think it was probably my sfm install
OMG Theres A Bear In My Oatmeal!  [author] Oct 23, 2022 @ 6:54am 
see if validating the SFM files fixes it.
illegitimate-egg Oct 23, 2022 @ 3:28am 
I'm back, the script asked me to install numpy and numpy lib and now when I run it just leaves a Traceback to line 312 in startAnalyze and line 55 in __init__ both of type <string>. According to the error argl must be open file
Scruffygamer (SFM COMMISSIONS) Apr 30, 2020 @ 6:54pm 
just animate it
wtf un Poni Apr 30, 2020 @ 5:55pm 
Can this script be used to move any character's jaw when speaking? or this works only with lights?