Class Statistics.Analyzer
- Enclosing class:
Statistics
Statistics.chromEffectsByCp.
A Statistics.DiatonicSplit is detected for each pair of voices with
the same GPC and different accidental at the current timepoint.
A Statistics.ChromaticChange is detected for each combination of voices,
both making a melodic step here,
which have the same GPC but a different accidental at the predecessor
timepoint and at the current timepoint, respectively.
(A voice may be combined with itself, for a normal chromatic step.)
// FALSCH FIXME RAUS , but only if no
// * DiatonicSplit is recognized with this GPC at either timepoint.
Additionally some numeric parameters accumulated on the flight per
movement are stored to Statistics.adjacentAccs, etc.
This code can operate in two different modes: (a) on unresolved ornaments, their pitches entered into diatonic clusters. (b) on a score with conventionally resolved ornaments.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intRegister to count the max value on the fly, of the number of different accidentals synchronuous or adjacent.(package private) final List<Statistics.ChromEffect> The constructed result.(package private) @Opt Statistics.DiatonicSplitFor closing the "sub-ornament-bracket".(package private) Map<WhiteKeyModOctave, Statistics.DiatonicSplit> Diatonic splits of the preceding step, to link back the right-side framing events.(package private) intRegister to count the max value on the fly, of the distance between all adjacent accidentqls.(package private) final intThe movement number, needed for print-out of results.(package private) final Multimap<Event, PitchAndOctave<OctaveRegister, FunctionalPitchModOctave>> For clustering mode: maps events to all pitches of its ornamente's expansion.(package private) final Score_cwnThe current score, needed for further information on events.All loaded voices.Fields inherited from class eu.bandm.tscore.base.SyncEventsDouble
allTps, atLeastOneEventStartsHere, countVoices, currentEvent, ignoreEvent, iterators, loaded, nextEvent, nextNormalized, normalize, previousEvent, startsHere -
Constructor Summary
ConstructorsConstructorDescriptionAnalyzer(Score_cwn score, int movement, int capacity, Multimap<Event, PitchAndOctave<OctaveRegister, FunctionalPitchModOctave>> ornamentExpansion) -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddAllWhitekeys(Set<WhiteKeyModOctave> wks, Event ev) Add all GPCs for the event to the given target set, either directly or from the expanded ornament.voidvoidclose()(package private) voidMarks the diatonic conflict as a closing event ornament expansion.(package private) intcountOrnaments(Event ev) Deliver 0 or 1, when the event carries an ornament symbol or is the expansion of another event (with ornament symbol).(package private) @Opt PitchAndOctave<OctaveRegister, FunctionalPitchModOctave> getPitch(Event ev, WhiteKeyModOctave wk) Get the pitch for the event and the given GPC, either directly or from the expanded ornament.(package private) voidMemorize in the map the accidental (max 1) for all GPCs occuring in the given event.voidprocess(double tp) Make one analysis step for the given timepoint.Methods inherited from class eu.bandm.tscore.base.SyncEventsDouble
addVoice, apply, loadCache, oneStep
-
Field Details
-
voices
All loaded voices. -
score
The current score, needed for further information on events. -
movement
final int movementThe movement number, needed for print-out of results. -
ceList
The constructed result. Will finally be stored in the external mapStatistics.chromEffectsByCp. -
ornamentExpansion
For clustering mode: maps events to all pitches of its ornamente's expansion. -
adjacentAccidentals
int adjacentAccidentalsRegister to count the max value on the fly, of the number of different accidentals synchronuous or adjacent. -
maxDistance
int maxDistanceRegister to count the max value on the fly, of the distance between all adjacent accidentqls. -
lastSplits
Map<WhiteKeyModOctave,Statistics.DiatonicSplit> lastSplitsDiatonic splits of the preceding step, to link back the right-side framing events. -
lastSplit
@Opt Statistics.DiatonicSplit lastSplitFor closing the "sub-ornament-bracket".
-
-
Constructor Details
-
Analyzer
Analyzer(Score_cwn score, int movement, int capacity, Multimap<Event, PitchAndOctave<OctaveRegister, FunctionalPitchModOctave>> ornamentExpansion) - Parameters:
ornamentExpansion- input parameter matching each event to the pitches of its ornament expansion, if any. Only needed in clustering mode.
-
-
Method Details
-
addVoice
-
addAllWhitekeys
Add all GPCs for the event to the given target set, either directly or from the expanded ornament. -
getPitch
@Opt PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> getPitch(Event ev, WhiteKeyModOctave wk) Get the pitch for the event and the given GPC, either directly or from the expanded ornament. Assume that only one pitch exists (= ornament expansion is not wide as an octave). -
memoAccidental
Memorize in the map the accidental (max 1) for all GPCs occuring in the given event. Value(s) may come directly from the single note or from an ornament expanded to a diatonic cluster. -
countOrnaments
Deliver 0 or 1, when the event carries an ornament symbol or is the expansion of another event (with ornament symbol). -
closeOrnament
Marks the diatonic conflict as a closing event ornament expansion. -
process
public void process(double tp) Make one analysis step for the given timepoint.- Specified by:
processin classSyncEventsDouble
-
close
public void close()
-