fixing gui to use Liberation Mono for consistency across platforms and resolving integers for lilypond generator - now compatible with SC 3.11.1 and Lilypond 2.20.0

main 0.3
mwinter 4 years ago
parent 9293ae2447
commit ec3d4ce3cd

Binary file not shown.

@ -97,13 +97,13 @@
startPosText.string = clockStringFunc.value((pos.value * ~totalDur * 5).asInteger); startPosText.string = clockStringFunc.value((pos.value * ~totalDur * 5).asInteger);
startPos = pos.value; startPos = pos.value;
}), stretch: 1], }), stretch: 1],
startPosText = StaticText(win).string_("00:00").font_(Font("Monaco", 15)), startPosText = StaticText(win).string_("00:00").font_(Font("Liberation Mono", 15)),
nil); nil);
view.layout_(HLayout(master, view.layout_(HLayout(master,
[VLayout(generator, nil, [VLayout(generator, nil,
HLayout(clock = StaticText(win).string_("00:00").font_(Font("Monaco", 200)), HLayout(clock = StaticText(win).string_("00:00").font_(Font("Liberation Mono", 200)),
StaticText(win).string_("|").font_(Font("Monaco", 200)), StaticText(win).string_("|").font_(Font("Liberation Mono", 200)),
metronome = StaticText(win).string_([-30, -105, -104].collect({arg int; int.asAscii}).as(String)).font_(Font("Monaco", 300)).stringColor_(Color.red)), metronome = StaticText(win).string_([-30, -105, -104].collect({arg int; int.asAscii}).as(String)).font_(Font("Liberation Mono", 300)).stringColor_(Color.red)),
nil, transport nil, transport
), alignment: \top])) }; ), alignment: \top])) };
faderViews = { |group| faderViews = { |group|

@ -28,8 +28,8 @@
lilyRhythmMark = case lilyRhythmMark = case
{state == 0} {""} {state == 0} {""}
{dur > 3} {""} {dur > 3} {""}
{lastState != state} {" _" ++ dur.asString ++ " "} {lastState != state} {" _" ++ dur.asInteger.asString ++ " "}
{lastDur != dur} {" _" ++ dur.asString ++ " "} {lastDur != dur} {" _" ++ dur.asInteger.asString ++ " "}
{true} {""}; {true} {""};
lilyStartBeam = if(beatPos % 4 == 0, {" [ "}, {""}); lilyStartBeam = if(beatPos % 4 == 0, {" [ "}, {""});
@ -39,8 +39,8 @@
lilyBar = if(b == 0 && (lastState != state), {' \\bar \"||\" '}, {""}); lilyBar = if(b == 0 && (lastState != state), {' \\bar \"||\" '}, {""});
sec = (((durSum - dur) + b) / 5); sec = (((durSum - dur) + b) / 5);
minString = (sec.trunc / 60).trunc.asString; minString = (sec.trunc / 60).trunc.asInteger.asString;
secString = (sec.trunc % 60).asString; secString = (sec.trunc % 60).asInteger.asString;
if(secString.size == 1, {secString = "0" ++ secString}, {}); if(secString.size == 1, {secString = "0" ++ secString}, {});
lilyTime = case lilyTime = case
{(b == 0 && lastState == 0 && state == 1) || (sec % 12 == 0)} { {(b == 0 && lastState == 0 && state == 1) || (sec % 12 == 0)} {
@ -63,7 +63,7 @@
{(state == 0) && (string <= 1)} { {(state == 0) && (string <= 1)} {
"\\once \\override NoteHead #\'stencil = #ly:text-interface::print " ++ "\\once \\override NoteHead #\'stencil = #ly:text-interface::print " ++
"\\once \\override NoteHead #\'text = \\markup { \\translate #\'(-0 . -0.8) \\whiteout \\pad-markup #0.5 " ++ '\"' ++ "\\once \\override NoteHead #\'text = \\markup { \\translate #\'(-0 . -0.8) \\whiteout \\pad-markup #0.5 " ++ '\"' ++
if(string == 0, {note.asString}, {(note - 7).asString}) ++ '\" } ' ++ lilyBracket ++ noteNames[string] ++ "16 "} if(string == 0, {note.asInteger.asString}, {(note - 7).asInteger.asString}) ++ '\" } ' ++ lilyBracket ++ noteNames[string] ++ "16 "}
{state == 0 && (string >= 2)} {noteNames[string] ++ "16 "} {state == 0 && (string >= 2)} {noteNames[string] ++ "16 "}
{(state == 1) && (b != 0)} {"r16 " ++ lilyStartBeam ++ lilyEndBeam} {(state == 1) && (b != 0)} {"r16 " ++ lilyStartBeam ++ lilyEndBeam}
@ -92,7 +92,7 @@
n = n + 1; n = n + 1;
}); });
lilyRepeat = "\\repeat unfold " ++ ((durSum-60)/5/12).trunc.asString ++ " { \\repeat unfold 59 { s16 \\noBreak } s16 \\break } "; lilyRepeat = "\\repeat unfold " ++ ((durSum-60)/5/12).asInteger.asString ++ " { \\repeat unfold 59 { s16 \\noBreak } s16 \\break } ";
lilyTime = "\\time 60/16 "; lilyTime = "\\time 60/16 ";
inFile = File(~dir +/+ "../lilypond/ostinato_and_interrupt_lilypond_score_template.ly", "r"); inFile = File(~dir +/+ "../lilypond/ostinato_and_interrupt_lilypond_score_template.ly", "r");
@ -124,7 +124,6 @@
}); });
}; };
) )
// uncomment below generate lilypond files without gui (requires resouces to exist) // uncomment below generate lilypond files without gui (requires resouces to exist)
/*( /*(
~dir = thisProcess.nowExecutingPath.dirname; ~dir = thisProcess.nowExecutingPath.dirname;

Loading…
Cancel
Save