Is it possible to put a small button on a larger one? In one of my projects, I am creating something like a piano keyboard. The white keys are in line and the black keys are half the width of the white ones and the black keys are in the foreground.
But if I click on a white key, the neighbouring black key is not yet in the foreground.
How to solve this problem?
Yes, the signs seem like a good idea.
How do you plan to manage keys?
My first idea would be to put all the keyboard keys in a panel then use GetAllViewRecursive to find out which key is pressed.
But the problem you will encounter is pressing multiple keys at the same time.
This is the reason why I created objects and linked sounds to these objects.
In this case, you can press several keys at the same time.
I wish you good luck.
No not at all.
I did it to pass the time. I don't publish any apps.
The code is free.
Anyone can use it to make a complete app.
I also made 2 drum machines if you're interested, I'll post the code
Well, I didn't try your code but just judging by the looks, the piano could very well be published. I imagine there are crazy amount of piano apps, but perhaps a basic one for $1 with no ads would be interesting for the market. Just saying...
Personally, I do the code when I don't know how it works.
Once I understood how it worked, it was a lot less fun for me.
This is why my apps are almost never finished.
I code just to pass my time.
Excellent work.
In fact, I stopped DrumAndPiano development because I don't know how to generate live sound and if it's only used clips in lists, it's less interesting
Zed,
Although the thread went a long way from my first question, I read all the answers with interrest.
In the meantime I discovered a new problem:
If I use the Mediaplayer to give a sound, after touching a key (panel) and that works fine, but after 50 - 70 tones, the mediaplayer stops and no sound is heard anymore. Is it a question of memory? (BTW: anytime the mediaplayer is used, I intialize it.)
It is best to use SoundPool. This allows multiple short sounds to be loaded and then played back those files with low latency.
MediaPlayer would be used to play the final recording. Otherwise, you have to have as many MediaPlayers as sound and the latency will be much higher.
If you have a 38-key keyboard, it's going to be a bit complicated.
On the other hand, you will only have one soundpool.