Returns the amplitude (power) as a float value which is represented by the given Y coordinate position of a visual control.
Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- y
- Type: SystemInt32
The Y coordinate from which to get the amplitude (between 0 and control.Height-1). - height
- Type: SystemInt32
The maximum height of the visual control which was used to display the visual (e.g. pictureBox.Height).
Return Value
Type: SingleThe amplitude or power as a float value (between 0.0 and 1.0) which is represented by the Y coordinate of the visual.
Remarks
Examples
private void pictureBoxSpectrum_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { if (_vis == null) return; int freq = _vis.GetFrequencyFromPosX(e.X, 44100); float amp = _vis.GetAmplitudeFromPosY(e.Y, this.pictureBoxSpectrum.Height); this.labelVis.Text = String.Format( "Freq={0}Hz, Amp={1}", freq, amp ); }
See Also