updating score, parts, and code after premiere with liminar
This commit is contained in:
parent
3d11b2ecd7
commit
9c02fd80ce
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
||||||
(
|
(
|
||||||
//~~FUNCTION THAT GENERATES THE GUI
|
//~~FUNCTION THAT GENERATES THE GUI
|
||||||
~generateGUI = {
|
~generateGUI = {
|
||||||
var win, clockStringFunc, masterView, faderViews, tabs;
|
var win, clockStringFunc, metronomeStringFunc, metronomeColorFunc, masterView, faderViews, tabs;
|
||||||
var tabButtonReset, masterButton, guitarOButton, guitarIButton, percButton, ensembleButton, accompButton, startPos = 0;
|
var tabButtonReset, masterButton, guitarOButton, guitarIButton, percButton, ensembleButton, accompButton, startPos = 0;
|
||||||
var groupNames = ["guitar - ostinato", "guitar - interrupt", "percussion", "interrupt highlights", "fields / beats / flicker"], groupAbbr = ["go", "gi", "p", "e", "a"];
|
var groupNames = ["guitar - ostinato", "guitar - interrupt", "percussion", "interrupt highlights", "fields / beats / flicker"], groupAbbr = ["go", "gi", "p", "e", "a"];
|
||||||
var accompNames = ["brown noise", "white noise", "sine beating", "flicker"];
|
var accompNames = ["brown noise", "white noise", "sine beating", "flicker"];
|
||||||
|
|
@ -18,16 +18,17 @@
|
||||||
masterVolGroups = [0.8, 0.8, 0.8, 0.8, 0.8];
|
masterVolGroups = [0.8, 0.8, 0.8, 0.8, 0.8];
|
||||||
|
|
||||||
clockStringFunc = {
|
clockStringFunc = {
|
||||||
arg div, metronome = true;
|
arg div;
|
||||||
var min, sec, metUni;
|
var min, sec;
|
||||||
sec = if(metronome, {(div / 5).trunc}, {div});
|
sec = (div / 5).trunc;
|
||||||
metUni = case {metronome == false} {""} {div % 20 < 2} {"|◘"} {div % 4 < 2} {"|●"} {true} {"| "};
|
|
||||||
min = (sec / 60).trunc.asString;
|
min = (sec / 60).trunc.asString;
|
||||||
if(min.size == 1, {min = "0" ++ min}, {});
|
if(min.size == 1, {min = "0" ++ min}, {});
|
||||||
sec = (sec % 60).trunc.asString;
|
sec = (sec % 60).trunc.asString;
|
||||||
if(sec.size == 1, {sec = "0" ++ sec}, {});
|
if(sec.size == 1, {sec = "0" ++ sec}, {});
|
||||||
min ++ ":" ++ sec ++ metUni;
|
min ++ ":" ++ sec
|
||||||
};
|
};
|
||||||
|
metronomeStringFunc = { arg div; case {div % 20 < 2} {"◘"} {div % 4 < 2} {"●"} {true} {" "} };
|
||||||
|
metronomeColorFunc = { arg div; case {div % 20 < 2} {Color.red} {div % 4 < 2} {Color.blue} {true} {Color.black} };
|
||||||
|
|
||||||
~appStatusFunc = Task({
|
~appStatusFunc = Task({
|
||||||
loop {
|
loop {
|
||||||
|
|
@ -42,10 +43,12 @@
|
||||||
|
|
||||||
win = Window("ostinato and interrupt", Rect(500, 500, 1100, 500), false).front;
|
win = Window("ostinato and interrupt", Rect(500, 500, 1100, 500), false).front;
|
||||||
masterView = {
|
masterView = {
|
||||||
var view, masterIndicators, master, generator, transport, ranSeed, startPosText, pauseButton, clock;
|
var view, masterIndicators, master, generator, transport, ranSeed, startPosText, pauseButton, clock, metronome;
|
||||||
|
|
||||||
OSCFunc({ arg msg, time;
|
OSCFunc({ arg msg, time; {
|
||||||
{clock.string = clockStringFunc.value(msg[3])}.defer;
|
clock.string = clockStringFunc.value(msg[3]);
|
||||||
|
metronome.stringColor = metronomeColorFunc.value(msg[3]);
|
||||||
|
metronome.string = metronomeStringFunc.value(msg[3])}.defer;
|
||||||
},'/tr', s.addr);
|
},'/tr', s.addr);
|
||||||
OSCFunc.new({arg msg; {
|
OSCFunc.new({arg msg; {
|
||||||
{|i| masterIndicators[i].value = msg[3 + i].ampdb.linlin(-40, 0, 0, 1)} ! 2}.defer},
|
{|i| masterIndicators[i].value = msg[3 + i].ampdb.linlin(-40, 0, 0, 1)} ! 2}.defer},
|
||||||
|
|
@ -88,14 +91,16 @@
|
||||||
[Slider(view, Rect(0, 0, 30, 5)).action_(
|
[Slider(view, Rect(0, 0, 30, 5)).action_(
|
||||||
{|pos|
|
{|pos|
|
||||||
var min, sec;
|
var min, sec;
|
||||||
startPosText.string = clockStringFunc.value((pos.value * ~totalDur).trunc, false);
|
startPosText.string = clockStringFunc.value((pos.value * ~totalDur * 5).trunc);
|
||||||
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("Monaco", 15)),
|
||||||
nil);
|
nil);
|
||||||
view.layout_(HLayout(master,
|
view.layout_(HLayout(master,
|
||||||
[VLayout(generator, nil,
|
[VLayout(generator, nil,
|
||||||
clock = StaticText(win).string_("00:00|◘").font_(Font("Monaco", 220)),
|
HLayout(clock = StaticText(win).string_("00:00").font_(Font("Monaco", 200)),
|
||||||
|
StaticText(win).string_("|").font_(Font("Monaco", 200)),
|
||||||
|
metronome = StaticText(win).string_("◘").font_(Font("Monaco", 300)).stringColor_(Color.red)),
|
||||||
nil, transport
|
nil, transport
|
||||||
), alignment: \top])) };
|
), alignment: \top])) };
|
||||||
faderViews = { |group|
|
faderViews = { |group|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
(
|
(
|
||||||
//~~FUNCTION THAT GENERATES THE LILYPOND FILES
|
//~~FUNCTION THAT GENERATES THE LILYPOND FILES
|
||||||
~generateLilypond = {
|
~generateLilypond = {
|
||||||
var sf, data, notes, perc, parts, noteNames, durSum, lastState, lastDur, n, beatPos, lastBassNote, grey, lilyRepeat, lilyTime;
|
var sf, data, notes, perc, parts, noteNames, durSum, lastState, lastDur, n, beatPos, lastBassNote, lGrey, dGrey, lilyRepeat, lilyTime;
|
||||||
var inFile, outFile, inString, outString;
|
var inFile, outFile, inString, outString;
|
||||||
sf = SoundFile.openRead(~dir +/+ "../supercollider/gen_data_resources/ostinato_and_interrupt_data.wav");
|
sf = SoundFile.openRead(~dir +/+ "../supercollider/gen_data_resources/ostinato_and_interrupt_data.wav");
|
||||||
sf.readData(data = FloatArray.newClear(10000)); sf.close;
|
sf.readData(data = FloatArray.newClear(10000)); sf.close;
|
||||||
data = data.clump(5).drop(1);
|
data = data.clump(5).drop(1);
|
||||||
notes = []; perc = []; parts = [[], [], [], [], [], [], []];
|
notes = []; perc = []; parts = [[], [], [], [], [], [], []];
|
||||||
noteNames = ["d\'", "f\'", "a\'", "c\'\'", "e\'\'", "g\'\'"];
|
noteNames = ["d\'", "f\'", "a\'", "c\'\'", "e\'\'", "g\'\'"];
|
||||||
durSum = 60; lastState = -1; lastDur = -1; n = 0; beatPos = 0; grey = 70; lastBassNote = 11;
|
durSum = 60; lastState = -1; lastDur = -1; n = 0; beatPos = 0; lGrey = 70; dGrey = 50; lastBassNote = 11;
|
||||||
while( {data[n][4] != 0}, {
|
while( {data[n][4] != 0}, {
|
||||||
var state, string, note, sound, dur;
|
var state, string, note, sound, dur;
|
||||||
state = data[n][0]; string = data[n][1]; note = data[n][2]; sound = data[n][3]; dur = data[n][4];
|
state = data[n][0]; string = data[n][1]; note = data[n][2]; sound = data[n][3]; dur = data[n][4];
|
||||||
|
|
@ -75,11 +75,12 @@
|
||||||
|
|
||||||
perc = perc.add(if(sound == 2 || (state == 0),
|
perc = perc.add(if(sound == 2 || (state == 0),
|
||||||
{lilyBar ++ lilyTime ++ lilyStem ++ lilyNote},
|
{lilyBar ++ lilyTime ++ lilyStem ++ lilyNote},
|
||||||
{lilyBar ++ lilyTime ++ " \\once \\override Stem.color = #(x11-color \'grey" ++ grey.asString ++ ") " ++ lilyStem ++
|
{lilyBar ++ lilyTime ++ " \\once \\override Stem.color = #(x11-color \'grey" ++ lGrey.asString ++ ") " ++ lilyStem ++
|
||||||
" \\once \\override NoteHead.color = #(x11-color \'grey" ++ grey.asString ++ ") " ++ lilyNote}));
|
" \\once \\override NoteHead.color = #(x11-color \'grey" ++ lGrey.asString ++ ") " ++ lilyNote}));
|
||||||
|
|
||||||
for(0, 5, {
|
for(0, 5, {
|
||||||
arg p;
|
arg p; var grey;
|
||||||
|
grey = if(sound == 2, {dGrey}, {lGrey});
|
||||||
parts[p] = parts[p].add(if(string == p || (state == 0),
|
parts[p] = parts[p].add(if(string == p || (state == 0),
|
||||||
{lilyBar ++ lilyTime ++ lilyStem ++ lilyNote},
|
{lilyBar ++ lilyTime ++ lilyStem ++ lilyNote},
|
||||||
{lilyBar ++ lilyTime ++ " \\once \\override Stem.color = #(x11-color \'grey" ++ grey.asString ++ ") " ++ lilyStem ++
|
{lilyBar ++ lilyTime ++ " \\once \\override Stem.color = #(x11-color \'grey" ++ grey.asString ++ ") " ++ lilyStem ++
|
||||||
|
|
@ -113,7 +114,7 @@
|
||||||
for(0, 5, {
|
for(0, 5, {
|
||||||
arg p, staff;
|
arg p, staff;
|
||||||
outFile = File(~dir +/+ "../lilypond/ostinato_and_interrupt_lilypond_ensemble_part_" ++ (6 - p).asString ++ ".ly", "w");
|
outFile = File(~dir +/+ "../lilypond/ostinato_and_interrupt_lilypond_ensemble_part_" ++ (6 - p).asString ++ ".ly", "w");
|
||||||
staff = Array.fill(6, {|i| if(i == (5 - p), {"#f "}, {"(x11-color \'grey" ++ grey.asString ++ ") "})}).join;
|
staff = Array.fill(6, {|i| if(i == (5 - p), {"#f "}, {"(x11-color \'grey" ++ lGrey.asString ++ ") "})}).join;
|
||||||
staff = "\\override Staff.StaffSymbol.stencil = #(color-staff-lines " ++ staff ++ ")";
|
staff = "\\override Staff.StaffSymbol.stencil = #(color-staff-lines " ++ staff ++ ")";
|
||||||
outString = "<< " ++ lilyRepeat ++ lilyTime ++
|
outString = "<< " ++ lilyRepeat ++ lilyTime ++
|
||||||
"{" ++ staff ++ " \\override Staff.Rest #\'transparent = ##t " ++ (parts[p]).join ++ ' \\bar \"|.\" } >>';
|
"{" ++ staff ++ " \\override Staff.Rest #\'transparent = ##t " ++ (parts[p]).join ++ ' \\bar \"|.\" } >>';
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ SynthDef(\play, {
|
||||||
Out.ar(0, allMaster);
|
Out.ar(0, allMaster);
|
||||||
|
|
||||||
curDur = ((A2K.kr(phasor) / BufFrames.kr(buf)) * BufDur.kr(buf) * 5).trunc;
|
curDur = ((A2K.kr(phasor) / BufFrames.kr(buf)) * BufDur.kr(buf) * 5).trunc;
|
||||||
|
//Optional click - uncomment and send to an output not used to give the guitarist a click track.
|
||||||
|
//Out.ar(2, 10 * BPF.ar(WhiteNoise.ar * EnvGen.kr(Env.perc(0.01, 0.1), curDur % 4 <= 0), 440 * ((curDur % 20 <= 0) + 1), 0.02));
|
||||||
SendTrig.kr(Changed.kr(curDur), 0, curDur);
|
SendTrig.kr(Changed.kr(curDur), 0, curDur);
|
||||||
imp = Impulse.kr(10);
|
imp = Impulse.kr(10);
|
||||||
delimp = Delay1.kr(imp);
|
delimp = Delay1.kr(imp);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue