Variables to Control Sound

I had this idea that would make Music a lot easier to program in Hopscotch. It would be cool to see variables able to be put into sound blocks (where the note is) by assigning values to each sound

We’d use this for piano recorders or Siri Shortcut json mods :wink:

Same as point 1?

Example design by JSON Free Edit:

Other programming languages? They don’t really use sound like that…


Another idea very closely related to this:
Make specialized variables? Instead of one set variable block in the editor, you can use set “to number”, set “to string”, “to color”, “to sound”.

Format: Set (variable) to string (<text field>)

14 Likes

Yes! Definitely!

5 Likes

Yes! Amazing idea.

1 Like

A long time ago, back when the editor layout was still Hopscotch 2.0, you could actually copy the sound and paste it into a text block to see what the sound was called. For example, “bubbles”, “roar”, or “sharp C”.

1 Like

That’s not what I mean. Each sound should have a number value so I think can be controlled with a variable

3 Likes

I know, but it could help when using a variable to set the sound. The problem is that in Hopscotch, variables can only support numbers, unlike in Scratch, where they can support all characters.

1 Like

Yeah, hence my secondary idea, then you could slide without number values. But numbr values are better, because you can randomly select a sound, etc.

2 Likes

Yes. However, variable strings would still be amazing.

2 Likes

(I like the secondary idea a lot too)

2 Likes

So basically data types in Hopscotch? I like this idea, but it could be confusing for beginners. It would help to keep projects organized, though, as well as adding some nice functionality :wink:

4 Likes

Yeah, under “set variable”. Set variable to string, etc. etc. all as separate blocks

3 Likes

I’d love to see this still.

Maybe do something similar like you did with colors @awesomeonion?

1 Like

Type casting would be super nice

Int
Double
String
Bool
Array<Type>
[String:String]

Sound


Those Sound variables look super cool

2 Likes

3D senses eh?

2 Likes

Those sound variables taste really nice

2 Likes

-1 has granted young Jeffery 14D senses, silly mortal.

4 Likes

3 as in more than 2, silly.

Wow that’s a great new pfp! Where’d you get that?

4 Likes

You can find out how on -1.com

1 Like