Variables to Control Sound

sounds
variables
ae_was_here
#1

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

Yes! Definitely!

5 Likes
#3

Yes! Amazing idea.

1 Like
#4

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

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

2 Likes
#6

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

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.

1 Like
#8

Yes. However, variable strings would still be amazing.

2 Likes
#9

(I like the secondary idea a lot too)

1 Like
#10

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

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

2 Likes