public class GraphartScharen extends SvgSource
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 renderingSensible extension would be:TO <0, width, 0, height>
(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]
SvgSource.ParamTranslate, SvgSource.Process
Modifier and Type | Field and Description |
---|---|
(package private) Map<Event,Integer> |
event2alpha |
(package private) Map<Event,String> |
event2alpha_ipol |
(package private) Map<Event,Color_rgb_8> |
event2color |
(package private) Map<Event,String> |
event2color_ipol |
(package private) Map<Event,Integer> |
event2dist |
(package private) Map<Event,String> |
event2dist_ipol |
(package private) Map<Event,Integer> |
event2len |
(package private) Map<Event,String> |
event2len_ipol |
(package private) Map<Event,Integer> |
event2num |
(package private) Map<Event,Integer> |
event2orient |
(package private) Map<Event,String> |
event2pos_ipol |
(package private) Map<Event,Integer> |
event2width |
(package private) Map<Event,String> |
event2width_ipol |
(package private) Map<Event,Integer> |
event2xpos |
(package private) Map<Event,Integer> |
event2ypos |
(package private) Translet.Parser<?> |
parse_alpha |
(package private) Translet.Parser<?> |
parse_color |
(package private) Translet.Parser<?> |
parse_dist |
(package private) Translet.Parser<String> |
parse_ipol |
(package private) Translet.Parser<?> |
parse_len |
(package private) Translet.Parser<?> |
parse_num |
(package private) Translet.Parser<?> |
parse_orient |
(package private) Translet.Parser<?> |
parse_pos
Parser for the position, which is the main parameter of each voice.
|
(package private) Translet.Parser<?> |
parse_width |
static String |
TRACKNAME_alpha |
static String |
TRACKNAME_color |
static String |
TRACKNAME_dist |
static String |
TRACKNAME_len |
static String |
TRACKNAME_num |
static String |
TRACKNAME_orient |
static String |
TRACKNAME_pos
The position parameter is the "main" parameter of each voice, i.e.
|
static String |
TRACKNAME_width |
Constructor and Description |
---|
GraphartScharen(Part part,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Only constructor for this tscore data processors, found and instantiated
by
MfMain by reflection. |
Modifier and Type | Method and Description |
---|---|
protected void |
convertData()
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.
|
alpha2string, animateString_tp, animateString, animateTransformString, check_init_def, color2string, convertToSvg, height2device, height2device, printAlpha, printColor, setString, tp2device, when2device, width2device, width2device, x2device, y2device
public static final String TRACKNAME_pos
Event.main_parameter_name
.public static final String TRACKNAME_orient
public static final String TRACKNAME_num
public static final String TRACKNAME_dist
public static final String TRACKNAME_width
public static final String TRACKNAME_len
public static final String TRACKNAME_color
public static final String TRACKNAME_alpha
final Map<Event,Color_rgb_8> event2color
final Translet.Parser<String> parse_ipol
final Translet.Parser<?> parse_pos
1,11 %,12/ 2,%- 3,13
final Translet.Parser<?> parse_orient
final Translet.Parser<?> parse_num
final Translet.Parser<?> parse_dist
final Translet.Parser<?> parse_width
final Translet.Parser<?> parse_len
final Translet.Parser<?> parse_color
final Translet.Parser<?> parse_alpha
public GraphartScharen(Part part, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
MfMain
by reflection.public void update()
protected void convertVoice(Vox v)
protected void convertData()
SvgSource.pw
.
Visits voices in source text order.convertData
in class SvgSource