Mark Read Well-Known Member Licensed User Longtime User Jun 10, 2014 #1 I am using a modified version of the demo from steveIO5 to show the waveform of a playing mp3. I cannot get the canvas to clear, the waveform is always drawn on top of the old one. What am I doing wrong. Included is the full code without the mp3 file (added in line 37). The code is for B4A 3.80 and using Media Player I think it is probably something simple but its driving me crazy! Thanks for any help Attachments visualizer.zip visualizer.zip 8.5 KB · Views: 423
I am using a modified version of the demo from steveIO5 to show the waveform of a playing mp3. I cannot get the canvas to clear, the waveform is always drawn on top of the old one. What am I doing wrong. Included is the full code without the mp3 file (added in line 37). The code is for B4A 3.80 and using Media Player I think it is probably something simple but its driving me crazy! Thanks for any help
Mark Read Well-Known Member Licensed User Longtime User Jun 11, 2014 #21 ok. How to destroy it. Just to see, I moved the "Viz.DrawWaveFormStart" into the Wave_Capture sub. No go! The wave does not scroll and the mp3 breaks apart! Upvote 0
ok. How to destroy it. Just to see, I moved the "Viz.DrawWaveFormStart" into the Wave_Capture sub. No go! The wave does not scroll and the mp3 breaks apart!
Mark Read Well-Known Member Licensed User Longtime User Jun 11, 2014 #22 That was not a good idea. Had to hard reset my tablet! oops. Upvote 0
stevel05 Expert Licensed User Longtime User Jun 11, 2014 #23 No, because the when thread that the wav draw routine runs it will be continually initialized. Last edited: Jun 11, 2014 Upvote 0
stevel05 Expert Licensed User Longtime User Jun 11, 2014 #24 The two need to run totally separately. Upvote 0
Mark Read Well-Known Member Licensed User Longtime User Jun 11, 2014 #25 Where can I put the Viz.DrawWaveFormStart so that the wave starts without a button or is that not possible? Upvote 0
Where can I put the Viz.DrawWaveFormStart so that the wave starts without a button or is that not possible?
stevel05 Expert Licensed User Longtime User Jun 11, 2014 #26 You can put it straight after the MP.Play call in Activity_Create Upvote 0
stevel05 Expert Licensed User Longtime User Jun 11, 2014 #27 I have to go out shortly, if you get any problems, post a message and I'll look at it when I get back, or in the morning. Upvote 0
I have to go out shortly, if you get any problems, post a message and I'll look at it when I get back, or in the morning.
Mark Read Well-Known Member Licensed User Longtime User Jun 11, 2014 #28 Great, this is going to take some time to digest. Great work! I will try to include the WaveDraw class into my app AND get the gradient to work. If I get it to work, I will post it here to finish this thread. Cheers. Upvote 0
Great, this is going to take some time to digest. Great work! I will try to include the WaveDraw class into my app AND get the gradient to work. If I get it to work, I will post it here to finish this thread. Cheers.
Mark Read Well-Known Member Licensed User Longtime User Jun 11, 2014 #29 Steve, its working! (Jumping for joy). The touch to end the app gives an error but the gradient works thanks to you. Now I just need a few more panels with different displays, FFT etc. Attachments visualizer.zip visualizer.zip 10.7 KB · Views: 325 Upvote 0
Steve, its working! (Jumping for joy). The touch to end the app gives an error but the gradient works thanks to you. Now I just need a few more panels with different displays, FFT etc.
stevel05 Expert Licensed User Longtime User Jun 11, 2014 #30 Yes, Fft I've not looked at that. Hopefully someone will give us some direction there. Otherwise it's back to school I think. Upvote 0
Yes, Fft I've not looked at that. Hopefully someone will give us some direction there. Otherwise it's back to school I think.