A String Music Method Tutorial

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


Getting started

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.

Explanation

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
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

The interpreter

this is the code for the interpreter:


image 1 set ends

image 2 set ends

Explanation

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:
2C0*1.000;

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:

2C0*1.000;
3C0*1.000;

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

set self(MusicString)
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

wait block
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
https://c.gethopscotch.com/p/11fi9615ms

non-advanced editor one coming soon

  • I read the whole thing
  • I didn’t

0 voters

  • The tutorial was very clear
  • I am confused because of the lack of clarity, can you help?

0 voters

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

@/The_Somebodies, @/omtl

29 Likes

Say yes to second

2 Likes

I love how the day it comes out, you’ve already have a method with the new blocks

7 Likes

actually I’ve had this method for a while but was too lazy to make a tutorial lol

6 Likes

You came up with all this really fast. :0

Oh lol.

I’m genuinely impressed. When I get the sub, I’m gonna play with the music a bit and try this out. Do you know if it’s less laggy than other methods?

5 Likes

yeah lol

I’m not exactly sure what you mean by lag—it can play multiple notes at the same time and doesn’t take up much (hardly any) filesize
usually music doesn’t affect FPS largely though

4 Likes

I’m the only person who read the whole thing

1 Like

Maybe lag isn’t the right word, but when it’s playing multiple notes, can they become de-synced? Like they might end up playing a bit later?

3 Likes

I don’t think it should do that as variables and check ifs take 0 frames to execute
maybe if the FPS is very low though

5 Likes

Wow this taught me a lot about music thanks !

2 Likes

Don’t you just Love the new music update !

2 Likes

Awesome tutorial, super helpful:)) I’ll definitely play around with it a bit

3 Likes

I am so confused and didn’t understand a thing cuz I skipped over half the text. I am not a patient man.

2 Likes

Cool! You’re quick!

2 Likes

Woah :exploding head emoji:

Nobody is the smartest person ever

Hahahahhha get it LOL?

4 Likes

Hashtag/pound sign=sharp
lowercase b=flat
And not the other way around, as you stated above.


Anyway, nice tutorial! I’ll definitely try to use it

4 Likes

Woah - this is very cool, well-documented, and useful! Superb!

3 Likes

I always mess those up lol, whoops—thanks for catching that

@pumpkingirl can you replace the orange things with the blue thing?

4 Likes

Even though I’m not subbed, how do you get to play the different instruments like 8bit and Guitar j

1 Like

I think that’s just for subbed people right now

thanks pumpkin!

2 Likes