Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Music Block Chords
- Akira_Roido
-
18 posts
Music Block Chords
I am currently making a collection of eight songs from various video-games and anime and a lot of the sheet music I am using for the transposition are for piano, and have a lot of chords. But when I try to do the chords, it failed. I tried making to different music scripts and having the chord block string rest until the chord it needed to come in at, but the problem with this is: if you get even the slightest bit of internet lag, the two music strings would fall out of sync with one another, what I mean is that the chords were no longer coming in when they needed to, even though I had all of the beats correct. Do you guys, gals, or non-binary pals (lololol) know how to make chords in scratch without this happening?
- MiniCoder11
-
100+ posts
Music Block Chords
One solution to your problem would be to sync all of your scripts with “wait until blocks”. Here is a example:
This is an example where each note waits for the beat to be increased to play. Any solution where you use variables to sync the notes should work fine.
This is an example where each note waits for the beat to be increased to play. Any solution where you use variables to sync the notes should work fine.
Last edited by MiniCoder11 (June 21, 2019 04:07:23)
- Akira_Roido
-
18 posts
Music Block Chords
@MiniCoder11 When I do this, the Beat variable doesn't increase how you want it to. Instead of waiting for 1 beat of the tempo, it is waiting for the tempo EX: My tempo is currently 120, so it is waiting 120 seconds.
- GunChleoc
-
500+ posts
Music Block Chords
You'll need to wait for 1/tempo secs then.
For the second part, it might also be more robust to
in case that part of the script is experiencing lag. Try the solution above first though.
For the second part, it might also be more robust to
in case that part of the script is experiencing lag. Try the solution above first though.
- codeman1044
-
1000+ posts
Music Block Chords
I think you'll actually want to divide 60 by the tempo, not 1. You could add operators to change how many beats it waits. For instance, multiplying the result by 2 would wait 2 beats. You'll need to wait for 1/tempo secs then.
If you wanted to make it easier, you could just use the rest block:
Or if you really wanted to use wait blocks, you could make a custom block:
Hope this helps!
- Rocket-Flier
-
100+ posts
Music Block Chords
I recommend using a broadcast loop like this:
This helps keep different parts of the song from drifting apart. Here is an example of how to use it:
- Discussion Forums
- » Help with Scripts
-
» Music Block Chords