You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need SMP to provide real-time audio data for the currently playing track.
I am using the old foo_vis_vumeter component, which reads the left and right channels and peaks
without needing a panel to display the component.
Here is a snippet of how I use it with my peakmeter bar:
/** Indicates if the foo_vis_vumeter component is installed. */
VUMeter: utils.CheckComponent('foo_vis_vumeter')
if (Component.VUMeter) {
this.VUMeter = new ActiveXObject('VUMeter');
}
/**
* Calculates the decibel (dB) value of the given volume.
* @type {Function}
* @private
*/
this.toDecibel = (Level) => Math.round(2000 * Math.log(Level) / Math.LN10) / 100;
// * Set and monitor volume level/peaks from VUMeter
this.leftLevel = this.toDecibel(this.VUMeter.LeftLevel);
this.leftPeak = this.toDecibel(this.VUMeter.LeftPeak);
this.rightLevel = this.toDecibel(this.VUMeter.RightLevel);
this.rightPeak = this.toDecibel(this.VUMeter.RightPeak);
// * Debug stuff
DebugLog('LEFT PEAKS: ', this.leftPeak, ' RIGHT PEAKS: ', this.rightPeak);
DebugLog('LEFT LEVEL: ', this.leftLevel, ' RIGHT LEVEL: ', this.rightLevel, '\n\n');
// Outputs:
LEFT PEAKS: -12.86 RIGHT PEAKS: 0.36
LEFT LEVEL: -13.89 RIGHT LEVEL: -0.46
LEFT PEAKS: 1.67 RIGHT PEAKS: 2.85
LEFT LEVEL: -1.88 RIGHT LEVEL: 1.4
LEFT PEAKS: 4.92 RIGHT PEAKS: 5
LEFT LEVEL: 0.28 RIGHT LEVEL: 2.18
LEFT PEAKS: 2.23 RIGHT PEAKS: 3.08
LEFT LEVEL: 2.01 RIGHT LEVEL: 3.03
Marc has already implement this in his JScript with fb.GetAudioChunk, see here and here.
Hope you can implement this so I can put foo_vis_vumeter component to sleep 😅.
-TT
The text was updated successfully, but these errors were encountered:
Hi @TheQwertiest,
I need SMP to provide real-time audio data for the currently playing track.
I am using the old
foo_vis_vumeter
component, which reads the left and right channels and peakswithout needing a panel to display the component.
Here is a snippet of how I use it with my peakmeter bar:
Marc has already implement this in his JScript with
fb.GetAudioChunk
, see here and here.Hope you can implement this so I can put
foo_vis_vumeter
component to sleep 😅.-TT
The text was updated successfully, but these errors were encountered: