Skip to content

Instantly share code, notes, and snippets.

@vikingosegundo
Created May 14, 2021 01:10
Show Gist options
  • Save vikingosegundo/b83ddc1a37a97bfc66b666d7198f452a to your computer and use it in GitHub Desktop.
Save vikingosegundo/b83ddc1a37a97bfc66b666d7198f452a to your computer and use it in GitHub Desktop.
prefix operator ♪; prefix func ♪(n: (Note.Pitch, Note.Duration) ) -> Note { .note(n.0, n.1) }
prefix operator ▿; prefix func ▿(x: (Note.Duration, (Note.Pitch,Note.Pitch,Note.Pitch))) -> Note { .triplet(x.1, x.0) }
prefix operator ▬; prefix func ▬(d: Note.Duration ) -> Note { .rest(d) }
prefix operator ♯; prefix func ♯(note: Note.Pitch ) -> Note.Pitch { .sharp(note) }
prefix operator ♭; prefix func ♭(note: Note.Pitch ) -> Note.Pitch { .flat (note) }
prefix operator ⩀; prefix func ⩀(note: Note ) -> Note { .hold (note) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment