A class or method to convert integer and float to scientific pitch notation?

What do you think about the following hierarchy and structure of notes and rests?
I think it would be better to remove SPN and PitchClass from the notation scheme I am proposing…

Notation: a subclass of the class Object, and an abstract parent class for ‘Notation Library’.
Attribute: an abstract parent class for its subclasses
╎ ├ Staff
╎ ├ Clef
╎ ├ Tempo
╎ ├ TimeSignature
╎ └ KeySignature
Entry: an abstract parent class for its subclasses
╎ ├ Intensity: a class that creates an instance of an Intensity class
╎ ├ I: the abbreviation of Intensity
╎ ├ Hairpin: a class that creates an instance of a hairpin
╎ ├ H: the abbreviation of Hairpin
╎ ├ Rest: a class that creates an instance of a rest
╎ ├ R: the abbreviation of Rest
╎ ├ Note: an abstract class for each pitch class name and the attachment to the note instance:
╎ ╎├ A: a class that creates an instance of note utilising the pitch class a
╎ ╎├ B: a class that creates an instance of note utilising the pitch class b
╎ ╎├ C: a class that creates an instance of note utilising the pitch class c
╎ ╎├ D: a class that creates an instance of note utilising the pitch class d
╎ ╎├ E: a class that creates an instance of note utilising the pitch class e
╎ ╎├ F: a class that creates an instance of note utilising the pitch class f
╎ ╎├ G: a class that creates an instance of note utilising the pitch class g
╎ ╎├ Articulation: a class that creates an instance of articulation for an instance of note
╎ ╎├ U: the abbreviation of Articulation
╎ ╎├ Tie: a class that creates an instance of tie for an instance of note
╎ ╎├ T: the abbreviation of Tie
╎ ╎├ Slur: a class that creates an instance of slur for an instance of note
╎ ╎└ S: the abbreviation of Slur
etc.

An instance of Rest can be created as follows:

  • R.4: rest 1/4 ← It is currently not possible in sclang.
  • R.c: rest 1/4 (crochet rest)
  • R.q: rest 1/4 (quarter rest)
  • R.4d: rest dotted 1/4 ← It is currently not possible in sclang.
  • R.cd: rest dotted 1/4 (dotted crochet rest)
  • R.qd: rest dotted 1/4 (dotted quarter rest)
  • R.8: rest 1/8 ← It is currently not possible in sclang.
  • R.v: rest 1/8 (quaver rest)
  • R.e: rest 1/8 (eighth rest)
  • R.8d: rest dotted 1/8 ← It is currently not possible in sclang.
  • R.vd: rest dotted 1/8 (dotted crochet rest)
  • R.ed: rest dotted 1/8 (dotted quarter rest)
  • etc.

An instance of Note can be created as follows:
(All methods starting with integer are currently not possible in sclang.)

  • A.n.4.4: a quarter note of the A natural in octave 4. MIDI pitch number 69.

  • g.x.4.c: a quarter note of the G double sharps in octave 4. MIDI pitch number 69.

  • B.ff.4.q: a quarter note of the B double flats in octave 4. MIDI pitch number 69.

  • A.qs.4.4d: a dotted quarter note of a quarter-tone higher than A in octave 4. MIDI pitch number 69.5.

  • B.tqf.4.cd: a dotted quarter note of three quarter-tone lower than B in octave 4. MIDI pitch number 69.5.

  • A.s.4.4dd: a double-dotted quarter note of the A sharp in octave 4. MIDI pitch number 70.

  • B.f.4.cdd: a double-dotted quarter note of the B flat in octave 4. MIDI pitch number 70.

  • C.ff.5.qdd: a double-dotted quarter note of the C double flat in octave 5. MIDI pitch number 70.

  • etc.

This will change the notation of a musical notation in my another post: Musical Notation in SC using musicXML - #17 by prko

  • an entry with full options in my initial idea:
[68, \e, \s2, \S, \r, \u] // midinote: 68, duration: 1/8, dynamic marking: strong2 i.e. ff, articulation: staccatissimo, tie: laissez vibrer, slur: start
  • the same entry changed version:
[A.f.4.e, Intensity.ff, Articulation.x, Tie.r, Slur.s] // A pitch and duration are combined to form a note.

or

[A.f.4.e, I.ff, U.x, T.r, S.s] // A pitch and duration are combined to form a note.

Which example is practical for reading and writing?

1 Like