SPB Git

Repository Public

exports.md 4.5 KB 111 lines markdown

1<!--2ORIX Sonata3File: Documentation/manual/exports.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Exports89## Audio1011**Composition › Render to Audio File…** (⌘E) in the app, `sonata render` on the command12line. Both use the offline renderer, which runs the same engine as playback: what you export13is what you heard, and rendering the same piece twice gives identical files.1415| Choice | Options | Notes |16|---|---|---|17| Format | WAV, AIFF, FLAC | FLAC is lossless and about half the size |18| Sample size | 16, 24 or 32-bit integers; 32-bit float (WAV, AIFF) | FLAC stores 16 or 24 bits |19| Sample rate | 44.1, 48, 88.2, 96, 176.4, 192 kHz | the project's rate unless you choose another; the piece is rendered at that rate, not converted afterwards |20| Tails | on / off | on: the render continues until releases and reverbs have died away (below −90 dBFS), for at most 30 s |21| Dither | on / off | on: TPDF dither is added when reducing to 16 or 24 bits, and only then |22| Normalise | off / peak / loudness | off by default |23| Stems | on / off | one extra file per track and bus |2425**Nothing is normalised unless you ask.** With *Normalise* off, the file has exactly the level26the code and the mixer give it. *Peak* scales the whole render so that its true peak reaches27the target (−1 dBTP unless you set one); *Loudness* scales it to a target integrated loudness28(−16 LUFS unless you set one) without letting the true peak exceed −1 dBTP. The same gain is29applied to the stems.3031After a render, the app and the command line report what was measured in each file: duration,32sample peak, true peak and integrated loudness.3334### Stems3536Stems are written beside the main file as `name - track.ext`. They have the same length and37start, so they line up when imported into another program. A stem is the track (or bus) after38its effects, fader and pan — what it contributes to the master. Stems sum to the master only39when the master has no effect, a gain of 0 dB and no limiter.4041### For measurements4243For a render that must be exactly the signal, with nothing protective in the way:4445```sonata46composition "Test Tone" {47    instrument tone: FluteOrgan {48        gain -12dB49        play A4 duration 1/150    }51    master {52        peak_limit off53    }54}55```5657```text58sonata render tone.sonata --output tone.wav --float --no-dither --no-tail59```6061### Checking a file6263The files were verified with independent decoders (`afinfo`, `ffprobe`, `ffmpeg`): every64combination of format and sample size decodes to the rendered samples within half a65least-significant bit, exactly for float. You can check your own:6667```text68afinfo piece.wav69ffprobe -v error -show_entries stream=codec_name,sample_rate,channels,duration piece.flac70```7172AAC and MP3 are not written by this version.7374## MIDI7576**Composition › Export MIDI…** or `sonata export piece.sonata --output piece.mid` writes a77Standard MIDI File (format 1, 960 ticks per quarter note).7879* The first track carries the title, the tempo map, the time signatures, the key and the80  markers. Each instrument track becomes a MIDI track.81* Positions are rounded to the nearest tick. A tempo ramp becomes one tempo event per82  sixteenth note.83* Drum engines (`kick`, `snare`, `hihat`) go to channel 10 with General MIDI keys.84* A MIDI file has no microtones: fractional pitches are rounded to the nearest semitone, and85  the export tells you how many notes were affected.86* Audio tracks are not part of a MIDI file.8788## MusicXML8990**Composition › Export MusicXML…** or `sonata export piece.sonata --output piece.musicxml`91writes MusicXML 4.0 for notation programs: parts, measures, voices, ties across bar lines,92dotted values, triplets, quintuplets and septuplets, key and time signatures, tempo marks and93articulations.9495It is a faithful transcription of what the code says, not engraving. Limits you should know:9697* Durations that cannot be written with dots and simple tuplets are quantised to a 128th-note98  grid, and the export says so.99* More than four simultaneous voices on one track cannot be written on one staff; extra100  chords are left out and reported.101* Microtones are written as fractional alterations.102103The **Score** space ([Score](score.md)) draws the same notation and exports it as PDF.104105## Importing106107* **MIDI.** `sonata import song.mid --output song.sonata` turns a MIDI file into Sonata108  source that you can then edit like any other.109* **Audio.** WAV, AIFF and FLAC files placed in a project's `assets` folder are played by110  `audio` tracks ([Modules and projects](modules-and-projects.md#audio-files-in-a-project)).111
Files main
Menu

Theme