Thread: Audio analyse
View Single Post
Old 10th July 2007, 14:13   #7  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
Hmm I just came across the audiograph plugin. If I just knew a bit about this c stuff... I guess it wouldn't be that hard to make it return a max value of the waveform of the current frame instead of a clip...

Can anyone help me with this?
If you are still interested, try this avisynth.dll:

Syntax:
AudioMax(channel) # maximal volume in channel (framewise)
AudioMin(channel) # minimal volume in channel (framewise)
AudioRMS(channel) # root mean square volume in channel (framewise)
# channel = 0 means that the max/min/rms is taken over all samples in all channels (framewise)

Usage:
Code:
v = BlankClip(pixel_type="YV12")
a = Tone(type="Triangle", frequency=2, level=0.4)
w = AudioDub(v,a) #.Histogram(mode="audiolevels")
w = ScriptClip(w, "Subtitle(String(AudioMax(1)))")
#w = ScriptClip(w, "Subtitle(String(AudioRMS(0)))")
#w = ScriptClip(w, "Subtitle(String(AudioMin(1)))")
w = w #.ConvertToRGB32.AudioGraph(20)
return w
Note that the values are given in decibels (see also histogram docs for an explanation).
Wilbert is offline   Reply With Quote