Hi there,
thanks for the replies.
I had tried it with more than one player-objects already, but it didn't do the trick.
Here is more of what I want it to be like: I want to include a start/stop-button to get a loop going. This loop should run within its own thread so I would be able to set a stopFlag from the stop-buttons click-method and actually stop the replay.
Sub Globals
'Declare the global variables here.
stopFlag = False
counter = 0
End Sub
Sub App_Start
Form1.Show
player1.New1
player2.New1
End Sub
Sub Button1_Click
stopFlag = True
End Sub
Sub Button2_Click
stopFlag = False
play
End Sub
Sub play
Do Until (stopFlag = True OR counter >= 4 )
player1.Play(AppPath & "\dSharp.ogg")
Sleep(1500)
player2.Play(AppPath & "\c1.ogg")
Sleep(3000)
counter = counter + 1
Loop
End Sub
So far only the counter value will stop the loop (which is what I would the code expect to do, too). I just found a hint on a thread-dll from agraham in the handbook, so I will take the time to test that. Maybe putting each player object in its own thread will do the trick. I'll be back on this, as soon as I get my first results - which might take a couple days, as programming that software is supposed to support me in playing my music, not to replace it.
The code above would do the trick in order to play a scale or an interval. Strange thing is, that it does not work without the last "sleep(3000)" statement (resulting in only the first note played, the second one skipped). The last note is supposed to sound a little longer (like when the fat lady practices scales), so the sleep-value is higher.
As I mentioned before, I developed the code from within another IDE but the other IDE doesn't compile the classes and methods correctly when it comes to the mobile device (I know, there is always a workaround, but I want to have an object-oriented model). I have a rough draft of a windows version from within the other IDE up and running. Though the principles behind the desktop-version (especially the sound-output) do work on the mobile draft, too.
The ogg-files were created before hand, using a midi-sequencer-software and a converter. The idea behind using the ogg-files was that I get a decent sound result on any device and the ogg-files turned out to be smaller than mp3-files. So I preferred it in order to be able to deploy the software in a tiny (wow, my first hard-disk had 52 MB and that was a lot!) package. Using the range of 3 octaves I get 37 ogg-files with a size of 23 k in average. I did not get into the ogg-format, it simply worked from within the other IDE.
Even though I would appreciate to have an FFT.dll, I don't think that it would suit my purposes, as I need a special wave-form. From what I read, mod-files would be 1st choice, as it seems to be possible to store the wave-form and the played notes seperately. But then again, I didn't dig into that to deep...
Littlun