• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Multi touch for piano

issam

Member
Hello,
I make a simple piano by game maker 1.4, I use about 24 keys as a keybourd each object work by left press as event to play the sound, How can I make 3 buttons at least to play at the same time please?

Edit:
I use the following code in each object but not working:

for(device=0;device<=4;device+=1){
if (device_mouse_check_button_pressed(device,mb_left)) && position_meeting(mouse_x,mouse_y,self)
{
audio_play_sound(name, 10, false);
}
 
Last edited:

issam

Member
Hello Ali,
Nice to see you here :) and thanks for the replay, Honestly what I am looking for is only to play more than sound at the same time, So I think its about multi touch, Can you please check the app in the link below and give me the way to do it?
 
Last edited:
Yes I was understood you , In sound sure No problem to play multi sounds in same time , but you need the multi pressing in same time
you can try it
Code:
button1 = virtual_key_add(32, 32, 64, 64, ord("A"));
button2 = virtual_key_add(32, 32, 64, 64, ord("B"));
button3 = virtual_key_add(32, 32, 64, 64, ord("C"));
you need to change postitions and width & height for each button
and update keys in step event for same example
Code:
button1=keyboard_check(ord('A'))
button1=keyboard_check(ord('B'))
button3=keyboard_check(ord('B'))
and to play sound you can check
Code:
if button1
{
audio_play_sound(sound0,0,0);
}
that all
cheers
 
Top