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.


This script is used to sync a slider control to the peaks in a wav audio file.
example clip:

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


  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


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.



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

Aliassfm posted 8 months, 2 weeks ago


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

msu355 posted 8 months, 2 weeks ago


Damn this is a really cool idea.

sh4de17 posted 8 months, 2 weeks 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 3 days, 13 hours ago

two words : music vizualiser

ayax posted 3 days, 2 hours ago

Leave a reply

You need to be logged in to leave a comment.

Support SFMLab on Patreon