Class ExpandOrnaments_simple
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The level of the warning message when forward search is executed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
expand_ornaments
(Score_cwn score, Vox v, SimpleMessage.Sender<XMLDocumentIdentifier> msg, Rational mindura, Rational maxdura, int... factors) Takes a tscore CWN voice and replaces a single event by a sequence of shorter events, according to the ornament assigned to it in the score.void
expand_ornaments
(Score_cwn score, Vox v, SimpleMessage.Sender<XMLDocumentIdentifier> msg, Map<Event, Event> expanded2original, Rational mindura, Rational maxdura, int... factors) Takes a tscore CWN voice and replaces a single event by a sequence of shorter events, according to the ornament assigned to it in the score.expandOrnamentsToPitches
(Score_cwn score, Vox v, SimpleMessage.Sender<XMLDocumentIdentifier> msg) Takes a tscore CWN voice and delivers for every event which carries an ornament symbol the set of pitches required to realize it.protected PitchAndOctave
<OctaveRegister, FunctionalPitchModOctave> getPitchByOffset
(Vox v, Score_cwn score, SimpleMessage.Sender<XMLDocumentIdentifier> msg, Event ev, int offset, FunctionalPitch pitch, Map<WhiteKeyModOctave, FunctionalPitchModOctave> diatonics) Get the functional pitch which has the given diatonic step distance from the given central pitch.
-
Field Details
-
FORWARD_WARNING_LEVEL
public static final int FORWARD_WARNING_LEVELThe level of the warning message when forward search is executed.- See Also:
-
-
Constructor Details
-
ExpandOrnaments_simple
public ExpandOrnaments_simple()
-
-
Method Details
-
expandOrnamentsToPitches
public Multimap<Event,PitchAndOctave<OctaveRegister, expandOrnamentsToPitchesFunctionalPitchModOctave>> (Score_cwn score, Vox v, SimpleMessage.Sender<XMLDocumentIdentifier> msg) Takes a tscore CWN voice and delivers for every event which carries an ornament symbol the set of pitches required to realize it.This implementation is often sufficient, but still very provisonary. Intervening key signature changes are NOT considered yet. In-ornament accidentals (reified by OrnamentUsage) are currently not supported.
The "rep" part is taken into account as executed at least once. (This is different to LMN, p.422 "Der Mittelteil [...] kann aber auch ganz wegfallen".)
-
expand_ornaments
public void expand_ornaments(Score_cwn score, Vox v, SimpleMessage.Sender<XMLDocumentIdentifier> msg, Rational mindura, Rational maxdura, int... factors) Takes a tscore CWN voice and replaces a single event by a sequence of shorter events, according to the ornament assigned to it in the score. The link from expansion events to original is discarded. See invalid input: '{@link expand_ornaments(Score_cwn, Vox, SimpleMessage.Sender, Rational, Rational, int[]).' -
expand_ornaments
public void expand_ornaments(Score_cwn score, Vox v, SimpleMessage.Sender<XMLDocumentIdentifier> msg, Map<Event, Event> expanded2original, Rational mindura, Rational maxdura, int... factors) Takes a tscore CWN voice and replaces a single event by a sequence of shorter events, according to the ornament assigned to it in the score. These events are entered into all data strctuctures assumed valid for the original event: sortedBySource, sortedByStart, event2endtp.This implementation is often sufficient, but still very provisonary. Intervening key signature changes are NOT considered yet. In-ornament accidentals (reified by OrnamentUsage) are currently not supported.
- Parameters:
score
- the context, which contains all parameter assignments to the events.v
- the voice in which to expand all ornaments.msg
- sender for all messages.expanded2original
- memorizes the origin of all inserted events.mindura
- minimal duration for a replacement event.maxdura
- maximal duration for a replacement event.factors
- list of divisors which can additionally be used for optimal filling of the duration by the ornaments replacement notes. At most one will be used and they will not be combined by the algorithm. For details seeOrnament
.
-
getPitchByOffset
protected PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> getPitchByOffset(Vox v, Score_cwn score, SimpleMessage.Sender<XMLDocumentIdentifier> msg, Event ev, int offset, FunctionalPitch pitch, Map<WhiteKeyModOctave, FunctionalPitchModOctave> diatonics) Get the functional pitch which has the given diatonic step distance from the given central pitch. First try to find it in the past = take the latest pitch with the same GPC. If no such is present, e.g. when the ornament is on a very early note in the piece, then search forward for the next pitch with the same GPC.In most cases, forward search is not necessary. Prominent example is the "d-minor-toccata" by J.S.Bach.
Eliminates augmented intervals by limiting the half tone distance. This is required to realize a trill as in
e-flat -- f -- g -- a -- b -- c-sharp -- d-sharp-with-trill,
which would otherwise be expanded tod-sharp -- e-flat -- d-sharp -- e-flat
. This works currently for seconds, thirds and (pure) fourths Larger intervals cause an ImplementationMissingException.- Parameters:
v
- the voice from which the ornament shall be expanded.score
- the score from which the ornament shall be expanded.msg
- the target of messagesev
- the event at wich the ornament shall be expanded. Needed only for diagnosis messages.offset
- the numberof diatonic steps the resolved pitch is away from the central pitchpitch
- the central pitch = the pitch of the note which carries the ornamendiatonics
- for each white key the latest appearing pitch. May be partial, if the white key has not appeared yet. In this case a forward search is executed.
-