Package eu.bandm.music.top
Class GraphartScharen
java.lang.Object
eu.bandm.music.top.SvgSource
eu.bandm.music.top.GraphartScharen
Renders graphical art according to a dynamic score, based on a project
by DKR and ML from 1980, called "Graphart Scharen".
The main example score is
Coordinate System is the usual peculiar one:
The main example score is
sig/examples/tscore/scharen0.tscore
.
Score format is as follows:
SCORE x PARS y T 0 20 1'20 2'10 VOX a 0,0/ %,99 / 99,0 // main param is position, integer from 0 to 99 // rendering makes viewport interpretation, eg. 20--70 -> 0 --1024 // scoreCoord -> physCoord "-" means: hold value until next explicit value (is default) "/" means: start linear interpolation P orient // orientation: CURRENTLY only 0 or 90. P num 3 // number of lines >=2, NOT INTERPOLATING P dist // distance 0.0 to 99.9999, same scale as position, etc. P width // linewidth, scale=position*100 P len 20 // same units as position P color 0,0,99/ 0,99,0-/ // color is integer RGB, 99 is full, 0 is not present // Defaults to naive complement of background color. P alpha 0-/ // alpha is transparency, 0 is opaque, 99 is invisible sequential source order of voices defines the (decreasing) visibility z-stacking viewport will be defined when rendering <x1, x2, y1, y2, size> TO <0, width, 0, height>Sensible extension would be:
- arbitrary rotation, dynamic
- selectable background color
Coordinate System is the usual peculiar one:
(0,0)------------------> | | (x,y)======== \ | ============= / dist | ============= | \____len____/ VCode generation scheme of one(1) sheaf:
[g] [g] [g] [line x="0" .." /] [line x="1*dist" .." ] [animate "x" from "1*dist" to "1*dist'" fill="freeze" .. /] // <---DIST [/line] [line x="2*dist" .." ] [animate attributeName="x" from="2*dist" to="2*dist'" begin=".." end=".." .. /] [set attributeName="len" to="0" begin=".."/] // <-- NUM. when it decreases [set attributeName="len" to="100" begin=".."/] // .. increases [/line] [animateTransform attributeName="transform" type="scale" from="1 len/100" to="1 len'/100" .. /] // <-- LEN [/g] [animateTransform attributeName="transform" type="translate" from="x 0" to="x' 0" .. /] // <-- X [/g] [animateTransform attributeName="transform" type="translate" from="0 y" to="0 y'" .. /] // <-- Y [animate attributeType="CSS" attributeName="stroke-width" from="x 0" to="x' 0" begin=".." dur=".." /] // <-- WIDTH [animate attributeType="CSS" attributeName="stroke" from="x 0" to="x' 0" .. /] // <-- COLOR [animate attributeType="CSS" attributeName="stroke-opacity" from="1.0" to="0.01" .. /] // <-- ALPHA [/g]
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.music.top.SvgSource
SvgSource.ParamTranslate, SvgSource.Process
-
Field Summary
Modifier and TypeFieldDescription(package private) final Map<Event,
Color_rgb_8> (package private) final Translet.Parser<?>
(package private) final Translet.Parser<?>
(package private) final Translet.Parser<?>
(package private) final Translet.Parser<String>
(package private) final Translet.Parser<?>
(package private) final Translet.Parser<?>
(package private) final Translet.Parser<?>
(package private) final Translet.Parser<?>
Parser for the position, which is the main parameter of each voice.(package private) final Translet.Parser<?>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
The position parameter is the "main" parameter of each voice, i.e.static final String
-
Constructor Summary
ConstructorDescriptionGraphartScharen
(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Only constructor for this tscore data processors, found and instantiated byMfMain
by reflection. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Global entry point for output generation, called by superclass.protected void
convertVoice
(Vox v) Writes the complete SVG source of one(1) voice to the output printwriter.void
update()
Translate untyped tscore data into semantically sensible "GraphartScharen" data.Methods inherited from class eu.bandm.music.top.SvgSource
alpha2string, animateString, animateString_tp, animateTransformString, check_init_def, color2string, convertToSvg, height2device, height2device, printAlpha, printColor, setString, tp2device, when2device, width2device, width2device, x2device, y2device
-
Field Details
-
TRACKNAME_pos
The position parameter is the "main" parameter of each voice, i.e. the "event defining" parameter, so the parameter track has no particular visible name, but appears as "VOX [voicename]" and is thus set toEvent.main_parameter_name
.- See Also:
-
TRACKNAME_orient
- See Also:
-
TRACKNAME_num
- See Also:
-
TRACKNAME_dist
- See Also:
-
TRACKNAME_width
- See Also:
-
TRACKNAME_len
- See Also:
-
TRACKNAME_color
- See Also:
-
TRACKNAME_alpha
- See Also:
-
event2xpos
-
event2ypos
-
event2orient
-
event2num
-
event2dist
-
event2width
-
event2len
-
event2alpha
-
event2color
-
event2pos_ipol
-
event2len_ipol
-
event2dist_ipol
-
event2width_ipol
-
event2color_ipol
-
event2alpha_ipol
-
parse_ipol
-
parse_pos
Parser for the position, which is the main parameter of each voice. x and y position are given independently, as in1,11 %,12/ 2,%- 3,13
-
parse_orient
-
parse_num
-
parse_dist
-
parse_width
-
parse_len
-
parse_color
-
parse_alpha
-
-
Constructor Details
-
GraphartScharen
public GraphartScharen(Part part, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Only constructor for this tscore data processors, found and instantiated byMfMain
by reflection.
-
-
Method Details
-
update
public void update()Translate untyped tscore data into semantically sensible "GraphartScharen" data. This method reads the event lists contained in TimeScape->voices->bySourceOrder and writes to all the local Map and Set output data declared locally. -
convertVoice
Writes the complete SVG source of one(1) voice to the output printwriter. Before, some important consistency constraints are checked, e.g. definedness of initial values. -
convertData
protected void convertData()Global entry point for output generation, called by superclass. Glo outSvgSource.pw
. Visits voices in source text order.- Specified by:
convertData
in classSvgSource
-