Android Question Music notes Play

Ydm

Active Member
Licensed User
Longtime User
I'm trying to play the musical notes. I use soundpool and timer. However, sometimes distorted because the period of time. Phone ram and it's elongation and contraction depending on the processor state. Is there another method would you recommend? I can give a priority to the CPU and RAM to their application? Is there a way to do that?
 

Ydm

Active Member
Licensed User
Longtime User
Yes. Time is not working fine. notes at the same time sometimes long, sometimes short plays.
 
Upvote 0

Ydm

Active Member
Licensed User
Longtime User
I can play MusicXML files. I get all the data from the MySQL database.
The problem is:
For example, there are 10 notes.
Each time 1 second.
I sometimes use the timer each time going 1 second. Sometimes they go shortening occurs.
B4X:
Sub tmrPlay1_Tick
    Dim mp As Map
    mp.Initialize
    mp=lstTmr1.Get(nIndex1)
   
    pGitar = SP.Play(sGitar, 1, 1, 1, 1,mp.Get("notarate"))
   
    nIndex1=nIndex1+1
    mp=lstTmr1.Get(nIndex1)
    tmrPlay1.Initialize("tmrPlay1",mp.Get("notaduration"))
    tmrPlay1.Enabled=True
End Sub

I define the duration of the timer in the next note Ticker.
 
Upvote 0

Ydm

Active Member
Licensed User
Longtime User
Thanks...
1-
B4X:
 tmrPlay1.Initialize("tmrPlay1",mp.Get("notaduration"))
tmrPlay1.Enabled=True
Timer, I start with the code above. How should I start?

2-I identify and try again in Globals.

Somewhere from the thread mentioned. Do I need to use something like this?
 
Upvote 0

Ydm

Active Member
Licensed User
Longtime User
I tried that. Play again not true. Probably not the right idea timer.
Is there an example you know about this application?
 
Upvote 0

Ydm

Active Member
Licensed User
Longtime User
OK. One last question.
Is that what the length of a sound with Soundpool not possible to determine whether or stolen?

B4X:
p = SP.Play(s, 1, 1,1, 1,1)
p = SP.Play(s, 1, 1,1, 1,0.5)
p = SP.Play(s, 1, 1,1, 1,1)
p = SP.Play(s, 1, 1,1, 1,0.4)
You mean, I have no chance to set the tone for a song I sort of ringing in this way?
 
Upvote 0

Ydm

Active Member
Licensed User
Longtime User
A-B-C-D-E-F-G music notes.
I am using Playback rate properties of soundpool. This way I can find all the notes in one voice.
p = SP.Play(s, 1, 1,1, 1,0.5) ----- 0.5 note voice.
p = SP.Play(s, 1, 1,1, 1,0.4)------ 0.4 note voice.

Also note that the length of the (duration) required.

For example 1.notes last 1 second.
The second half-second notes.
Third note ........ 1.5 seconds
If few notes of a song ....

That's my only problem now.
That note lengths. (DURATIONs)

Let's say there are 200 notes, each at different times.

I want to play them repeatedly.

(I explain difficult because of Google translate. Sorry...)
 
Upvote 0
Top