as you may know, more notes were recently added to the hopscotch keyboard (as well as instruments). this opens up many possibilities for new methods, but doing KeepSync chords (notes that are played at the same time, as shown by awesome e) are still somewhat hard. because of this, making a completely new music method is tough, but I’ve improved an old one I know. this is a tutorial on it
all you need is hopscotch, a keyboard, and (optional) the advanced editor
now, let’s get the tedious part out of the way
the top is if you can/want to use the advanced editor, the bottom is if you don’t want to/don’t have the advanced editor.
for now, ignore the variable “ActualMusicString” as that is just the note chunk being read.
the matches block checks if a note “trigger” is included in the note chunk. if the trigger is, then the sound is played. if the trigger isn’t, then the sound is not played. the “2” represents the octave the note is, the “c_” is what note on the octave the read note is.
the 0 means that the note is a natural (not a black key on a piano)
if you were to type a # (sharp symbol, it’s a hashtag/pound sign) in place of it, then the note would be a flat
if you were to type a b (flat symbol, it’s a lowercase B) in place of it, then the note would be a sharp
now, you would do this for every note on the sound range
but nobody I am too lazy to do that!
I have a template for people with the advanced editor and am working on setting one up for those without the advanced editor
keep reading though, else you won’t know how to make the music from a string
this is the code for the interpreter:
image 1 set ends
image 2 set ends
you may be very confused about what’s going on up there, so I will break it down. of course most people will skip past this but for the few who actually want to know how it works, here:
repeat times Length(MusicString/10)
all this does is repeat the process the minimum times necessary to read the whole string
set var (self)ActualMusicString [first yellow block]
basically, this gets the first “chunk” or note (note length and what note is played)
something that this might get set to is:
if you read the getting started section, you’d know that the note being played would be a low natural c
I used the asterisk (*) as a times symbol, which makes for better readability when transitioning into the next part. the next part is how many beats the note is played for.
note: this HAS to be 5 characters, doing just 1 breaks the system. you MUST do 1.000
the semicolon is to break up the string (again, for readability) and there is also a new line for every chunk, so 2 notes would look like:
set self NoteLength
this gets the amount of beats the note should be played for. as explained above 1.000 would be 1 beat, 2.000 would be 2 beats, and so on
all the check ifs
this is what registers the keepsync chords. I made it so it registers up to 4 synchronous notes, but by looking at how I incremented them you can do more
this checks is there is a number where there should be a semicolon (if there is only 1 note being played). if there is in fact a number instead of a semicolon then it increases the length of the note chunk. it keeps checking for this until there is 4 notes playing at the same time, when it stops
this cuts off the note chunk from the original music string so that it is not constantly reading the same note.
set self(ActualMusicString) to 0
this resets the variable so it is ready to read next time & so the note does not constantly repeat while the next block is running
this takes the tempo and multiplies it by the NoteLength variable which I explained earlier
non advanced editor people: instead of using the tempo variable, make a variable on your own and set it to the bpm of your song
Creating the music
you will make the music using a self variable called “MusicString” (at least I did for the tutorial)
once you’re familiar with the note structure, all you have to do is type away and create your masterpiece! if you’re looking for sheet music, try googling. I like to use the website musescore as it is completely free, but there are other sources
if you were just here for the template it’s located right here
non-advanced editor one coming soon
- I read the whole thing
- I didn’t
- The tutorial was very clear
- I am confused because of the lack of clarity, can you help?
any feedback? I probably messed up somewhere lol
of course, there is a way to improve this i bet but I figured this may be helpful