0
0

I’ve been trying to get the scope to work but it wont!
I followed Paranoid Android’s example but all I get is a
goofy looking scope. I tried to do every thing the same,
but all I get is a wave form that looks blocky and stupid. 😡

If you can help I would be greatful!

  • You must to post comments
0
0

Yeah FPU should work on all computers. Most of the time when I use FMOD with an oscilliscope or spectrum or whatever I use a buffersize of 200ms, which works good. When I change it to FPU it works, good job.

  • You must to post comments
0
0

Interesting, I thought I was the only one who knew that song existed.

  • You must to post comments
0
0

[quote:2u0k7lai] Anonymous wrote:
do you play guitar?

yes [/quote:2u0k7lai]

Do you know much about scales? Either way, would you like to take a look at a paper i’m working on… i found a cool pattern behind it and i wanna see if people know of it

  • You must to post comments
0
0

Post your code and I’ll see if I can help you.

  • You must to post comments
0
0

[quote="Anonymous":iwvyapbi]Interesting, I thought I was the only one who knew that song existed.[/quote:iwvyapbi]

No no, i also like Radiohead a lot and continue to listen to their songs 😀

  • You must to post comments
0
0

I’m still learning to play the guitar, but yeah I can play scales. I’ve only been playing for a couple years. What pattern? There are a few patterns I know of, A, G, E, D, and C, which are all scale forms made from those chords, then you have the major and minor pentatonic 5 note scale, and the major and minor 7 note scales.

  • You must to post comments
0
0

Ok, Here it is:

Public Sub SpectrumEnable(blnValue As Boolean)
‘Spectrum

'Set up the Scope
ReDim sngScopeData(0 To FSOUND_DSP_GetBufferLength) As Single
lngScopeUnit = FSOUND_DSP_Create(AddressOf ScopeCallback, FSOUND_DSP_DEFAULTPRIORITY_USER + 3, 0)
FSOUND_DSP_SetActive FSOUND_DSP_GetFFTUnit, blnValue
FSOUND_DSP_SetActive lngScopeUnit, blnValue

blnSpectrumOn = blnValue
'Reset the display
SpectrumClear

End Sub

‘The scope callback:

Public Function ScopeCallback(ByVal originalbuffer As Long, ByVal newbuffer As Long, ByVal length As Long, ByVal param As Long) As Long

lngScopeBuffer = newbuffer
ScopeCallback = newbuffer

End Function

Public Function GetScopeFPU(ByRef Scope() As Single)
On Error Resume Next
Dim nrOfVals As Long

If UBound(Scope) > 1023 Then nrOfVals = 1024 Else nrOfVals = UBound(Scope) + 1
CopyMemory Scope(0), ByVal lngScopeBuffer, nrOfVals * 4

End Function

    Dim point As PointAPI

    SpectrumClear True

    MoveToEx picSpec.hdc, 0, (picSpec.Height / 2), point

    picSpec.ForeColor = vbRed
    Call GetScopeFPU(sngScopeData)
    For intX = 0 To FSOUND_DSP_GetBufferLength / 16

        LineTo picSpec.hdc, intX * (picSpec.ScaleWidth / (FSOUND_DSP_GetBufferLength / 16)), (picSpec.ScaleHeight / 2) + (sngScopeData(intX * 16) * (picSpec.ScaleHeight / 100000))
    Next intX

    picSpec.Refresh
  • You must to post comments
0
0

Right on

  • You must to post comments
0
0

Yeah, i did a little research and found out some things…

go to

http://www1.coe.neu.edu/~nrhoades/scalemethod.pdf

tell me if it helps

-Nate

  • You must to post comments
0
0

Maybe the scalemode of your picturebox isn’t set right, it has to be set to pixels not twips.

  • You must to post comments
0
0

[quote="Anonymous":fipdbpbp]Interesting, I thought I was the only one who knew that song existed.[/quote:fipdbpbp]

Which one are you talking about?

  • You must to post comments
0
0

Hmm. I have the same problems. :(
Setting the mixer to an FPU based mixer->Everything runs fine and I can see my scope, but when I change it to an MMX based mixer it doesn’t look well at all :(

I have tried to add some handling in the scope callback so that if an MMX mixer is used, I put the scope data into an interger buffer instead of a single buffer, but that doesn’t works neither.

Any tips somone?

(I’m using Delphi btw.)

Thanks in advance,
Mikael S

  • You must to post comments
0
0

That was one of the first things I checked. I made sure it
was set to pixel. but it doesn’t work.

  • You must to post comments
0
0

do you play guitar?

  • You must to post comments
0
0

I’ve solved it :)

The problem was caused by me since I assumed that the MMX buffer was as wide as the FPU buffer, which wasn’t the case (4 vs. 2 bytes).

  • You must to post comments
0
0

off topic but a quick question, for speed what do you think is best, using a callback for spec displays for a standard constant loop a decent ‘do events’ replacement ????

just wondering?

  • You must to post comments
0
0

I’m not sure why it would crash on you. I noticed that when
I added the DSP callback for scope my player became very
unstable. If I were to paste a large picture in paint the sound
would skip and the program would crash. It would also just randomly
crash during a song. But I am able to run it and have it work, but the
scope doesn’t work. maybe I’m overlooking a small detail somewhere.

You have to initialize and terminate like normal. but that is basically all.
I can send you a pre-made test program for the ocx control.

  • You must to post comments
0
0

NCI:
Well, I dont really see anything wrong with the code, try messing around with the numbers in LineTo, I had to mess around with it a bit before it looked good. Try changing the 16 to 8 or 24 or whatever makes it look more smooth.

JimBob:
If you are dealing with a RECT than you can use the InvalidateRect API, which can work the same as DoEvents, but when using InvalideRect dont use AutRedraw on your pricturebox. I’m pretty sure that will work.

  • You must to post comments
0
0

[quote="Anonymous":2h44zlho]do you play guitar?[/quote:2h44zlho]

yes

  • You must to post comments
0
0

Paranoid_Android, can I send you my full source code for my fmod
activeX control by email so you can look at it? (only 23k)

If you can fix it that would be great.
I have been trying and I cannot get anything but crap.

Thanks

  • You must to post comments
Showing 1 - 20 of 26 results
Your Answer

Please first to submit.