Been doing a lot of sound baking lately too. You'll find different audio files have different levels, so unless you normalize them first using ffmpeg or similar you will have to find a way to deal with them.
What I have done in sound drivers is added a minmax property to each fcurve and using those values added an envelope modifier. (Had to add the control point code to the python API.. that took a while..)
# return ((min, max), (min_index, max_index))
# it thru keyframe_points
col = self.keyframe_points
col = self.sampled_points
return ((0, 0), (0, 0))
# check for modifiers
mods = [mod for mod in self.modifiers if not mod.mute and mod.is_valid]
v = [self.evaluate(p.co) for p in col]
v = [p.co for p in col]
_min = min(v)
_max = max(v)
return ((_min, _max), (v.index(_min), v.index(_max)))
bpy.types.FCurve.minmax = property(fcurve_minmax)
After baking, cleaning, smoothing etc I can call
(_min, _max), (min_at_frame, max_at_frame) = fc.minmax
Noticed your other post re driver. I am baking to a set of custom properties on a speaker object. I chose the speaker as it a convenient way to handle sounds and playback, and somewhere to hang the props that doesn't render. These properties are then used to drive animations / create visualisers.
Here is what a 16 channel bake looks like on a small wav file.
You'll notice there are 2 envelope modifiers. One maps each fcurve to its percentage of the maximum action range (Action), the other maps each fcurve across its baked range (Channel) to the mapped range..
Close up of how to set up the modifiers, channel CS8 range
[0, 0.246] and the action from
[0, 0.305], being mapped to
[0, 1]. Top modifier will map it to
[0, 0.246 / 0.305] the second to
The channel, freqA, freqB, min, max, and baketimes
I bake first and last in case there is no level at either end.
Ok now I have baked the animation, I can add a driver to any object(s) drive by channel 0 and create a visualizer. Here is a very simple, and very quick, visualizer on the default cube by animating z-scale with channel0 then selecting grid visualizer.
The amplitudes of the fcurves can now be changed on the fly