Snap 12 beta music ADT! (Part 1)

Basically, we are making an ADT type (custom type) that represents musical notes as an image of how they would be in sheet music. This was (at least partially) done by jens in the early stages of development, but I can’t seem to find it in a topic.
@redgeographysnap’s progress on the custom melody + note utilities:

@sathvikrias 's progress on the music symbol design integration:

@mctx_studios’s progress on music symbol design:

TO DO:
@redgeographysnap has a separate list of blocks to do: Here

technical
|| Make a ‘costume’ shape type sathvikrias + mctx_studios
|| note implementation + optimization sathvikrias

clefs
|| Prettified Treble @mctx_studios
|| Prettified Bass @mctx_studios
|| Complete implementation

ties
|| Complete implementation

general note things all @mctx_studios except for implementation&ledger lines
|| Better tail designs
|| Recursive tail generation
|| Modifiable stem height
|| Recursive dottings
|| Ledger lines
|| Complete implementation

tuplets all @mctx_studios except for implementation
|| Make design
|| Generate for almost any number (ex. tuplet 3/2, 4/3, 5/4)
|| Complete implementation

other
|| Time signatures @mctx_studios

Yooo! I already have a very basic project done

nice! Could you share the link?
(i’m assuming the topic you created seconds ago has to do with this?)

I just need to polish a few things real quick…

Or First-class melodies by redgeographysnap | Snap! Build Your Own Blocks
Edit: added note naming and parsing

Ok, nice! I think the next step is to create the lines of the staff, likely pretty easy using the text block from here: https://cdn.forum.snap.berkeley.edu/original/3X/7/9/7909e72140a0598afd9c5925bf4197e013c25e29.png
I’m working on it now.

Why is that easier than drawing a line with pen?

we don’t want to mess with the stage, because we are likely going to be overlaying the unicode characters on the lines, writing as you know does not have overdraw support :⋅(

I mean, you can utilize (a new clone of [[Turtle sprite] V]) and [overdraw V] on [ V] :: pen to avoid the stage.

we would need to ‘write’ the music notes as unicode.

I mean, you can draw the lines then write the text, or stamp the text costume on it.

Stamping when you’te currently painting/overdrawing on a sprite does not stamp on the stage, but I did just test it, and it does actually have the same limitations as writing text.

@redgeographysnap
look!!!

is it ok if I assume everything is black/white? (to make stuff faster)?

Yeah but if you were to say “jsonfoo” starts with “json” for example it would error which I really don’t like

fair. does this definition work for you?

I don’t think it should be this complex…

this is the alternative though…


OK, I was wrong. (BTW, why +48)?

Also, I just found out chromeOS doesn’t support the music note unicodes, we should probably use blitting or drawing instead of text

I think:
first part makes C=60
second part is #=+1 b=-1
3rd part is the octave, basically ((-12)*((octave)-(4))) is equivalent to ((-12) *(octave))+(48)
the -4 is because C4 makes no change to the note, whereas C3 is -12 notes
but I can barely understand what happened myself so i’ll leave it as “It just happened to work like that.”

we could have a hidden global variable that holds a costume for each note, kinda like the shapes library