Android Question Polyphony

Levit

Member
Licensed User
Longtime User
Hi all,
I am a new member, new in android and basic4android, and this is my first post. As a start point i decide to make a piano to learn. My problem is I can not play 2 or more samples notes at same time, and a piano needs at least 3 simultaneous notes.
I read some documents (maybe no the right one) and need help to get polyphony in my app.
Any help will be apreciated.
Thank you
 

stevel05

Expert
Licensed User
Longtime User
What are you using to play the sound? Although that is not likely to be the cause. Each device will have a limit to the number of concurrent touches the screen will register. Some have one or two, some have 8 or more.
 
Upvote 0

Levit

Member
Licensed User
Longtime User
thanks stevel05. I am using 'mediaplayer' to play the sound and when i play another sound the first stop before the second starts. Right now an idea occurs...Can i initialize
mediaplayer more than once in the same activity? Guess that would solve the problem
thank you
 
Upvote 0

Levit

Member
Licensed User
Longtime User
Thanks a lot stevel05 . 'soundpool' solves my problem nicely. Btw is there another way to polyphony? (just curious)
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…