public class MwHaiku extends Object
Score_cwn
, for printing, executing or
further manual or automated processing.
A working example is in sig/examples/tscore/haiku0.tscore
.
The currently supported format is as follows:
// since only the sequential order is semantically relevant, this // top-level time points are required only technically, for parsing: T 0 1 VOX haiku Wol- ken am Hü- gel/ der Hund des Schä- fers treibt sie/ categ -,- !,- ,- !- !,- !-. :-,! !,, :xx- ,,., !,,,!! ,-xThe characters in the text line stand for the Haiku text, divided in syllables. Appended can be "-" for "syllable not yet finished" and "/" for "line finished." Each text character must be categorized by a character code in the "categ" parameter track as in a particular phoneme category or not. The categories and their codes are:
Modifier and Type | Class and Description |
---|---|
protected class |
MwHaiku.GenEvent
Prototypes to generate a CWN Event (with text and markup).
|
Modifier and Type | Field and Description |
---|---|
static char |
cat_end
Character category: at the end of a syllable, nearly vanishing.
|
static char |
cat_long
Character category: long (mostly vowel, but also soundful consonant.)
|
static char |
cat_plosive
Character category: very short explosive sound.
|
static char |
cat_redundant
Character category: only WRITTEN character, no phonetic appearance.
|
static char |
cat_short
Character category: short (normal vowel or consonant).
|
static char |
cat_start
Character category: at the start of a syllable,
no stand-alone form possible ("spiritus asper" etc)
|
protected int |
debugLevel
Whether to print debugging information.
|
(package private) Map<Event,String> |
event2kategorien
The category string corresponding to the syllable text.
|
(package private) Map<Event,String> |
event2register
Values of the param track named
paramname_register . |
(package private) Map<Event,String> |
event2silbe
The text for each tscore event.
|
(package private) Map<Event,String> |
eventIsLastInLine
Whether the text of a tscore event ends with a "
/ ". |
(package private) Map<Event,String> |
eventNotLastInWord
Whether the text of a tscore event ends with a "
- ". |
(package private) Map<Event,List<MwHaiku.GenEvent>> |
inEvent2soundEvent
Inverse of
soundEvent2inEvent . |
protected Map<Character,Rational> |
kat2factor
Duration factors for the different categories of phonems.
|
(package private) MessageTee<SimpleMessage<XMLDocumentIdentifier>> |
msg
Target of all messages.
|
(package private) MessageCounter |
msgCounter
Only needed in the main application.
|
(package private) static Modifiers |
myModifiers
Tscore parsing control.
|
(package private) Map<Event,Event> |
origin
Maps the generated CWN event to the original Haiku score event.
|
static String |
paramname_kategorie
The name of the only obligate parameter track,
carrying the categorie of the phonetic units.
|
static String |
paramname_register
The name of the an additional parameter track, carrying the accordeon register for MWs
project.
|
protected Translet.Parser<?> |
parseKateg
Parser for character categories
|
protected Translet.Parser<?> |
parseRegister
Parser additional text in the param track named
paramname_register . |
protected Translet.Parser<?> |
parseText
Parser for syllable text.
|
(package private) Map<Event,Integer> |
posInOrigin
Gives the position of the character which lead to the CWN event in the original Haiku
score event's sequence of categories.
|
(package private) Map<MwHaiku.GenEvent,Event> |
soundEvent2inEvent
Maps the sound event prototype to the original Haiku score event.
|
(package private) List<MwHaiku.GenEvent> |
soundEvents
Sequence of event prototypes, generated from the characters of the syllables.
|
static String |
voxname_haiku
The name of the only voice, carrying the haiku syllables.
|
Constructor and Description |
---|
MwHaiku() |
Modifier and Type | Method and Description |
---|---|
protected void |
convert(String inputfilename)
Central service provision: read the input file identified by the given file name
and generate all output files.
|
protected void |
doAdd(Map<Event,Integer> map,
Event e,
int i)
Count up the number assigned to e by one.
|
protected void |
dumpRawEvents(Vox v)
Debugging method, dump the events of the Haiku score: syllable text, categories and
"lastInLine" / "notLastInWord".
|
(package private) void |
error(Event e,
String s)
Send an error to
msg with the event's location |
(package private) void |
error(String s)
Send an error to
msg |
(package private) boolean |
hasErrors()
Whether errors have been received by
msg . |
static void |
main(String[] args)
Application to parse a tscore source file and generated lilypond source and statistics.
|
void |
nonStatic_main(String[] args)
Application to parse a tscore source file and generated lilypond source and statistics.
|
protected void |
printStatistics(Vox v,
PrintWriter p,
String inputfilename)
Print the whole analysed input score as a vertical table of groupings and frequencies.
|
(package private) void |
terminateApplicationOnErrors()
Evident.
|
Vox |
update(TimeScape timeScape)
Convert raw data into haiku input events.
|
static final Modifiers myModifiers
public static final String voxname_haiku
public static final String paramname_kategorie
public static final String paramname_register
public static final char cat_redundant
public static final char cat_plosive
public static final char cat_long
public static final char cat_short
public static final char cat_start
public static final char cat_end
final Map<Event,String> eventNotLastInWord
-
".final Map<Event,String> eventIsLastInLine
/
".final Map<Event,String> event2kategorien
final Map<Event,String> event2register
paramname_register
. Additional data for MWs
accordeon project.protected final Translet.Parser<?> parseText
protected final Translet.Parser<?> parseKateg
protected final Translet.Parser<?> parseRegister
paramname_register
.final List<MwHaiku.GenEvent> soundEvents
MwHaiku_to_cwn
.)final Map<MwHaiku.GenEvent,Event> soundEvent2inEvent
final Map<Event,List<MwHaiku.GenEvent>> inEvent2soundEvent
soundEvent2inEvent
.final Map<Event,Event> origin
final Map<Event,Integer> posInOrigin
protected Map<Character,Rational> kat2factor
protected int debugLevel
final MessageCounter msgCounter
final MessageTee<SimpleMessage<XMLDocumentIdentifier>> msg
protected void dumpRawEvents(Vox v)
protected void doAdd(Map<Event,Integer> map, Event e, int i)
protected void printStatistics(Vox v, PrintWriter p, String inputfilename)
syllables in that line / syllables in that word / / phonemes in that word / / / phonemes in that syllables / / / / syllable / / / / /and categories / / / / / Phonemes and calculated durations / / / / / / S/Z S/W Ph/W Ph/S | ------------------------+--------------- 5 2 6 3 | Wol W=1/2 o=1/4 l=1/2 | -,- 3 | ken k=1/12 e=1/4 n=1/2 | !,- 1 2 2 | am a=3/8 m=3/4 | ,- 2 5 2 | Hü H=1/8 ü=3/4 | !- 3 | gel g=1/12 e=1/4 l=1/2 | !,-
public Vox update(TimeScape timeScape)
boolean hasErrors()
msg
.void terminateApplicationOnErrors()
protected void convert(String inputfilename)
public static void main(String[] args)
public void nonStatic_main(String[] args)