Compare commits
10 commits
8726241d91
...
18253e6ba2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18253e6ba2 | ||
|
|
19a23c83cb | ||
|
|
02adb42def | ||
|
|
b6ab8e625c | ||
|
|
3fb0e2382a | ||
|
|
483162b94d | ||
|
|
2c11afac7a | ||
|
|
ec1f32350e | ||
|
|
245865ef41 | ||
|
|
805ed9d5de |
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
6243
lilypond/seed_19800725/includes/part_star_8_systemsperpage.ly
Normal file
6243
lilypond/seed_19800725/includes/part_star_8_systemsperpage.ly
Normal file
File diff suppressed because it is too large
Load diff
171
lilypond/seed_19800725/tkam_part_star.ly
Normal file
171
lilypond/seed_19800725/tkam_part_star.ly
Normal file
|
|
@ -0,0 +1,171 @@
|
||||||
|
\version "2.19.83"
|
||||||
|
|
||||||
|
#(define (override-color-for-all-grobs color)
|
||||||
|
(lambda (context)
|
||||||
|
(let loop ((x all-grob-descriptions))
|
||||||
|
(if (not (null? x))
|
||||||
|
(let ((grob-name (caar x)))
|
||||||
|
(ly:context-pushpop-property context grob-name 'color color)
|
||||||
|
(loop (cdr x)))))))
|
||||||
|
|
||||||
|
#(define-markup-command (relMark layout props mus) (ly:music?)
|
||||||
|
#:properties ((size -2))
|
||||||
|
(interpret-markup layout props
|
||||||
|
#{
|
||||||
|
\markup {
|
||||||
|
\score {
|
||||||
|
\new Staff { $mus }
|
||||||
|
\layout {
|
||||||
|
\context {
|
||||||
|
\Staff
|
||||||
|
\remove Time_signature_engraver
|
||||||
|
fontSize = #-2
|
||||||
|
\hide Stem
|
||||||
|
\override TextScript.outside-staff-priority = ##f
|
||||||
|
\override StaffSymbol.staff-space = #(magstep -2)
|
||||||
|
\override StaffSymbol.thickness = #(magstep -2)
|
||||||
|
\override TextScript.self-alignment-X = #-0.4
|
||||||
|
\override TextScript.staff-padding = #1
|
||||||
|
}
|
||||||
|
\context {
|
||||||
|
\Score
|
||||||
|
proportionalNotationDuration = #(ly:make-moment 1/16)
|
||||||
|
\remove "Separating_line_group_engraver"
|
||||||
|
\override SpacingSpanner.strict-note-spacing = ##t
|
||||||
|
\override RehearsalMark.self-alignment-X = #-1
|
||||||
|
\override RehearsalMark.Y-offset = #10
|
||||||
|
\override RehearsalMark.X-offset = #10
|
||||||
|
}
|
||||||
|
\context {
|
||||||
|
\Voice
|
||||||
|
\consists "Horizontal_bracket_engraver"
|
||||||
|
\override HorizontalBracket.direction = #UP
|
||||||
|
}
|
||||||
|
indent = 0
|
||||||
|
line-width = 4\cm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#}))
|
||||||
|
|
||||||
|
|
||||||
|
\paper {
|
||||||
|
#(set-paper-size "a4" 'portrait)
|
||||||
|
top-margin = 1 \cm
|
||||||
|
bottom-margin = 1 \cm
|
||||||
|
left-margin = 2 \cm
|
||||||
|
ragged-bottom = ##t
|
||||||
|
|
||||||
|
top-system-spacing =
|
||||||
|
#'((basic-distance . 15 )
|
||||||
|
(minimum-distance . 15 )
|
||||||
|
(padding . 0 )
|
||||||
|
(stretchability . 0))
|
||||||
|
|
||||||
|
system-system-spacing =
|
||||||
|
#'((basic-distance . 35 )
|
||||||
|
(minimum-distance . 35 )
|
||||||
|
(padding . 0 )
|
||||||
|
(stretchability . 0))
|
||||||
|
|
||||||
|
last-bottom-spacing =
|
||||||
|
#'((basic-distance . 10 )
|
||||||
|
(minimum-distance . 10 )
|
||||||
|
(padding . 0 )
|
||||||
|
(stretchability . 0))
|
||||||
|
|
||||||
|
%systems-per-page = 8
|
||||||
|
%max-systems-per-page = 8
|
||||||
|
first-page-number = 1
|
||||||
|
print-first-page-number = ##t
|
||||||
|
|
||||||
|
print-page-number = ##t
|
||||||
|
oddHeaderMarkup = \markup { \fill-line { \line { \on-the-fly #not-first-page {\pad-markup #2 { \concat {\italic {"to kill a monarch "} (seed: 19800725)}}}}}}
|
||||||
|
evenHeaderMarkup = \markup { \fill-line { \line { \on-the-fly #not-first-page {\pad-markup #2 { \concat {\italic {"to kill a monarch "} (seed: 19800725)}}}}}}
|
||||||
|
oddFooterMarkup = \markup { \fill-line {
|
||||||
|
\concat {
|
||||||
|
"-"
|
||||||
|
\fontsize #1.5
|
||||||
|
\on-the-fly #print-page-number-check-first
|
||||||
|
\fromproperty #'page:page-number-string
|
||||||
|
"-"}}}
|
||||||
|
evenFooterMarkup = \markup { \fill-line {
|
||||||
|
\concat {
|
||||||
|
"-"
|
||||||
|
\fontsize #1.5
|
||||||
|
\on-the-fly #print-page-number-check-first
|
||||||
|
\fromproperty #'page:page-number-string
|
||||||
|
"-"}}}
|
||||||
|
}
|
||||||
|
|
||||||
|
\header {
|
||||||
|
title = \markup { \italic {to kill a monarch}}
|
||||||
|
composer = \markup \right-column {"michael winter" "(berlin, germany; 2021)"}
|
||||||
|
poet = "seed: 19800725"
|
||||||
|
tagline = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
#(set-global-staff-size 11)
|
||||||
|
|
||||||
|
\layout {
|
||||||
|
indent = 0.0\cm
|
||||||
|
line-width = 17.5\cm
|
||||||
|
ragged-last = ##f
|
||||||
|
ragged-right = ##f
|
||||||
|
|
||||||
|
\context {
|
||||||
|
\Score
|
||||||
|
\override BarNumber.stencil = #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
|
||||||
|
\override Stem.stemlet-length = #0.75
|
||||||
|
proportionalNotationDuration = #(ly:make-moment 1/16)
|
||||||
|
\remove "Separating_line_group_engraver"
|
||||||
|
\override RehearsalMark.self-alignment-X = #-1
|
||||||
|
\override RehearsalMark.Y-offset = #10
|
||||||
|
\override RehearsalMark.X-offset = #-8
|
||||||
|
%\override RehearsalMark.outside-staff-priority = #0
|
||||||
|
}
|
||||||
|
\context {
|
||||||
|
\Staff
|
||||||
|
|
||||||
|
\override VerticalAxisGroup.staff-staff-spacing =
|
||||||
|
#'((basic-distance . 20 )
|
||||||
|
(minimum-distance . 20 )
|
||||||
|
(padding . 0 )
|
||||||
|
(stretchability . 0))
|
||||||
|
|
||||||
|
\override VerticalAxisGroup.default-staff-staff-spacing =
|
||||||
|
#'((basic-distance . 20 )
|
||||||
|
(minimum-distance . 20 )
|
||||||
|
(padding . 0 )
|
||||||
|
(stretchability . 0))
|
||||||
|
\override TextScript.staff-padding = #2
|
||||||
|
\override TextScript.self-alignment-X = #0
|
||||||
|
}
|
||||||
|
\context {
|
||||||
|
\StaffGroup
|
||||||
|
\name "SemiStaffGroup"
|
||||||
|
\consists "Span_bar_engraver"
|
||||||
|
\override SpanBar.stencil =
|
||||||
|
#(lambda (grob)
|
||||||
|
(if (string=? (ly:grob-property grob 'glyph-name) "|")
|
||||||
|
(set! (ly:grob-property grob 'glyph-name) ""))
|
||||||
|
(ly:span-bar::print grob))
|
||||||
|
}
|
||||||
|
\context {
|
||||||
|
\Score
|
||||||
|
\accepts SemiStaffGroup
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
\midi { }
|
||||||
|
|
||||||
|
|
||||||
|
\score{
|
||||||
|
\new Score
|
||||||
|
<<
|
||||||
|
\include "includes/part_star_8_systemsperpage.ly"
|
||||||
|
>>
|
||||||
|
|
||||||
|
\layout{}
|
||||||
|
\midi{}
|
||||||
|
}
|
||||||
BIN
lilypond/seed_19800725/tkam_part_star.midi
Normal file
BIN
lilypond/seed_19800725/tkam_part_star.midi
Normal file
Binary file not shown.
BIN
lilypond/seed_19800725/tkam_part_star.pdf
Normal file
BIN
lilypond/seed_19800725/tkam_part_star.pdf
Normal file
Binary file not shown.
|
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
\header {
|
\header {
|
||||||
title = \markup { \italic {to kill a monarch}}
|
title = \markup { \italic {to kill a monarch}}
|
||||||
composer = \markup \right-column {"michael winter" "(berlin, germany; 2020)"}
|
composer = \markup \right-column {"michael winter" "(berlin, germany; 2021)"}
|
||||||
poet = "seed: 19800725"
|
poet = "seed: 19800725"
|
||||||
tagline = ""
|
tagline = ""
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +109,7 @@
|
||||||
\layout {
|
\layout {
|
||||||
indent = 0.0\cm
|
indent = 0.0\cm
|
||||||
line-width = 17.5\cm
|
line-width = 17.5\cm
|
||||||
ragged-last = ##t
|
ragged-last = ##f
|
||||||
ragged-right = ##f
|
ragged-right = ##f
|
||||||
|
|
||||||
\context {
|
\context {
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
\header {
|
\header {
|
||||||
title = \markup { \italic {to kill a monarch}}
|
title = \markup { \italic {to kill a monarch}}
|
||||||
composer = \markup \right-column {"michael winter" "(berlin, germany; 2020)"}
|
composer = \markup \right-column {"michael winter" "(berlin, germany; 2021)"}
|
||||||
poet = "seed: xxx"
|
poet = "seed: xxx"
|
||||||
tagline = ""
|
tagline = ""
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +109,7 @@
|
||||||
\layout {
|
\layout {
|
||||||
indent = 0.0\cm
|
indent = 0.0\cm
|
||||||
line-width = 17.5\cm
|
line-width = 17.5\cm
|
||||||
ragged-last = ##t
|
ragged-last = ##f
|
||||||
ragged-right = ##f
|
ragged-right = ##f
|
||||||
|
|
||||||
\context {
|
\context {
|
||||||
|
|
|
||||||
11
mixer_settings/settings
Normal file
11
mixer_settings/settings
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"tempo": 60,
|
||||||
|
"master_volume": 0.8,
|
||||||
|
"master_mute": 0,
|
||||||
|
"master_out": 0,
|
||||||
|
"track_volumes": [0.8,0.8,0.8,0.8,0.8,0.8,0.8],
|
||||||
|
"track_solos": [0,0,0,0,0,0,0],
|
||||||
|
"track_mutes": [1,1,1,1,0,0,0],
|
||||||
|
"track_pans": [0.5,0.5,0.5,0.5,0.5,0.5,0.5],
|
||||||
|
"track_outs": [0,0,0,0,0,0,3]
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
(
|
(
|
||||||
var clockStringFunc, metronomeStringFunc, metronomeColorFunc, updateTransport, updateSubsection,
|
var clockStringFunc, metronomeStringFunc, metronomeColorFunc, updateTransport, updateSection, updateSubsection,
|
||||||
buildGenerator, buildMetronome, updateSection, buildTransport, buildTempoControl, buildMasterFader, buildTrackFader,
|
buildGenerator, buildMetronome, buildTransport, buildTempoControl, buildMasterFader, buildTrackFader,
|
||||||
masterView, faderView, helpView, currentSection = 1, currentSubsection = 1;
|
buildMasterView, buildFaderView, buildHelpView, currentSection = 1, currentSubsection = 1;
|
||||||
|
|
||||||
// these funcs update the elements of the transport panel
|
// these funcs update the elements of the transport panel
|
||||||
clockStringFunc = {
|
clockStringFunc = {
|
||||||
|
|
@ -27,20 +27,6 @@ updateTransport = {arg clock, metronome, sectionDisplay, measure, beat, section,
|
||||||
{0.75.wait; {metronome.string = ""}.defer}.fork(~tempoClock, quant: 0);
|
{0.75.wait; {metronome.string = ""}.defer}.fork(~tempoClock, quant: 0);
|
||||||
}.inEnvir;
|
}.inEnvir;
|
||||||
|
|
||||||
updateSubsection = {arg mod, clock, metronome, sectionDisplay, refresh = true;
|
|
||||||
if(~sectionNavDict[[currentSection, currentSubsection + mod]] != nil, {
|
|
||||||
currentSubsection = currentSubsection + mod;
|
|
||||||
if(refresh, {
|
|
||||||
updateTransport.value(clock, metronome, sectionDisplay,
|
|
||||||
~sectionNavDict[[currentSection, currentSubsection]][0], 1,
|
|
||||||
currentSection, currentSubsection
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
updateSection.value(mod, clock, metronome, sectionDisplay, refresh, true)
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
buildGenerator = {arg view;
|
buildGenerator = {arg view;
|
||||||
var ranSeed;
|
var ranSeed;
|
||||||
HLayout(
|
HLayout(
|
||||||
|
|
@ -103,6 +89,20 @@ updateSection = {arg mod, clock, metronome, sectionDisplay, refresh = true, indi
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
updateSubsection = {arg mod, clock, metronome, sectionDisplay, refresh = true;
|
||||||
|
if(~sectionNavDict[[currentSection, currentSubsection + mod]] != nil, {
|
||||||
|
currentSubsection = currentSubsection + mod;
|
||||||
|
if(refresh, {
|
||||||
|
updateTransport.value(clock, metronome, sectionDisplay,
|
||||||
|
~sectionNavDict[[currentSection, currentSubsection]][0], 1,
|
||||||
|
currentSection, currentSubsection
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}, {
|
||||||
|
updateSection.value(mod, clock, metronome, sectionDisplay, refresh, true)
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
buildTransport = {arg win, view, clock, metronome, preampBusses, accompBusses, postampBusses;
|
buildTransport = {arg win, view, clock, metronome, preampBusses, accompBusses, postampBusses;
|
||||||
var sec, subsec, sectionDisplay, layout, player;
|
var sec, subsec, sectionDisplay, layout, player;
|
||||||
|
|
||||||
|
|
@ -152,18 +152,18 @@ buildTransport = {arg win, view, clock, metronome, preampBusses, accompBusses, p
|
||||||
[sectionDisplay, layout]
|
[sectionDisplay, layout]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildTempoControl = {arg view;
|
buildTempoControl = {arg view;
|
||||||
var tempo, address, updateSection;
|
var layout, tempoField, address, updateSection;
|
||||||
HLayout(
|
layout = HLayout(
|
||||||
tempo = TextField(view).string_("60"),
|
tempoField = TextField(view).string_("60").action_({arg v;
|
||||||
Button(view).states_([["set tempo"]]).action_({~tempoClock.tempo = tempo.string.asInteger / 60}.inEnvir),
|
var tempo = v.value.asInteger; ~tempoClock.tempo = tempo / 60}.inEnvir),
|
||||||
[StaticText(view).string_(" "), stretch: 1])
|
Button(view).states_([["set tempo"]]).action_({arg v; ~tempoClock.tempo = tempoField.string.asInteger / 60}.inEnvir),
|
||||||
|
[StaticText(view).string_(" "), stretch: 1]);
|
||||||
|
[layout, tempoField]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildMasterFader = {arg view;
|
buildMasterFader = {arg view;
|
||||||
var trackIndicators, layout, volSlider, muteButton;
|
var trackIndicators, layout, volSlider, muteButton, outMenu;
|
||||||
|
|
||||||
trackIndicators = {LevelIndicator()} ! 2;
|
trackIndicators = {LevelIndicator()} ! 2;
|
||||||
|
|
||||||
|
|
@ -181,15 +181,18 @@ buildMasterFader = {arg view;
|
||||||
trackIndicators[1]),
|
trackIndicators[1]),
|
||||||
muteButton = Button(view).states_([["mute", Color.black], ["mute", Color.black, Color.grey]]).action_(
|
muteButton = Button(view).states_([["mute", Color.black], ["mute", Color.black, Color.grey]]).action_(
|
||||||
{arg v; var masterMute = (1 - v.value).abs; ~play.set(\masterMute, masterMute)}.inEnvir),
|
{arg v; var masterMute = (1 - v.value).abs; ~play.set(\masterMute, masterMute)}.inEnvir),
|
||||||
|
StaticText(view).string_("out").align_(\center),
|
||||||
|
outMenu = PopUpMenu(view).items_((1..16).collect({arg o; o + "-" + (o + 1)})).action_(
|
||||||
|
{arg v; var out = v.value.postln; ~play.set(\masterOut, out)}.inEnvir),
|
||||||
StaticText(view).string_("master").align_(\center)
|
StaticText(view).string_("master").align_(\center)
|
||||||
), stretch: 2], nil);
|
), stretch: 2], nil);
|
||||||
[layout, volSlider, muteButton]
|
[layout, volSlider, muteButton, outMenu]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildTrackFader = {arg view, name, index;
|
buildTrackFader = {arg view, name, index;
|
||||||
var trackIndicator, layout, volSlider, muteButton, panKnob;
|
var trackIndicator, netAddr, layout, volSlider, soloButton, muteButton, panKnob, outMenu;
|
||||||
|
|
||||||
|
netAddr = NetAddr("127.0.0.1", NetAddr.langPort);
|
||||||
trackIndicator = LevelIndicator();
|
trackIndicator = LevelIndicator();
|
||||||
|
|
||||||
OSCFunc.new({arg msg; {trackIndicator.value = msg[3].ampdb.linlin(-50, 0, 0, 1)}.defer},
|
OSCFunc.new({arg msg; {trackIndicator.value = msg[3].ampdb.linlin(-50, 0, 0, 1)}.defer},
|
||||||
|
|
@ -201,27 +204,35 @@ buildTrackFader = {arg view, name, index;
|
||||||
volSlider = Slider(view).value_(0.8).action_(
|
volSlider = Slider(view).value_(0.8).action_(
|
||||||
{arg v; var vol = v.value * 1.25; ~play.set(\vol_ ++ index, vol)}.inEnvir),
|
{arg v; var vol = v.value * 1.25; ~play.set(\vol_ ++ index, vol)}.inEnvir),
|
||||||
trackIndicator),
|
trackIndicator),
|
||||||
|
soloButton = Button(view).states_([["solo", Color.black], ["solo", Color.black, Color.grey]]).action_(
|
||||||
|
{netAddr.sendMsg("/soloer_" ++ ~hash, index)}.inEnvir).value_(0),
|
||||||
muteButton = Button(view).states_([["mute", Color.black], ["mute", Color.black, Color.grey]]).action_(
|
muteButton = Button(view).states_([["mute", Color.black], ["mute", Color.black, Color.grey]]).action_(
|
||||||
{arg v; var mute = (1 - v.value).abs; ~play.set(\mute_ ++ index, mute)}.inEnvir).value_(0),
|
{arg v; var mute = (1 - v.value).abs;
|
||||||
|
~play.set(\mute_ ++ index, mute)}.inEnvir).valueAction_(if(index < 4, {1}, {0})),
|
||||||
VLayout(
|
VLayout(
|
||||||
StaticText(view).string_("pan").align_(\center),
|
StaticText(view).string_("pan").align_(\center),
|
||||||
panKnob = Knob(view).action_({arg v; var pan = v.value * 2 - 1; ~play.set(\pan_ ++ index, pan)}.inEnvir).value_(0.5)
|
panKnob = Knob(view).action_({arg v; var pan = v.value * 2 - 1; ~play.set(\pan_ ++ index, pan)}.inEnvir).valueAction_(0.5)
|
||||||
),
|
),
|
||||||
|
StaticText(view).string_("out").align_(\center),
|
||||||
|
outMenu = PopUpMenu(view).items_(["master"] ++ (1..16)).action_(
|
||||||
|
{arg v; var out = v.value; ~play.set(\out_ ++ index, out)}.inEnvir).valueAction_(if(index < 6, {0}, {3})),
|
||||||
StaticText(view).string_(name).align_(\center)
|
StaticText(view).string_(name).align_(\center)
|
||||||
|
//StaticText(view).string_("output").align_(\center),
|
||||||
),
|
),
|
||||||
nil);
|
nil);
|
||||||
[layout, volSlider, muteButton, panKnob]
|
[layout, volSlider, soloButton, muteButton, panKnob, outMenu]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildMasterView = {arg win, preampBusses, accompBusses, postampBusses;
|
||||||
masterView = {arg win, preampBusses, accompBusses, postampBusses;
|
var view, generatorLayout, clock, metronome, metronomeLayout, transportLayout,
|
||||||
var view, generatorLayout, clock, metronome, metronomeLayout, transportLayout, auxControlsLayout, countOff, ranSeed, order, tempo, sectionDisplay, address;
|
tempoContol, auxControlsLayout, countOff, ranSeed, order, tempo, sectionDisplay, address;
|
||||||
|
|
||||||
view = View(win);
|
view = View(win);
|
||||||
generatorLayout = buildGenerator.value(view);
|
generatorLayout = buildGenerator.value(view);
|
||||||
# clock, metronome, metronomeLayout = buildMetronome.value(win);
|
# clock, metronome, metronomeLayout = buildMetronome.value(win);
|
||||||
# sectionDisplay, transportLayout = buildTransport.value(win, view, clock, metronome, preampBusses, accompBusses, postampBusses);
|
# sectionDisplay, transportLayout = buildTransport.value(win, view, clock, metronome, preampBusses, accompBusses, postampBusses);
|
||||||
auxControlsLayout = buildTempoControl.value(view);
|
tempoContol = buildTempoControl.value(view);
|
||||||
|
auxControlsLayout = tempoContol[0];
|
||||||
|
|
||||||
view.layout_(
|
view.layout_(
|
||||||
HLayout(
|
HLayout(
|
||||||
|
|
@ -237,16 +248,18 @@ masterView = {arg win, preampBusses, accompBusses, postampBusses;
|
||||||
alignment: \top
|
alignment: \top
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
);
|
||||||
|
[view, tempoContol[1]]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildFaderView = {arg win, tempoField;
|
||||||
faderView = {arg win;
|
var view, masterIndicators, trackIndicators, master, tracks, openButton, basePath, saveButton;
|
||||||
var view, masterIndicators, trackIndicators, master, tracks, openButton, saveButton;
|
var partAbbr = ["*", "III", "II", "I", "accomp_II", "accomp_I", "click"];
|
||||||
var partAbbr = ["*", "III", "II", "I", "accomp_I", "accomp_II", "click"];
|
var trackNames = ["*", "III", "II", "I", "accomp_II", "accomp_I", "click"];
|
||||||
var trackNames = ["*", "III", "II", "I", "accomp_I", "accomp_II", "click"];
|
|
||||||
var partVols, partMutes, partPans;
|
var partVols, partMutes, partPans;
|
||||||
var masterMute, masterVol;
|
var masterMute, masterVol;
|
||||||
|
var netAddr = NetAddr("127.0.0.1", NetAddr.langPort);
|
||||||
|
var player = ~play;
|
||||||
|
|
||||||
// set initial mixer values
|
// set initial mixer values
|
||||||
partVols = [1, 1, 1, 1, 1, 1];
|
partVols = [1, 1, 1, 1, 1, 1];
|
||||||
|
|
@ -264,35 +277,72 @@ faderView = {arg win;
|
||||||
buildTrackFader.value(view, trackNames[part], part);
|
buildTrackFader.value(view, trackNames[part], part);
|
||||||
} ! 7;
|
} ! 7;
|
||||||
|
|
||||||
|
OSCFunc.new({arg msg; {
|
||||||
|
tracks.slice(nil, 3).do({arg mute, m;
|
||||||
|
if(tracks[msg[1]][2].value == 1, {
|
||||||
|
mute.valueAction = if(msg[1] == m, {0}, {1});
|
||||||
|
tracks[m][2].value = if(msg[1] != m, {0}, {1})
|
||||||
|
}, {
|
||||||
|
mute.valueAction = 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}.defer}, '/soloer_' ++ ~hash, netAddr);
|
||||||
|
|
||||||
|
basePath = ~dir +/+ ".." +/+ "mixer_settings";
|
||||||
|
|
||||||
openButton = Button(view).states_([["open", Color.black]]).action_({
|
openButton = Button(view).states_([["open", Color.black]]).action_({
|
||||||
Dialog.openPanel({ arg path;
|
Dialog.openPanel({ arg path;
|
||||||
path.postln;
|
var settings;
|
||||||
},{
|
settings = File.readAllString(path).parseJSON;
|
||||||
"cancelled".postln;
|
tempoField.valueAction = settings["tempo"];
|
||||||
});
|
master[1].valueAction = settings["master_volume"];
|
||||||
|
master[2].valueAction = settings["master_pan"];
|
||||||
|
master[3].valueAction = settings["master_out"];
|
||||||
|
settings["track_volumes"].do({arg val, v; tracks[v][1].valueAction = val});
|
||||||
|
settings["track_solos"].do({arg val, v; tracks[v][2].valueAction = val});
|
||||||
|
settings["track_mutes"].do({arg val, v; tracks[v][3].valueAction = val});
|
||||||
|
settings["track_pans"].do({arg val, v; tracks[v][4].valueAction = val});
|
||||||
|
settings["track_outs"].do({arg val, v; tracks[v][5].valueAction = val});
|
||||||
|
},{}, false, basePath);
|
||||||
});
|
});
|
||||||
|
|
||||||
saveButton = Button(view).states_([["save", Color.black]]).action_({
|
saveButton = Button(view).states_([["save", Color.black]]).action_({
|
||||||
Dialog.savePanel({ arg path;
|
Dialog.savePanel({ arg path;
|
||||||
path.postln;
|
var settings, file;
|
||||||
},{
|
settings = "{\n";
|
||||||
"cancelled".postln;
|
settings = settings ++ "\"tempo\": " ++ tempoField.string ++ ",\n";
|
||||||
});
|
settings = settings ++ "\"master_volume\": " ++ master[1].value ++ ",\n";
|
||||||
|
settings = settings ++ "\"master_mute\": " ++ master[2].value ++ ",\n";
|
||||||
|
settings = settings ++ "\"master_out\": " ++ master[3].value ++ ",\n";
|
||||||
|
settings = settings ++ "\"track_volumes\": [" ++ tracks.collect({arg track; track[1].value}).join(",") ++ "],\n";
|
||||||
|
settings = settings ++ "\"track_solos\": [" ++ tracks.collect({arg track; track[2].value}).join(",") ++ "],\n";
|
||||||
|
settings = settings ++ "\"track_mutes\": [" ++ tracks.collect({arg track; track[3].value}).join(",") ++ "],\n";
|
||||||
|
settings = settings ++ "\"track_pans\": [" ++ tracks.collect({arg track; track[4].value}).join(",") ++ "],\n";
|
||||||
|
settings = settings ++ "\"track_outs\": [" ++ tracks.collect({arg track; track[5].value}).join(",") ++ "]\n";
|
||||||
|
settings = settings ++ "}";
|
||||||
|
file = File(path, "w");
|
||||||
|
file.write(settings);
|
||||||
|
file.close;
|
||||||
|
},{}, basePath);
|
||||||
});
|
});
|
||||||
|
|
||||||
view.layout_(HLayout(HLayout(master[0], nil, *tracks.slice(nil, 0)), VLayout(nil, openButton, saveButton)))
|
view.layout_(HLayout(HLayout(master[0], nil, *tracks.slice(nil, 0)), VLayout(nil, saveButton, openButton)))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildHelpView = {arg win;
|
||||||
helpView = {arg win;
|
|
||||||
TextView(win).string_(File.readAllString(~dir +/+ "tkam_readme.scd")).editable_(false);
|
TextView(win).string_(File.readAllString(~dir +/+ "tkam_readme.scd")).editable_(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
~generateGUI = {arg preampBusses, accompBusses, postampBusses;
|
~generateGUI = {arg preampBusses, accompBusses, postampBusses;
|
||||||
var win, tabButtonReset, transportButton, mixerButton, helpButton, tabs;
|
var win, tabButtonReset, transportButton, mixerButton, helpButton, masterConrol, tempoControl, masterView, faderView, helpView, tabs;
|
||||||
win = Window("to kill a monarch", Rect(500, 500, 1100, 575), false).front;
|
win = Window("to kill a monarch", Rect(500, 500, 1100, 575), false).front;
|
||||||
tabButtonReset = {transportButton.value = 1; mixerButton.value = 1; helpButton.value = 1};
|
tabButtonReset = {transportButton.value = 1; mixerButton.value = 1; helpButton.value = 1};
|
||||||
|
masterConrol = buildMasterView.value(win, preampBusses, accompBusses, postampBusses);
|
||||||
|
masterView = masterConrol[0];
|
||||||
|
tempoControl = masterConrol[1];
|
||||||
|
faderView = buildFaderView.value(win, tempoControl);
|
||||||
|
helpView = buildHelpView.value(win);
|
||||||
|
|
||||||
win.layout = VLayout(
|
win.layout = VLayout(
|
||||||
HLayout(
|
HLayout(
|
||||||
HLayout(
|
HLayout(
|
||||||
|
|
@ -307,6 +357,6 @@ helpView = {arg win;
|
||||||
helpButton = Button().states_([["help", Color.white, Color.grey], ["help", Color.black]]).action_(
|
helpButton = Button().states_([["help", Color.white, Color.grey], ["help", Color.black]]).action_(
|
||||||
{tabButtonReset.value; helpButton.value = 0; tabs.index = 2 }.inEnvir).value_(1)
|
{tabButtonReset.value; helpButton.value = 0; tabs.index = 2 }.inEnvir).value_(1)
|
||||||
),
|
),
|
||||||
tabs = StackLayout(masterView.value(win, preampBusses, accompBusses, postampBusses), faderView.value(win), helpView.value(win)));
|
tabs = StackLayout(masterView, faderView, helpView));
|
||||||
};
|
};
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
(
|
(
|
||||||
var frAdd, frDiff, frToFloat, frNearestInList, frCollapse, harmonicDistance, //helper functions
|
// DATA GENEREATOR - this file IS the piece
|
||||||
|
var frAdd, frDiff, frToFloat, frNearestInList, frCollapse, harmonicDistance,
|
||||||
genMode, hdChoose, wchooseDict, collectRoots,
|
genMode, hdChoose, wchooseDict, collectRoots,
|
||||||
initModeState, advanceMode,
|
initModeState, advanceMode,
|
||||||
initTemporalState, genTemporalData,
|
initTemporalState, genTemporalData,
|
||||||
|
|
@ -38,7 +39,7 @@ frNearestInList = {arg frComp, frDict;
|
||||||
frDict.reject({arg item;
|
frDict.reject({arg item;
|
||||||
(item[\root][0] == frComp[1]) ||
|
(item[\root][0] == frComp[1]) ||
|
||||||
(item[\fr] == frComp[1])
|
(item[\fr] == frComp[1])
|
||||||
}).keys.asList.sort({arg a, b; a.asString < b.asString}).do({arg fr;
|
}).keys.asList.sort({arg a, b; harmonicDistance.value(a) < harmonicDistance.value(b)}).do({arg fr;
|
||||||
var diff = abs(frToFloat.value(fr) - frToFloat.value(frComp[0]));
|
var diff = abs(frToFloat.value(fr) - frToFloat.value(frComp[0]));
|
||||||
if(diff < diffNearest, {diffNearest = diff; frNearest = fr});
|
if(diff < diffNearest, {diffNearest = diff; frNearest = fr});
|
||||||
});
|
});
|
||||||
|
|
@ -58,17 +59,17 @@ harmonicDistance = {arg fr; log2(fr[0].asFloat.product * fr[1].asFloat.product)}
|
||||||
|
|
||||||
|
|
||||||
//~~~~~~~~~~~~GENERATE MODE~~~~~~~~~~~~
|
//~~~~~~~~~~~~GENERATE MODE~~~~~~~~~~~~
|
||||||
//TODO: Play with this a bit more (should I go back to the old way)
|
genMode = {arg forceHS = false;
|
||||||
genMode = {
|
var mode, alternateProb;
|
||||||
var mode;
|
alternateProb = [1, 0].wchoose([if(forceHS, {0}, {1}), 4].normalizeSum);
|
||||||
mode = [
|
mode = [
|
||||||
[1, 1],
|
[1, 1],
|
||||||
[9, 8],
|
[9, 8],
|
||||||
[[5, 4], [6, 5]].wchoose([3, 1].normalizeSum),
|
[[5, 4], [6, 5]].wchoose([3, if(forceHS, {0}, {1})].normalizeSum),
|
||||||
[[4, 3], [11, 8]].wchoose([1, 10].normalizeSum),
|
[[4, 3], [11, 8]].wchoose([alternateProb, 1].normalizeSum),
|
||||||
[3, 2],
|
[3, 2],
|
||||||
[[8, 5], [13, 8]].wchoose([1, 10].normalizeSum),
|
[[8, 5], [13, 8]].wchoose([alternateProb, 1].normalizeSum),
|
||||||
[[15, 8], [7, 4]].wchoose([1, 10].normalizeSum)
|
[[15, 8], [7, 4]].wchoose([alternateProb, 1].normalizeSum)
|
||||||
];
|
];
|
||||||
mode.collect({arg fr; [[1] ++ fr[0].factors, [1] ++ fr[1].factors]});
|
mode.collect({arg fr; [[1] ++ fr[0].factors, [1] ++ fr[1].factors]});
|
||||||
};
|
};
|
||||||
|
|
@ -82,10 +83,13 @@ hdChoose = {arg mode, exp = 1, weights = [1, 1, 1, 1, 1, 1, 1];
|
||||||
mode.wchoose(probs.normalizeSum)
|
mode.wchoose(probs.normalizeSum)
|
||||||
};
|
};
|
||||||
|
|
||||||
//faster sorting algorithm?
|
wchooseDict = {arg dict, exp = 1, limit = 0, isFR = true;
|
||||||
wchooseDict = {arg dict, exp = 1, limit = 0;
|
|
||||||
var keyList, probs;
|
var keyList, probs;
|
||||||
keyList = dict.keys.asList.sort({arg a, b; a.asString < b.asString});
|
keyList = if(isFR, {
|
||||||
|
dict.keys.asList.sort({arg a, b; harmonicDistance.value(a) < harmonicDistance.value(b)});
|
||||||
|
}, {
|
||||||
|
dict.keys.asList.sort({arg a, b; a.convertDigits(2) < b.convertDigits(2)});
|
||||||
|
});
|
||||||
probs = keyList.collect({arg key;
|
probs = keyList.collect({arg key;
|
||||||
var count = dict[key][\count];
|
var count = dict[key][\count];
|
||||||
if(count < limit, {0}, {count})
|
if(count < limit, {0}, {count})
|
||||||
|
|
@ -95,7 +99,7 @@ wchooseDict = {arg dict, exp = 1, limit = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
collectRoots = {arg dict; dict.keys.collect({arg fr;
|
collectRoots = {arg dict; dict.keys.collect({arg fr;
|
||||||
dict[fr][\root][0]}).asList.sort({arg a, b; a.asString < b.asString})
|
dict[fr][\root][0]}).asList.sort({arg a, b; harmonicDistance.value(a) < harmonicDistance.value(b)});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -115,19 +119,19 @@ initModeState = {
|
||||||
curModeState;
|
curModeState;
|
||||||
};
|
};
|
||||||
|
|
||||||
advanceMode = {arg lastModeState, lastCadenceState;
|
advanceMode = {arg lastModeState, lastCadenceState, forceHS = false;
|
||||||
var curModeState, curRoots, lastRoots, lastCadenceRoot, changeCount;
|
var curModeState, curRoots, lastRoots, lastCadenceRoot, changeCount, modSpeed;
|
||||||
|
|
||||||
curModeState = lastModeState.deepCopy;
|
curModeState = lastModeState.deepCopy;
|
||||||
curRoots = collectRoots.value(curModeState);
|
curRoots = collectRoots.value(curModeState);
|
||||||
lastRoots = collectRoots.value(lastModeState);
|
lastRoots = collectRoots.value(lastModeState);
|
||||||
lastCadenceRoot = collectRoots.value(lastCadenceState).asList[0];
|
lastCadenceRoot = collectRoots.value(lastCadenceState).asList[0];
|
||||||
changeCount = 0;
|
changeCount = 0;
|
||||||
|
modSpeed = if(forceHS, {1}, {[1, 2, 3].wchoose([2, 3, 1].normalizeSum)});
|
||||||
|
|
||||||
//change either when there is a single root or a few notes have changed in the mode
|
|
||||||
while({
|
while({
|
||||||
((curRoots == lastRoots) && (changeCount < 3)) ||
|
((curRoots == lastRoots) && (changeCount < modSpeed)) ||
|
||||||
((changeCount < 2) && (curRoots.size > 1))
|
((changeCount < modSpeed) && (curRoots.size > 1))
|
||||||
}, {
|
}, {
|
||||||
var roots, rootSel, mults, multProbs, multSel, new;
|
var roots, rootSel, mults, multProbs, multSel, new;
|
||||||
|
|
||||||
|
|
@ -165,10 +169,9 @@ advanceMode = {arg lastModeState, lastCadenceState;
|
||||||
old = frNearestInList.value([new, rootSel], curModeState);
|
old = frNearestInList.value([new, rootSel], curModeState);
|
||||||
if(curModeState[old][\count] >= 20, {
|
if(curModeState[old][\count] >= 20, {
|
||||||
var mode, root;
|
var mode, root;
|
||||||
mode = genMode.value;
|
|
||||||
root = [rootSel, curModeState[rootSel][\mode]];
|
root = [rootSel, curModeState[rootSel][\mode]];
|
||||||
curModeState.add(new ->
|
curModeState.add(new ->
|
||||||
Dictionary.with(*[\count->1,\mode->genMode.value, \root->root, \mult->multSel, \fr->new]));
|
Dictionary.with(*[\count->1,\mode->genMode.value(forceHS), \root->root, \mult->multSel, \fr->new]));
|
||||||
curModeState.removeAt(old);
|
curModeState.removeAt(old);
|
||||||
changeCount = changeCount + 1;
|
changeCount = changeCount + 1;
|
||||||
})
|
})
|
||||||
|
|
@ -185,14 +188,13 @@ initTemporalState = {
|
||||||
tuple->Dictionary.with(*[\count->1])}))
|
tuple->Dictionary.with(*[\count->1])}))
|
||||||
};
|
};
|
||||||
|
|
||||||
//The temporal density could / should also be based on the parts contribution to the mode
|
|
||||||
genTemporalData = {arg lastTupleState, modeState, cadenceOverride, noParts = 4;
|
genTemporalData = {arg lastTupleState, modeState, cadenceOverride, noParts = 4;
|
||||||
var cadence, curTupleState, timeToNextEvent, tuple, temporalData;
|
var cadence, curTupleState, timeToNextEvent, tuple, temporalData;
|
||||||
|
|
||||||
cadence = if(collectRoots.value(modeState).size == 1, {cadenceOverride.not}, {false});
|
cadence = if(collectRoots.value(modeState).size == 1, {cadenceOverride.not}, {false});
|
||||||
curTupleState = lastTupleState.deepCopy;
|
curTupleState = lastTupleState.deepCopy;
|
||||||
timeToNextEvent = (64 + 50.rand + if(cadence, {50}, {0})).round(16);
|
timeToNextEvent = (64 + 50.rand + if(cadence, {50}, {0})).round(16);
|
||||||
tuple = wchooseDict.value(curTupleState);
|
tuple = wchooseDict.value(curTupleState, isFR: false);
|
||||||
if(cadence, {tuple = [1, 1, 1]});
|
if(cadence, {tuple = [1, 1, 1]});
|
||||||
curTupleState = curTupleState.keysValuesDo({arg key, val;
|
curTupleState = curTupleState.keysValuesDo({arg key, val;
|
||||||
curTupleState[key][\count] = val[\count] + 1});
|
curTupleState[key][\count] = val[\count] + 1});
|
||||||
|
|
@ -203,7 +205,7 @@ genTemporalData = {arg lastTupleState, modeState, cadenceOverride, noParts = 4;
|
||||||
var flourishDensity, genDensity, flourish, beforeLen, before, after, buffer;
|
var flourishDensity, genDensity, flourish, beforeLen, before, after, buffer;
|
||||||
flourishDensity = if(tuple[p] == 1, {0.125 + 0.5.rand}, {3});
|
flourishDensity = if(tuple[p] == 1, {0.125 + 0.5.rand}, {3});
|
||||||
if((p == 0) && cadence.not, {flourishDensity = 3});
|
if((p == 0) && cadence.not, {flourishDensity = 3});
|
||||||
genDensity = if(p == 0, {3}, {20});
|
genDensity = if(p == 0, {5}, {20});
|
||||||
|
|
||||||
flourish = (if(cadence, {16}, {8}) + 32.rand).collect({[0, 1].wchoose([flourishDensity, 1].normalizeSum)});
|
flourish = (if(cadence, {16}, {8}) + 32.rand).collect({[0, 1].wchoose([flourishDensity, 1].normalizeSum)});
|
||||||
buffer = 16.collect({0});
|
buffer = 16.collect({0});
|
||||||
|
|
@ -239,7 +241,9 @@ distributeRoots = {arg modeState, lastRoots;
|
||||||
var roots;
|
var roots;
|
||||||
roots = modeState.keys.asList.collect({arg fr; modeState[fr][\root]});
|
roots = modeState.keys.asList.collect({arg fr; modeState[fr][\root]});
|
||||||
roots = roots.asBag.contents.asPairs.reverse.clump(2);
|
roots = roots.asBag.contents.asPairs.reverse.clump(2);
|
||||||
roots = roots.sort({arg a, b; a[0] > b[0]}).collect({arg item; item[1]}).wrapExtend(4);
|
roots = roots = roots.sort({arg a, b;
|
||||||
|
if(a[0] != b[0], {a[0] > b[0]}, {frToFloat.value(a[1][0]) > frToFloat.value(b[1][0])})}).collect({arg item; item[1]}).wrapExtend(4);
|
||||||
|
|
||||||
roots = [roots[0]] ++ roots[..2].scramble;
|
roots = [roots[0]] ++ roots[..2].scramble;
|
||||||
roots = 4.collect({arg part;
|
roots = 4.collect({arg part;
|
||||||
var root, rootMod, rootFreq, mode;
|
var root, rootMod, rootFreq, mode;
|
||||||
|
|
@ -266,7 +270,6 @@ genEnsemblePart = {arg partState, modeState, temporalData, roots, part, offset;
|
||||||
firstChange = false;
|
firstChange = false;
|
||||||
cadence = if(collectRoots.value(modeState).size == 1, {true}, {false});
|
cadence = if(collectRoots.value(modeState).size == 1, {true}, {false});
|
||||||
lastInsRef = nil;
|
lastInsRef = nil;
|
||||||
if(offset == 0, {cadence = false});
|
|
||||||
|
|
||||||
ensData = [];
|
ensData = [];
|
||||||
temporalData.do({arg val, ts;
|
temporalData.do({arg val, ts;
|
||||||
|
|
@ -274,7 +277,7 @@ genEnsemblePart = {arg partState, modeState, temporalData, roots, part, offset;
|
||||||
|
|
||||||
partState[\lastDur] = partState[\lastDur] + 1;
|
partState[\lastDur] = partState[\lastDur] + 1;
|
||||||
timeStamp = ts + offset;
|
timeStamp = ts + offset;
|
||||||
change = [val == 1, (val == 1) && firstChange.not].wchoose([1, 2].normalizeSum);//5 * abs((curPulse / totalLen).clip(0, 1) - 1)].normalizeSum);
|
change = [val == 1, (val == 1) && firstChange.not].wchoose([1, 2].normalizeSum);
|
||||||
if(
|
if(
|
||||||
(partState[\index] == 0) &&
|
(partState[\index] == 0) &&
|
||||||
(frToFloat.value(partState[\lastFreqRatio]) >= 4.0) &&
|
(frToFloat.value(partState[\lastFreqRatio]) >= 4.0) &&
|
||||||
|
|
@ -285,20 +288,12 @@ genEnsemblePart = {arg partState, modeState, temporalData, roots, part, offset;
|
||||||
if(change, {
|
if(change, {
|
||||||
var mult, multWeights, freq, rootFreq, insRef;
|
var mult, multWeights, freq, rootFreq, insRef;
|
||||||
|
|
||||||
//check that this is working correctly
|
//this weights notes that are richer and mixes with the DCA algorithm
|
||||||
multWeights = mults.collect({arg fr;
|
multWeights = mults.collect({arg fr;
|
||||||
var comp = frCollapse.value(frAdd.value(root, fr));
|
var comp = frCollapse.value(frAdd.value(root, fr));
|
||||||
if(modeState.keys.includes(comp), {3}, {1}) * pow(partState[\multCounts][fr], 1);
|
if(modeState.keys.includes(comp), {3}, {1}) * pow(partState[\multCounts][fr], 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
mult = if( (i == (curPhrase.size - 1)), {
|
|
||||||
hdChoose.value(mults, 3, multWeights);
|
|
||||||
}, {
|
|
||||||
hdChoose.value(mults, 0.5, multWeights);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
mult = hdChoose.value(mults, 0.5, multWeights);
|
mult = hdChoose.value(mults, 0.5, multWeights);
|
||||||
mults.do({arg fr; partState[\multCounts][fr] = partState[\multCounts][fr] + 1});
|
mults.do({arg fr; partState[\multCounts][fr] = partState[\multCounts][fr] + 1});
|
||||||
partState[\multCounts][mult] = 0;
|
partState[\multCounts][mult] = 0;
|
||||||
|
|
@ -314,11 +309,15 @@ genEnsemblePart = {arg partState, modeState, temporalData, roots, part, offset;
|
||||||
modeState[fr][\root][0], modeState[fr][\mult]
|
modeState[fr][\root][0], modeState[fr][\mult]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
mode = mode.sort({arg a, b; frToFloat.value(a[0]) < frToFloat.value(b[0])});
|
mode = mode.sort({arg a, b;
|
||||||
|
case
|
||||||
|
{frToFloat.value(a[0]) != frToFloat.value(b[0])} {frToFloat.value(a[0]) < frToFloat.value(b[0])}
|
||||||
|
{frToFloat.value(a[1]) != frToFloat.value(b[1])} {frToFloat.value(a[1]) < frToFloat.value(b[1])}
|
||||||
|
{true} {frToFloat.value(a[2]) < frToFloat.value(b[2])};
|
||||||
|
});
|
||||||
mode = mode ++ mode.collect({arg fr; [frAdd.value(fr[0], [[2], [1]]), fr[1], fr[2]]});
|
mode = mode ++ mode.collect({arg fr; [frAdd.value(fr[0], [[2], [1]]), fr[1], fr[2]]});
|
||||||
mode = mode ++ mode.collect({arg fr; [frAdd.value(fr[0], [[4], [1]]), fr[1], fr[2]]});
|
mode = mode ++ mode.collect({arg fr; [frAdd.value(fr[0], [[4], [1]]), fr[1], fr[2]]});
|
||||||
continue = true;
|
continue = true;
|
||||||
//check that this is working correctly
|
|
||||||
while({continue}, {
|
while({continue}, {
|
||||||
# freqRatio, root, mult = mode[partState[\noteCount] % 15];
|
# freqRatio, root, mult = mode[partState[\noteCount] % 15];
|
||||||
freq = 36.midicps * trans * frToFloat.value(frAdd.value([[1], [1]], freqRatio));
|
freq = 36.midicps * trans * frToFloat.value(frAdd.value([[1], [1]], freqRatio));
|
||||||
|
|
@ -355,7 +354,7 @@ genAccompPart = {arg modeState, temporalData, offset, trans, part, register;
|
||||||
accompData = [];
|
accompData = [];
|
||||||
temporalData.do({arg val, tS;
|
temporalData.do({arg val, tS;
|
||||||
var change;
|
var change;
|
||||||
change = [val == 1, (val == 1) && firstChange.not].wchoose([1, if(part == 0, {5}, {3})].normalizeSum); //5 * abs((curPulse / totalLen).clip(0, 0.8) - 1)].normalizeSum);
|
change = [val == 1, (val == 1) && firstChange.not].wchoose([1, if(part == 0, {5}, {3})].normalizeSum);
|
||||||
if(change, {
|
if(change, {
|
||||||
var sel, freq, amp;
|
var sel, freq, amp;
|
||||||
sel = wchooseDict.value(modeState, 0.1);
|
sel = wchooseDict.value(modeState, 0.1);
|
||||||
|
|
@ -402,12 +401,12 @@ genAmpCurve = {arg temporalData1, temporalData2, offset1, offset2, type;
|
||||||
{1} {temporalData2[0].size - firsts2.maxItem}
|
{1} {temporalData2[0].size - firsts2.maxItem}
|
||||||
{2} {(offset2 - temporalData2[0].size) - offset1} ;
|
{2} {(offset2 - temporalData2[0].size) - offset1} ;
|
||||||
min = switch(type)
|
min = switch(type)
|
||||||
{0} {0.25}
|
{0} {0.15}
|
||||||
{1} {0}
|
{1} {0}
|
||||||
{2} {0};
|
{2} {0};
|
||||||
max = switch(type)
|
max = switch(type)
|
||||||
{0} {0.5}
|
{0} {0.5}
|
||||||
{1} {0.75}
|
{1} {0.65}
|
||||||
{2} {1};
|
{2} {1};
|
||||||
|
|
||||||
env = Env.dadsr(delay, attack, decay, 0.25, release, curve: \cub).range(min, max);
|
env = Env.dadsr(delay, attack, decay, 0.25, release, curve: \cub).range(min, max);
|
||||||
|
|
@ -415,11 +414,11 @@ genAmpCurve = {arg temporalData1, temporalData2, offset1, offset2, type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//~~~~~~~~~~~~GENERATE ALL MUSIC DATA~~~~~~~~~~~~
|
//~~~~~~~~~~~~GENERATE ALL MUSIC DATA~~~~~~~~~~~~
|
||||||
~genMusicData = {arg seed;
|
~genMusicData = {arg seed;
|
||||||
var totalDur, section1Dur, dUnit, curLen, cadence, ultimate,
|
var minTotalDur, minSection1Dur, dUnit, curLen, cadence,
|
||||||
totalLen, section1Len,
|
ultimateSubsection, ultimateSection, ultimateCadenceCount,
|
||||||
|
minTotalLen, minSection1Len,
|
||||||
modeState, temporalState, partStates,
|
modeState, temporalState, partStates,
|
||||||
lastCadenceTemporalData, lastCadenceState, lastSectionPoint,
|
lastCadenceTemporalData, lastCadenceState, lastSectionPoint,
|
||||||
ensData, accompData, bassData, ampData,
|
ensData, accompData, bassData, ampData,
|
||||||
|
|
@ -427,47 +426,51 @@ genAmpCurve = {arg temporalData1, temporalData2, offset1, offset2, type;
|
||||||
sectionCount, subsectionCount,
|
sectionCount, subsectionCount,
|
||||||
lastRoots, roots, ampDataTmp;
|
lastRoots, roots, ampDataTmp;
|
||||||
|
|
||||||
thisThread.randSeed = seed.postln;
|
thisThread.randSeed = seed;
|
||||||
|
|
||||||
# totalDur, section1Dur, dUnit, curLen, cadence, ultimate = [2 * 60, 1 * 60, 8.reciprocal, 0, false, false];
|
# minTotalDur, minSection1Dur, dUnit, curLen, cadence = [23 * 60, 8 * 60, 8.reciprocal, 0, false];
|
||||||
# totalLen, section1Len = [(totalDur / dUnit).round(16), (section1Dur / dUnit).round(16)];
|
# ultimateSubsection, ultimateSection, ultimateCadenceCount = [false, false, 0];
|
||||||
|
# minTotalLen, minSection1Len = [(minTotalDur / dUnit).round(16), (minSection1Dur / dUnit).round(16)];
|
||||||
# modeState, temporalState, partStates = [initModeState.value, initTemporalState.value, initPartStates.value];
|
# modeState, temporalState, partStates = [initModeState.value, initTemporalState.value, initPartStates.value];
|
||||||
# lastCadenceTemporalData, lastCadenceState, lastSectionPoint = [nil, modeState.deepCopy, 0];
|
# lastCadenceTemporalData, lastCadenceState, lastSectionPoint = [nil, modeState.deepCopy, 0];
|
||||||
# ensData, accompData, bassData, ampData = [4.collect({[]}), 4.collect({6.collect({[]})}), 2.collect({[]}), 3.collect({[]})];
|
# ensData, accompData, bassData, ampData = [4.collect({[]}), 4.collect({6.collect({[]})}), 2.collect({[]}), 3.collect({[]})];
|
||||||
# sectionData, sectionNavDict = [Dictionary.new, Dictionary.new];
|
# sectionData, sectionNavDict = [Dictionary.new, Dictionary.new];
|
||||||
# sectionCount, subsectionCount = [1, 1];
|
# sectionCount, subsectionCount = [1, 1];
|
||||||
|
|
||||||
while({(curLen < totalLen) || ((curLen >= totalLen) && cadence.not)}, {
|
while({(curLen < minTotalLen) || ((curLen >= minTotalLen) && cadence.not) || ultimateSection.not}, {
|
||||||
var temporalData;
|
var temporalData;
|
||||||
# temporalData, temporalState = genTemporalData.value(temporalState, modeState, curLen <= section1Len);
|
# temporalData, temporalState = genTemporalData.value(temporalState, modeState, curLen <= minSection1Len);
|
||||||
|
|
||||||
collectRoots.value(modeState).collect({arg fr; [fr[0].asFloat.product, fr[1].asFloat.product]}).postln;
|
collectRoots.value(modeState).collect({arg fr; [fr[0].asFloat.product, fr[1].asFloat.product]}).postln;
|
||||||
//modeState.keys.postln;
|
//modeState.keys.postln;
|
||||||
"-----------".postln;
|
("-- " ++ sectionCount ++ "." ++ subsectionCount ++ " -----").postln;
|
||||||
|
|
||||||
lastRoots = if(curLen == 0, {4.collect({[[1], [1]]})}, {roots.slice(nil, 0)});
|
lastRoots = if(curLen == 0, {4.collect({[[1], [1]]})}, {roots.slice(nil, 0)});
|
||||||
roots = distributeRoots.value(modeState, lastRoots);
|
roots = distributeRoots.value(modeState, lastRoots);
|
||||||
|
|
||||||
sectionData.add((curLen / 4).asInteger->[roots, lastRoots.collect({arg fr, part;
|
sectionData.add((curLen / 4).asInteger->[roots, lastRoots.collect({arg fr, part;
|
||||||
[fr, 36.midicps * pow(2, [1, 0, 1, 2][part]) * frToFloat.value(fr)]}), sectionCount, subsectionCount, cadence, ultimate]);
|
[fr, 36.midicps * pow(2, [1, 0, 1, 2][part]) * frToFloat.value(fr)]}), sectionCount, subsectionCount, cadence, ultimateSubsection]);
|
||||||
sectionNavDict.add([sectionCount, subsectionCount]->[(curLen / 16 + 1).asInteger]);
|
sectionNavDict.add([sectionCount, subsectionCount]->[(curLen / 16 + 1).asInteger]);
|
||||||
|
|
||||||
4.do({arg part;
|
4.do({arg part;
|
||||||
var musicData, partState, noteCountInd;
|
var musicData, partState, accompRoutine;
|
||||||
# musicData, partState = genEnsemblePart.value(partStates[part], modeState, temporalData[part], roots, part, curLen);
|
# musicData, partState = genEnsemblePart.value(partStates[part], modeState, temporalData[part], roots, part, curLen);
|
||||||
ensData[part] = ensData[part] ++ musicData;
|
ensData[part] = ensData[part] ++ musicData;
|
||||||
partStates[part] = partState;
|
partStates[part] = partState;
|
||||||
|
|
||||||
|
//use an independent random number generator for the accompaniment
|
||||||
|
accompRoutine = Routine({
|
||||||
thisThread.randSeed = Date.seed;
|
thisThread.randSeed = Date.seed;
|
||||||
6.do({arg register;
|
6.do({arg register;
|
||||||
musicData = genAccompPart.value(modeState, temporalData[part], curLen, pow(2, part + register), part, register);
|
musicData = genAccompPart.value(modeState, temporalData[part], curLen, pow(2, part + register), part, register);
|
||||||
accompData[part][register] = accompData[part][register] ++ musicData;
|
accompData[part][register] = accompData[part][register] ++ musicData;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
accompRoutine.value;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
subsectionCount = subsectionCount + 1;
|
subsectionCount = subsectionCount + 1;
|
||||||
thisThread.randSeed = (seed + (sectionCount * 200) + subsectionCount);
|
|
||||||
|
|
||||||
if(curLen == 0, {
|
if(curLen == 0, {
|
||||||
lastCadenceTemporalData = temporalData;
|
lastCadenceTemporalData = temporalData;
|
||||||
|
|
@ -476,7 +479,7 @@ genAmpCurve = {arg temporalData1, temporalData2, offset1, offset2, type;
|
||||||
|
|
||||||
curLen = curLen + temporalData[0].size;
|
curLen = curLen + temporalData[0].size;
|
||||||
|
|
||||||
if(curLen > section1Len, {
|
if(curLen > minSection1Len, {
|
||||||
if(collectRoots.value(modeState).size == 1, {
|
if(collectRoots.value(modeState).size == 1, {
|
||||||
|
|
||||||
ampData[0] = ampData[0] ++ genAmpCurve.value(lastCadenceTemporalData, temporalData, lastSectionPoint, curLen, 0);
|
ampData[0] = ampData[0] ++ genAmpCurve.value(lastCadenceTemporalData, temporalData, lastSectionPoint, curLen, 0);
|
||||||
|
|
@ -501,14 +504,18 @@ genAmpCurve = {arg temporalData1, temporalData2, offset1, offset2, type;
|
||||||
# sectionCount, subsectionCount = [sectionCount + 1, 1];
|
# sectionCount, subsectionCount = [sectionCount + 1, 1];
|
||||||
# lastCadenceTemporalData, lastCadenceState, lastSectionPoint = [temporalData, modeState, curLen];
|
# lastCadenceTemporalData, lastCadenceState, lastSectionPoint = [temporalData, modeState, curLen];
|
||||||
cadence = true;
|
cadence = true;
|
||||||
|
|
||||||
|
//this should ensure that the final cadence is a HS
|
||||||
|
if(curLen >= minTotalLen, {ultimateCadenceCount = ultimateCadenceCount + 1});
|
||||||
|
ultimateSection = ultimateCadenceCount > 1;
|
||||||
}, {
|
}, {
|
||||||
cadence = false
|
cadence = false
|
||||||
});
|
});
|
||||||
modeState = advanceMode.value(modeState, lastCadenceState);
|
modeState = advanceMode.value(modeState, lastCadenceState, curLen >= minTotalLen);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
ampDataTmp = genAmpCurve.value(lastCadenceTemporalData, [[1], [1], [1], [1]], lastSectionPoint, lastSectionPoint + 80, 2);
|
ampDataTmp = genAmpCurve.value(lastCadenceTemporalData, [[1], [1], [1], [1]], lastSectionPoint, lastSectionPoint + 360, 2);
|
||||||
ampData[2] = ampData[2] ++ ampDataTmp;
|
ampData[2] = ampData[2] ++ ampDataTmp;
|
||||||
bassData[1] = bassData[1] ++ genBassPart.value(collectRoots.value(lastCadenceState).asList[0], ampDataTmp, false);
|
bassData[1] = bassData[1] ++ genBassPart.value(collectRoots.value(lastCadenceState).asList[0], ampDataTmp, false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,11 @@ The play button will always start from the beginning of the current section.
|
||||||
|
|
||||||
The transport buttons allow you to advance by subsection (<,>) and section (<<,>>).
|
The transport buttons allow you to advance by subsection (<,>) and section (<<,>>).
|
||||||
|
|
||||||
Tempo change will only go into effect once "set tempo" button is pressed.
|
Tempo change will only go into effect once the enter key or "set tempo" button is pressed.
|
||||||
|
|
||||||
Setting the address:port will create a pipe to recieve a message to advance the subsection externally with an OSC message '/nextSubsection. This could be used to set up a foot pedal / controller for the guitarist to advance the subsections manually.
|
The default seed given in the application will generate the first version of the music and score (as provided). Changing the seed will generate a new version with that seed once the "generate" button is pressed. After the new version is generated, new Lilypond files can be generated by pressing the "transcribe" button. This will create a tkam_score.ly file in a folder labeled "seed_[number]" which can be rendered by Lilypond. Note that the file must be rendered from that location as it dependes on files in that folder and the "includes" subfolder.
|
||||||
|
|
||||||
The default seed given in the application and reseeded when the "reset seed" button is pressed will generate the default music and score (as provided). Changing the seed will generate a new version with that seed once the "generate" button is pressed. After the new version is generated, new Lilypond files can be generated by pressing the "transcribe" button. This will create a cicc_score.ly file in a folder labeled "seed_[number]" which can be rendered by Lilypond. Note that the file must be rendered from that location as it dependes in files in that folder and the "includes" subfolder.
|
|
||||||
|
|
||||||
|
|
||||||
~~~~mixer tab
|
~~~~mixer tab
|
||||||
This allow invidual control of each of the sonic elements. The synthesized guitar part is automatically muted is at should only be used for audition and practice. The low accompaniment has two separate tracks in case a performer cannot play both the notes. The sonification will go to outputs 1 and 2 while the click will go to outputs 3 and 4.
|
This allow invidual control of each of the sonic elements. The three parts that can be played on acoustic instruments are automatically muted. The outputs will go out to whatever sound card is being used by the system.
|
||||||
*/
|
*/
|
||||||
|
|
@ -15,58 +15,56 @@ var formatPatternData;
|
||||||
var sdPlayer, sdTransport, sdClick, sdAmpCurve, sdEns, sdAccomp, sdClip, sdBass, sdDiskOut, allSds;
|
var sdPlayer, sdTransport, sdClick, sdAmpCurve, sdEns, sdAccomp, sdClip, sdBass, sdDiskOut, allSds;
|
||||||
|
|
||||||
sdPlayer = SynthDef(\masterPlayerControl_ ++ ~hash, {
|
sdPlayer = SynthDef(\masterPlayerControl_ ++ ~hash, {
|
||||||
var sigs, sigsPanned, masterSig, imp;
|
var router, sigs, sigsPanned, masterSig, imp;
|
||||||
|
|
||||||
sigs = postampBusses.collect({arg bus, i; In.ar(bus) * NamedControl.kr(\vol_ ++ i, 1, 0.1)});
|
sigs = postampBusses.collect({arg bus, i; In.ar(bus) * NamedControl.kr(\vol_ ++ i, 1, 0.1) * NamedControl.kr(\mute_ ++ i, 1, 0.1)});
|
||||||
sigsPanned = sigs.collect({arg sig, i; Pan2.ar(sig * NamedControl.kr(\mute_ ++ i, 1, 0.1), NamedControl.kr(\pan_ ++ i, 0, 0.1))});
|
router = sigs.collect({arg sig, i; NamedControl.kr(\out_ ++ i, 0, 0)});
|
||||||
masterSig = Mix.ar(sigsPanned.drop(-1)) * NamedControl.kr(\masterVol, 1, 0.1) * NamedControl.kr(\masterMute, 1, 0.1);
|
sigs.collect({arg sig, i; Out.ar(router[i] - 1, sig * router[i].sign)});
|
||||||
|
|
||||||
Out.ar(0, masterSig);
|
sigsPanned = sigs.collect({arg sig, i; Pan2.ar(sig, NamedControl.kr(\pan_ ++ i, 0, 0.1))});
|
||||||
Out.ar(2, sigsPanned.last); //change this if you want the click to go somewhere else
|
masterSig = Mix.ar(sigsPanned.collect({arg sig, i; sig * abs(router[i].sign - 1)}));
|
||||||
|
masterSig = masterSig * NamedControl.kr(\masterVol, 1, 0.1) * NamedControl.kr(\masterMute, 1, 0.1);
|
||||||
|
|
||||||
|
Out.ar(NamedControl.kr(\masterOut, 0, 0), masterSig);
|
||||||
|
|
||||||
imp = Impulse.kr(10);
|
imp = Impulse.kr(10);
|
||||||
SendReply.kr(imp, '/masterLevels_' ++ ~hash, values: [Amplitude.kr(masterSig)]);
|
SendReply.kr(imp, '/masterLevels_' ++ ~hash, values: [Amplitude.kr(masterSig)]);
|
||||||
sigs.collect({arg sig, i; SendReply.kr(imp, '/trackLevel_' ++ i ++ "_" ++ ~hash, values: [Amplitude.kr(sig)])});
|
sigs.collect({arg sig, i; SendReply.kr(imp, '/trackLevel_' ++ i ++ "_" ++ ~hash, values: [Amplitude.kr(sig)])});
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
|
|
||||||
sdTransport = SynthDef(\transport_ ++ ~hash, {arg measure = 0, beat = 0, section = 0, subsection = 0, gate = 1, dur = 1;
|
sdTransport = SynthDef(\transport_ ++ ~hash, {arg measure = 0, beat = 0, section = 0, subsection = 0, gate = 1, dur = 1;
|
||||||
SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock_' ++ ~hash, values: [measure, beat, section, subsection]);
|
SendReply.kr(Impulse.kr(0) * (measure > 0) * (beat > 0),'/measureClock_' ++ ~hash, values: [measure, beat, section, subsection]);
|
||||||
//SendReply.kr(Impulse.kr(0),'/nextSubsection_' ++ ~hash);
|
|
||||||
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
|
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
|
|
||||||
sdClick = SynthDef(\click_ ++ ~hash, {arg beat = 0, gate = 1, dur = 1;
|
sdClick = SynthDef(\click_ ++ ~hash, {arg beat = 0, gate = 1, dur = 1;
|
||||||
Out.ar(postampBusses[6], 10 * BPF.ar(WhiteNoise.ar * EnvGen.kr(Env.perc(0.01, 0.1), gate), 440 * ((beat <= 1) + 1), 0.02));
|
Out.ar(postampBusses[6], 10 * BPF.ar(WhiteNoise.ar * EnvGen.kr(Env.perc(0.01, 0.1), gate), 440 * ((beat <= 1) + 1), 0.02));
|
||||||
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
|
EnvGen.kr(Env.sine(dur), gate, doneAction: 2);
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
sdAmpCurve = SynthDef(\amp_curve_ ++ ~hash, {arg amp = 0, dur = 0.1, gate = 1, bus = 0;
|
sdAmpCurve = SynthDef(\amp_curve_ ++ ~hash, {arg amp = 1, dur = 0.1, bus = 0;
|
||||||
Out.kr(bus, amp)
|
Out.kr(bus, amp.lag)
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
sdEns = SynthDef(\ens_ ++ ~hash, {arg freq = 440, amp = 1, dur = 1, gate = 1, bus = 0, ampBus = 0;
|
sdEns = SynthDef(\ens_ ++ ~hash, {arg freq = 440, amp = 1, dur = 1, gate = 1, bus = 0, ampBus = 0, rel = 0.1;
|
||||||
Out.ar(bus, SinOsc.ar(freq, 2pi.rand, 0.1) * Latch.kr(In.kr(ampBus), Impulse.kr(0)) * EnvGen.kr(Env.asr(0.1, 1, 0.1), gate, doneAction: 2))
|
Out.ar(bus, SinOsc.ar(freq, 2pi.rand, 0.1) * amp * Latch.kr(In.kr(ampBus), Impulse.kr(0)) * EnvGen.kr(Env.asr(0.1, 1, rel), gate, doneAction: 2))
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
sdAccomp = SynthDef(\accomp_ ++ ~hash, {arg freq = 440, amp = 1, attack = 1, dur = 1, gate = 1, bout = 0, ampBus = 0;
|
sdAccomp = SynthDef(\accomp_ ++ ~hash, {arg freq = 440, amp = 1, sustain = 1, dur = 1, gate = 1, bout = 0, ampBus = 0, rel = 0.01;
|
||||||
Out.ar(bout, SinOsc.ar(freq, 2pi.rand, 1) * 0.01 * amp * Latch.kr(In.kr(ampBus), Impulse.kr(0)) * EnvGen.kr(Env.asr(attack, 1, 0.01), gate, doneAction: 2))
|
Out.ar(bout, SinOsc.ar(freq, 2pi.rand, 1) * 0.01 * amp * Latch.kr(In.kr(ampBus), Impulse.kr(0)) * EnvGen.kr(Env.asr(sustain, 1, rel), gate, doneAction: 2))
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
sdClip = SynthDef(\clip_ ++ ~hash, {arg dur = 1, gate = 1, bin = 0, bus = 0;
|
sdClip = SynthDef(\clip_ ++ ~hash, {arg dur = 1, gate = 1, bin = 0, bus = 0;
|
||||||
//Out.ar([0, 1], (In.ar(bin)).clip(0, 1) * pow(Line.kr(0, 1, 240), 2))
|
Out.ar(bus, (In.ar(bin)).clip(0, 1) * 50)
|
||||||
Out.ar(bus, (In.ar(bin)).clip(0, 1) * 50 * pow(Line.kr(0, 1, 10), 2))
|
});
|
||||||
}).add;
|
|
||||||
|
|
||||||
sdBass = SynthDef(\bass_mono_ ++ ~hash, {arg freq = 440, ampBus = 0, bus = 0;
|
sdBass = SynthDef(\bass_mono_ ++ ~hash, {arg freq = 440, ampBus = 0, bus = 0;
|
||||||
Poll.kr(Changed.kr(In.kr(ampBus)), In.kr(ampBus));
|
Out.ar(bus, (SinOsc.ar(freq) * 0.5 * In.kr(ampBus)))
|
||||||
Out.ar(bus, (SinOsc.ar(freq) * 0.4 * In.kr(ampBus)))
|
});
|
||||||
}).add;
|
|
||||||
|
|
||||||
sdDiskOut = SynthDef(\disk_out_ ++ ~hash, {arg bufnum, inbus;
|
sdDiskOut = SynthDef(\disk_out_ ++ ~hash, {arg bufnum, inbus;
|
||||||
DiskOut.ar(bufnum, In.ar(inbus));
|
DiskOut.ar(bufnum, In.ar(inbus));
|
||||||
}).add;
|
});
|
||||||
|
|
||||||
allSds = [sdPlayer, sdTransport, sdClick, sdAmpCurve, sdEns, sdAccomp, sdClip, sdBass, sdDiskOut];
|
allSds = [sdPlayer, sdTransport, sdClick, sdAmpCurve, sdEns, sdAccomp, sdClip, sdBass, sdDiskOut];
|
||||||
allSds.do({arg sd; sd.add});
|
allSds.do({arg sd; sd.add});
|
||||||
|
|
@ -75,12 +73,14 @@ var formatPatternData;
|
||||||
|
|
||||||
|
|
||||||
// group data by measures for navigation
|
// group data by measures for navigation
|
||||||
formatPatternData = {arg musData, measureLen;
|
formatPatternData = {arg musData, measureLen, rel, print = false;
|
||||||
var dataLen;
|
var dataLen;
|
||||||
dataLen = musData[0][0].size;
|
dataLen = musData[0][0].size + 1;
|
||||||
musData.collect({arg partData;
|
musData.collect({arg partData;
|
||||||
var res;
|
var res;
|
||||||
res = partData.flop;
|
res = partData;
|
||||||
|
res = res.collect({arg mData, index; mData.add(if(index != (res.size - 1), {rel}, {5.rand + 5}))});
|
||||||
|
res = res.flop;
|
||||||
res = res.add(res[1]);
|
res = res.add(res[1]);
|
||||||
res[1] = (res[1].differentiate.drop(1) ++ [10]);
|
res[1] = (res[1].differentiate.drop(1) ++ [10]);
|
||||||
res = res.flop ++ measureLen.collect({arg measure; dataLen.collect({0}) ++ [measure * 16]});
|
res = res.flop ++ measureLen.collect({arg measure; dataLen.collect({0}) ++ [measure * 16]});
|
||||||
|
|
@ -104,8 +104,8 @@ formatPatternData = {arg musData, measureLen;
|
||||||
accompData.flatten.collect({arg partData; partData.last[1]})
|
accompData.flatten.collect({arg partData; partData.last[1]})
|
||||||
).maxItem.ceil(16) / 16).asInteger + 1;
|
).maxItem.ceil(16) / 16).asInteger + 1;
|
||||||
|
|
||||||
ensDataFormatted = formatPatternData.value(ensData, measureLen);
|
ensDataFormatted = formatPatternData.value(ensData, measureLen, 0.1, true);
|
||||||
accompDataFormatted = formatPatternData.value(accompData.flatten, measureLen);
|
accompDataFormatted = formatPatternData.value(accompData.flatten, measureLen, 0.01);
|
||||||
dUnit = 8.reciprocal;
|
dUnit = 8.reciprocal;
|
||||||
|
|
||||||
patterns = measureLen.collect({arg measure;
|
patterns = measureLen.collect({arg measure;
|
||||||
|
|
@ -115,30 +115,29 @@ formatPatternData = {arg musData, measureLen;
|
||||||
});
|
});
|
||||||
Ppar(
|
Ppar(
|
||||||
//check how amplitude is being handled
|
//check how amplitude is being handled
|
||||||
ensDataFormatted[measure].collect({arg musData, m;
|
ensDataFormatted[measure].collect({arg musData, p;
|
||||||
Pbind(
|
Pbind(
|
||||||
\instrument, \ens_ ++ ~hash,
|
\instrument, \ens_ ++ ~hash,
|
||||||
\freq, Pseq(musData[0].replace(0, Rest(0))),
|
\freq, Pseq(musData[0].replace(0, Rest(0))),
|
||||||
\dur, Pseq(musData[1] * dUnit),
|
\dur, Pseq(musData[1] * dUnit),
|
||||||
\sustain, Pseq(musData[2] * dUnit),
|
\sustain, Pseq(musData[2] * dUnit),
|
||||||
\amp, [0.5, 0.3, 0.3, 0.3][m],
|
\amp, [1, 0.7, 0.5, 0.3][p],
|
||||||
//\amp, Pseq(musData[2].collect({arg item; [0, 0.25, 0.5, 0.75][item]}) * [1, 0.5, 0.25, 0.1][m] * 16);
|
|
||||||
\ampBus, preampBusses[0].index,
|
\ampBus, preampBusses[0].index,
|
||||||
\bus, postampBusses[m].index
|
\bus, postampBusses[p].index,
|
||||||
|
\rel, Pseq(musData[6])
|
||||||
)
|
)
|
||||||
}) ++
|
}) ++
|
||||||
//check how amplitude and attack are being handled
|
//check how amplitude and attack are being handled
|
||||||
accompDataFormatted[measure].collect({arg musData, m;
|
accompDataFormatted[measure].collect({arg musData;
|
||||||
Pbind(
|
Pbind(
|
||||||
\instrument, \accomp_ ++ ~hash,
|
\instrument, \accomp_ ++ ~hash,
|
||||||
\freq, Pseq(musData[0].replace(0, Rest(0))),
|
\freq, Pseq(musData[0].replace(0, Rest(0))),
|
||||||
\dur, Pseq(musData[1] * dUnit),
|
\dur, Pseq(musData[1] * dUnit),
|
||||||
\sustain, Pseq(musData[2] * dUnit),
|
\sustain, Pseq(musData[2] * dUnit),
|
||||||
\amp, Pseq(musData[3].collect({arg item; [0, 2, 4, 8][item]}) * 0.0125 * 1),
|
\amp, Pseq(musData[3].collect({arg item; [0, 2, 4, 8][item]}) * 0.0125 * 1),
|
||||||
//\attack, Pseq(musData[1] * abs(musData[3].clip(0, 0.25) * 2 - 1) * dUnit),
|
|
||||||
\attack, Pseq(musData[2] * 1 * dUnit),
|
|
||||||
\ampBus, preampBusses[0].index,
|
\ampBus, preampBusses[0].index,
|
||||||
\bout, Pseq(musData[4].collect({arg index; accompBusses[index].index}))
|
\bout, Pseq(musData[4].collect({arg index; accompBusses[index].index})),
|
||||||
|
\rel, Pseq(musData[5])
|
||||||
)
|
)
|
||||||
}) ++
|
}) ++
|
||||||
[
|
[
|
||||||
|
|
@ -193,7 +192,7 @@ formatPatternData = {arg musData, measureLen;
|
||||||
preampBusses, nextNode, accompBusses, postampBusses,
|
preampBusses, nextNode, accompBusses, postampBusses,
|
||||||
synths, prePatterns, playablePatterns, score;
|
synths, prePatterns, playablePatterns, score;
|
||||||
|
|
||||||
trackNames = ["part_start", "part_III", "part_II", "part_I", "accomp_I", "accomp_II", "click"];
|
trackNames = ["part_star", "part_III", "part_II", "part_I", "accomp_II", "accomp_I", "click"];
|
||||||
|
|
||||||
basePath = ~dir +/+ ".." +/+ "audio" +/+ "seed_" ++ seed;
|
basePath = ~dir +/+ ".." +/+ "audio" +/+ "seed_" ++ seed;
|
||||||
basePath.mkdir;
|
basePath.mkdir;
|
||||||
|
|
@ -213,7 +212,7 @@ formatPatternData = {arg musData, measureLen;
|
||||||
|
|
||||||
playablePatterns = ~genPlayablePatterns.value(0, prePatterns, preampBusses, accompBusses, postampBusses);
|
playablePatterns = ~genPlayablePatterns.value(0, prePatterns, preampBusses, accompBusses, postampBusses);
|
||||||
|
|
||||||
recDur = (prePatterns[2][0].size / 8) + 10;
|
recDur = (prePatterns[2][0].size / 8) + 45;
|
||||||
score = playablePatterns.asScore(duration: recDur, timeOffset: 0.001);
|
score = playablePatterns.asScore(duration: recDur, timeOffset: 0.001);
|
||||||
nextNode = score.score.slice(nil, 1).select({arg msg; msg[0] == 9}).slice(nil, 2).maxItem + 1;
|
nextNode = score.score.slice(nil, 1).select({arg msg; msg[0] == 9}).slice(nil, 2).maxItem + 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ formatMusicData = {arg rawMusicData;
|
||||||
});
|
});
|
||||||
|
|
||||||
//make them all the same length
|
//make them all the same length
|
||||||
maxSize = maxSize.trunc(16) + 16;
|
maxSize = maxSize.trunc(64) + 64;
|
||||||
musicData = musicData.collect({arg partData, p; partData.extend(maxSize, [-1, -1, -1, partData.last[1]])});
|
musicData = musicData.collect({arg partData, p; partData.extend(maxSize, partData.last)});
|
||||||
musicData
|
musicData
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ lyFinalizeMusic = {arg lyStr, part, name, nameShort, nameMidi, clef;
|
||||||
"\n\\set Score.markFormatter = #format-mark-box-numbers " +
|
"\n\\set Score.markFormatter = #format-mark-box-numbers " +
|
||||||
"\\tempo 2 = 60\n" +
|
"\\tempo 2 = 60\n" +
|
||||||
"\\numericTimeSignature \\time 2/2\n" +
|
"\\numericTimeSignature \\time 2/2\n" +
|
||||||
"\\clef " ++ clef ++ "\n" ++ lyStr ++
|
"\\clef " ++ clef ++ "\n" ++ lyStr + "\\fermata" +
|
||||||
" }>> \\bar \"|.\" \n} \n\n>>" ++
|
" }>> \\bar \"|.\" \n} \n\n>>" ++
|
||||||
"\n>>"
|
"\n>>"
|
||||||
};
|
};
|
||||||
|
|
@ -113,7 +113,7 @@ lyRelMark = {arg root, lastRoot, section, subsection;
|
||||||
|
|
||||||
lyRelMarkNote.value(root, lastRoot, 1, "bass") ++ "^\\markup{\\large \\raise #2 \"III\"}" ++
|
lyRelMarkNote.value(root, lastRoot, 1, "bass") ++ "^\\markup{\\large \\raise #2 \"III\"}" ++
|
||||||
|
|
||||||
lyHBracket.value(lyFreqRatio.value(root[2][4][2], nil, true, 0, false), 8.5, 1, 2, 1, 1) ++
|
lyHBracket.value(lyFreqRatio.value(root[1][4][2], nil, true, 0, false), 8.5, 1, 2, 1, 1) ++
|
||||||
lyHBracket.value(lyFreqRatio.value(root[2][4][1], nil, true, 0, false), 5.5, 3, 3, 0, 0) ++
|
lyHBracket.value(lyFreqRatio.value(root[2][4][1], nil, true, 0, false), 5.5, 3, 3, 0, 0) ++
|
||||||
|
|
||||||
"\\hide c16 \n " ++
|
"\\hide c16 \n " ++
|
||||||
|
|
@ -121,7 +121,7 @@ lyRelMark = {arg root, lastRoot, section, subsection;
|
||||||
lyRelMarkNote.value(root, lastRoot, 2, "alto") ++ "^\\markup{\\large \\raise #2 \"II\"}" +
|
lyRelMarkNote.value(root, lastRoot, 2, "alto") ++ "^\\markup{\\large \\raise #2 \"II\"}" +
|
||||||
"\\stopGroup \\hide c'16 \n " ++
|
"\\stopGroup \\hide c'16 \n " ++
|
||||||
|
|
||||||
lyHBracket.value(lyFreqRatio.value(root[1][4][2], nil, true, 0, false), 5.5, 1, 3, 0, 0) ++
|
lyHBracket.value(lyFreqRatio.value(root[2][4][2], nil, true, 0, false), 5.5, 1, 3, 0, 0) ++
|
||||||
|
|
||||||
lyRelMarkNote.value(root, lastRoot, 3, "treble") ++ "^\\markup{\\large \\raise #2 \"I\"}" +
|
lyRelMarkNote.value(root, lastRoot, 3, "treble") ++ "^\\markup{\\large \\raise #2 \"I\"}" +
|
||||||
"\\stopGroup \\stopGroup \n " ++
|
"\\stopGroup \\stopGroup \n " ++
|
||||||
|
|
|
||||||
BIN
to_kill_a_monarch_score.pdf
Normal file
BIN
to_kill_a_monarch_score.pdf
Normal file
Binary file not shown.
Loading…
Reference in a new issue