[WARNING] This quark is still under test and is not listed in the Community Quark Directory for SuperColllider. The feature, help documents and manual may be modified without a change log until it is listed in the Community Quark Directory.
musicXML File Writer for SuperCollider with its own music notation, similar to LilyPond. When writing musicXML from the input music notation, it also writes an SCD file by converting the input into a standard SuperCollider code block, so that you can play it back via scserver.
The included Pitch Class Set and Scientific Pitch Notation classes allow you to get MIDI pitch numbers (MIDI notes) or frequencies from pitch names and vice versa.
(Table of contents generated with markdown-toc)
To install Notator Library, copy and paste the following code into the SC-IDE editor window, and evaluate it:
(
// "https://github.com/telephon/Strang".include; // It will be installed automatically.
"https://github.com/prko/Notator".include
)
Using the Notator class, you can play the score via the sc-server and create musicXML files to seamlessly edit the score created in sclang in your favourite music notation software that supports musicXML 4.0 (or higher) import. It provides the following automated functions:
- export a musicXML file and automatically open it in a music notation program,
- create an SCD file and automatically load and open it to play music:
- all standard and abbreviated notation is rewritten;
- adds a new code block to play the transcribed code;
- tied notes and articulation are applied for playback;
- tries to associate the staff label with the same name as SynthDef. Synth(\default) will be used if the same defname is not found with the staff label.
You can print (or make a PDF of) the musicXML file without editing it, but you should edit and modify the score, since the Notator class is not intended for engraving music, but for composing seamlessly from music designed with SuperCollider.
[NOTE] The musical notation for the Notator class can be opened as a form of score in any music software program that supports musicXML 4.0 (or higher) import and a score view functionality. The scores used in the examples in this help document are encoded by Dorico 4 Pro for some examples that do not display the musicXML file correctly, but are otherwise encoded by MuseScore 4.
[WARNING] The way musicXML is decoded varies from software to software, so a musicXML file may look different in different software that opens it. Also, if the decoding is not correct, the score may look incorrect. You should therefore be familiar with the musicXML import characteristics of the software you use.
Code | Results |
---|---|
( |
Score in MuseScore 4: HelpSource/Classes/resources/Eighth-tone_Scale.musicXML SCD file: HelpSource/Classes/resources/Eighth-tone_Scale.scd |
Code | Results |
---|---|
( |
Score in MuseScore 4: HelpSource/Classes/resources/twelve-tone_series.musicXML SCD file: HelpSource/Classes/resources/twelve-tone_series.scd |
- Notator class (Note: hyperlinks in the preview do not work!)
- Score Guideline (needs further work) (Note: hyperlinks in the preview do not work!)
This is a Pitch Class Set implementation. Quarter tones are supported for the name system used in LilyPond and the musician-friendly naming convention. The sixteenth tones are supported for its own style \ez.
\a.pitchClassNum // -> 9.0
\a.pcnum // -> 9.0
9.pitchClassName // -> [ a, gx, bff, a♮, g𝄪, b𝄫, an, a, gS, bF ]
9.pcname // -> [ a, gx, bff, a♮, g𝄪, b𝄫, an, a, gS, bF ]
- PitchClassSet class (Note: hyperlinks in the preview do not work!)
Scientific Pitch Notation
This is an implementation of Scientific Pitch Notation (SPN). For the name system used in LilyPond (N.B.: the octave number follows the SPN.) and the musician-friendly naming convention, quarter tones are supported. For its own style \ez, sixteenth tones are supported.
In scientific pitch notation, middle A at 440 Hz is defined as A4. It is identical to the middle A at 440 Hz of A4 on Roland instruments, but 1 octave higher than the middle A at 440 Hz of A3 on Yahaha instruments. A4 in scientific notation is identical to A1 or A' in Helmholtz Pitch Notation.
\a4.midi // -> 69.0
\a4.cps // -> 440.0
69.midispn // -> [ a4, gx4, bff4 ]
440.cpsspn // -> [ a4, gx4, bff4 ]
- SPN class (Note: hyperlinks in the preview do not work!)
- implementing the following methods
\a4.pitchClassName
\a4.pcname
\aqf4.pitchClassNum
\a4.pcnum
\a4.octave
//69.pitchClassName
//69.pcname
69.octave
\a.pitchClassName
\a.pcname
//\a.pitchClassNum
//\a.pcnum
\a.octave
//9.pitchClassName
//9.pcname
9.octave
- transcribing Chopin's piano prelude e-minor op. 28-4