Support SFMLab on Patreon

Audio Peak Analyzer v1.1

Warning: BETA content

This file is marked as "BETA" which means that the contents might be unfinished, outdated or incompatible with the most recent version of Source Filmmaker.


Description

This script is used to sync a slider control to the peaks in a wav audio file.
example clip: https://www.youtube.com/watch?time_continue=1&v=leXKTIMs0Ok

To install:

just drop the .py file in "workshop\scripts\sfm\animset" and
place the numpy lib folders in "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:

  1. bookmarks- this will just add bookmarks in the graph editor at each keyframe
  2. 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 will slow down playback
  3. 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
  4. 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.

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



Comments

Aliassfm

Sounds interesting. What application does something like this have? I'm trying to think of something I'd use it for.

Aliassfm posted 9 months, 1 week ago

msu355

-syncing lights to music or a sound effect like lighting -syncing eye light to voice files like the robots in portal 2

msu355 posted 9 months, 1 week ago

sh4de17

Damn this is a really cool idea.

sh4de17 posted 9 months, 1 week ago

Does the override buffer size help with any issues? Just trying to think of any projects that have been giving me trouble & I could try this script...

mestrus posted 4 weeks, 1 day ago

two words : music vizualiser

ayax posted 4 weeks ago

WARNING! Carry on reading! Or you will die, even if you only looked at the word warning! Once there was a little girl called Clarissa, she was ten-years-old and she lived in a mental hospital, because she killed her mom and her dad. She got so bad she went to kill all the staff in the hospital so the More-government decided that best idea was to get rid of her so they set up a special room to kill her, as humane as possible but it went wrong the machine they were using went wrong. And she sat there in agony for hours until she died. Now every week on the day of her death she returns to the person that reads this letter, on a Monday night at 12:00 a.m. She creeps into your room and kills you slowly, by cutting you and watching you bleed to death. Now send this to ten other pictures on this one site, and she will haunt someone else who doesn't. This isn't fake. apparently, if you copy and paste this to ten comments in the next ten minutes you will have the best day of your life tomorrow.You will either get kissed or asked out, if you break this chain u will see a little dead girl in you

1234 and 5 posted 5 days, 1 hour ago

WARNING! Carry on reading! Or you will die, even if you only looked at the word warning! Once there was a little girl called Clarissa, she was ten-years-old and she lived in a mental hospital, because she killed her mom and her dad. She got so bad she went to kill all the staff in the hospital so the More-government decided that best idea was to get rid of her so they set up a special room to kill her, as humane as possible but it went wrong the machine they were using went wrong. And she sat there in agony for hours until she died. Now every week on the day of her death she returns to the person that reads this letter, on a Monday night at 12:00 a.m. She creeps into your room and kills you slowly, by cutting you and watching you bleed to death. Now send this to ten other pictures on this one site, and she will haunt someone else who doesn't. This isn't fake. apparently, if you copy and paste this to ten comments in the next ten minutes you will have the best day of your life tomorrow.You will either get kissed or asked out, if you break this chain u will see a little dead girl in you

1234 and 5 posted 5 days, 1 hour ago


Leave a reply

You need to be logged in to leave a comment.

Support SFMLab on Patreon