This functor defines distribution strategie (and parts thereof) for harmonic CSPs.
Functor
HS_Distro ("/Users/torsten/oz/music/Strasheela/strasheela/trunk/strasheela/contributions/anders/HarmonisedScore/source/Distribution.oz")
Import
- HS_Score at "Score.ozf"
- SDistro at "x-ozlib://anders/strasheela/source/ScoreDistribution.ozf"
Export
Define
fun{MakeOrder_TimeScaleChordPitchclass P}
[variable ordering constructor] Returns a score variable ordering. A variable ordering is a binary function expecting two parameter objects and returning a boolean value, which is given to the argument 'order' expected by score solvers. This variable ordering first visits time parameters, then scale, then chord, and then pitch class parameters. It breaks ties (i.e. both parameters are the same type or not one of these type) with the score variable ordering P. For example, P can be SDistro.dom.
fun{MakeOrder_TimeScaleChordPitchclassOctave P}
[variable ordering constructor] Returns a score variable ordering. This variable ordering first visits time parameters, then scale, then chord, then pitch class parameters, and then octaves. It breaks ties (i.e. both parameters are the same type or not one of these type) with the score variable ordering P. For example, P can be SDistro.dom.
NB: with this variable ordering first *all* note pitch classes are determined before the octave parameters are visited. This is often less efficient than determining the pitch class and octave of the same note immediately after each other.
fun{IsNoTimepointNorPitch X}
[Parameter filtering test] Score distribution should only be performed on the parameters necessary for efficiency. IsNoTimepointNorPitch returns false for the following parameter types: time points, and pitch parameters with one of the following info tags: root, untransposedRoot and notePitch (notePitch is added to a note's pitch parameter info tags by PitchClassMixin), and true otherwise.
NB: using this test for filtering is suitable for many harmonic CSPs. When time intervals (duration and offset time parameters) are determined, then time points will be determined by propagation. Similarily, pitch parameters will be determined by propagation if the pitch class and octave are determined. Nevertheless, depending on your CSP this filtering might not be appropriate. For example, if your CSP uses chord and scale degrees for notes, then it may be appropriate to filter these parameters out as well or alternatively filter out the note pitch class parameters.
fun{IsNoPcCollectionTimeInterval X}
[Parameter filtering test] returns false for time intervals (durations/offset times) of pitch class collections (chords/scale). In most cases, these parameters should be determined only by propagating the time intervals of the actual notes.
fun{IsNoContainerNorTimepointNorPitchNorPcCollectionTimeInterval X}
[Parameter filtering test] Combines IsNoTimepointNorPitch and IsNoPcCollectionTimeInterval above, and returns false for all container parameters. This is the default filtering for all full distribution strategies exported by this functor.
End