0
0

:roll: I was wondering if there was a way to find the upper and lower cutoff frequencies of the bandwidth knowing the center frequency and the bandwidth in semitones.

The reason I want to know is is to display the settings of the EQ graphically.For example, showing as peak looking something like an upside-down ‘V’. The crest would be positioned left to right with the center frequency and the hieght with the gain. However, I want to be able to set the bottom ends of the lines with the corresponding cutoff frequencies to approrprietly dislpay the ‘Q’ of the EQ.

If anybody knows of a formula or anything the help would be very appreciated.

  • You must to post comments
0
0

That’s how I draw my equalizer (in VB, but can help anyway):

[code:1fxszqhe]Private Declare Function PolyBezier Lib "gdi32" (ByVal hdc As Long, _
lppt As POINTAPI, ByVal cPoints As Long) As Long

Private Type POINTAPI
X As Long
Y As Long
End Type

Private Sub DessinerLignes()
Picture1.Cls
For i = 0 To 9
XX = (i + 0.25) * (31 + 2 / 3)
Picture1.Line (XX, 0)-(XX, 46), RGB(150, 150, 150)
Next i
Picture1.Line (0, 22)-(301, 22), RGB(150, 150, 150)
Dim Arr(23) As Long
Arr(0) = -0.25 * (31 + 2 / 3)
Arr(1) = 15 * (3 / 2)
Arr(22) = 9.75 * (31 + 2 / 3)
Arr(23) = 15 * (3 / 2)
For i = 0 To 9
Arr((i * 2) + 2) = (i + 0.25) * (31 + 2 / 3)
Arr((i * 2) + 3) = (SliderControl1(i).Value + 15) * (3 / 2)
Next i
DrawBezierDiagram Picture1, Arr, 50
End Sub

Public Sub DrawBezierDiagram(dest As Object, PointArray As Variant, CurveSize As Long)
Dim i As Long
Dim BezierArray() As POINTAPI
Dim Middle As POINTAPI
Dim Difference As Long
Dim offset As Long
dest.ScaleMode = vbPixels
ReDim BezierArray(((UBound(PointArray) – 1) / 2 * 3))
For i = 0 To UBound(PointArray) – 2 Step 2
BezierArray((i \ 2) * 3).X = PointArray(i)
BezierArray((i \ 2) * 3).Y = PointArray(i + 1)
Middle.X = (PointArray(i) + PointArray(i + 2)) / 2
Middle.Y = (PointArray(i + 1) + PointArray(i + 3)) / 2
Difference = PointArray(i + 1) – PointArray(i + 3)
offset = CurveSize * Abs(Difference) / 100
If Difference < 0 Then
BezierArray((i \ 2) * 3 + 1).X = Middle.X
BezierArray((i \ 2) * 3 + 1).Y = Middle.Y – offset
BezierArray((i \ 2) * 3 + 2).X = Middle.X
BezierArray((i \ 2) * 3 + 2).Y = Middle.Y + offset
ElseIf Difference > 0 Then
BezierArray((i \ 2) * 3 + 2).X = Middle.X
BezierArray((i \ 2) * 3 + 2).Y = Middle.Y – offset
BezierArray((i \ 2) * 3 + 1).X = Middle.X
BezierArray((i \ 2) * 3 + 1).Y = Middle.Y + offset
ElseIf Difference = 0 Then
BezierArray((i \ 2) * 3 + 1) = Middle
BezierArray((i \ 2) * 3 + 2) = Middle
End If
Next i
BezierArray((i \ 2) * 3).X = PointArray(i)
BezierArray((i \ 2) * 3).Y = PointArray(i + 1)
Call PolyBezier(dest.hdc, BezierArray(0), UBound(BezierArray) + 1)
End Sub[/code:1fxszqhe]

That’s what it draw:

[img:1fxszqhe]http://page-mindstorms.tripod.com/equalizer.jpg[/img:1fxszqhe]

Hope this will help you.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.