Package eu.bandm.tscore.base
package eu.bandm.tscore.base
Generic and low level data types and transformation algorithms,
to be used by very different applications of the
The basic processing pipeline is as follows:
tscore
framework.
The basic processing pipeline is as follows:
-
The lexer
TScoreLexer
translates some text input into a token stream. -
This is fed into a hand-written, recursive descent parser in
RawParser
. This creates an instance of the umod model fromeu.bandm.tscore.model
Here the items one level below the mere event structure are still unparsed. -
Therefore, in a second step
specialized, dedicated parsers must be called
for further translation, depending on the concrete score format.
The parsers must be derived fromTranslet.Parser
. Their output data in most cases will be encoded in instances of classes derived fromEntity
.
The functionality is not at all restricted to conventional music notation. Nevertheless this realm is supported by further packages built upon this basic framework:
-
eu.bandm.music.entities
contains extensions and specializations of the classes contained herein. -
eu.bandm.music.top
combines code of that and this package to realize score formats.
-
ClassDescriptionFor musical purposes it is utmost convenient to support the "dotted notation", using "prolongation dots", short "dots".Class for debugging purpose which prints unparsed tscore event sequences.Base class for all things which are in a certain multi-lingual catalog, and have a common parser for their symbolic appearance in scores, and which form a common semantic domain.EntityCatalog<E extends Entity>Contains collection of basic score entities used as parameter values, indexed and documented in a multi lingual way.Looks for start/end of pattern repetition and constructs the representing Event ->Event relation.Collects sets of adjacent events from one single voice.Kind of group commands, to be stored in
GroupCollector.GroupEvent
.Encodes how the code will react to a specific input condition.Looks for repettions of a pattern in a certain parameter track and distributes it event-wise to the successor events.States of the state machine.Recursive-descent parser for the raw level of tscore.TendencyCollector<E extends Entity>Processes a parameter track which contains tendencies spanning more than oneEvent
.Base class for constructing user defined parsers by combinators; originally for the values contained in the different parameter tracks of a tscore voice.Implements a greedy longest prefix match from a collection of strings.Parser for a simple string constant which must appear verbatim, as is.Parser for text input following a regular expression.Realizes a protocol tree of alternatives to the parsing results.Translet.CoTupleParser<A,B, C, D> Common superclass for Parsers which accept one of many alternatives and return aCoTuple
(ORn and PRIORn).Kinds of disjunctive parser combinators.Common superclass for Parsers which accept one of many alternatives.Format printer which puts maximally one ParserFormat to each screen column and memorizes this for later alignment of consumed char data.Accepts a sequence "A,B,C", where only the middle parsing/processing result is stored as result in theTranslet.State
object, discarding the frame.Accepts a sequence "A,B,..", where only the very first parsing/processing result is stored as result in theTranslet.State
object, discarding all the tail.Common superclass for Parsers which accept one of many alternatives and return the upper limit of the different result classes (OR1 and PRIOR1).Option parser, in greedy and non-deterministic variant, with or without default value.Translet.OrCoTupleParser<A,B, C, D> Realizes disjunction which is nondeterministic and returns a CoTuple.Realizes disjunction which is nondeterministic and returns an upper limit class.Used to retrieve aTranslet.Parser
in a particular (human) language, to plug it into the tscore parsing process.Base class for all parser classes, contains most of the working methods.Specialized Format which refers to a Parser for alignment of char data.Translet.PermutationParser<R,A, B, C, D, E, F, G, H> Variant ofTranslet.ProductParser
which accepts all permutations of sub-parsers.Repetition parser which does not allow allow empty list as result.Translet.PriorCoTupleParser<A,B, C, D> Realizes disjunction which is priorized and returns a CoTuple.Realizes disjunction which is priorized and returns an upper limit class.Translet.ProductParser<R,A, B, C, D, E, F, G, H> Common superclass for Parsers which produce a product type as their result.A placeholder which can be formandum into a parser construct, and later be assigned the complete parser as a whole, for recursive use.Common superclass forTranslet.StarParser
andTranslet.PlusParser
.Translet.SequParser<R,A, B, C, D, E, F, G, H> Variant ofTranslet.ProductParser
which accepts a certain sequence of sub-parsers.Repetition parser which allows empty list as result.Central data type for parser operation.Common superclass of the storing oeprators.Storing operator which only one(1) value per key.Storing operator which can store multiple (>1) values per key, preserving the sequential order in the source.Storing operator which can store multiple (>1) values per key.Library of universalTranslet
parsers, and of auxiliary functions to be used in such parsers.Filters the result of its sub-parser by an explicit Java-encoded boolean predicate.Collection of static utility methods.Util.Multimap_LTree<A,B> Employed for the central map from a "naturally" ordered arithmetic type (like Rational, BigInteger, etc.) to Tp objects representing time points, allowing their time-respecting traversal.Step through all time points and process the tuple of events from all voices which are currently "sounding".