[Open all] [Close all] [Open all source code] [Close all source code]

The HumdrumToken class manages data a single token of a Humdrum File.

HumdrumToken — Constructor for HumdrumToken.
equalChar — Returns true if the character at the given index is the given char.
getBarlineDuration — Returns the duration between the next and previous barline.
getDataType — Get the exclusive interpretation type for the token.
getDuration — Returns the duration of the token.
getDurationFromStart — Returns the duration from the start of the owning HumdrumFile to the starting time of the owning HumdrumLine for the token.
getDurationToEnd — Returns the duration from the start of the current line to the start of the last line (the duration of the last line is always zero, so the duration to end is always the duration to the end of the last non-zero duration line.
getFieldIndex — Returns the index of the token the line.
getLineIndex — Returns the line index of the owning HumdrumLine for this token.
getLineNumber — Returns the line index plus 1.
getNextNonNullDataToken — Returns the given next non-null token following this one in the spine.
getNextNonNullDataTokenCount — Returns the number of non-null data tokens which follow this token in the spine.
getNextToken — Returns the next token in the spine.
getNextTokenCount — Returns the number of tokens in the spine/sub spine which follow this token.
getNextTokens — Returns a list of the next tokens in the spine after this token.
getOwner — Returns a pointer to the HumdrumLine that owns this token.
getPreviousNonNullDataToken — Returns the non-null data token which occurs before this token in the data in the same spine.
getPreviousNonNullDataTokenCount — Returns the number of previous tokens in the spine which is not a null token.
getPreviousToken — Returns the previous token in the spine.
getPreviousTokenCount — Returns the number of tokens in the spine/sub-spine which precede this token.
getPreviousTokens — Returns a list of the previous tokens in the spine before this token.
getSlurDuration — If the note has a slur start, then returns the duration until the endpoint; otherwise, returns 0; Expand later to handle slur ends and elided slurs.
getSlurEndElisionLevel — Returns the count of elision marks ('&') preceding a slur end character ')'.
getSlurStartElisionLevel — Returns the count of elision marks ('&') preceding a slur start character '('.
getSpineInfo — Returns the spine split/merge history for the token.
getStrandIndex — Returns the 1-D strand index that the token belongs to in the owning HumdrumFile.
getSubtoken — Extract the specified sub-token from the token.
getSubtokenCount — Returns the number of sub-tokens in a token.
getSubtrack — Get the subtrack (similar to a layer in MEI).
getTrack — Get the track (similar to a staff in MEI).
getTrackString — Gets "track.
getXmlId — Returns an XML id attribute based on the line and field index for the location of the token in the HumdrumFile.
getXmlIdPrefix — Returns the XML ID prefix from the HumdrumFile structure via the HumdrumLine on which the token resides.
hasRhythm — Returns true if the exclusive interpretation contains rhythmic data which will be used for analyzing the duration of a HumdrumFile, for example.
hasSlurEnd — Returns true if the **kern token has a ')' character.
hasSlurStart — Returns true if the **kern token has a '(' character.
isAddInterpretation — True if the token is "*+".
isBarline — Returns true if the first character is an equals sign.
isComment — Returns true of the token start with "!".
isCommentLocal — Returns true of the token start with "!", but not "!!" which is for global comments.
isData — Returns true if not an interpretation, barline or local comment.
isDataType — Returns true if the data type of the token matches the test data type.
isExchangeInterpretation — True if the token is "*x".
isExclusiveInterpretation — Returns true if first two characters are "**".
isManipulator — Returns true if token is one of: SPLIT_TOKEN = "*^" == spine splitter MERGE_TOKEN = "*v" == spine merger EXCHANGE_TOKEN = "*x" == spine exchanger ADD_TOKEN = "*+" == spine adder TERMINATE_TOKEN = "*-" == spine terminator **... == exclusive interpretation
isMergeInterpretation — True if the token is "*v".
isNonNullData — Returns true if the token is a data token that is not a null token.
isNote — Returns true if the token is a (kern) note (possessing a pitch).
isNull — Returns true if the token is a null token, either for data, comments, or interpretations.
isNullData — Returns true if the token is a null data token.
isRest — Returns true if the token is a (kern) rest.
isSecondaryTiedNote — Returns true if the token is a (kern) note (possessing a pitch) and has '_' or ']' characters.
isSplitInterpretation — True if the token is "*^".
isTerminateInterpretation — True if the token is "*-".
printCSV — print token in CSV format.
printXml — Print a HumdrumToken in XML format.
setParameters — Process a local comment with the structure: !NS1:NS2:key1=value1:key2=value2:key3=value3 and store the parameter in the HumHash parent class component of the HumdrumToken object.