SPB Git

Repository Public

score.md 3.8 KB 65 lines markdown

1<!--2ORIX Sonata3File: Documentation/manual/score.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Score89The Score space shows the compiled composition as staff notation and exports it.10It is **a faithful transcription, not professional engraving**: every note the compiler11produced is written with the duration notated in the source, but spacing and collisions are12not optimised the way an engraver would.1314## What you see1516- One staff per instrument track, grouped in systems that are broken to the page width and17  justified; pages in US Letter or A4.18- Clef per part: bass when the mean written pitch is below G3, alto for a track or instrument19  named *viola*, percussion (notes on the middle line) for `kick`, `snare` and `hihat`, treble20  otherwise.21- Key signature of the composition's `key` (modes use the signature of their relative major),22  time signatures at every change, tempo marks at each tempo point.23- The measure under the playhead is tinted while playing; the view follows it page by page.24- Click a note to select it; double-click to jump to the statement that produced it.2526## Rules applied (the same for the screen, the PDF and MusicXML)2728They are implemented once, in `crates/sonata-interop/src/score.rs` (`engrave`), and tested there.2930| Rule | Behaviour |31|---|---|32| Durations | Split into dotted values, largest first; a note crossing a bar line is tied. |33| Tuplets | Triplets, quintuplets and septuplets are recognised from the exact rational duration. Anything else is quantised to a 128th and **reported**. |34| Rests | A rest starting off the beat is split at the next beat (dotted-quarter beat in 6/8, 9/8, 12/8). A silent voice is not drawn when another voice of the staff plays. |35| Accidentals | Printed when the alteration differs from the key signature or from an earlier note of the same measure on the same line (all voices of the staff together). The second note of a tie repeats nothing. |36| Beams | Consecutive notes shorter than a quarter inside one beat. |37| Stems | With several sounding voices: first voice up, second down. Otherwise by the note farthest from the middle line; one direction per beam. |38| Transposing parts | The written pitch is the sounding pitch plus the part's transposition; MusicXML carries `<transpose>`. |39| Microtones | Quarter tones are drawn as half sharps and half flats; other deviations as the nearest accidental with an arrow. |4041Approximations are never silent: the toolbar shows a warning with the list (quantised42durations, voices beyond four per staff, microtonal spelling).4344## Not handled4546Slurs, dynamics, hairpins, lyrics, chord symbols, repeats and voltas; a grand staff for47keyboards (each track is one staff); clef changes inside a part; cross-staff and cross-measure48beams, beams over rests; collision avoidance between voices; nested tuplets; tempo ramps49(only the tempo points are printed) and swing notation; mid-piece key changes; courtesy50accidentals; multi-measure rests; part extraction; visual editing of the score (edit the code,51or the notes in the Studio's piano roll).5253## Export5455| Format | How | Checked by |56|---|---|---|57| PDF | Vector drawing through Core Graphics, one PDF page per score page; text stays text. | Reopened with PDFKit in the tests (page count, page size, title text). |58| MusicXML 4.0 | `score-partwise`, with voices, ties, tuplets, accidentals, stems and beams. | Every example is validated with `xmllint` and each measure's durations are summed. |59| MIDI | Format 1, 960 ticks per quarter note. Microtones are rounded to the semitone and reported. | Parsed back; note counts compared with the program. |6061The same exports exist on the command line: `sonata export piece.sonata --output piece.musicxml`.6263The clef signs are glyphs of the system font *Apple Symbols*; every other shape (noteheads,64stems, flags, beams, rests, accidentals, ties, brackets) is a path drawn by the application.65
Files main
Menu

Theme