n-armstrong / fosc

A SuperCollider API for generating musical notation in LilyPond.
GNU General Public License v3.0
43 stars 9 forks source link

How to attach key signature changes? #5

Closed madskjeldgaard closed 1 year ago

madskjeldgaard commented 1 year ago

Hi!

Thanks so much for making this package. It is really incredibly nicely made!

One thing I haven't figured out yet is how to attach a Key Signature in a voice, like this abjad thing: https://abjad.github.io/api/abjad/indicators.html#abjad.indicators.KeySignature

I would expect something that works sort of like meters, but I can't find any info on any Key Signature stuff in the package.

// Set new time signature
voice[0].attach(FoscTimeSignature(FoscMeter(meter)));

Thanks and keep up the amazing work

n-armstrong commented 1 year ago

Hi,

Thanks for the comments about Fosc!

I was surprised to see that I've never added a KeySignature class, but it was an easy one to make and it's now included in the repository. The usage is as you'd expect:

a = FoscVoice([FoscNote(64, 1/4)]); a[0].attach(FoscKeySignature("e", "major")); a.show;

cheers Newton

madskjeldgaard commented 1 year ago

Wow, that was fast! Thanks, this works perfectly.