This functor allows to customise a few settings: change to stateful which can be adjusted in, e.g., .ozrc
Functor
Init ("/Users/t/oz/music/Strasheela/strasheela/trunk/strasheela/source/Init.oz")
Require
- OS
- Path at "x-ozlib://anders/tmp/Path/Path.ozf"
Import
- Browser(browse:Browse)
- Pickle
- Explorer
- Error
- Resolve
- Strasheela at "../Strasheela.ozf"
- GUtils at "GeneralUtils.ozf"
- MUtils at "MusicUtils.ozf"
- Score at "ScoreCore.ozf"
- Out at "Output.ozf"
- ScoreInspector at "x-ozlib://anders/strasheela/ScoreInspector/ScoreInspector.ozf"
Export
Define
fun{GetStrasheelaEnv Key}
Access the value of the Strasheela 'environment variable' Key.
proc{PutStrasheelaEnv Key Value}
Set the value of the Strasheela 'environment variable' Key to Value. These variables are used, e.g., by the various output format transformers.
fun{GetFullStrasheelaEnv }
Returns the full Strasheela environment as record.
proc{SetFullStrasheelaEnv R}
Overwrites the full Strasheela environment (R is a record).
proc{SaveStrasheelaEnv Path}
Save the full Strasheela environment as a pickle at Path.
proc{LoadStrasheelaEnv Path}
Load the full Strasheela environment from a pickle saved at Path (this was before created with SaveStrasheelaEnv).
fun{GetBeatDuration }
Access the current beat duration in seconds (a float, defaults to 0.8).
proc{SetBeatDuration Dur}
Set the beat duration in seconds to Dur which must be a float.
fun{GetTempo }
Access the current tempo in beats per minute (a float, defaults to 75.0).
proc{SetTempo Tempo}
Set the tempo in beats per minute which must be a float.
proc{SetTuningTable Table}
Globally sets the tuning table to Table. The tuning table is used by all output formats which use the (full) float returned by the pitch parameter method getValueInMidi (e.g. the note method getPitchInMidi, which is used by default by Csound and microtonal MIDI output). The format of the tuning table declaration is somewhat similar to the Scala scale file format (cf. http://www.xs4all.nl/~huygensf/scala/scl_format.html). Table is a tuple of pitch specs. A pitch spec is either a float (measured in cent) or a ratio notated Nom#Den. The first degree is implict (always 1/1 or 0.0). Also the size is implicit (the width of the tuple), in contrast to the Scala scale file format. The last table value is the period interval.
It is recommended to set the pitchUnit of notes to a value matching the size of the tuning table so that constraints on pitch classes etc work as expected (e.g., for a tuning table with 31 pitches per octave/period, the pitchUnit et31 is recommended).
proc{UnsetTuningTable }
By default, no tuning table is set and methods like getPitchInMidi return pitches corresponding to an equal-tempered scale. UnsetTuningTable sets this default behaviour back.
proc{GetTuningTable Table}
[aux def, not intended for user] Returns a full tuning table (cf. MUtils.fullTuningTable for the format).
proc{SetMaxLilyRhythm Dur}
When outputting a Lilypond file, Strasheela automatically splits very long notes (or other score objects notated by notes such as chords or scales) into multiple notes connected by ties. The maximum duration notated by a single note can be set with this procedure. Dur is a float measured in quarternotes. For example, 2.0 indicates a halve note and 0.5 an eighth note. The maximum duration supported by Lilypond is a longa (16.0). The default is 4.0 (a whole note).
It is recommended to set Dur to the length of your bars (e.g., 4.0 for 4/4).
Note: this definition is an alias for Out.setMaxLilyRhythm.
proc{AddExplorerOuts_Standard }
Extends the Explorer menu "Notes -> Information Action" by a few entries to output scores into various formats just by clicking the solution nodes in the Explorer.
This procedure adds standard output formats like Csound, Lilypond, and MIDI.
proc{AddExplorerOuts_Extended }
Extends the Explorer menu "Notes -> Information Action" by a few entries to output scores into various formats just by clicking the solution nodes in the Explorer.
This procedure complements the formats of AddExplorerOuts_Standard by further formats like ENP and Fomus.
This split into two procedures is only intended to avoid confusing new users with too many options. Anyway, the Explorer actions created by both procs are (hopefully) soon obsolete and replaced by a GUI settings dialog...
End