Snap 12 beta music ADT! (Part 2)

Continuing the discussion from Snap 12 beta music ADT! (Part 1) - #257 by mrace0.

Previous discussions:

putting links & todo list here, because i dont think anybody wants to have to go back to part 1

@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

thanks! could you make your post a wiki though so I can add things?

; )

I saw it already, but still thinking :upside_down_face:

Sorry for the repost then, I didn’t think you saw it/ was able to reply to it due to the limit from the topic ;D

it was justified, don’t worry.

Cinco de Mayo? Could be a nice Mexican themed hat

sure, why not?
I hadn’t thought of that! I have added it to my project for the time being + added the $notes symbol:
First-class Music script pic (7)

I’m not sure how it would look, after all Cinco de mayo is a bit american

Yooo! It works + no global variables!

nice!
what is this???
First-class melodies script pic (6)

I have done every data structure (Which matters to the song, I haven’t done visual-only classes yet), except for the instrument. I can’t find the mathematical formulas for sawtooth/triangle

Sine: \sin x
Square: \text{sgn } (\sin x)

That’s a ‘maxima’, a note lasting 8 bars ;)

wow. never ever seen that!
I’m wondering, why not use the primitive First-class melodies script pic (7) for tempo?

where can I find this in the project?

In this implementation, tempos are first-class data (actually numbers) which vary by melody.

it is not added. I need to find the formula for sawtooth and triangle.

I will make this when I’m done the music
part of the library

POSSIBLE SUCCESS WITH sawtooth


(replace the 0.5 in the * block with a lower number to lower the volume)

possible success w triangle: (one of the play sounds is very messed up, idk which one)

I managed to create this, although it’s just for fun mostly:

once the library is relatively finished, i’m assuming there will be one main example project, no? if so, i’d like to make an example melody, probably either something from one of my own songs, or linkin park.

i worked with audio synthesis/generation ~3 months back when i made a program here that could generate EAS tones to teach myself about how audio samples actually worked! which i won’t be sharing because of some legal things relating to imitations and public deception, since someone could use it for nefarious purposes! (look up FCC 47 CFR § 11.45 if you’re curious)

if you’re ok, I would prefer this?

of course! gives me an excuse to show it off anyways :)