Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I am trying to make a piano where it plays the note until you let go of the key
- Mandslo_bird
-
3 posts
I am trying to make a piano where it plays the note until you let go of the key
The “Music” code pack has “play note _ for _ beats” and there is nothing that allows it to play the note until I release the key I am pressing, I have tried many things and can not figure anything out.
The blocks in the “music” pack are very limited and I have no idea if it is even possible to play a note ONLY when the key is held down and ONLY while it is being held down.
The blocks in the “music” pack are very limited and I have no idea if it is even possible to play a note ONLY when the key is held down and ONLY while it is being held down.
Last edited by Mandslo_bird (Dec. 5, 2024 20:42:46)
- Mandslo_bird
-
3 posts
I am trying to make a piano where it plays the note until you let go of the key

Last edited by Mandslo_bird (Dec. 5, 2024 20:41:57)
- Paddle2See
-
1000+ posts
I am trying to make a piano where it plays the note until you let go of the key
I think I was sort of able to get that to work by playing the note for a very long time - and then using the “Stop all Sounds” block triggered by the key being released. Of course - you can't use that technique for a polyphonic piano.
- Mandslo_bird
-
3 posts
I am trying to make a piano where it plays the note until you let go of the key
Could you show an example? I am doing this for a school assignment and don't have as much experience with scratch as I would like lol I think I was sort of able to get that to work by playing the note for a very long time - and then using the “Stop all Sounds” block triggered by the key being released. Of course - you can't use that technique for a polyphonic piano.
Last edited by Mandslo_bird (Dec. 6, 2024 03:42:59)
- BlazedYoutube
-
3 posts
I am trying to make a piano where it plays the note until you let go of the key
Simply add
- nembence
-
100+ posts
I am trying to make a piano where it plays the note until you let go of the key
This actually doesn't work: I think I was sort of able to get that to work by playing the note for a very long time - and then using the “Stop all Sounds” block triggered by the key being released. Of course - you can't use that technique for a polyphonic piano.
To be able to stop the sound make it using a sounds block:
- Gladius247
-
99 posts
I am trying to make a piano where it plays the note until you let go of the key
Maybe try The “Music” code pack has “play note _ for _ beats” and there is nothing that allows it to play the note until I release the key I am pressing, I have tried many things and can not figure anything out.
The blocks in the “music” pack are very limited and I have no idea if it is even possible to play a note ONLY when the key is held down and ONLY while it is being held down.
?
Or if you meant a sprite being clicked,
- Discussion Forums
- » Help with Scripts
-
» I am trying to make a piano where it plays the note until you let go of the key