diff --git a/latex/seeds_and_ledgers_1_to_3.log b/latex/seeds_and_ledgers_1_to_3.log index afbdb5b..f106e01 100644 --- a/latex/seeds_and_ledgers_1_to_3.log +++ b/latex/seeds_and_ledgers_1_to_3.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=pdflatex 2024.2.5) 7 MAR 2024 16:22 +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=pdflatex 2024.2.5) 7 MAR 2024 17:58 entering extended mode \write18 enabled. %&-line parsing enabled. @@ -148,152 +148,6 @@ LaTeX Info: Redefining \] on input line 2954. \xmathstrut@box=\box53 \xmathstrut@dim=\dimen167 ) -(/usr/share/texmf-dist/tex/latex/minted/minted.sty -Package: minted 2022/12/12 v2.7 Yet another Pygments shim for LaTeX - -(/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty -Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) - -(/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty -Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) -) -(/usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty -Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) -)) -(/usr/share/texmf-dist/tex/latex/fvextra/fvextra.sty -Package: fvextra 2022/11/30 v1.5 fvextra - extensions and patches for fancyvrb - -(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty -Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW) -\etb@tempcnta=\count278 -) -(/usr/share/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty -Package: fancyvrb 2023/01/19 4.5a verbatim text (tvz,hv) -\FV@CodeLineNo=\count279 -\FV@InFile=\read2 -\FV@TabBox=\box54 -\c@FancyVerbLine=\count280 -\FV@StepNumber=\count281 -\FV@OutFile=\write3 -) -(/usr/share/texmf-dist/tex/latex/upquote/upquote.sty -Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verba -tim -) -(/usr/share/texmf-dist/tex/latex/lineno/lineno.sty -Package: lineno 2023/01/19 line numbers on paragraphs v5.1 -\linenopenalty=\count282 -\output=\toks23 -\linenoprevgraf=\count283 -\linenumbersep=\dimen168 -\linenumberwidth=\dimen169 -\c@linenumber=\count284 -\c@pagewiselinenumber=\count285 -\c@LN@truepage=\count286 -\c@internallinenumber=\count287 -\c@internallinenumbers=\count288 -\quotelinenumbersep=\dimen170 -\bframerule=\dimen171 -\bframesep=\dimen172 -\bframebox=\box55 -\linenoamsmath@ams@eqpen=\count289 -LaTeX Info: Redefining \\ on input line 3131. -) -\c@FV@TrueTabGroupLevel=\count290 -\c@FV@TrueTabCounter=\count291 -\FV@TabBox@Group=\box56 -\FV@TmpLength=\skip57 -\c@FV@HighlightLinesStart=\count292 -\c@FV@HighlightLinesStop=\count293 -\FV@LoopCount=\count294 -\FV@NCharsBox=\box57 -\FV@BreakIndent=\dimen173 -\FV@BreakIndentNChars=\count295 -\FV@BreakSymbolSepLeft=\dimen174 -\FV@BreakSymbolSepLeftNChars=\count296 -\FV@BreakSymbolSepRight=\dimen175 -\FV@BreakSymbolSepRightNChars=\count297 -\FV@BreakSymbolIndentLeft=\dimen176 -\FV@BreakSymbolIndentLeftNChars=\count298 -\FV@BreakSymbolIndentRight=\dimen177 -\FV@BreakSymbolIndentRightNChars=\count299 -\c@FancyVerbLineBreakLast=\count300 -\FV@LineBox=\box58 -\FV@LineIndentBox=\box59 -\c@FV@BreakBufferDepth=\count301 -\FV@LineWidth=\dimen178 -) -(/usr/share/texmf-dist/tex/latex/base/ifthen.sty -Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC) -) -(/usr/share/texmf-dist/tex/latex/tools/shellesc.sty -Package: shellesc 2019/11/08 v1.0c unified shell escape interface for LaTeX -Package shellesc Info: Unrestricted shell escape enabled on input line 75. -) -(/usr/share/texmf-dist/tex/latex/ifplatform/ifplatform.sty -Package: ifplatform 2017/10/13 v0.4a Testing for the operating system - -(/usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty -Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO -) - -(/usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty -Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) -) -Package pdftexcmds Info: \pdf@primitive is available. -Package pdftexcmds Info: \pdf@ifprimitive is available. -Package pdftexcmds Info: \pdfdraftmode found. -) -(/usr/share/texmf-dist/tex/generic/catchfile/catchfile.sty -Package: catchfile 2019/12/09 v1.8 Catch the contents of a file (HO) - -(/usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty -Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) -)) -(/usr/share/texmf-dist/tex/generic/iftex/ifluatex.sty -Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead. -) -runsystem(uname -s > "seeds_and_ledgers_1_to_3.w18")...executed. - - -(./seeds_and_ledgers_1_to_3.w18) -runsystem(rm -- "seeds_and_ledgers_1_to_3.w18")...executed. - -) -(/usr/share/texmf-dist/tex/generic/xstring/xstring.sty -(/usr/share/texmf-dist/tex/generic/xstring/xstring.tex -\integerpart=\count302 -\decimalpart=\count303 -) -Package: xstring 2023/01/14 v1.85 String manipulations (CT) -) -(/usr/share/texmf-dist/tex/latex/framed/framed.sty -Package: framed 2011/10/22 v 0.96: framed or shaded text with page breaks -\OuterFrameSep=\skip58 -\fb@frw=\dimen179 -\fb@frh=\dimen180 -\FrameRule=\dimen181 -\FrameSep=\dimen182 -) -(/usr/share/texmf-dist/tex/latex/float/float.sty -Package: float 2001/11/08 v1.3d Float enhancements (AL) -\c@float@type=\count304 -\float@exts=\toks24 -\float@box=\box60 -\@float@everytoks=\toks25 -\@floatcapt=\box61 -) -\minted@appexistsfile=\read3 -\minted@bgbox=\box62 -\minted@code=\write4 -\c@minted@FancyVerbLineTemp=\count305 -\c@minted@pygmentizecounter=\count306 -\@float@every@listing=\toks26 -\c@listing=\count307 -) -runsystem(mkdir -p _minted-seeds_and_ledgers_1_to_3)...executed. - - (/usr/share/texmf-dist/tex/latex/wasysym/wasysym.sty Package: wasysym 2020/01/19 v2.4 Wasy-2 symbol support package \symwasy=\mathgroup4 @@ -302,27 +156,36 @@ LaTeX Font Info: Overwriting symbol font `wasy' in version `bold' ) (/usr/share/texmf-dist/tex/latex/tools/multicol.sty Package: multicol 2021/11/30 v1.9d multicolumn formatting (FMi) -\c@tracingmulticols=\count308 -\mult@box=\box63 -\multicol@leftmargin=\dimen183 -\c@unbalance=\count309 -\c@collectmore=\count310 -\doublecol@number=\count311 -\multicoltolerance=\count312 -\multicolpretolerance=\count313 -\full@width=\dimen184 -\page@free=\dimen185 -\premulticols=\dimen186 -\postmulticols=\dimen187 -\multicolsep=\skip59 -\multicolbaselineskip=\skip60 -\partial@page=\box64 -\last@line=\box65 -\maxbalancingoverflow=\dimen188 -\mult@rightbox=\box66 -\mult@grightbox=\box67 -\mult@firstbox=\box68 -\mult@gfirstbox=\box69 +\c@tracingmulticols=\count278 +\mult@box=\box54 +\multicol@leftmargin=\dimen168 +\c@unbalance=\count279 +\c@collectmore=\count280 +\doublecol@number=\count281 +\multicoltolerance=\count282 +\multicolpretolerance=\count283 +\full@width=\dimen169 +\page@free=\dimen170 +\premulticols=\dimen171 +\postmulticols=\dimen172 +\multicolsep=\skip57 +\multicolbaselineskip=\skip58 +\partial@page=\box55 +\last@line=\box56 +\maxbalancingoverflow=\dimen173 +\mult@rightbox=\box57 +\mult@grightbox=\box58 +\mult@firstbox=\box59 +\mult@gfirstbox=\box60 +\@tempa=\box61 +\@tempa=\box62 +\@tempa=\box63 +\@tempa=\box64 +\@tempa=\box65 +\@tempa=\box66 +\@tempa=\box67 +\@tempa=\box68 +\@tempa=\box69 \@tempa=\box70 \@tempa=\box71 \@tempa=\box72 @@ -350,44 +213,35 @@ Package: multicol 2021/11/30 v1.9d multicolumn formatting (FMi) \@tempa=\box94 \@tempa=\box95 \@tempa=\box96 -\@tempa=\box97 -\@tempa=\box98 -\@tempa=\box99 -\@tempa=\box100 -\@tempa=\box101 -\@tempa=\box102 -\@tempa=\box103 -\@tempa=\box104 -\@tempa=\box105 -\c@minrows=\count314 -\c@columnbadness=\count315 -\c@finalcolumnbadness=\count316 -\last@try=\dimen189 -\multicolovershoot=\dimen190 -\multicolundershoot=\dimen191 -\mult@nat@firstbox=\box106 -\colbreak@box=\box107 -\mc@col@check@num=\count317 +\c@minrows=\count284 +\c@columnbadness=\count285 +\c@finalcolumnbadness=\count286 +\last@try=\dimen174 +\multicolovershoot=\dimen175 +\multicolundershoot=\dimen176 +\mult@nat@firstbox=\box97 +\colbreak@box=\box98 +\mc@col@check@num=\count287 ) (/usr/share/texmf-dist/tex/generic/dirtree/dirtree.sty Package: dirtree 2012/12/11 v0.32 package wrapper for dirtree (/usr/share/texmf-dist/tex/generic/dirtree/dirtree.tex `dirtree' v0.32, 2012/12/11 (jcc) -\DT@offset=\dimen192 -\DT@width=\dimen193 -\DT@sep=\dimen194 -\DT@all=\dimen195 -\DT@rulewidth=\dimen196 -\DT@dotwidth=\dimen197 -\DTbaselineskip=\dimen198 -\DT@counti=\count318 -\DT@countii=\count319 -\DT@countiii=\count320 -\DT@countiv=\count321 -\DT@indent=\dimen199 -\DT@parskip=\dimen256 -\DT@baselineskip=\dimen257 +\DT@offset=\dimen177 +\DT@width=\dimen178 +\DT@sep=\dimen179 +\DT@all=\dimen180 +\DT@rulewidth=\dimen181 +\DT@dotwidth=\dimen182 +\DTbaselineskip=\dimen183 +\DT@counti=\count288 +\DT@countii=\count289 +\DT@countiii=\count290 +\DT@countiv=\count291 +\DT@indent=\dimen184 +\DT@parskip=\dimen185 +\DT@baselineskip=\dimen186 ) File: dirtree.tex 2012/12/11 v0.32 `dirtree' (jcc) ) @@ -398,10 +252,13 @@ LaTeX Info: Redefining \_ on input line 42. (/usr/share/texmf-dist/tex/latex/pdfpages/pdfpages.sty Package: pdfpages 2022/12/19 v0.5x Insert pages of external PDF documents (AM) +(/usr/share/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC) +) (/usr/share/texmf-dist/tex/latex/eso-pic/eso-pic.sty Package: eso-pic 2020/10/14 v3.0a eso-pic (RN) -\ESO@tempdima=\dimen258 -\ESO@tempdimb=\dimen259 +\ESO@tempdima=\dimen187 +\ESO@tempdimb=\dimen188 (/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK) @@ -439,69 +296,69 @@ File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 107. ) -\Gin@req@height=\dimen260 -\Gin@req@width=\dimen261 +\Gin@req@height=\dimen189 +\Gin@req@width=\dimen190 ) -\AM@pagewidth=\dimen262 -\AM@pageheight=\dimen263 -\AM@fboxrule=\dimen264 +\AM@pagewidth=\dimen191 +\AM@pageheight=\dimen192 +\AM@fboxrule=\dimen193 (/usr/share/texmf-dist/tex/latex/pdfpages/pppdftex.def File: pppdftex.def 2022/12/19 v0.5x Pdfpages driver for pdfTeX (AM) ) -\pdfpages@includegraphics@status=\count322 -\AM@pagebox=\box108 -\AM@global@opts=\toks27 -\AM@pagecnt=\count323 -\AM@toc@title=\toks28 -\AM@lof@heading=\toks29 -\c@AM@survey=\count324 -\AM@templatesizebox=\box109 +\pdfpages@includegraphics@status=\count292 +\AM@pagebox=\box99 +\AM@global@opts=\toks23 +\AM@pagecnt=\count293 +\AM@toc@title=\toks24 +\AM@lof@heading=\toks25 +\c@AM@survey=\count294 +\AM@templatesizebox=\box100 ) (/usr/share/texmf-dist/tex/latex/wrapfig/wrapfig.sty -\wrapoverhang=\dimen265 -\WF@size=\dimen266 -\c@WF@wrappedlines=\count325 -\WF@box=\box110 -\WF@everypar=\toks30 +\wrapoverhang=\dimen194 +\WF@size=\dimen195 +\c@WF@wrappedlines=\count295 +\WF@box=\box101 +\WF@everypar=\toks26 Package: wrapfig 2003/01/31 v 3.6 ) (/usr/share/texmf-dist/tex/latex/tocloft/tocloft.sty Package: tocloft 2017/08/31 v2.3i parameterised ToC, etc., typesetting Package tocloft Info: The document has section divisions on input line 51. -\cftparskip=\skip61 -\cftbeforetoctitleskip=\skip62 -\cftaftertoctitleskip=\skip63 -\cftbeforepartskip=\skip64 -\cftpartnumwidth=\skip65 -\cftpartindent=\skip66 -\cftbeforesecskip=\skip67 -\cftsecindent=\skip68 -\cftsecnumwidth=\skip69 -\cftbeforesubsecskip=\skip70 -\cftsubsecindent=\skip71 -\cftsubsecnumwidth=\skip72 -\cftbeforesubsubsecskip=\skip73 -\cftsubsubsecindent=\skip74 -\cftsubsubsecnumwidth=\skip75 -\cftbeforeparaskip=\skip76 -\cftparaindent=\skip77 -\cftparanumwidth=\skip78 -\cftbeforesubparaskip=\skip79 -\cftsubparaindent=\skip80 -\cftsubparanumwidth=\skip81 -\cftbeforeloftitleskip=\skip82 -\cftafterloftitleskip=\skip83 -\cftbeforefigskip=\skip84 -\cftfigindent=\skip85 -\cftfignumwidth=\skip86 -\c@lofdepth=\count326 -\c@lotdepth=\count327 -\cftbeforelottitleskip=\skip87 -\cftafterlottitleskip=\skip88 -\cftbeforetabskip=\skip89 -\cfttabindent=\skip90 -\cfttabnumwidth=\skip91 +\cftparskip=\skip59 +\cftbeforetoctitleskip=\skip60 +\cftaftertoctitleskip=\skip61 +\cftbeforepartskip=\skip62 +\cftpartnumwidth=\skip63 +\cftpartindent=\skip64 +\cftbeforesecskip=\skip65 +\cftsecindent=\skip66 +\cftsecnumwidth=\skip67 +\cftbeforesubsecskip=\skip68 +\cftsubsecindent=\skip69 +\cftsubsecnumwidth=\skip70 +\cftbeforesubsubsecskip=\skip71 +\cftsubsubsecindent=\skip72 +\cftsubsubsecnumwidth=\skip73 +\cftbeforeparaskip=\skip74 +\cftparaindent=\skip75 +\cftparanumwidth=\skip76 +\cftbeforesubparaskip=\skip77 +\cftsubparaindent=\skip78 +\cftsubparanumwidth=\skip79 +\cftbeforeloftitleskip=\skip80 +\cftafterloftitleskip=\skip81 +\cftbeforefigskip=\skip82 +\cftfigindent=\skip83 +\cftfignumwidth=\skip84 +\c@lofdepth=\count296 +\c@lotdepth=\count297 +\cftbeforelottitleskip=\skip85 +\cftafterlottitleskip=\skip86 +\cftbeforetabskip=\skip87 +\cfttabindent=\skip88 +\cfttabnumwidth=\skip89 ) (/usr/share/texmf-dist/tex/latex/blindtext/blindtext.sty Package: blindtext 2012/01/06 V2.0 blindtext-Package @@ -509,24 +366,24 @@ Package: blindtext 2012/01/06 V2.0 blindtext-Package (/usr/share/texmf-dist/tex/latex/tools/xspace.sty Package: xspace 2014/10/28 v1.13 Space after command names (DPC,MH) ) -\c@blindtext=\count328 -\c@Blindtext=\count329 -\c@blind@countparstart=\count330 -\blind@countxx=\count331 -\blindtext@numBlindtext=\count332 -\blind@countyy=\count333 -\c@blindlist=\count334 -\c@blindlistlevel=\count335 -\c@blindlist@level=\count336 -\blind@listitem=\count337 -\c@blind@listcount=\count338 -\c@blind@levelcount=\count339 -\blind@mathformula=\count340 -\blind@Mathformula=\count341 -\c@blind@randomcount=\count342 -\c@blind@randommax=\count343 -\c@blind@pangramcount=\count344 -\c@blind@pangrammax=\count345 +\c@blindtext=\count298 +\c@Blindtext=\count299 +\c@blind@countparstart=\count300 +\blind@countxx=\count301 +\blindtext@numBlindtext=\count302 +\blind@countyy=\count303 +\c@blindlist=\count304 +\c@blindlistlevel=\count305 +\c@blindlist@level=\count306 +\blind@listitem=\count307 +\c@blind@listcount=\count308 +\c@blind@levelcount=\count309 +\blind@mathformula=\count310 +\blind@Mathformula=\count311 +\c@blind@randomcount=\count312 +\c@blind@randommax=\count313 +\c@blind@pangramcount=\count314 +\c@blind@pangrammax=\count315 ) (/usr/share/texmf-dist/tex/latex/etaremune/etaremune.sty Package: etaremune 2005/06/01 v1.2 Reversed enumerate (HA) @@ -536,14 +393,14 @@ Package: xkeyval 2022/06/16 v2.9 package option processing (HA) (/usr/share/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/usr/share/texmf-dist/tex/generic/xkeyval/xkvutils.tex -\XKV@toks=\toks31 -\XKV@tempa@toks=\toks32 +\XKV@toks=\toks27 +\XKV@tempa@toks=\toks28 ) -\XKV@depth=\count346 +\XKV@depth=\count316 File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA) )) -\c@EM@itemctr=\count347 -\c@EM@etaremunectr=\count348 +\c@EM@itemctr=\count317 +\c@EM@etaremunectr=\count318 ) (/usr/share/texmf-dist/tex/latex/sclang-prettifier/sclang-prettifier.sty Package: sclang-prettifier 2014/06/14 v0.1 A package for prettyprinting SuperCo @@ -553,35 +410,52 @@ llider source code Package: textcomp 2020/02/02 v2.0n Standard LaTeX package ) (/usr/share/texmf-dist/tex/latex/listings/listings.sty -\lst@mode=\count349 -\lst@gtempboxa=\box111 -\lst@token=\toks33 -\lst@length=\count350 -\lst@currlwidth=\dimen267 -\lst@column=\count351 -\lst@pos=\count352 -\lst@lostspace=\dimen268 -\lst@width=\dimen269 -\lst@newlines=\count353 -\lst@lineno=\count354 -\lst@maxwidth=\dimen270 +\lst@mode=\count319 +\lst@gtempboxa=\box102 +\lst@token=\toks29 +\lst@length=\count320 +\lst@currlwidth=\dimen196 +\lst@column=\count321 +\lst@pos=\count322 +\lst@lostspace=\dimen197 +\lst@width=\dimen198 +\lst@newlines=\count323 +\lst@lineno=\count324 +\lst@maxwidth=\dimen199 (/usr/share/texmf-dist/tex/latex/listings/lstmisc.sty File: lstmisc.sty 2023/02/27 1.9 (Carsten Heinz) -\c@lstnumber=\count355 -\lst@skipnumbers=\count356 -\lst@framebox=\box112 +\c@lstnumber=\count325 +\lst@skipnumbers=\count326 +\lst@framebox=\box103 ) (/usr/share/texmf-dist/tex/latex/listings/listings.cfg File: listings.cfg 2023/02/27 1.9 listings configuration )) Package: listings 2023/02/27 1.9 (Carsten Heinz) -\currentchar@scpr=\count357 -\toks@scpr=\toks34 +\currentchar@scpr=\count327 +\toks@scpr=\toks30 ) (/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty Package: hyperref 2023-02-07 v7.00v Hypertext links for LaTeX +(/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty +Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) +) +(/usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty +Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO +) + +(/usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty +Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) +) +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +) +(/usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty +Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO) +) (/usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) ) @@ -605,12 +479,15 @@ Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO) ) (/usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO) + +(/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty +Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO) +)) +\c@section@level=\count328 ) -\c@section@level=\count358 -) -\@linkdim=\dimen271 -\Hy@linkcounter=\count359 -\Hy@pagecounter=\count360 +\@linkdim=\dimen256 +\Hy@linkcounter=\count329 +\Hy@pagecounter=\count330 (/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def File: pd1enc.def 2023-02-07 v7.00v Hyperref: PDFDocEncoding definition (HO) @@ -620,7 +497,10 @@ Now handling font encoding PD1 ... (/usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO) ) -\Hy@SavedSpaceFactor=\count361 +(/usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty +Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) +) +\Hy@SavedSpaceFactor=\count331 (/usr/share/texmf-dist/tex/latex/hyperref/puenc.def File: puenc.def 2023-02-07 v7.00v Hyperref: PDF Unicode definition (HO) @@ -634,14 +514,14 @@ Package hyperref Info: Plain pages OFF on input line 4192. Package hyperref Info: Backreferencing OFF on input line 4197. Package hyperref Info: Implicit mode ON; LaTeX internals redefined. Package hyperref Info: Bookmarks ON on input line 4425. -\c@Hy@tempcnt=\count362 +\c@Hy@tempcnt=\count332 (/usr/share/texmf-dist/tex/latex/url/url.sty \Urlmuskip=\muskip17 Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. ) LaTeX Info: Redefining \url on input line 4763. -\XeTeXLinkMargin=\dimen272 +\XeTeXLinkMargin=\dimen257 (/usr/share/texmf-dist/tex/generic/bitset/bitset.sty Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) @@ -650,9 +530,9 @@ Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO ) )) -\Fld@menulength=\count363 -\Field@Width=\dimen273 -\Fld@charsize=\dimen274 +\Fld@menulength=\count333 +\Field@Width=\dimen258 +\Fld@charsize=\dimen259 Package hyperref Info: Hyper figures OFF on input line 6042. Package hyperref Info: Link nesting OFF on input line 6047. Package hyperref Info: Hyper index ON on input line 6050. @@ -665,9 +545,9 @@ Package hyperref Info: PDF/A mode OFF on input line 6072. Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi package with kernel methods ) -\Hy@abspage=\count364 -\c@Item=\count365 -\c@Hfootnote=\count366 +\Hy@abspage=\count334 +\c@Item=\count335 +\c@Hfootnote=\count336 ) Package hyperref Info: Driver (autodetected): hpdftex. @@ -679,8 +559,8 @@ Package: atveryend-ltx 2020/08/19 v1.0a Emulation of the original atveryend pac kage with kernel methods ) -\Fld@listcount=\count367 -\c@bookmark@seq@number=\count368 +\Fld@listcount=\count337 +\c@bookmark@seq@number=\count338 (/usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty Package: rerunfilecheck 2022-07-10 v1.10 Rerun checks for auxiliary files (HO) @@ -691,7 +571,7 @@ Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO) Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 85. ) -\Hy@SectionHShift=\skip92 +\Hy@SectionHShift=\skip90 ) (/usr/share/texmf-dist/tex/latex/lipsum/lipsum.sty (/usr/share/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty @@ -700,15 +580,15 @@ Package: expl3 2023-02-22 L3 programming layer (loader) (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2023-01-16 L3 backend support: PDF output (pdfTeX) -\l__color_backend_stack_int=\count369 -\l__pdf_internal_box=\box113 +\l__color_backend_stack_int=\count339 +\l__pdf_internal_box=\box104 )) Package: l3keys2e 2023-02-02 LaTeX2e option processing using LaTeX3 keys ) Package: lipsum 2021-09-20 v2.7 150 paragraphs of Lorem Ipsum dummy text -\g__lipsum_par_int=\count370 -\l__lipsum_a_int=\count371 -\l__lipsum_b_int=\count372 +\g__lipsum_par_int=\count340 +\l__lipsum_a_int=\count341 +\l__lipsum_b_int=\count342 (/usr/share/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex)) (/usr/share/texmf-dist/tex/latex/datetime2/datetime2.sty @@ -717,12 +597,16 @@ Package: datetime2 2021/03/21 v1.5.7 (NLCT) date and time formats (/usr/share/texmf-dist/tex/latex/tracklang/tracklang.sty Package: tracklang 2022/12/13 v1.6.1 (NLCT) Track Languages -(/usr/share/texmf-dist/tex/generic/tracklang/tracklang.tex))) +(/usr/share/texmf-dist/tex/generic/tracklang/tracklang.tex)) +(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count343 +)) (/usr/share/texmf-dist/tex/latex/tools/verbatim.sty Package: verbatim 2022-07-02 v1.5u LaTeX2e package for verbatim enhancements -\every@verbatim=\toks35 -\verbatim@line=\toks36 -\verbatim@in@stream=\read4 +\every@verbatim=\toks31 +\verbatim@line=\toks32 +\verbatim@in@stream=\read2 ) (/usr/share/texmf-dist/tex/latex/lm/lmodern.sty Package: lmodern 2015/05/01 v1.6.1 Latin Modern Fonts @@ -759,36 +643,32 @@ LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold' LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold' (Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38. ) -runsystem(which pygmentize && touch seeds_and_ledgers_1_to_3.aex)...executed. - -runsystem(rm seeds_and_ledgers_1_to_3.aex)...executed. - LaTeX Font Info: Trying to load font information for OT1+lmr on input line 5 -7. +6. (/usr/share/texmf-dist/tex/latex/lm/ot1lmr.fd File: ot1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern ) (./seeds_and_ledgers_1_to_3.aux) \openout1 = `seeds_and_ledgers_1_to_3.aux'. -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. +LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 56. +LaTeX Font Info: ... okay on input line 56. *geometry* driver: auto-detecting *geometry* detected driver: pdftex *geometry* verbose mode - [ preamble ] result: @@ -825,17 +705,17 @@ LaTeX Font Info: ... okay on input line 57. (/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count373 -\scratchdimen=\dimen275 -\scratchbox=\box114 -\nofMPsegments=\count374 -\nofMParguments=\count375 -\everyMPshowfont=\toks37 -\MPscratchCnt=\count376 -\MPscratchDim=\dimen276 -\MPnumerator=\count377 -\makeMPintoPDFobject=\count378 -\everyMPtoPDFconversion=\toks38 +\scratchcounter=\count344 +\scratchdimen=\dimen260 +\scratchbox=\box105 +\nofMPsegments=\count345 +\nofMParguments=\count346 +\everyMPshowfont=\toks33 +\MPscratchCnt=\count347 +\MPscratchDim=\dimen261 +\MPnumerator=\count348 +\makeMPintoPDFobject=\count349 +\everyMPtoPDFconversion=\toks34 ) (/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 @@ -857,12 +737,12 @@ Package: lscape 2020/05/28 v3.02 Landscape Pages (DPC) ) Package pdflscape Info: Auto-detected driver: pdftex on input line 81. )) -\c@lstlisting=\count379 -Package hyperref Info: Link coloring OFF on input line 57. +\c@lstlisting=\count350 +Package hyperref Info: Link coloring OFF on input line 56. (./seeds_and_ledgers_1_to_3.out) (./seeds_and_ledgers_1_to_3.out) -\@outlinefile=\write5 -\openout5 = `seeds_and_ledgers_1_to_3.out'. +\@outlinefile=\write3 +\openout3 = `seeds_and_ledgers_1_to_3.out'. (./seeds_and_ledgers_1_to_3.toc @@ -895,11 +775,11 @@ LaTeX Font Info: Trying to load font information for U+wasy on input line 1. (/usr/share/texmf-dist/tex/latex/wasysym/uwasy.fd File: uwasy.fd 2020/01/19 v2.4 Wasy-2 symbol font definitions )) -\tf@toc=\write6 -\openout6 = `seeds_and_ledgers_1_to_3.toc'. +\tf@toc=\write4 +\openout4 = `seeds_and_ledgers_1_to_3.toc'. LaTeX Font Info: Trying to load font information for OT1+lmtt on input line -106. +113. (/usr/share/texmf-dist/tex/latex/lm/ot1lmtt.fd File: ot1lmtt.fd 2015/05/01 v1.6.1 Font defs for Latin Modern @@ -914,13 +794,13 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf used on input line 152. +1.pdf used on input line 161. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf used on input line 152. +1.pdf used on input line 161. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=42, page=1, 59 7.51233pt x 845.0471pt> @@ -928,31 +808,31 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page1 used on input line 152. +1.pdf , page1 used on input line 161. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page1 used on input line 152. +1.pdf , page1 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page1 used on input line 152. +1.pdf , page1 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page1 used on input line 152. +1.pdf , page1 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page1 used on input line 152. +1.pdf , page1 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [3 @@ -963,19 +843,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page2 used on input line 152. +1.pdf , page2 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page2 used on input line 152. +1.pdf , page2 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page2 used on input line 152. +1.pdf , page2 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [4 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=68, page=3, 59 @@ -984,19 +864,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page3 used on input line 152. +1.pdf , page3 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page3 used on input line 152. +1.pdf , page3 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page3 used on input line 152. +1.pdf , page3 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [5 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=73, page=4, 59 @@ -1005,19 +885,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page4 used on input line 152. +1.pdf , page4 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page4 used on input line 152. +1.pdf , page4 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page4 used on input line 152. +1.pdf , page4 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [6 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=78, page=5, 59 @@ -1026,19 +906,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page5 used on input line 152. +1.pdf , page5 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page5 used on input line 152. +1.pdf , page5 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page5 used on input line 152. +1.pdf , page5 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [7 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=84, page=6, 59 @@ -1047,19 +927,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page6 used on input line 152. +1.pdf , page6 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page6 used on input line 152. +1.pdf , page6 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page6 used on input line 152. +1.pdf , page6 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [8 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=89, page=7, 59 @@ -1068,19 +948,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page7 used on input line 152. +1.pdf , page7 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page7 used on input line 152. +1.pdf , page7 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page7 used on input line 152. +1.pdf , page7 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [9 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=94, page=8, 59 @@ -1089,19 +969,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page8 used on input line 152. +1.pdf , page8 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page8 used on input line 152. +1.pdf , page8 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page8 used on input line 152. +1.pdf , page8 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [10 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=99, page=9, 59 @@ -1110,19 +990,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page9 used on input line 152. +1.pdf , page9 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page9 used on input line 152. +1.pdf , page9 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page9 used on input line 152. +1.pdf , page9 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [11 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=104, page=10, @@ -1131,19 +1011,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page10 used on input line 152. +1.pdf , page10 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page10 used on input line 152. +1.pdf , page10 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page10 used on input line 152. +1.pdf , page10 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [12 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf, id=109, page=11, @@ -1152,19 +1032,19 @@ File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page11 used on input line 152. +1.pdf , page11 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page11 used on input line 152. +1.pdf , page11 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_1/edited/seeds_and_ledgers_ -1.pdf , page11 used on input line 152. +1.pdf , page11 used on input line 161. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [13 <../lilypond/string_quartet_1/edited/seeds_and_ledgers_1.pdf>] <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf, id=115, 597.51233 @@ -1173,13 +1053,13 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf used on input line 156. +2.pdf used on input line 165. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf used on input line 156. +2.pdf used on input line 165. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf, id=118, page=1, 5 97.51233pt x 845.0471pt> @@ -1187,31 +1067,31 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page1 used on input line 156. +2.pdf , page1 used on input line 165. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page1 used on input line 156. +2.pdf , page1 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page1 used on input line 156. +2.pdf , page1 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page1 used on input line 156. +2.pdf , page1 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page1 used on input line 156. +2.pdf , page1 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [14 @@ -1223,19 +1103,19 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page2 used on input line 156. +2.pdf , page2 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page2 used on input line 156. +2.pdf , page2 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page2 used on input line 156. +2.pdf , page2 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [15 <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf>] <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf, id=144, page=3, 5 @@ -1244,19 +1124,19 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page3 used on input line 156. +2.pdf , page3 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page3 used on input line 156. +2.pdf , page3 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page3 used on input line 156. +2.pdf , page3 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [16 <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf>] <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf, id=149, page=4, 5 @@ -1265,19 +1145,19 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page4 used on input line 156. +2.pdf , page4 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page4 used on input line 156. +2.pdf , page4 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page4 used on input line 156. +2.pdf , page4 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [17 <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf>] <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf, id=154, page=5, 5 @@ -1286,19 +1166,19 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page5 used on input line 156. +2.pdf , page5 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page5 used on input line 156. +2.pdf , page5 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page5 used on input line 156. +2.pdf , page5 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [18 <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf>] <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf, id=159, page=6, 5 @@ -1307,19 +1187,19 @@ File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page6 used on input line 156. +2.pdf , page6 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page6 used on input line 156. +2.pdf , page6 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_2/edited/seeds_and_ledgers_ -2.pdf , page6 used on input line 156. +2.pdf , page6 used on input line 165. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [19 <../lilypond/string_quartet_2/edited/seeds_and_ledgers_2.pdf>] <../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf, id=165, 597. @@ -1328,13 +1208,13 @@ File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf used on input line 160. +gers_3.pdf used on input line 169. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf used on input line 160. +gers_3.pdf used on input line 169. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. <../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf, id=168, page =1, 597.51233pt x 845.0471pt> @@ -1342,31 +1222,31 @@ File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page1 used on input line 160. +gers_3.pdf , page1 used on input line 169. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page1 used on input line 160. +gers_3.pdf , page1 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page1 used on input line 160. +gers_3.pdf , page1 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page1 used on input line 160. +gers_3.pdf , page1 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page1 used on input line 160. +gers_3.pdf , page1 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [20 @@ -1377,19 +1257,19 @@ File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page2 used on input line 160. +gers_3.pdf , page2 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page2 used on input line 160. +gers_3.pdf , page2 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page2 used on input line 160. +gers_3.pdf , page2 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [21 <../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf>] @@ -1399,19 +1279,19 @@ File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page3 used on input line 160. +gers_3.pdf , page3 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page3 used on input line 160. +gers_3.pdf , page3 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page3 used on input line 160. +gers_3.pdf , page3 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [22 <../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf>] @@ -1421,19 +1301,19 @@ File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page4 used on input line 160. +gers_3.pdf , page4 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page4 used on input line 160. +gers_3.pdf , page4 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page4 used on input line 160. +gers_3.pdf , page4 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [23 <../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf>] @@ -1443,19 +1323,19 @@ File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page5 used on input line 160. +gers_3.pdf , page5 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page5 used on input line 160. +gers_3.pdf , page5 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf Graphic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/main/edited/seeds_and_led -gers_3.pdf , page5 used on input line 160. +gers_3.pdf , page5 used on input line 169. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [24 <../lilypond/string_quartet_3/main/edited/seeds_and_ledgers_3.pdf>] @@ -1465,13 +1345,13 @@ File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf used on input line 162. +gers_3_coda.pdf used on input line 171. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf used on input line 162. +gers_3_coda.pdf used on input line 171. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. <../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf, id=213, page=1, 597.51233pt x 845.0471pt> @@ -1480,35 +1360,35 @@ phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page1 used on input line 162. +gers_3_coda.pdf , page1 used on input line 171. (pdftex.def) Requested size: 597.51086pt x 845.04504pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page1 used on input line 162. +gers_3_coda.pdf , page1 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page1 used on input line 162. +gers_3_coda.pdf , page1 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page1 used on input line 162. +gers_3_coda.pdf , page1 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page1 used on input line 162. +gers_3_coda.pdf , page1 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [25 <../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf>] @@ -1519,21 +1399,21 @@ phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page2 used on input line 162. +gers_3_coda.pdf , page2 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page2 used on input line 162. +gers_3_coda.pdf , page2 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page2 used on input line 162. +gers_3_coda.pdf , page2 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [26 <../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf>] @@ -1544,21 +1424,21 @@ phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page3 used on input line 162. +gers_3_coda.pdf , page3 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page3 used on input line 162. +gers_3_coda.pdf , page3 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. File: ../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf Gra phic file (type pdf) Package pdftex.def Info: ../lilypond/string_quartet_3/coda/edited/seeds_and_led -gers_3_coda.pdf , page3 used on input line 162. +gers_3_coda.pdf , page3 used on input line 171. (pdftex.def) Requested size: 597.53821pt x 845.08372pt. [27 <../lilypond/string_quartet_3/coda/edited/seeds_and_ledgers_3_coda.pdf>] @@ -1568,18 +1448,18 @@ d. (rerunfilecheck) Checksum: 54A0E65D9B6770A892BA4A0FD61297F1;513. ) Here is how much of TeX's memory you used: - 20241 strings out of 477985 - 368764 string characters out of 5840059 - 1868388 words of memory out of 5000000 - 40078 multiletter control sequences out of 15000+600000 + 17495 strings out of 477985 + 306455 string characters out of 5840059 + 1869388 words of memory out of 5000000 + 37384 multiletter control sequences out of 15000+600000 552942 words of font info for 54 fonts, out of 8000000 for 9000 14 hyphenation exceptions out of 8191 - 77i,17n,77p,1002b,634s stack positions out of 10000i,1000n,20000p,200000b,200000s + 75i,17n,77p,1002b,608s stack positions out of 10000i,1000n,20000p,200000b,200000s -Output written on seeds_and_ledgers_1_to_3.pdf (27 pages, 653149 bytes). +Output written on seeds_and_ledgers_1_to_3.pdf (27 pages, 656396 bytes). PDF statistics: 276 PDF objects out of 1000 (max. 8388607) 183 compressed objects within 2 object streams diff --git a/latex/seeds_and_ledgers_1_to_3.pdf b/latex/seeds_and_ledgers_1_to_3.pdf index 3b1203c..924792c 100644 Binary files a/latex/seeds_and_ledgers_1_to_3.pdf and b/latex/seeds_and_ledgers_1_to_3.pdf differ diff --git a/latex/seeds_and_ledgers_1_to_3.synctex.gz b/latex/seeds_and_ledgers_1_to_3.synctex.gz index 65181fa..99c23ea 100644 Binary files a/latex/seeds_and_ledgers_1_to_3.synctex.gz and b/latex/seeds_and_ledgers_1_to_3.synctex.gz differ diff --git a/latex/seeds_and_ledgers_1_to_3.tex b/latex/seeds_and_ledgers_1_to_3.tex index 2e8118b..d3e451c 100644 --- a/latex/seeds_and_ledgers_1_to_3.tex +++ b/latex/seeds_and_ledgers_1_to_3.tex @@ -2,7 +2,6 @@ \usepackage[a4paper, top=0.5in, bottom=0.7in, left=0.6in, right=0.6in]{geometry} \usepackage{mathtools} -\usepackage{minted} \usepackage{wasysym} \usepackage{multicol} \usepackage{dirtree} @@ -94,38 +93,48 @@ michael winter\\ \rule{\textwidth}{0.4pt} \bigskip -\textbf{Description (which can optionally be used as a program note)} +\textbf{Description (which can optionally be used/adapted as a program note)} + +\textit{seeds and ledgers 1--3} explore the reconciliation of distance in harmonic space, generally referred to as `consonance' or `dissonance', and melodic movement in pitch space, generally referred as a difference in `height'. Distance in harmonic space is measured as a complexity function on the frequency ratio between two tones: the higher the quantity and size of the prime factors needed to express the numbers in the frequency ratio, the more dissonant the relationship. Distance in pitch space is typically measured as the log of a frequency ratio and is often expressed in semitones or cents (100th of a tempered semitone). For example, the perfect 5th (a frequency ratio of 3/2) is one of the closest intervals in harmonic space but relatively far (7 semitones) in pitch space. On the contrary, tones that are distance in harmonic space often represent smaller melodic and chromatic differences/movements in pitch space. + +These pieces were generated using custom software that maintains `compact sets' (consonant groups of tones) in harmonic space among any simultaneously sounding tones, but favors smaller steps when one voice moves melodically. This is essentially a sort of `voice leading', which is a term often used in the tradition of western classical music. + +A compact set is defined as a group of notes such that each note in the group is close in harmonic space to some other note in the group. But when one voice moves, the program will favor notes that move by a smaller step in pitch space from itself while transitioning to another compact set among all the tones. + +Any individual part would be near impossible to play by itself. However, because compact sets are always maintained, each successive tone within a part can always be tuned via a relatively simple interval in harmonic space to a tone that is already sounding in one of the other instruments. As a result of this process, some of the passages have an almost baroque, contrapuntal feel; a chromatic drift in harmonic space constantly modulating. \bigskip \textbf{Tuning} -These pieces explore an extended just-intonation with no fixed fundamental. Within a part, from note-to-note, the melodic movement may be very complex. However, each note is always a relatively simple interval from a note that has recently terminated or is currently sounding in one of the other parts. +%These pieces explore an extended just-intonation with no fixed fundamental. Within a part, from note-to-note, the melodic movement may be very complex. However, each note is always a relatively simple interval from a note that has recently terminated or is currently sounding in one of the other parts. -Each written note indicates the closest pitch in twelve-tone equal temperament with a cent-deviation (100th of a tempered semitone) provided above. +Each written note indicates the closest pitch in twelve-tone equal temperament with a cents-deviation (100th of a tempered semitone) provided above. -A Roman numeral with an Arabic superscript followed by an up or down arrow is most often provided below each note. The Roman numeral indicates the reference part against which the current note (which will be called the \textit{referencing note} from here on) can be tuned by a relatively simple interval from a recently or currently sounding pitch in the reference part (which will be called the \textit{reference pitch} from here on). The Arabic superscript and the corresponding arrow indicate the exact interval, up or down, of the referencing note from the reference pitch. Generally, the reference pitch is initiated prior and continues to sound when it is referenced. Occasionally, the reference pitch terminates in the beat prior to the initiation of the referencing note. As a courtesy, this is indicated by a `\verb!= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - if(pDistance < 0, {stepFunc.value(abs(pDistance))}, {0.001}); - //stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - - - if(rangeScore.value(candidate, [0, 0, 0, 0, 0, 0], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { - isInRangeScore = 1 - rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0] + 500, ranges[ins][1] - 500, 0, true); - }, { - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - }); - - - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/45fa07e8/45fa07e8_mus_model.json b/resources/string_quartet_3/45fa07e8/45fa07e8_mus_model.json deleted file mode 100644 index 10b6bb0..0000000 --- a/resources/string_quartet_3/45fa07e8/45fa07e8_mus_model.json +++ /dev/null @@ -1,443 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ 2, -5, 0, 3, -1, -1 ], [ "Rest" ], [ "Rest" ] ], 1.5 ], - [ [ [ "Rest" ], [ 2, -5, 0, 3, -1, -1 ], [ "Rest" ], [ 4, -5, -1, 2, -1, -1 ] ], 1.75 ], - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ "Rest" ], [ 4, -5, -1, 2, -1, -1 ] ], 1 ], - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 4, -5, -1, 1, -1, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 4, -5, -1, 1, -1, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 3, -4, -1, 2, 0, -1 ] ], 1.625 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 3, -5, -1, 3, -1, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 3, -4, -1, 2, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 4, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 3, -4, -1, 2, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ 3, -6, -1, 2, 0, -1 ], [ 4, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 3, -4, -1, 2, 0, -1 ] ], 1.375 ] - ], - [ - [ [ [ 3, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ], [ 4, -5, -1, 2, 0, -1 ], [ 3, -4, -1, 2, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ 3, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ], [ 3, -4, -1, 2, 1, -1 ], [ 3, -4, -1, 2, 0, -1 ] ], 1.625 ] - ], - [ - [ [ [ 3, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ], [ 3, -4, -1, 2, 1, -1 ], [ 2, -3, -1, 2, 1, -1 ] ], 1.125 ] - ], - [ - [ [ [ 3, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ], [ 3, -4, -1, 2, 1, -1 ], [ 3, -4, -2, 2, 1, -1 ] ], 1.5 ] - ], - [ - [ [ [ 3, -6, -1, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 3, -4, -2, 2, 1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 3, -4, -2, 2, 1, -1 ] ], 1.5 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 4, -5, -2, 2, 0, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 3, -4, -2, 2, 1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 4, -5, -2, 2, 0, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 5, -5, -2, 1, 0, -1 ] ], 1.25 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 4, -5, -3, 2, 1, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 5, -5, -2, 1, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 4, -5, -3, 2, 1, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 3, -5, -2, 3, 1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 5, -5, -2, 1, 0, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 3, -5, -2, 3, 1, -1 ] ], 0.625 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 5, -6, -2, 2, 0, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 3, -5, -2, 3, 1, -1 ] ], 0.75 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 5, -6, -2, 2, 0, -1 ], [ 4, -5, -2, 2, 1, -1 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.125 ] - ], - [ - [ [ [ 3, -5, -2, 2, 0, -1 ], [ 6, -5, -2, 1, 0, -2 ], [ 4, -5, -2, 2, 1, -1 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -4, -2, 1, 0, -2 ], [ 6, -5, -2, 1, 0, -2 ], [ 4, -5, -2, 2, 1, -1 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.375 ] - ], - [ - [ [ [ 4, -4, -2, 1, 0, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 4, -5, -2, 2, 1, -1 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.625 ] - ], - [ - [ [ [ 4, -4, -2, 1, 0, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 6, -5, -2, 2, 0, -3 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.375 ] - ], - [ - [ [ [ 5, -4, -2, 1, -2, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 6, -5, -2, 2, 0, -3 ], [ 5, -5, -2, 2, 0, -2 ] ], 0.75 ] - ], - [ - [ [ [ 5, -4, -2, 1, -2, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 5, -5, -1, 2, 0, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.375 ] - ], - [ - [ [ [ 5, -4, -2, 1, -2, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 5, -5, -2, 1, -1, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1 ] - ], - [ - [ [ [ 5, -4, -2, 1, -2, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 4, -4, -2, 1, 0, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -4, -2, 1, -2, -2 ], [ 6, -4, -2, 1, -1, -2 ], [ 4, -3, -2, 1, -1, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -4, -2, 1, -2, -2 ], [ 5, -3, -2, 1, -2, -2 ], [ 4, -3, -2, 1, -1, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1 ] - ], - [ - [ [ [ 4, -5, -2, 2, 0, -2 ], [ 5, -3, -2, 1, -2, -2 ], [ 4, -3, -2, 1, -1, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.125 ] - ], - [ - [ [ [ 4, -5, -2, 2, 0, -2 ], [ 5, -3, -2, 1, -2, -2 ], [ 5, -3, -2, 1, -3, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 0.75 ] - ], - [ - [ [ [ 4, -5, -2, 2, 0, -2 ], [ 5, -5, -2, 2, -1, -2 ], [ 5, -3, -2, 1, -3, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 5, -5, -2, 2, -1, -2 ], [ 5, -3, -2, 1, -3, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -4, -2, 2, 0, -2 ], [ 5, -3, -2, 1, -3, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.75 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -4, -2, 2, 0, -2 ], [ 5, -5, -2, 1, 0, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -4, -2, 2, 0, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -4, -2, 2, 0, -2 ], [ 4, -5, -1, 2, 0, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -4, -2, 2, 0, -2 ], [ 5, -6, -2, 2, 0, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -5, -2, 2, 0, -1 ], [ 5, -6, -2, 2, 0, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.625 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -5, -2, 2, 0, -1 ], [ 5, -5, -2, 2, -1, -2 ], [ 5, -5, -2, 2, 0, -2 ] ], 1.125 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 4, -5, -2, 2, 0, -1 ], [ 5, -5, -2, 2, -1, -2 ], [ 5, -4, -2, 2, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 2, -1, -2 ], [ 5, -5, -2, 2, -1, -2 ], [ 5, -4, -2, 2, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 2, -1, -2 ], [ 5, -5, -2, 2, -1, -2 ], [ 6, -5, -3, 2, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 2, -1, -2 ], [ 6, -6, -3, 2, -1, -2 ], [ 6, -5, -3, 2, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 2, -1, -2 ], [ 6, -5, -2, 1, -1, -2 ], [ 6, -5, -3, 2, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 7, -5, -2, 0, -1, -2 ], [ 6, -5, -2, 1, -1, -2 ], [ 6, -5, -3, 2, -1, -2 ] ], 0.75 ] - ], - [ - [ [ [ 4, -5, -2, 1, -1, -2 ], [ 7, -5, -2, 0, -1, -2 ], [ 6, -5, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 0.75 ] - ], - [ - [ [ [ 5, -5, -2, 0, -1, -2 ], [ 7, -5, -2, 0, -1, -2 ], [ 6, -5, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 5, -5, -2, 1, -1, -3 ], [ 7, -5, -2, 0, -1, -2 ], [ 6, -5, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -5, -2, 1, -1, -3 ], [ 6, -4, -3, 1, -1, -2 ], [ 6, -5, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.75 ] - ], - [ - [ [ [ 5, -5, -2, 1, -1, -3 ], [ 6, -4, -3, 1, -1, -2 ], [ 5, -3, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 6, -4, -3, 1, -1, -2 ], [ 5, -3, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 6, -4, -3, 1, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 5, -4, -2, 2, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.875 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 3, -3, -2, 1, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 4, -4, -3, 1, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 6, -4, -2, 1, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 4, -4, -3, 1, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 5, -4, -3, 1, -1, -2 ] ], 0.625 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 3, -4, -2, 2, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 5, -4, -3, 1, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 4, -4, -2, 1, -1, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 5, -4, -3, 1, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -4, -3, 1, -2, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -4, -2, 1, -1, -2 ], [ 5, -4, -3, 1, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 5, -4, -3, 1, -2, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 6, -5, -3, 1, -1, -2 ], [ 5, -4, -3, 1, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 4, -3, -3, 1, -1, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 6, -5, -3, 1, -1, -2 ], [ 5, -4, -3, 1, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 4, -3, -3, 1, -1, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 6, -5, -3, 1, -1, -2 ], [ 6, -5, -4, 1, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 5, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 6, -5, -3, 1, -1, -2 ], [ 6, -5, -4, 1, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 5, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 6, -5, -3, 1, -1, -2 ], [ 5, -5, -3, 1, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 5, -5, -2, 1, -1, -2 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -5, -2, 1, -1, -1 ], [ 5, -5, -3, 1, -1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -5, -2, 1, -1, -1 ], [ 5, -5, -3, 1, -1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -5, -2, 1, -1, -1 ], [ 4, -5, -2, 2, -1, -1 ] ], 1.5 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -5, -2, 1, -1, -1 ], [ 6, -7, -2, 1, -1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -5, -2, 1, -1, -1 ], [ 6, -6, -2, 1, -2, -1 ] ], 1.625 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 6, -6, -3, 1, -1, -1 ], [ 6, -6, -2, 1, -2, -1 ] ], 1.125 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -6, -2, 2, -1, -1 ], [ 6, -6, -2, 1, -2, -1 ] ], 1.125 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 5, -6, -2, 2, -1, -1 ], [ 6, -4, -2, 0, -1, -2 ] ], 0.625 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -4, -3, 0, -1, -2 ], [ 7, -4, -2, -1, -1, -2 ], [ 6, -4, -2, 0, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 7, -4, -2, -1, -1, -2 ], [ 6, -4, -2, 0, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -4, -2, 1, -1, -2 ], [ 7, -4, -2, -1, -1, -2 ], [ 6, -4, -2, 0, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -5, -2, 1, -1, -1 ], [ 7, -4, -2, -1, -1, -2 ], [ 6, -4, -2, 0, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -5, -2, 1, -1, -1 ], [ 7, -4, -2, -1, -1, -2 ], [ 5, -6, -2, 1, -1, 0 ] ], 1 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -5, -2, 1, -1, -1 ], [ 6, -6, -2, 1, -1, -1 ], [ 5, -6, -2, 1, -1, 0 ] ], 1.625 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -5, -2, 1, -1, -1 ], [ 5, -6, -1, 1, -1, 0 ], [ 5, -6, -2, 1, -1, 0 ] ], 1.25 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -5, -2, 1, -1, -1 ], [ 5, -6, -1, 1, -1, 0 ], [ 5, -6, -2, 2, -1, -1 ] ], 1 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -5, -2, 1, -1, -1 ], [ 5, -6, -1, 1, -1, 0 ], [ 5, -5, -1, 1, -1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 4, -6, -1, 1, -1, -1 ], [ 5, -6, -1, 1, -1, 0 ], [ 5, -5, -1, 1, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 5, -6, -1, 1, -1, 0 ], [ 5, -5, -1, 1, -1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 6, -5, -1, 0, -1, -1 ], [ 5, -5, -1, 1, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 6, -5, -1, 0, -1, -1 ], [ 6, -6, -2, 1, -1, -1 ] ], 0.75 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 7, -7, -2, 1, -1, -1 ], [ 6, -6, -2, 1, -1, -1 ] ], 1.125 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -6, -2, 1, -1, -1 ], [ 6, -6, -2, 1, -1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -6, -2, 1, -1, -1 ], [ 7, -7, -3, 1, -1, -1 ] ], 1.125 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -6, -2, 1, -1, -1 ], [ 6, -7, -2, 1, -1, 0 ] ], 1.375 ] - ], - [ - [ [ [ 5, -6, -2, 1, -1, -1 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -6, -2, 1, -1, -1 ], [ 6, -6, -1, 1, -1, -1 ] ], 1.75 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -6, -2, 1, -1, -1 ], [ 6, -6, -1, 1, -1, -1 ] ], 1.125 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -6, -2, 1, -1, -1 ], [ 7, -7, -2, 1, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -7, -2, 1, -1, 0 ], [ 7, -7, -2, 1, -1, -1 ] ], 0.75 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -7, -2, 1, -1, 0 ], [ 6, -7, -1, 1, -1, 0 ] ], 1 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -7, -2, 1, -1, 0 ], [ 5, -6, -1, 1, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 4, -7, -2, 1, -1, 0 ], [ 5, -6, -1, 1, 0, 0 ] ], 0.625 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 3, -5, -1, 1, 0, 0 ], [ 5, -6, -1, 1, 0, 0 ] ], 1.25 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 3, -5, -1, 1, 0, 0 ], [ 5, -6, -2, 1, -1, 0 ] ], 1.25 ] - ], - [ - [ [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 3, -5, -1, 1, 0, 0 ], [ 6, -7, -1, 1, -1, -1 ] ], 1 ], - [ [ [ 4, -6, -1, 1, -1, 0 ], [ "Rest" ], [ 3, -5, -1, 1, 0, 0 ], [ 6, -7, -1, 1, -1, -1 ] ], 1.375 ], - [ [ [ 4, -6, -1, 1, -1, 0 ], [ "Rest" ], [ 3, -5, -1, 1, 0, 0 ], [ "Rest" ] ], 1.125 ], - [ [ [ "Rest" ], [ "Rest" ], [ 3, -5, -1, 1, 0, 0 ], [ "Rest" ] ], 1.5 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 6.375 ] - ] - ] -], -"last_changes": -[ - [ [ 4, -6, -1, 1, -1, 0 ], [ 5, -7, -2, 1, -1, -1 ], [ 4, -7, -2, 1, -1, 0 ], [ 5, -6, -1, 1, 0, 0 ] ], - [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 4, -7, -2, 1, -1, 0 ], [ 5, -6, -1, 1, 0, 0 ] ], - [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 3, -5, -1, 1, 0, 0 ], [ 5, -6, -1, 1, 0, 0 ] ], - [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 3, -5, -1, 1, 0, 0 ], [ 5, -6, -2, 1, -1, 0 ] ], - [ [ 4, -6, -1, 1, -1, 0 ], [ 4, -7, -1, 1, -1, 0 ], [ 3, -5, -1, 1, 0, 0 ], [ 6, -7, -1, 1, -1, -1 ] ] -], -"cur_uid": "45fa07e8", -"ref_uid": "55f9b81e", -"order_seed": 921383, -"dur_seed": 545846, -"motifs_seed": 212473, -"entrances_probs_vals": [ 0, 0, 0, 0.66, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0.66, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0.66, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2467, 2400 ], [ -1167, 2400 ], [ -702, 2400 ], [ -702, 2400 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.090534979423868, 0.92613636363636, 0.17489711934156, 0.079545454545455, 0.37037037037037, 0, 0.7201646090535, 0, 1, 0 ], -"passages_weights": [ 0.63, 0.62, 1, 0.41, 1 ], -"hd_exp": 6, -"hd_invert": 0, -"order": -[ - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [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], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.61 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/4ff624b0/4ff624b0_mus_model.json b/resources/string_quartet_3/4ff624b0/4ff624b0_mus_model.json deleted file mode 100644 index 0ef2a04..0000000 --- a/resources/string_quartet_3/4ff624b0/4ff624b0_mus_model.json +++ /dev/null @@ -1,552 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ -1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 1, 0, 0, 0, 0, 0 ], [ -1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ 1, 0, 0, 0, 0, 0 ], [ -1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, -1, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 0 ] ], 1 ] - ], - [ -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 1 ], - [ [ [ -1, 3, -1, 0, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ -1, 3, -1, 0, -1, 0 ], [ -2, 3, -1, 0, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -1, 3, -1, 0, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ -1, 3, -1, 0, -1, 0 ], [ -2, 4, -1, 0, -1, 0 ] ], 1 ] - ], - [ - [ [ [ -1, 3, -1, 0, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ -1, 3, -1, 0, -1, 0 ], [ 0, 3, 0, -1, 0, 0 ] ], 1 ], - [ [ [ 0, 3, -1, -1, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ -1, 3, -1, 0, -1, 0 ], [ 0, 3, 0, -1, 0, 0 ] ], 1 ], - [ [ [ 0, 3, -1, -1, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ], [ 0, 3, 0, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 3, -1, -1, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ 0, 3, 0, -1, 0, 0 ] ], 1 ], - [ [ [ 0, 3, -1, -1, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1 ], - [ [ [ 0, 3, -1, -1, 0, 0 ], [ -1, 2, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 3, -1, -1, 0, 0 ], [ -2, 4, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -2, 5, -1, -1, 0, 0 ], [ -2, 4, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -1, 0, 0 ], [ -2, 4, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -2, 5, -1, -1, 0, 0 ], [ -3, 6, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -1, 0, 0 ], [ -3, 6, -1, -1, 0, 0 ], [ -1, 4, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -1, 0, 0 ], [ -3, 6, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -2, 5, -1, -1, 0, 0 ], [ -4, 8, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -3, 6, -1, -1, 0, 0 ], [ -4, 8, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -4, 7, -1, -1, 0, 0 ], [ -4, 8, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -4, 7, -1, -1, 0, 0 ], [ -2, 7, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -4, 6, -1, -1, 0, 0 ], [ -2, 7, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -4, 6, -1, -1, 0, 0 ], [ -2, 7, -1, -1, 0, 0 ], [ -3, 8, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -4, 6, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 8, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -3, 6, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 8, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -3, 6, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 7, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -3, 6, -1, -1, 0, 0 ], [ -2, 6, -1, -1, 0, 0 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -3, 6, -1, -1, 0, 0 ], [ -4, 7, -1, 0, 0, 1 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -5, 7, -1, 0, 0, 1 ], [ -4, 7, -1, 0, 0, 1 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -4, 7, -1, -1, 0, 1 ], [ -4, 7, -1, 0, 0, 1 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -4, 7, -1, -1, 0, 1 ], [ -4, 7, -1, 0, 0, 1 ], [ -4, 7, 0, 0, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -4, 7, -1, -1, 0, 1 ], [ -4, 7, -1, 0, 0, 1 ], [ -3, 6, -1, 0, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -4, 7, -1, -1, 0, 1 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, 0, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, 0, 0, 1 ], [ -3, 6, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -3, 7, -1, -1, 0, 1 ], [ -3, 6, -1, 0, 0, 1 ], [ -3, 5, -1, 0, 0, 1 ] ], 1 ], - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ], [ -3, 6, -1, 0, 0, 1 ], [ -3, 5, -1, 0, 0, 1 ] ], 1 ], - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ], [ -2, 5, 0, -1, 0, 1 ], [ -3, 5, -1, 0, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -2, 5, 0, -1, 0, 1 ], [ -3, 5, -1, 0, 0, 1 ] ], 1 ], - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 4, -1, -1, 0, 1 ], [ -3, 5, -1, 0, 0, 1 ] ], 1 ], - [ [ [ -3, 5, -1, -1, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 4, -1, -1, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 4, -1, -1, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 4, -1, -2, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -2, 6, -1, -2, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -2, 4, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ], [ -2, 5, -1, -1, 0, 1 ] ], 1 ], - [ [ [ -2, 4, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ], [ -1, 4, -1, -2, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -3, 6, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ], [ -1, 4, -1, -2, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -3, 6, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ], [ -2, 6, -1, -2, 0, 1 ] ], 1 ], - [ [ [ -3, 6, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -2, 5, -1, -2, 0, 1 ], [ -2, 6, -1, -2, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -3, 6, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -2, 5, -1, -2, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ] ], 1 ], - [ [ [ -3, 6, -1, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -2, -2, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -2, -3, 0, 1 ], [ -1, 5, -1, -2, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 0, 5, -1, -3, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 5, -2, -2, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 0, 5, -1, -3, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 6, -1, -3, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 0, 5, -1, -3, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 5, -2, -3, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ], [ -1, 5, -1, -3, 0, 1 ], [ -1, 5, -2, -3, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ -1, 5, -2, -3, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 0, 5, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ -1, 5, -2, -3, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -2, -3, 0, 1 ], [ 1, 5, -2, -4, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ -1, 5, -2, -3, 0, 1 ] ], 1 ], - [ [ [ -1, 5, -2, -4, 0, 1 ], [ 1, 5, -2, -4, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ -1, 5, -2, -3, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -2, -4, 0, 1 ], [ 1, 5, -2, -4, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 0, 5, -2, -4, 0, 1 ] ], 1 ], - [ [ [ -1, 5, -2, -4, 0, 1 ], [ 0, 6, -2, -4, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 0, 5, -2, -4, 0, 1 ] ], 1 ], - [ [ [ -1, 5, -2, -4, 0, 1 ], [ 0, 6, -2, -4, 0, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ 0, 5, -2, -4, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -4, 0, 1 ], [ 0, 6, -2, -4, 0, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ 0, 5, -2, -4, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -1, -4, 0, 1 ], [ 0, 5, -1, -4, 1, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ 0, 5, -2, -4, 0, 1 ] ], 1 ], - [ [ [ -2, 5, -1, -4, 0, 1 ], [ 0, 5, -1, -4, 1, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ -1, 5, -1, -4, 1, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 5, -1, -4, 0, 1 ], [ -1, 6, -1, -4, 0, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ -1, 5, -1, -4, 1, 1 ] ], 1 ], - [ [ [ -1, 5, -1, -5, 0, 1 ], [ -1, 6, -1, -4, 0, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ -1, 5, -1, -4, 1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -5, 0, 1 ], [ -1, 6, -1, -4, 0, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ] ], 1 ], - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 0, 6, -1, -5, 0, 1 ], [ 0, 5, -1, -4, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ] ], 1 ], - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 0, 6, -1, -5, 0, 1 ], [ 1, 5, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 0, 5, -1, -5, 0, 1 ], [ 1, 5, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ] ], 1 ], - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 0, 5, -1, -5, 0, 1 ], [ 1, 5, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ] ], 1 ], - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 0, 5, -1, -5, 0, 1 ], [ 2, 4, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 0, 5, -1, -5, 0, 1 ], [ 2, 4, -1, -5, 0, 1 ], [ 0, 6, -1, -5, 0, 1 ] ], 1 ], - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 0, 5, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 1 ], [ 0, 6, -1, -5, 0, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 0, 5, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 1 ], [ 2, 4, -1, -5, 0, 0 ] ], 1 ], - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 1, 4, -2, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 1 ], [ 2, 4, -1, -5, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 1, 4, -2, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 1, 5, -1, -5, 0, 0 ], [ 1, 6, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 1 ], [ 1, 6, -1, -5, 0, 0 ] ], 1 ], - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ], [ 3, 4, -1, -5, 0, 0 ], [ 1, 6, -1, -5, 0, 0 ] ], 1 ], - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 1, 4, -1, -5, 0, 1 ], [ 3, 4, -1, -5, 0, 0 ], [ 1, 5, -1, -5, 0, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -5, 0, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 3, 4, -1, -5, 0, 0 ], [ 1, 5, -1, -5, 0, 1 ] ], 1 ], - [ [ [ 0, 4, -1, -5, 1, 0 ], [ 1, 5, -1, -5, -1, 1 ], [ 3, 4, -1, -5, 0, 0 ], [ 1, 5, -1, -5, 0, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -1, -5, 1, 0 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 4, -1, -5, -1, 1 ], [ 1, 5, -1, -5, 0, 1 ] ], 1 ], - [ [ [ 0, 4, -1, -5, 1, 0 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 4, -1, -5, -1, 1 ], [ 0, 5, -1, -4, -1, 1 ] ], 1 ], - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 4, -1, -5, -1, 1 ], [ 0, 5, -1, -4, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 4, -1, -5, -1, 1 ], [ -1, 5, -1, -3, -1, 1 ] ], 1 ], - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 0, 5, -1, -3, -1, 1 ], [ -1, 5, -1, -3, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 1, 5, -1, -4, -1, 1 ], [ -1, 5, -1, -3, -1, 1 ] ], 1 ], - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 1, 5, -1, -4, -1, 1 ], [ 0, 5, -1, -4, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 5, -1, -5, -1, 1 ], [ 0, 5, -1, -4, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -1, -4, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 5, -1, -5, -1, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ], - [ [ [ 0, 5, -1, -5, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 5, -1, -5, -1, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ], - [ [ [ 0, 5, -1, -5, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 2, 5, -1, -5, -2, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 5, -1, -5, -1, 1 ], [ 1, 6, -1, -5, -2, 1 ], [ 2, 5, -1, -5, -2, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 6, -1, -5, -2, 1 ], [ 1, 6, -1, -5, -2, 1 ], [ 2, 5, -1, -5, -2, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 6, -1, -5, -2, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 2, 5, -1, -5, -2, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ], - [ [ [ 0, 6, -2, -5, -1, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 2, 5, -1, -5, -2, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ], - [ [ [ 0, 6, -2, -5, -1, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 1, 6, -2, -5, -1, 1 ], [ 1, 6, -1, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 6, -2, -5, -1, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 1, 6, -2, -5, -1, 1 ], [ 2, 5, -2, -5, -1, 1 ] ], 1 ], - [ [ [ -1, 7, -2, -5, -1, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 1, 6, -2, -5, -1, 1 ], [ 2, 5, -2, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 7, -2, -5, -1, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 1, 6, -2, -5, -1, 1 ], [ 0, 7, -2, -5, -1, 1 ] ], 1 ], - [ [ [ -1, 7, -2, -5, -1, 1 ], [ 0, 6, -1, -5, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 0, 7, -2, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 7, -2, -5, -1, 1 ], [ -1, 8, -2, -5, -1, 1 ], [ 1, 5, -1, -5, -1, 1 ], [ 0, 7, -2, -5, -1, 1 ] ], 1 ], - [ [ [ -1, 7, -2, -5, -1, 1 ], [ -1, 8, -2, -5, -1, 1 ], [ 0, 8, -2, -5, -1, 1 ], [ 0, 7, -2, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 8, -2, -5, -1, 1 ], [ -1, 8, -2, -5, -1, 1 ], [ 0, 8, -2, -5, -1, 1 ], [ 0, 7, -2, -5, -1, 1 ] ], 1 ], - [ [ [ -2, 8, -2, -5, -1, 1 ], [ 0, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -5, -1, 1 ], [ 0, 7, -2, -5, -1, 1 ] ], 1 ], - [ [ [ -2, 8, -2, -5, -1, 1 ], [ 0, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -5, -1, 1 ], [ -1, 9, -2, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -5, -1, 1 ], [ -1, 9, -2, -5, -1, 1 ] ], 1 ], - [ [ [ -1, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -5, -1, 1 ], [ 0, 8, -3, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -6, -1, 1 ], [ 1, 8, -2, -6, -1, 1 ], [ 0, 8, -3, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 8, -2, -6, -1, 1 ], [ 0, 8, -2, -6, -1, 1 ], [ 0, 9, -3, -5, -1, 1 ], [ 0, 8, -3, -5, -1, 1 ] ], 1 ], - [ [ [ -2, 8, -3, -5, -1, 2 ], [ 0, 8, -2, -6, -1, 1 ], [ 0, 9, -3, -5, -1, 1 ], [ 0, 8, -3, -5, -1, 1 ] ], 1 ], - [ [ [ -2, 8, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 9, -3, -5, -1, 1 ], [ 0, 8, -3, -5, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -2, 8, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 8, -3, -5, -1, 2 ], [ 0, 8, -3, -5, -1, 1 ] ], 1 ], - [ [ [ -2, 8, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 8, -3, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -2, 8, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 1, 8, -3, -6, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 8, -3, -6, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 1, 8, -3, -6, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 1, 8, -3, -6, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -2, 8, -2, -4, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -2, 7, -2, -5, -1, 2 ], [ -2, 8, -2, -4, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -2, 7, -2, -5, -1, 2 ], [ -2, 8, -1, -5, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -2, 7, -2, -5, -1, 2 ], [ -1, 7, -2, -5, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -3, 9, -2, -5, -1, 2 ], [ -1, 7, -2, -5, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -3, 9, -2, -5, -1, 2 ], [ 0, 6, -3, -5, -1, 2 ], [ -1, 8, -2, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -3, 9, -2, -5, -1, 2 ], [ 0, 6, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -2, 8, -3, -5, -1, 2 ], [ 0, 6, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -2, 7, -3, -5, -1, 2 ], [ 0, 6, -3, -5, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -2, 7, -3, -5, -1, 2 ], [ 0, 6, -3, -5, -1, 2 ], [ 0, 7, -4, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 7, -3, -6, -1, 2 ], [ 0, 6, -3, -5, -1, 2 ], [ 0, 7, -4, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ 0, 7, -4, -5, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ -1, 7, -3, -4, -1, 2 ], [ 0, 7, -3, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -1, 8, -3, -5, -1, 2 ], [ -1, 7, -3, -4, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 7, -3, -6, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ -1, 7, -3, -4, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -2, 6, -3, -4, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ -1, 7, -3, -4, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -2, 6, -3, -4, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ 0, 6, -4, -4, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 6, -3, -5, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ 0, 6, -4, -4, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 6, -3, -5, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ -1, 6, -3, -3, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ -1, 6, -3, -3, -1, 2 ], [ -1, 7, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ -1, 6, -3, -4, -1, 2 ], [ -1, 6, -3, -3, -1, 2 ], [ 0, 6, -3, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 0, 5, -4, -4, -1, 2 ], [ -1, 6, -3, -3, -1, 2 ], [ 0, 6, -3, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 0, 5, -4, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ], [ 0, 6, -3, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 0, 5, -4, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ], [ 1, 5, -4, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ -1, 5, -3, -3, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ], [ 1, 5, -4, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 1, 5, -3, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ], [ 1, 5, -4, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 1, 5, -3, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ], [ 0, 5, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 1, 5, -3, -4, -1, 2 ], [ 1, 5, -3, -5, -1, 2 ], [ 0, 5, -2, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 1, 5, -3, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 0, 5, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 1, 5, -3, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 5, -3, -4, -1, 2 ], [ 0, 6, -3, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -4, -4, -1, 2 ], [ 0, 6, -3, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ] ], 1 ], - [ [ [ 0, 4, -4, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 0, 5, -3, -4, -1, 2 ] ], 1 ], - [ [ [ 0, 4, -4, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 2, 4, -4, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ 0, 3, -3, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 2, 4, -4, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ 0, 3, -4, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 2, 4, -4, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -3, -5, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 2, 4, -4, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ 0, 4, -3, -5, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 1, 4, -3, -3, -1, 2 ] ], 1 ], - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 1, 4, -3, -3, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 1, 5, -2, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 1, 4, -3, -4, -1, 2 ], [ 1, 4, -2, -4, -1, 2 ] ], 1 ], - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 2, 3, -4, -4, -1, 2 ], [ 1, 4, -2, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 2, 3, -4, -4, -1, 2 ], [ 1, 3, -2, -4, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 1, 4, -4, -4, -1, 2 ], [ 2, 3, -4, -4, -1, 2 ], [ 1, 4, -2, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 0, 4, -2, -4, 0, 2 ], [ 2, 3, -4, -4, -1, 2 ], [ 1, 4, -2, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 0, 4, -2, -4, 0, 2 ], [ 0, 5, -2, -4, -1, 2 ], [ 1, 4, -2, -5, -1, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 1, 4, -2, -5, -1, 2 ] ], 1 ], - [ [ [ -1, 4, -2, -4, -1, 2 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 1, 4, -2, -4, -1, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 3, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 1, 4, -2, -4, -1, 1 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 1, 4, -2, -4, -1, 1 ] ], 1 ], - [ [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ], - [ [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 3, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 0, 5, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ] - ], - [ - [ [ [ -1, 3, -2, -4, 0, 2 ], [ 0, 4, -2, -4, 0, 2 ], [ 0, 5, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ], - [ [ [ -1, 3, -2, -4, 0, 2 ], [ "Rest" ], [ 0, 5, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ 0, 5, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ 0, 4, -3, -4, 0, 2 ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1 ] - ] - ] -], -"last_changes": -[ - [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 1, 4, -2, -4, -1, 1 ] ], - [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 4, -2, -4, 0, 1 ], [ 0, 4, -3, -4, 0, 2 ] ], - [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 1, 3, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], - [ [ -1, 4, -2, -4, 0, 1 ], [ 0, 4, -2, -4, 0, 2 ], [ 0, 5, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ], - [ [ -1, 3, -2, -4, 0, 2 ], [ 0, 4, -2, -4, 0, 2 ], [ 0, 5, -2, -4, 0, 2 ], [ 0, 4, -3, -4, 0, 2 ] ] -], -"cur_uid": "4ff624b0", -"ref_uid": "nil", -"order_seed": 492048, -"dur_seed": 518010, -"motifs_seed": 626337, -"entrances_probs_vals": [ 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2400, 1200 ], [ -1200, 1200 ], [ -702, 1200 ], [ -702, 1200 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61316872427983, 0, 0.98971193415638, 0 ], -"passages_weights": [ 0.48, 0.46, 0.48, 1, 1 ], -"hd_exp": 9, -"hd_invert": 0, -"order": -[ - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 1, 2 ], [ 0, 3 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 2 ], [ 3, 0, 1 ], [ ] ], - [ [ 3 ], [ 2, 1, 0 ], [ ] ], - [ [ 1 ], [ 0, 2, 3 ], [ ] ], - [ [ 1, 2, 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[ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 2 ], [ 3, 1, 0 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 1 ], [ 2, 0, 3 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ], - [ [ 2 ], [ 0, 1, 3 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 1, 2 ], [ 3, 0 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 1, 0 ], [ 3, 2 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 0 ], [ 3, 1, 2 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 1 ], [ 0, 3, 2 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5201b8af/5201b8af_code.scd b/resources/string_quartet_3/5201b8af/5201b8af_code.scd deleted file mode 100644 index c194eef..0000000 --- a/resources/string_quartet_3/5201b8af/5201b8af_code.scd +++ /dev/null @@ -1,945 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance); -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/5201b8af/5201b8af_mus_model.json b/resources/string_quartet_3/5201b8af/5201b8af_mus_model.json deleted file mode 100644 index aa90760..0000000 --- a/resources/string_quartet_3/5201b8af/5201b8af_mus_model.json +++ /dev/null @@ -1,58 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ "Rest" ], [ 1, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ 0, 0, 1, 0, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 0, -1, 0 ], [ 0, 0, 1, 0, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ] ], 4.875 ] - ], - [ - [ [ [ 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 0, -1, 0 ], [ 1, 0, 0, 0, 0, -1 ], [ 1, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 1, 0, 0, 0, 0, -1 ], [ 1, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 1, 0, 0, 0, 0, -1 ], [ 0, 0, 1, 0, 0, 0 ] ], 4.75 ] - ], - [ - [ [ [ 0, 0, 0, 0, 0, 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": 921767, -"dur_seed": 954688, -"motifs_seed": 995213, -"entrances_probs_vals": [ 1, 0, 0, 3.68, 5, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 1, 0, 0, 3.68, 5, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 1, 0, 0, 3.68, 5, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -1315.1702786378, 338.08049535604 ], [ -200.61919504644, 1452.6315789474 ], [ -386, 1675.5417956656 ], [ -219, 1694.1176470588 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.063786008230453, 0.92613636363636, 0.12757201646091, 0, 0.54732510288066, 0, 0.71604938271605, 0, 1, 0 ], -"passages_weights": [ 0.7, 0.29, 0.66, 0.74, 0.68 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 0 ], [ 3, 2, 1 ], [ ] ], - [ [ 0 ], [ 2, 1, 3 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ] -], -"sus_weights": [ 1, 0, 0 ], -"order_size": [ 8, 10 ], -"passages_size": [ 0, 10 ], -"motif_edited": "true", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5201b8af/lilypond/part_I.ly b/resources/string_quartet_3/5201b8af/lilypond/part_I.ly deleted file mode 100644 index 01ab702..0000000 --- a/resources/string_quartet_3/5201b8af/lilypond/part_I.ly +++ /dev/null @@ -1,16 +0,0 @@ -{ - { r2 c''2^\markup { \pad-markup #0.2 "+0"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} ~ } - \bar "|" - { c''1 ~ } - \bar "|" - { c''2. ~ c''8.[ e'16^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] ~ } - \bar "|" - { e'1 ~ } - \bar "|" - { e'1 ~ } - \bar "|" - { e'4 ~ e'16[ e'8.^\markup { \pad-markup #0.2 "-41"}] ~ e'2 ~ } - \bar "|" - { e'1} -\bar "||" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5201b8af/lilypond/part_II.ly b/resources/string_quartet_3/5201b8af/lilypond/part_II.ly deleted file mode 100644 index f176e75..0000000 --- a/resources/string_quartet_3/5201b8af/lilypond/part_II.ly +++ /dev/null @@ -1,16 +0,0 @@ -{ - { r2 e'2^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} ~ } - \bar "|" - { e'1 ~ } - \bar "|" - { e'2. ~ e'8.[ e'16^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↓" }}] ~ } - \bar "|" - { e'1 ~ } - \bar "|" - { e'1 ~ } - \bar "|" - { e'4 ~ e'16[ f'8.^\markup { \pad-markup #0.2 "-2"}] ~ f'2 ~ } - \bar "|" - { f'1} -\bar "||" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5201b8af/lilypond/part_III.ly b/resources/string_quartet_3/5201b8af/lilypond/part_III.ly deleted file mode 100644 index 5f83063..0000000 --- a/resources/string_quartet_3/5201b8af/lilypond/part_III.ly +++ /dev/null @@ -1,16 +0,0 @@ -{ - { r2 fis'2^\markup { \pad-markup #0.2 "+49"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }} ~ } - \bar "|" - { fis'1 ~ } - \bar "|" - { fis'2. ~ fis'8.[ g'16^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] ~ } - \bar "|" - { g'1 ~ } - \bar "|" - { g'1 ~ } - \bar "|" - { g'4 ~ g'16[ gis'8.^\markup { \pad-markup #0.2 "+14"}] ~ gis'2 ~ } - \bar "|" - { gis'1} -\bar "||" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5201b8af/lilypond/part_IV.ly b/resources/string_quartet_3/5201b8af/lilypond/part_IV.ly deleted file mode 100644 index 67fc5d0..0000000 --- a/resources/string_quartet_3/5201b8af/lilypond/part_IV.ly +++ /dev/null @@ -1,16 +0,0 @@ -{ - { c'1^\markup { \pad-markup #0.2 "+0"} ~ } - \bar "|" - { c'1 ~ } - \bar "|" - { c'1 ~ } - \bar "|" - { c'1 ~ } - \bar "|" - { c'1 ~ } - \bar "|" - { c'1 ~ } - \bar "|" - { c'1} -\bar "||" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5488f7e9/5488f7e9_code.scd b/resources/string_quartet_3/5488f7e9/5488f7e9_code.scd deleted file mode 100644 index e5197a1..0000000 --- a/resources/string_quartet_3/5488f7e9/5488f7e9_code.scd +++ /dev/null @@ -1,945 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - if(pDistance < 0, {stepFunc.value(pDistance)}, {0.001}); -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/5488f7e9/5488f7e9_mus_model.json b/resources/string_quartet_3/5488f7e9/5488f7e9_mus_model.json deleted file mode 100644 index cf2a424..0000000 --- a/resources/string_quartet_3/5488f7e9/5488f7e9_mus_model.json +++ /dev/null @@ -1,163 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ -3, -2, 0, 1, 0, -2 ], [ "Rest" ], [ "Rest" ] ], 0.75 ], - [ [ [ "Rest" ], [ -3, -2, 0, 1, 0, -2 ], [ -3, -1, 0, 0, 0, -1 ], [ "Rest" ] ], 0.75 ], - [ [ [ -3, -1, 0, 1, 0, -2 ], [ -3, -2, 0, 1, 0, -2 ], [ -3, -1, 0, 0, 0, -1 ], [ "Rest" ] ], 0.5 ], - [ [ [ -3, -1, 0, 1, 0, -2 ], [ -3, -2, 0, 1, 0, -2 ], [ -3, -1, 0, 0, 0, -1 ], [ 0, -1, 0, 2, 0, -2 ] ], 0.5 ] - ], - [ - [ [ [ -3, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 1, 0, -1 ], [ -3, -1, 0, 0, 0, -1 ], [ 0, -1, 0, 2, 0, -2 ] ], 0.75 ] - ], - [ - [ [ [ -3, -1, 0, 1, 0, -2 ], [ 2, -1, 0, 2, -1, -2 ], [ -3, -1, 0, 0, 0, -1 ], [ 0, -1, 0, 2, 0, -2 ] ], 0.5 ] - ], - [ - [ [ [ -3, -1, 0, 1, 0, -2 ], [ 2, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 2, 0, -2 ] ], 0.875 ] - ], - [ - [ [ [ 0, 0, 0, 1, 0, -2 ], [ 2, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 2, 0, -2 ] ], 0.5 ] - ], - [ - [ [ [ 0, 0, 0, 1, 0, -2 ], [ 2, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 1, 0, -2 ], [ 1, 0, 0, 1, 0, -2 ] ], 0.5 ] - ], - [ - [ [ [ 0, 0, 0, 1, 0, -2 ], [ 2, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 1, 0, -2 ], [ 0, 0, 0, 2, 0, -2 ] ], 1.25 ] - ], - [ - [ [ [ 0, 0, 0, 1, 0, -2 ], [ 2, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 1, 0, -2 ], [ 1, 1, 0, 1, 0, -2 ] ], 0.875 ] - ], - [ - [ [ [ 0, 0, 0, 1, 0, -2 ], [ 2, 0, 0, 1, -1, -2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75 ] - ], - [ - [ [ [ 0, 1, 0, 1, 0, -1 ], [ 1, -1, 0, 2, -1, -2 ], [ -1, 1, 1, 1, 0, -2 ], [ 1, 1, 0, 1, 0, -2 ] ], 0.75 ] - ], - [ - [ [ [ 0, 1, 1, 1, 0, -3 ], [ 1, -1, 0, 2, -1, -2 ], [ -1, 1, 1, 1, 0, -2 ], [ 1, 1, 0, 1, 0, -2 ] ], 1 ] - ], - [ - [ [ [ 0, 1, 1, 1, 0, -3 ], [ 1, -1, 0, 2, -1, -2 ], [ 1, 1, 1, 1, -1, -3 ], [ 1, 1, 0, 1, 0, -2 ] ], 1.125 ] - ], - [ - [ [ [ 0, 1, 1, 1, 0, -3 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 2, -1, -3 ], [ 1, 1, 0, 1, 0, -2 ] ], 0.375 ] - ], - [ - [ [ [ 2, -1, 0, 3, -1, -3 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 2, -1, -3 ], [ 1, 1, 0, 1, 0, -2 ] ], 0.75 ] - ], - [ - [ [ [ 2, -1, 0, 3, -1, -3 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -1, 0, 2, -1, -3 ], [ 3, -1, 0, 1, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 2, -1, 0, 3, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 3, -1, 0, 1, -1, -2 ] ], 0.375 ] - ], - [ - [ [ [ 2, -1, 0, 3, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -2, 1, 3, -1, -3 ] ], 0.625 ] - ], - [ - [ [ [ 2, -1, 0, 3, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -2, 0, 2, -1, -3 ] ], 0.25 ] - ], - [ - [ [ [ 1, -1, -1, 2, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -2, 0, 2, -1, -3 ] ], 1.125 ] - ], - [ - [ [ [ 1, -1, -1, 2, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -1, -1, 2, -1, -2 ] ], 0.25 ] - ], - [ - [ [ [ 1, -1, -1, 2, -1, -3 ], [ 2, -1, -1, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -1, -1, 2, -1, -2 ] ], 0.875 ], - [ [ [ "Rest" ], [ 2, -1, -1, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -1, -1, 2, -1, -2 ] ], 0 ], - [ [ [ "Rest" ], [ 2, -1, -1, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ "Rest" ] ], 0.5 ], - [ [ [ "Rest" ], [ "Rest" ], [ 2, -1, 0, 2, -1, -3 ], [ "Rest" ] ], 0.375 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 6.625 ] - ] - ] -], -"last_changes": -[ - [ [ 2, -1, 0, 3, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -2, 1, 3, -1, -3 ] ], - [ [ 2, -1, 0, 3, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -2, 0, 2, -1, -3 ] ], - [ [ 1, -1, -1, 2, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -2, 0, 2, -1, -3 ] ], - [ [ 1, -1, -1, 2, -1, -3 ], [ 2, -2, 0, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -1, -1, 2, -1, -2 ] ], - [ [ 1, -1, -1, 2, -1, -3 ], [ 2, -1, -1, 3, -1, -3 ], [ 2, -1, 0, 2, -1, -3 ], [ 2, -1, -1, 2, -1, -2 ] ] -], -"cur_uid": "5488f7e9", -"ref_uid": "7c2de94c", -"order_seed": 199804, -"dur_seed": 927098, -"motifs_seed": 741655, -"entrances_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -1147.9876160991, 1638 ], [ -1240.866873065, 1453 ], [ -980.80495356037, 1768 ], [ -850.77399380805, 1843 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.063786008230453, 0.92613636363636, 0.12757201646091, 0, 0.54732510288066, 0, 0.71604938271605, 0, 1, 0 ], -"passages_weights": [ 1, 0.34, 0.98, 0.74, 0.68 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.61 ], -"order_size": [ 30, 30 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/55bd25a1/55bd25a1_code.scd b/resources/string_quartet_3/55bd25a1/55bd25a1_code.scd deleted file mode 100644 index 49436ca..0000000 --- a/resources/string_quartet_3/55bd25a1/55bd25a1_code.scd +++ /dev/null @@ -1,973 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array2) - hsArrayToCents.value(array1); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - //if(pDistance >= 0, {stepFunc.value(abs(pDistance))}, {0.01}); - stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0.01); - - - - if(rangeScore.value(candidate.collect({0}), voices[ins], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { - isInRangeScore = 1 - rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0] + 500, ranges[ins][1] - 500, 0, true); - isInRangeScore = isInRangeScore * rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true) - }, { - isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - }); - - - //isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - //old way - worked but actually by accident (I think) - //isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - - - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/55bd25a1/55bd25a1_mus_model.json b/resources/string_quartet_3/55bd25a1/55bd25a1_mus_model.json deleted file mode 100644 index b0cec78..0000000 --- a/resources/string_quartet_3/55bd25a1/55bd25a1_mus_model.json +++ /dev/null @@ -1,548 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ 7, -5, -2, -1, -3, -2 ], [ "Rest" ], [ "Rest" ] ], 1.125 ], - [ [ [ "Rest" ], [ 7, -5, -2, -1, -3, -2 ], [ "Rest" ], [ 6, -6, -2, 0, -1, -2 ] ], 1.25 ], - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ "Rest" ], [ 6, -6, -2, 0, -1, -2 ] ], 1.25 ], - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 6, -5, -2, 0, -1, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 6, -6, -2, 0, -2, -2 ], [ 6, -5, -2, 0, -1, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 0.625 ], - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 6, -6, -2, 0, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 4, -3, -2, 0, -2, -2 ], [ 6, -6, -2, 0, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 0.625 ], - [ [ [ 4, -3, -2, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 4, -3, -2, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 7, -4, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1 ], - [ [ [ 5, -4, -3, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 7, -4, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 0.75 ], - [ [ [ 5, -4, -3, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 7, -4, -2, -1, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.5 ] - ], - [ - [ [ [ 6, -6, -2, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 7, -4, -2, -1, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.625 ], - [ [ [ 6, -6, -2, 0, -2, -2 ], [ 6, -5, -3, 0, -2, -2 ], [ 7, -4, -2, -1, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 1.25 ], - [ [ [ 6, -6, -2, 0, -2, -2 ], [ 6, -5, -3, 0, -2, -2 ], [ 7, -5, -3, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 1.5 ] - ], - [ - [ [ [ 6, -6, -2, 0, -2, -2 ], [ 6, -5, -3, 0, -2, -2 ], [ 6, -5, -2, 1, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.625 ] - ], - [ - [ [ [ 6, -5, -2, 0, -3, -2 ], [ 6, -5, -3, 0, -2, -2 ], [ 6, -5, -2, 1, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.5 ], - [ [ [ 6, -5, -2, 0, -3, -2 ], [ 5, -5, -2, 1, -2, -2 ], [ 6, -5, -2, 1, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.75 ], - [ [ [ 6, -5, -2, 0, -3, -2 ], [ 5, -5, -2, 1, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.75 ] - ], - [ - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 5, -5, -2, 1, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.875 ], - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.875 ], - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -1 ], [ 6, -5, -2, 0, -2, -2 ] ], 0.875 ] - ], - [ - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 5, -4, -2, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -1 ], [ 5, -5, -1, 1, -2, -2 ] ], 1.625 ], - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 6, -6, -1, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -1 ], [ 5, -5, -1, 1, -2, -2 ] ], 0.75 ] - ], - [ - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 6, -6, -1, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -1 ], [ 6, -5, -1, 0, -2, -2 ] ], 1.75 ] - ], - [ - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -1 ], [ 6, -5, -1, 0, -2, -2 ] ], 1.75 ], - [ [ [ 6, -5, -1, -1, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ], [ 6, -5, -2, 0, -2, -1 ], [ 6, -5, -1, 0, -2, -2 ] ], 1.125 ], - [ [ [ 6, -5, -1, -1, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 6, -5, -1, 0, -2, -2 ] ], 1.75 ] - ], - [ - [ [ [ 5, -4, -2, 0, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 6, -5, -1, 0, -2, -2 ] ], 0.875 ], - [ [ [ 5, -4, -2, 0, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 5, -3, -1, 0, -2, -2 ] ], 1.25 ], - [ [ [ 5, -4, -2, 0, -2, -2 ], [ 6, -4, -1, -1, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 5, -3, -1, 0, -2, -2 ] ], 1 ] - ], - [ - [ [ [ 5, -5, -1, 0, -2, -2 ], [ 6, -4, -1, -1, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 5, -3, -1, 0, -2, -2 ] ], 1.25 ] - ], - [ - [ [ [ 4, -3, -1, 0, -2, -2 ], [ 6, -4, -1, -1, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 5, -3, -1, 0, -2, -2 ] ], 1.5 ], - [ [ [ 4, -3, -1, 0, -2, -2 ], [ 6, -4, -1, -1, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ] ], 0.75 ] - ], - [ - [ [ [ 4, -3, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -3 ], [ 6, -4, -1, 0, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ] ], 1.375 ] - ], - [ - [ [ [ 4, -3, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -3 ], [ 6, -4, -1, 0, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ] ], 0.75 ], - [ [ [ 5, -4, -2, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -3 ], [ 6, -4, -1, 0, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ] ], 1.375 ], - [ [ [ 5, -4, -2, 0, -2, -2 ], [ 6, -5, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ] ], 0.375 ] - ], - [ - [ [ [ 4, -4, -1, 1, -3, -2 ], [ 6, -5, -1, 0, -2, -2 ], [ 6, -4, -1, 0, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ] ], 0.5 ], - [ [ [ 4, -4, -1, 1, -3, -2 ], [ 4, -4, -1, 1, -2, -1 ], [ 6, -4, -1, 0, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ] ], 1.625 ], - [ [ [ 4, -4, -1, 1, -3, -2 ], [ 4, -4, -1, 1, -2, -1 ], [ 5, -4, -1, 1, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ] ], 1.5 ] - ], - [ - [ [ [ 4, -4, -1, 1, -3, -2 ], [ 4, -4, -1, 1, -2, -1 ], [ 5, -4, -1, 1, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ] ], 1.25 ], - [ [ [ 4, -4, -1, 1, -3, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 5, -4, -1, 1, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ] ], 1.625 ], - [ [ [ 4, -4, -2, 1, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 5, -4, -1, 1, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ] ], 0.5 ] - ], - [ - [ [ [ 4, -4, -2, 1, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 5, -4, -1, 0, -2, -2 ] ], 0.875 ], - [ [ [ 4, -4, -2, 1, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 6, -4, -2, 0, -2, -2 ], [ 4, -4, 0, 1, -2, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -4, -2, 1, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 4, -4, 0, 1, -2, -1 ], [ 4, -4, 0, 1, -2, -2 ] ], 1.75 ], - [ [ [ 3, -4, -1, 2, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 4, -4, 0, 1, -2, -1 ], [ 4, -4, 0, 1, -2, -2 ] ], 1.625 ] - ], - [ - [ [ [ 3, -4, -1, 2, -2, -2 ], [ 4, -4, -1, 1, -2, -2 ], [ 4, -4, 0, 1, -2, -1 ], [ 3, -4, -1, 2, -2, -1 ] ], 1.375 ], - [ [ [ 3, -4, -1, 2, -2, -2 ], [ 3, -4, 0, 2, -2, -2 ], [ 4, -4, 0, 1, -2, -1 ], [ 3, -4, -1, 2, -2, -1 ] ], 1.625 ], - [ [ [ 3, -4, -1, 2, -2, -2 ], [ 3, -4, 0, 2, -2, -2 ], [ 4, -4, 0, 2, -2, -2 ], [ 3, -4, -1, 2, -2, -1 ] ], 1.5 ] - ], - [ - [ [ [ 3, -5, -1, 2, -2, -1 ], [ 3, -4, 0, 2, -2, -2 ], [ 4, -4, 0, 2, -2, -2 ], [ 3, -4, -1, 2, -2, -1 ] ], 1 ], - [ [ [ 3, -5, -1, 2, -2, -1 ], [ 2, -4, -1, 2, -2, 0 ], [ 4, -4, 0, 2, -2, -2 ], [ 3, -4, -1, 2, -2, -1 ] ], 1.25 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -4, -1, 2, -2, 0 ], [ 4, -4, 0, 2, -2, -2 ], [ 3, -4, -1, 2, -2, -1 ] ], 1.25 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -4, 0, 2, -2, -1 ], [ 4, -4, 0, 2, -2, -2 ], [ 3, -4, -1, 2, -2, -1 ] ], 0.875 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -4, 0, 2, -2, -1 ], [ 4, -5, 0, 2, -2, -1 ], [ 3, -4, -1, 2, -2, -1 ] ], 1.75 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -4, 0, 2, -2, -1 ], [ 4, -5, 0, 2, -2, -1 ], [ 2, -4, 0, 3, -2, -1 ] ], 1.5 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -5, 0, 2, -2, 0 ], [ 4, -5, 0, 2, -2, -1 ], [ 2, -4, 0, 3, -2, -1 ] ], 0.625 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -5, 0, 2, -2, 0 ], [ 4, -5, 0, 2, -2, -1 ], [ 3, -4, 0, 2, -2, -1 ] ], 1.25 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 0, 2, -2, -2 ], [ 4, -5, 0, 2, -2, -1 ], [ 3, -4, 0, 2, -2, -1 ] ], 0.625 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 0, 2, -2, -2 ], [ 4, -5, 0, 2, -2, -1 ], [ 4, -5, 0, 2, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 0, 2, -2, -2 ], [ 4, -5, 0, 2, -2, -1 ], [ 4, -4, 0, 2, -2, -2 ] ], 1.5 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 0, 2, -2, -2 ], [ 3, -4, 0, 2, -2, -1 ], [ 4, -4, 0, 2, -2, -2 ] ], 1.5 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, -1, 2, -1, -2 ], [ 3, -4, 0, 2, -2, -1 ], [ 4, -4, 0, 2, -2, -2 ] ], 1.625 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, -1, 2, -1, -2 ], [ 4, -5, 0, 2, -1, -2 ], [ 4, -4, 0, 2, -2, -2 ] ], 1.25 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, -1, 2, -1, -2 ], [ 4, -5, 0, 2, -1, -2 ], [ 4, -4, 0, 1, -1, -2 ] ], 1.75 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, -1, 2, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ], [ 4, -4, 0, 1, -1, -2 ] ], 0.75 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, -1, 2, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ] ], 1.5 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -4, 0, 3, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -4, 0, 3, -1, -2 ], [ 2, -3, 0, 3, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -4, 0, 3, -1, -2 ], [ 2, -3, 0, 3, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ] ], 1.25 ], - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -4, 0, 3, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ] ], 0.5 ], - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ], [ 2, -2, 1, 2, -1, -2 ] ], 1.5 ], - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 2, -2, 1, 2, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 3, -5, 1, 3, -1, -2 ], [ 2, -2, 1, 2, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 1, -2, 1, 3, -1, -2 ], [ 2, -2, 1, 2, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 2, -4, 2, 3, -1, -2 ], [ 2, -2, 1, 2, -1, -2 ] ], 1.25 ], - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -3, 1, 2, -1, -2 ], [ 2, -4, 2, 3, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ], [ 2, -4, 2, 3, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ] ], 0.875 ], - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ] ], 0.5 ], - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 2, -4, 2, 3, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 1, -4, 1, 3, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ] ], 1.625 ], - [ [ [ 2, -4, 1, 2, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ] ], 1.25 ], - [ [ [ 2, -4, 1, 2, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 1, -4, 1, 2, -1, -1 ] ], 0.625 ] - ], - [ - [ [ [ 2, -4, 1, 2, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 3, -4, 0, 1, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 3, -4, 1, 2, -1, -2 ], [ 3, -4, 0, 1, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ], [ 3, -4, 0, 1, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 3, -4, 1, 1, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ] ], 1.625 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -2 ], [ 4, -4, 1, 1, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ] ], 1.625 ], - [ [ [ 2, -4, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ] ], 1.375 ] - ], - [ - [ [ [ 1, -2, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -2 ], [ 3, -3, 0, 2, -1, -2 ], [ 2, -4, 1, 2, -1, -2 ] ], 0.625 ], - [ [ [ 1, -2, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -1 ], [ 2, -4, 1, 2, -1, -2 ] ], 1.375 ] - ], - [ - [ [ [ 1, -2, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -1 ], [ 2, -2, 0, 2, -1, -3 ] ], 1.375 ], - [ [ [ 1, -2, 0, 2, -1, -2 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -1 ], [ 2, -2, 0, 2, -1, -3 ] ], 1.375 ] - ], - [ - [ [ [ 0, 0, 0, 2, -1, -2 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -3, 0, 2, -1, -1 ], [ 2, -2, 0, 2, -1, -3 ] ], 1.25 ], - [ [ [ 0, 0, 0, 2, -1, -2 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -1, -1, 2, -1, -2 ], [ 2, -2, 0, 2, -1, -3 ] ], 1 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 1, -1, 0, 2, -1, -2 ], [ 2, -1, -1, 2, -1, -2 ], [ 2, -2, 0, 2, -1, -3 ] ], 1.75 ], - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -1, -1, 2, -1, -2 ], [ 2, -2, 0, 2, -1, -3 ] ], 0.625 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -1, -1, 2, -1, -2 ], [ 1, -1, -2, 2, -1, -2 ] ], 0.5 ], - [ [ [ 2, -3, -1, 2, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -1, -1, 2, -1, -2 ], [ 1, -1, -2, 2, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 2, -3, -1, 2, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 3, -2, -2, 2, -1, -2 ], [ 1, -1, -2, 2, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 2, -3, -1, 2, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 3, -2, -2, 2, -1, -2 ], [ 2, -2, -3, 2, -1, -2 ] ], 1.125 ], - [ [ [ 2, -3, -2, 2, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 3, -2, -2, 2, -1, -2 ], [ 2, -2, -3, 2, -1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 2, -3, -2, 2, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -2, -1, 3, -1, -2 ], [ 2, -2, -3, 2, -1, -2 ] ], 0.875 ], - [ [ [ 2, -3, -2, 2, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -2, -1, 3, -1, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 0.875 ], - [ [ [ 2, -2, -1, 1, -1, -2 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -2, -1, 3, -1, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 1.375 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 2, -2, -1, 2, -1, -2 ], [ 2, -2, -1, 3, -1, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 0.875 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 2, -1, -1, 2, -2, -2 ], [ 2, -2, -1, 3, -1, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 0.875 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 2, -1, -1, 2, -2, -2 ], [ 3, -2, -1, 2, -2, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 1.75 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 2, -1, -1, 2, -2, -2 ], [ 4, -2, -1, 1, -2, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 0.875 ], - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 1, -2, -1, 2, -2, -1 ], [ 4, -2, -1, 1, -2, -2 ], [ 2, -2, -1, 2, -2, -2 ] ], 1.5 ] - ], - [ - [ [ [ 2, -2, -1, 2, -1, -3 ], [ 1, -2, -1, 2, -2, -1 ], [ 4, -2, -1, 1, -2, -2 ], [ 1, -2, -1, 2, -1, -1 ] ], 1.625 ], - [ [ [ 2, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 2, -2, -1 ], [ 4, -2, -1, 1, -2, -2 ], [ 1, -2, -1, 2, -1, -1 ] ], 0.625 ], - [ [ [ 2, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 2, -2, -1 ], [ 3, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 2, -1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 2, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 2, -2, -1 ], [ 4, -2, -1, 0, -2, -1 ], [ 1, -2, -1, 2, -1, -1 ] ], 0.625 ], - [ [ [ 2, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 2, -2, -1 ], [ 4, -2, -1, 0, -2, -1 ], [ 3, -3, -1, 1, -2, -1 ] ], 1.75 ], - [ [ [ 2, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 1, -2, 0 ], [ 4, -2, -1, 0, -2, -1 ], [ 3, -3, -1, 1, -2, -1 ] ], 1.25 ] - ], - [ - [ [ [ 2, -2, -1, 1, -2, -1 ], [ 1, -2, -1, 1, -2, 0 ], [ 4, -2, -1, 0, -2, -1 ], [ 3, -2, 0, 0, -2, -1 ] ], 1.375 ] - ], - [ - [ [ [ 2, -2, -1, 0, -2, 0 ], [ 1, -2, -1, 1, -2, 0 ], [ 4, -2, -1, 0, -2, -1 ], [ 3, -2, 0, 0, -2, -1 ] ], 1.875 ], - [ [ [ 2, -2, -1, 0, -2, 0 ], [ 1, -2, -1, 1, -2, 0 ], [ 4, -2, -1, 0, -2, -1 ], [ 2, -2, -1, 1, -2, 0 ] ], 0.5 ], - [ [ [ 2, -2, -1, 0, -2, 0 ], [ 1, -2, -1, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ] ], 0.875 ] - ], - [ - [ [ [ 2, -2, -1, 0, -2, 0 ], [ 0, 0, -1, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ] ], 1.625 ], - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 0, 0, -1, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 1, -2, 0, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ] ], 1.5 ] - ], - [ - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ] ], 0.375 ], - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, 0, -1, 1, -2, 0 ] ], 1.375 ], - [ [ [ 1, -2, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, 0, -1, 1, -2, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 0, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, 0, -1, 1, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ 0, 0, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 1, 0, -1, 1, -2, 0 ] ], 1.125 ] - ], - [ - [ [ [ 0, 0, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, 0, -1, 1, -2, 0 ] ], 0.875 ], - [ [ [ -1, 0, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, 0, -1, 1, -2, 0 ] ], 1 ], - [ [ [ -1, 0, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ] ], 1.125 ] - ], - [ - [ [ [ -1, 0, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 3, -2, 0 ] ], 0.875 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 3, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 3, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, -1, -1, 3, -2, 0 ] ], 0.5 ], - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ] ], 0.75 ], - [ [ [ -1, -1, -1, 2, -2, 1 ], [ 0, -1, -1, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ -1, -1, -1, 2, -2, 1 ], [ 0, -1, -1, 2, -2, 0 ], [ 1, -1, -1, 1, -2, 1 ], [ 2, -1, -1, 1, -2, 0 ] ], 1.75 ], - [ [ [ -1, -1, -1, 2, -2, 1 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 1 ], [ 2, -1, -1, 1, -2, 0 ] ], 0.875 ], - [ [ [ 0, 0, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 1 ], [ 2, -1, -1, 1, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ 0, 0, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 1 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.375 ], - [ [ [ 0, -1, -1, 1, -2, 1 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 1 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.25 ] - ], - [ - [ [ [ 1, -2, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 1 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -2, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -2, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.5 ], - [ [ [ 1, -1, -1, 1, -3, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ 1, -1, -1, 1, -3, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.625 ], - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.375 ], - [ [ [ -1, -1, -1, 3, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.375 ] - ], - [ - [ [ [ -1, -1, -1, 3, -2, 0 ], [ 1, -2, -1, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.625 ], - [ [ [ -1, -1, -1, 3, -2, 0 ], [ 1, -2, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.25 ], - [ [ [ -1, -2, -1, 2, -2, 0 ], [ 1, -2, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.75 ] - ], - [ - [ [ [ 0, -2, -1, 1, -2, 0 ], [ 1, -2, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.5 ], - [ [ [ 0, -2, -1, 1, -2, 0 ], [ 1, -2, -1, 2, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ] ], 0.5 ], - [ [ [ 0, -2, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 2, -1, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ 0, -2, -1, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -2, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ] ], 0.875 ], - [ [ [ 1, -2, -1, 0, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -2, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ 0, -2, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -2, -1, 1, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ] ], 1.375 ], - [ [ [ 0, -2, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 2, -2, -1, 0, -2, 0 ], [ 1, -1, -1, 1, -2, 0 ] ], 1.75 ], - [ [ [ 0, -2, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 2, -2, -1, 0, -2, 0 ], [ 2, -2, -2, 1, -2, 0 ] ], 1.5 ] - ], - [ - [ [ [ 0, -2, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ], [ 2, -2, -2, 1, -2, 0 ] ], 1.5 ], - [ [ [ 0, -2, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ], [ 3, -2, -2, 0, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ 0, -2, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, 0, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1 ], - [ [ [ -1, 0, -2, 1, -2, 0 ], [ 2, -2, -1, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ] ], 1.75 ], - [ [ [ -1, 0, -2, 1, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ] ], 1.75 ] - ], - [ - [ [ [ -1, 0, -2, 1, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 0, 1, -2, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, 0, -2, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ 0, 1, -2, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ] ], 0.75 ], - [ [ [ -2, 2, -2, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ 0, 1, -2, 1, -2, 0 ], [ 2, -1, -2, 1, -2, 0 ] ], 0.5 ], - [ [ [ -2, 2, -2, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ 0, 1, -2, 1, -2, 0 ], [ 1, 1, -2, 1, -2, 0 ] ], 0.875 ] - ], - [ - [ [ [ -2, 2, -2, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ -1, 3, -2, 1, -2, 0 ], [ 1, 1, -2, 1, -2, 0 ] ], 1.375 ], - [ [ [ -1, 1, -3, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ -1, 3, -2, 1, -2, 0 ], [ 1, 1, -2, 1, -2, 0 ] ], 1.375 ] - ], - [ - [ [ [ -1, 1, -3, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ -1, 3, -2, 1, -2, 0 ], [ 0, 3, -2, 1, -2, 0 ] ], 1.875 ], - [ [ [ -1, 1, -3, 1, -2, 0 ], [ 0, 2, -2, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 0, 3, -2, 1, -2, 0 ] ], 1.5 ] - ], - [ - [ [ [ -1, 1, -3, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 0, 3, -2, 1, -2, 0 ] ], 0.875 ] - ], - [ - [ [ [ -2, 3, -3, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 0, 3, -2, 1, -2, 0 ] ], 1.25 ], - [ [ [ -2, 3, -3, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 0, 3, -3, 1, -2, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, 2, -4, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 0, 3, -3, 1, -2, 0 ] ], 0.5 ] - ], - [ - [ [ [ -1, 2, -4, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 1, 2, -4, 1, -2, 0 ] ], 1.25 ], - [ [ [ 0, 0, -3, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 1, 2, -4, 1, -2, 0 ] ], 1.25 ] - ], - [ - [ [ [ -1, 2, -3, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 1, 2, -4, 1, -2, 0 ] ], 0.75 ], - [ [ [ -1, 2, -3, 1, -2, 0 ], [ 1, 1, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 2, 0, -3, 1, -2, 0 ] ], 1 ] - ], - [ - [ [ [ -1, 2, -3, 1, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 0, 2, -3, 1, -2, 0 ], [ 2, 0, -3, 1, -2, 0 ] ], 0.75 ], - [ [ [ -1, 2, -3, 1, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 2, 0, -3, 1, -2, 0 ] ], 1 ], - [ [ [ 0, 0, -2, 1, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 2, 0, -3, 1, -2, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 0, -2, 1, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ] ], 0.5 ], - [ [ [ 0, 0, -2, 1, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ] ], 0.75 ], - [ [ [ 0, 0, -2, 1, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 0, 1, -2, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ] ], 0.625 ] - ], - [ - [ [ [ 0, 0, -2, 1, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ] ], 0.75 ] - ], - [ - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ] ], 0.625 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 1, -1, -2, 1, -2, 0 ] ], 0.875 ] - ], - [ - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, 0, -2, 1, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.625 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ], [ 1, 0, -3, 1, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 0.75 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.375 ] - ], - [ - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, 0, -2, 2, -3, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.25 ] - ], - [ - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 0, -1, -1, 2, -2, 0 ] ], 1.25 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -2, -2, 2, -2, 0 ] ], 0.875 ] - ], - [ - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.375 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 1, -1, -1, 2, -2, 0 ], [ 1, -1, -3, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 0.625 ], - [ [ [ 0, -1, -2, 2, -2, 0 ], [ 2, -2, -2, 2, -2, 0 ], [ 1, -1, -3, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1 ] - ], - [ - [ [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -2, -2, 2, -2, 0 ], [ 1, -1, -3, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 0.875 ], - [ [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -2, -2, 2, -2, 0 ], [ 1, -2, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 1, -2, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.125 ], - [ [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.5 ], - [ [ [ 1, -1, -2, 1, -2, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.625 ], - [ [ [ 1, -1, -2, 1, -2, 0 ], [ "Rest" ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.625 ], - [ [ [ "Rest" ], [ "Rest" ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], 1.25 ], - [ [ [ "Rest" ], [ "Rest" ], [ 0, 0, -2, 2, -2, 0 ], [ "Rest" ] ], 1.25 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 7.25 ] - ] - ] -], -"last_changes": -[ - [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -2, -2, 2, -2, 0 ], [ 1, -1, -3, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], - [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -2, -2, 2, -2, 0 ], [ 1, -2, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], - [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 1, -2, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], - [ [ 1, -2, -3, 2, -2, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ], - [ [ 1, -1, -2, 1, -2, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 0, 0, -2, 2, -2, 0 ], [ 1, -1, -2, 2, -2, 0 ] ] -], -"cur_uid": "55bd25a1", -"ref_uid": "6a9928d6", -"order_seed": 807265, -"dur_seed": 754968, -"motifs_seed": 848720, -"entrances_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2430, -293 ], [ -869, 1211 ], [ -832, 1285 ], [ -702, 1211 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61316872427983, 0, 0.98971193415638, 0 ], -"passages_weights": [ 0.48, 0.46, 0.48, 1, 1 ], -"hd_exp": 9, -"hd_invert": 0, -"order": -[ - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 0 ], [ 1, 2 ], [ ] ], - [ [ 3, 2 ], [ 0, 1 ], [ ] ], - [ [ 1 ], [ 2, 0, 3 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 2, 0 ], [ 3, 1 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 3 ], [ 1, 0, 2 ], [ ] ], - [ [ 2 ], [ 0, 3, 1 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 2, 1 ], [ 0, 3 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 2 ], [ 3, 0, 1 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 2 ], [ 3, 1, 0 ], [ ] ], - [ [ 0, 1 ], [ 2, 3 ], [ ] ], - [ [ 3, 1 ], [ 2, 0 ], [ ] ], - [ [ 0 ], [ 3, 1, 2 ], [ ] ], - [ [ 3, 2 ], [ 0, 1 ], [ ] ], - [ [ 2, 3 ], [ 0, 1 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 2, 0 ], [ 1, 3 ], [ ] ], - [ [ 0, 2 ], [ 1, 3 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 0 ], [ 1, 2, 3 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 3 ], [ 0, 2, 1 ], [ ] ], - [ [ 1, 0 ], [ 3, 2 ], [ ] ], - [ [ 0, 3, 1 ],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] ], - [ [ 1, 2 ], [ 3, 0 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 3, 1 ], [ 2, 0 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 3 ], [ 1, 2, 0 ], [ ] ], - [ [ 2 ], [ 0, 3, 1 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 1 ], [ 0, 2, 3 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 2 ], [ 0, 3, 1 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 2 ], [ 1, 0, 3 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 1, 0 ], [ 3, 2 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 1, 2 ], [ 0, 3 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 2, 1 ], [ 3, 0 ], [ ] ], - [ [ 2, 1 ], [ 0, 3 ], [ ] ], - [ [ 3 ], [ 1, 2, 0 ], [ ] ], - [ [ 0 ], [ 3, 1, 2 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 2 ], [ 0, 1 ], [ ] ], - [ [ 0 ], [ 3, 1, 2 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 2, 0 ], [ 1, 3 ], [ ] ], - [ [ 0 ], [ 3, 2, 1 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 3 ], [ 1, 2, 0 ], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/55f9b81e/55f9b81e_code.scd b/resources/string_quartet_3/55f9b81e/55f9b81e_code.scd deleted file mode 100644 index 2dad11e..0000000 --- a/resources/string_quartet_3/55f9b81e/55f9b81e_code.scd +++ /dev/null @@ -1,958 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - if(pDistance < 0, {stepFunc.value(abs(pDistance))}, {0.001}); - //stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/55f9b81e/55f9b81e_mus_model.json b/resources/string_quartet_3/55f9b81e/55f9b81e_mus_model.json deleted file mode 100644 index 52fe7d6..0000000 --- a/resources/string_quartet_3/55f9b81e/55f9b81e_mus_model.json +++ /dev/null @@ -1,443 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ -3, 1, 1, 4, 1, -2 ], [ "Rest" ] ], 1.125 ], - [ [ [ -2, 0, 0, 3, 1, -2 ], [ "Rest" ], [ -3, 1, 1, 4, 1, -2 ], [ "Rest" ] ], 1.75 ], - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -3, 1, 1, 4, 1, -2 ], [ "Rest" ] ], 1.375 ], - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -3, 1, 1, 4, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 0, 0, 4, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.5 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 0.875 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -3, 1, 2, 4, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -4, 1, 2, 4, 1, -2 ], [ -3, 1, 2, 4, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ -4, 1, 1, 4, 2, -2 ], [ -3, 1, 2, 4, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.25 ] - ], - [ - [ [ [ -4, 1, 1, 4, 2, -2 ], [ -2, 0, 1, 4, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -4, 1, 1, 4, 2, -2 ], [ -2, 0, 1, 4, 1, -2 ], [ -3, 1, 2, 4, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -4, 2, 1, 4, 1, -2 ], [ -2, 0, 1, 4, 1, -2 ], [ -3, 1, 2, 4, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.75 ] - ], - [ - [ [ [ -4, 2, 1, 4, 1, -2 ], [ -2, 1, 2, 3, 1, -2 ], [ -3, 1, 2, 4, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.75 ] - ], - [ - [ [ [ -4, 2, 1, 4, 1, -2 ], [ -2, 1, 2, 3, 1, -2 ], [ -2, 0, 1, 4, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.25 ] - ], - [ - [ [ [ -4, 2, 1, 4, 1, -2 ], [ -2, 1, 2, 3, 1, -2 ], [ -2, 1, 1, 4, 0, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 0.875 ] - ], - [ - [ [ [ -2, 1, 1, 3, 0, -2 ], [ -2, 1, 2, 3, 1, -2 ], [ -2, 1, 1, 4, 0, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -2, 1, 1, 3, 0, -2 ], [ -2, 1, 2, 3, 1, -2 ], [ -3, 2, 2, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.625 ] - ], - [ - [ [ [ -2, 1, 1, 3, 0, -2 ], [ -2, 2, 2, 3, 0, -2 ], [ -3, 2, 2, 3, 1, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -2, 1, 1, 3, 0, -2 ], [ -2, 2, 2, 3, 0, -2 ], [ -3, 3, 2, 3, 0, -2 ], [ -2, 1, 1, 4, 1, -2 ] ], 1.75 ] - ], - [ - [ [ [ -2, 1, 1, 3, 0, -2 ], [ -2, 2, 2, 3, 0, -2 ], [ -3, 3, 2, 3, 0, -2 ], [ -2, 2, 2, 3, 1, -2 ] ], 1.25 ] - ], - [ - [ [ [ -2, 1, 1, 3, 0, -2 ], [ -2, 2, 2, 3, 0, -2 ], [ -2, 1, 1, 3, 0, -1 ], [ -2, 2, 2, 3, 1, -2 ] ], 1.625 ] - ], - [ - [ [ [ -2, 0, 1, 3, 0, -1 ], [ -2, 2, 2, 3, 0, -2 ], [ -2, 1, 1, 3, 0, -1 ], [ -2, 2, 2, 3, 1, -2 ] ], 1.375 ] - ], - [ - [ [ [ -2, 0, 1, 3, 0, -1 ], [ -2, 2, 2, 3, 0, -2 ], [ -1, 0, 0, 3, 0, -1 ], [ -2, 2, 2, 3, 1, -2 ] ], 1.75 ] - ], - [ - [ [ [ -2, 0, 1, 3, 0, -1 ], [ -2, 2, 2, 3, 0, -2 ], [ -2, 0, 1, 3, 0, 0 ], [ -2, 2, 2, 3, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -2, 0, 1, 3, 0, -1 ], [ -2, 2, 2, 3, 0, -2 ], [ -2, 0, 1, 3, 0, 0 ], [ -1, 2, 2, 3, -1, -2 ] ], 1.375 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -2, 2, 2, 3, 0, -2 ], [ -2, 0, 1, 3, 0, 0 ], [ -1, 2, 2, 3, -1, -2 ] ], 1.375 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -2, 0, 1, 3, 0, 0 ], [ -1, 2, 2, 3, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -2, 0, 1, 3, 0, 0 ], [ -2, 0, 1, 3, 0, 1 ] ], 1.25 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -2, 0, 1, 3, 0, 0 ], [ -2, 0, 1, 4, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -2, 0, 1, 3, 0, 0 ], [ -1, -1, 1, 3, 1, 0 ] ], 1.25 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 1, 3, 1, 0 ] ], 0.75 ] - ], - [ - [ [ [ -2, -1, 1, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 0, 4, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ -1, 0, 1, 2, 0, -1 ], [ -1, 0, 1, 2, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 0, 4, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, -1, 1, 2, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 0, 4, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ -2, 0, 0, 3, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 0, 4, 0, 0 ] ], 1.5 ] - ], - [ - [ [ [ -2, -1, 0, 4, 0, 0 ], [ -1, 0, 1, 2, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 0, 4, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ -2, -1, 0, 4, 0, 0 ], [ -1, -1, 1, 3, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 0, 4, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ -2, -1, 0, 4, 0, 0 ], [ -1, -1, 1, 3, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, -1, 1, 4, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, -1, 0, 4, 0, 0 ], [ -1, -1, 1, 3, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.25 ] - ], - [ - [ [ [ -1, -1, 1, 3, -1, 0 ], [ -1, -1, 1, 3, 0, 0 ], [ -1, -1, 0, 3, 0, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 0.75 ] - ], - [ - [ [ [ -1, -1, 1, 3, -1, 0 ], [ -1, -1, 1, 3, 0, 0 ], [ -2, -1, 1, 3, 0, 1 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.5 ] - ], - [ - [ [ [ -1, -1, 1, 3, -1, 0 ], [ -1, -1, 1, 3, 0, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ -1, -1, 1, 3, -1, 0 ], [ 0, -1, 1, 3, -2, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.25 ] - ], - [ - [ [ [ -1, -1, 1, 3, -1, 0 ], [ -1, 0, 1, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.5 ] - ], - [ - [ [ [ -1, -1, 1, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ -1, -1, 0, 3, 0, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, 0, 0 ] ], 1.375 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 1, 0, 3, -1, 0 ] ], 1.875 ] - ], - [ - [ [ [ -2, 1, 0, 3, 0, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 1, 0, 3, -1, 0 ] ], 1.375 ] - ], - [ - [ [ [ -2, 1, 0, 3, 0, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 0 ], [ -1, 0, 0, 3, -1, 1 ] ], 1.75 ] - ], - [ - [ [ [ -2, 1, 0, 3, 0, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, -1, 0, 4, -1, 0 ], [ -1, 0, 0, 3, -1, 1 ] ], 1.625 ] - ], - [ - [ [ [ 0, -1, -1, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, -1, 0, 4, -1, 0 ], [ -1, 0, 0, 3, -1, 1 ] ], 0.625 ] - ], - [ - [ [ [ 0, -1, -1, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ -1, -1, 0, 4, -1, 0 ], [ 1, -2, 0, 3, -1, 0 ] ], 1.125 ] - ], - [ - [ [ [ 0, -1, -1, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ 1, -2, 0, 3, -2, 0 ], [ 1, -2, 0, 3, -1, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -3, 0, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ 1, -2, 0, 3, -2, 0 ], [ 1, -2, 0, 3, -1, 0 ] ], 0.875 ] - ], - [ - [ [ [ 1, -3, 0, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ 0, -2, 0, 3, -1, 1 ], [ 1, -2, 0, 3, -1, 0 ] ], 0.875 ] - ], - [ - [ [ [ 1, -3, 0, 3, -1, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ 2, -3, 0, 3, -1, -1 ], [ 1, -2, 0, 3, -1, 0 ] ], 1.375 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 0, -1, 0, 3, -1, 0 ], [ 2, -3, 0, 3, -1, -1 ], [ 1, -2, 0, 3, -1, 0 ] ], 1.125 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 1, -2, -1, 3, -1, 0 ], [ 2, -3, 0, 3, -1, -1 ], [ 1, -2, 0, 3, -1, 0 ] ], 1 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 2, -2, 0, 2, -2, 0 ], [ 2, -3, 0, 3, -1, -1 ], [ 1, -2, 0, 3, -1, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 2, -2, 0, 2, -2, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 1, -2, 0, 3, -1, 0 ] ], 1.75 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 2, -2, 0, 2, -2, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 1.5 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 1, -2, 1, 3, -2, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -2, 0, 3, -2, 0 ], [ 1, -2, 0, 3, -1, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 1 ] - ], - [ - [ [ [ 1, -1, 0, 3, -3, 0 ], [ 1, -2, 0, 3, -1, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 2, -2, -1, 3, -3, 0 ], [ 1, -2, 0, 3, -1, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 0.75 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 1, -2, 0, 3, -1, 0 ], [ 0, -2, 0, 4, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 1.125 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 1, -2, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 1, -3, 0, 3, -1, 1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -2, 0, 3, -3, 0 ] ], 1.25 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 1, -3, 0, 3, -1, 1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 1, 3, -1, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 1, -3, 0, 3, -1, 1 ], [ 2, -4, 0, 3, -1, 0 ], [ 1, -4, 0, 3, -1, 0 ] ], 1.875 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 2, -4, 1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 1, -4, 0, 3, -1, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 0, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 1, -4, 0, 3, -1, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ -1, -2, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 1, -4, 0, 3, -1, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ -1, -2, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 0, -2, 0, 3, -1, 0 ] ], 1.75 ] - ], - [ - [ [ [ -1, -3, 0, 3, -1, 0 ], [ 0, -3, -1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 0, -2, 0, 3, -1, 0 ] ], 0.875 ] - ], - [ - [ [ [ -2, -2, 0, 3, 0, 0 ], [ 0, -3, -1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 0, -2, 0, 3, -1, 0 ] ], 0.625 ] - ], - [ - [ [ [ -1, -4, 0, 3, -1, 1 ], [ 0, -3, -1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 0, -2, 0, 3, -1, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, -4, 0, 3, -1, 1 ], [ 1, -5, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 0, -2, 0, 3, -1, 0 ] ], 1.375 ] - ], - [ - [ [ [ -1, -4, 0, 3, -1, 1 ], [ 1, -5, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 1, -5, 0, 4, -1, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, -4, 0, 3, -1, 1 ], [ 1, -5, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1 ] - ], - [ - [ [ [ 1, -6, 0, 3, -1, 0 ], [ 1, -5, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.625 ] - ], - [ - [ [ [ 1, -6, 0, 3, -1, 0 ], [ 1, -5, 0, 3, -1, 0 ], [ 3, -5, -1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.625 ] - ], - [ - [ [ [ 1, -6, 0, 3, -1, 0 ], [ 1, -5, 0, 3, -1, 0 ], [ 3, -6, 1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 0, -6, 1, 3, -1, 1 ], [ 1, -5, 0, 3, -1, 0 ], [ 3, -6, 1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 0, -6, 1, 3, -1, 1 ], [ 0, -5, 1, 3, -1, 1 ], [ 3, -6, 1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.75 ] - ], - [ - [ [ [ 0, -6, 1, 4, -1, 0 ], [ 0, -5, 1, 3, -1, 1 ], [ 3, -6, 1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.75 ] - ], - [ - [ [ [ 0, -6, 1, 4, -1, 0 ], [ 0, -5, 1, 4, -1, 0 ], [ 3, -6, 1, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, -6, 1, 4, -1, 0 ], [ 0, -5, 1, 4, -1, 0 ], [ 2, -6, 2, 4, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1 ] - ], - [ - [ [ [ 0, -6, 1, 4, -1, 0 ], [ 0, -5, 1, 4, -1, 0 ], [ 3, -7, 1, 4, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1 ] - ], - [ - [ [ [ 0, -6, 1, 4, -1, 0 ], [ 2, -7, 1, 3, -1, 0 ], [ 3, -7, 1, 4, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 1, -7, 0, 4, -1, 0 ], [ 2, -7, 1, 3, -1, 0 ], [ 3, -7, 1, 4, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.625 ] - ], - [ - [ [ [ 0, -7, 1, 5, -1, 0 ], [ 2, -7, 1, 3, -1, 0 ], [ 3, -7, 1, 4, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.75 ] - ], - [ - [ [ [ 0, -7, 1, 5, -1, 0 ], [ 2, -7, 1, 3, -1, 0 ], [ 4, -7, 1, 2, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1 ] - ], - [ - [ [ [ 0, -7, 1, 5, -1, 0 ], [ 2, -5, 0, 3, -1, -1 ], [ 4, -7, 1, 2, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 3, -7, 1, 2, -2, 0 ], [ 2, -5, 0, 3, -1, -1 ], [ 4, -7, 1, 2, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.75 ] - ], - [ - [ [ [ 3, -7, 1, 2, -2, 0 ], [ 2, -5, 0, 3, -1, -1 ], [ 5, -7, 1, 2, -3, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 3, -7, 1, 2, -2, 0 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -3, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 3, -7, 1, 2, -2, 0 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.75 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 3, -5, -1, 3, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -5, 0, 4, -1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.625 ], - [ [ [ "Rest" ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.125 ], - [ [ [ "Rest" ], [ 2, -5, 0, 3, -1, -1 ], [ "Rest" ], [ 4, -5, -1, 2, -1, -1 ] ], 1.75 ], - [ [ [ "Rest" ], [ 2, -5, 0, 3, -1, -1 ], [ "Rest" ], [ "Rest" ] ], 1.5 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 3.0 ] - ] - ] -], -"last_changes": -[ - [ [ 3, -7, 1, 2, -2, 0 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], - [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -4, 0, 3, -1, -1 ] ], - [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 3, -5, -1, 3, -1, -1 ] ], - [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 2, -5, 0, 4, -1, -1 ] ], - [ [ 2, -5, -1, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ] -], -"cur_uid": "55f9b81e", -"ref_uid": "726a40c7", -"order_seed": 540514, -"dur_seed": 331257, -"motifs_seed": 728928, -"entrances_probs_vals": [ 0, 0, 0, 0.66, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0.66, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0.66, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2467, 2400 ], [ -1167, 2400 ], [ -702, 2400 ], [ -702, 2400 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.090534979423868, 0.92613636363636, 0.17489711934156, 0.079545454545455, 0.37037037037037, 0, 0.7201646090535, 0, 1, 0 ], -"passages_weights": [ 0.63, 0.62, 1, 0.41, 1 ], -"hd_exp": 3.09, -"hd_invert": 0, -"order": -[ - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 2, 1, 3 ], [ 0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2, 1 ], [ 3 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.61 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/577cf188/577cf188_code.scd b/resources/string_quartet_3/577cf188/577cf188_code.scd deleted file mode 100644 index 5a3854b..0000000 --- a/resources/string_quartet_3/577cf188/577cf188_code.scd +++ /dev/null @@ -1,945 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance); -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/577cf188/577cf188_mus_model.json b/resources/string_quartet_3/577cf188/577cf188_mus_model.json deleted file mode 100644 index b37c8be..0000000 --- a/resources/string_quartet_3/577cf188/577cf188_mus_model.json +++ /dev/null @@ -1,198 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 2.375 ], - [ [ [ -1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1.875 ] - ], - [ - [ [ [ 0, -1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1.5 ] - ], - [ - [ [ [ 0, -1, 0, 0, 0, 0 ], [ 1, -1, 0, 0, -1, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ 1, -2, 0, 0, -1, 0 ], [ 1, -1, 0, 0, -1, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1.625 ] - ],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 - [ [ [ 0, 1, 2, -1, 0, -2 ], [ 1, 1, 2, -1, 0, -1 ], [ 0, 1, 2, -1, 0, -1 ], [ 0, 1, 2, -1, 0, 0 ] ], 2.5 ] - ], - [ - [ [ [ 0, 1, 2, -1, 0, -2 ], [ 1, 1, 2, -1, 0, -1 ], [ 0, 1, 2, -1, 0, -1 ], [ 2, 1, 2, -1, 0, -3 ] ], 1.875 ] - ], - [ - [ [ [ 0, 1, 2, -1, 0, -2 ], [ 3, 1, 2, -1, 0, -4 ], [ 0, 1, 2, -1, 0, -1 ], [ 2, 1, 2, -1, 0, -3 ] ], 1.375 ] - ], - [ - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 3, 1, 2, -1, 0, -4 ], [ 0, 1, 2, -1, 0, -1 ], [ 2, 1, 2, -1, 0, -3 ] ], 2.25 ] - ], - [ - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 3, 1, 2, -1, 0, -4 ], [ 0, 1, 2, -1, 0, -1 ], [ 2, 2, 2, -1, 0, -4 ] ], 2 ] - ], - [ - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 3, 1, 2, -1, 0, -4 ], [ 0, 1, 2, -1, 0, -1 ], [ 2, 1, 2, -3, 0, -1 ] ], 2 ] - ], - [ - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 3, 1, 2, -1, 0, -4 ], [ 0, 1, 2, -1, 0, -1 ], [ 0, 1, 3, -1, 0, -1 ] ], 2 ] - ], - [ - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 2, 2, -2, 0, -1 ], [ 0, 1, 2, -1, 0, -1 ], [ 0, 1, 3, -1, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 2, 2, -2, 0, -1 ], [ 2, 1, 2, -3, 0, -1 ], [ 0, 1, 3, -1, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 2, 2, -2, 0, -1 ], [ 2, 1, 2, -3, 0, -1 ], [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2, 0, -2 ] ], 1.625 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 0, 2, 2, -2, 0, 0 ], [ 1, 2, 2, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -2 ] ], 1.625 ] - ], - [ - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 2, 1, 2, -3, 0, -1 ], [ 1, 2, 2, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -2 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 2, 1, 2, -3, 0, -1 ], [ 2, 1, 2, -2, -1, -1 ], [ 2, 1, 2, -2, 0, -2 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 2, 1, 2, -3, 0, -1 ], [ 2, 1, 2, -2, -1, -1 ], [ 3, 1, 2, -2, 0, -2 ] ], 2.625 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 0, 2, 2, -2, 0, -1 ], [ 2, 1, 2, -2, -1, -1 ], [ 3, 1, 2, -2, 0, -2 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 0, 2, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 1, -1 ], [ 3, 1, 2, -2, 0, -2 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 0, 2, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 1, -1 ], [ 3, 1, 2, -3, 0, -1 ] ], 2.125 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, -1, -1 ], [ 1, 1, 2, -2, 1, -1 ], [ 3, 1, 2, -3, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, -1, -1 ], [ 2, 0, 2, -2, 0, -1 ], [ 3, 1, 2, -3, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, -1, -1 ], [ 2, 0, 2, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -1 ] ], 1.5 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ 2, 0, 2, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ 1, 1, 3, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ 1, 1, 3, -2, 0, -1 ], [ 2, 1, 3, -2, 0, -1 ] ], 2.25 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ "Rest" ], [ 2, 1, 3, -2, 0, -1 ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ "Rest" ], [ "Rest" ] ], 0 ], - [ [ [ 0, 1, 2, -2, 0, -1 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 0 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 7.0 ] - ] - ] -], -"last_changes": -[ - [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, -1, -1 ], [ 2, 0, 2, -2, 0, -1 ], [ 3, 1, 2, -3, 0, -1 ] ], - [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, -1, -1 ], [ 2, 0, 2, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -1 ] ], - [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ 2, 0, 2, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -1 ] ], - [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ 1, 1, 3, -2, 0, -1 ], [ 2, 1, 2, -2, 0, -1 ] ], - [ [ 0, 1, 2, -2, 0, -1 ], [ 1, 1, 2, -2, 0, -1 ], [ 1, 1, 3, -2, 0, -1 ], [ 2, 1, 3, -2, 0, -1 ] ] -], -"cur_uid": "577cf188", -"ref_uid": "nil", -"order_seed": 755225, -"dur_seed": 543380, -"motifs_seed": 119394, -"entrances_probs_vals": [ 1, 0, 0, 1.1263736263736, 2.83, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 1, 0, 0, 1.1263736263736, 2.83, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 1, 0, 0, 1.1263736263736, 2.83, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -1315, 1582.6625386997 ], [ -702.16718266254, 1453 ], [ -386, 1676 ], [ -219, 1694 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.063786008230453, 0.92613636363636, 0.12757201646091, 0, 0.54732510288066, 0, 0.71604938271605, 0, 1, 0 ], -"passages_weights": [ 1, 1, 0.66, 0.74, 1 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 0 ], [ 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3 ], [ ] ], - [ [ 3, 2, 1 ], [ 1 ], [ ] ], - [ [ 0 ], [ 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.51 ], -"order_size": [ 30, 30 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/5ec14635/5ec14635_code.scd b/resources/string_quartet_3/5ec14635/5ec14635_code.scd deleted file mode 100644 index f822edb..0000000 --- a/resources/string_quartet_3/5ec14635/5ec14635_code.scd +++ /dev/null @@ -1,946 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - if(pDistance < 0, {stepFunc.value(abs(pDistance))}, {0.001}); - //stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/5ec14635/5ec14635_mus_model.json b/resources/string_quartet_3/5ec14635/5ec14635_mus_model.json deleted file mode 100644 index c4309f6..0000000 --- a/resources/string_quartet_3/5ec14635/5ec14635_mus_model.json +++ /dev/null @@ -1,163 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ -2, -1, 0, 0, 0, -1 ], [ "Rest" ] ], 0.375 ], - [ [ [ "Rest" ], [ -2, -2, 0, 1, 0, -2 ], [ -2, -1, 0, 0, 0, -1 ], [ "Rest" ] ], 0 ], - [ [ [ -2, -1, 0, 1, 0, -2 ], [ -2, -2, 0, 1, 0, -2 ], [ -2, -1, 0, 0, 0, -1 ], [ "Rest" ] ], 0.5 ], - [ [ [ -2, -1, 0, 1, 0, -2 ], [ -2, -2, 0, 1, 0, -2 ], [ -2, -1, 0, 0, 0, -1 ], [ 1, -2, 0, 2, 0, -2 ] ], 0.125 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ -2, -2, 0, 1, 0, -2 ], [ 0, 0, 0, 1, 0, -2 ], [ 1, -2, 0, 2, 0, -2 ] ], 1 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ -2, -2, 0, 1, 0, -2 ], [ 0, 0, 0, 1, 0, -2 ], [ 0, 0, 0, 1, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ -1, 1, 0, 1, 0, -1 ], [ 0, 0, 0, 1, 0, -2 ], [ 0, 0, 0, 1, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ 0, 0, 0, 1, 0, -2 ], [ 0, 0, 0, 1, 0, -1 ] ], 0.125 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ -1, 0, 1, 1, 0, -1 ], [ 0, 0, 0, 1, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ -1, 0, 1, 2, 0, -2 ], [ 0, 0, 0, 1, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ 0, -1, 0, 2, 0, -2 ], [ 0, 0, 0, 1, 0, -1 ] ], 0 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ -1, 1, 0, 1, 0, -1 ], [ 0, 0, 0, 1, 0, -1 ] ], 0.625 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ -1, 1, 0, 1, 0, -1 ], [ 0, 0, 1, 1, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ -1, 1, 1, 1, 1, -2 ], [ 0, 0, 1, 1, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 0, 0, 1, 1, 0, -2 ], [ -1, 1, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 0.625 ] - ], - [ - [ [ [ -2, -1, 0, 1, 0, -2 ], [ 1, -1, 0, 1, 0, -2 ], [ -1, 1, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ -1, -1, 0, 2, 1, -2 ], [ 1, -1, 0, 1, 0, -2 ], [ -1, 1, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -1, 0, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 0, -2 ], [ -1, 1, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 0.25 ] - ], - [ - [ [ [ -1, 0, 1, 1, 1, -2 ], [ -1, 0, 1, 1, 1, -1 ], [ -1, 1, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 0.25 ] - ], - [ - [ [ [ -1, 0, 1, 1, 1, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -1, 1, 1, 1, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -1, 0, 1, 1, 1, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ 1, -1, 0, 1, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -1, 0, 1, 1, 1, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ -1, 0, 1, 3, 0, -2 ] ], 1 ] - ], - [ - [ [ [ -1, 0, 1, 1, 1, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ 0, -1, 1, 2, 1, -2 ] ], 0.25 ] - ], - [ - [ [ [ -1, 0, 1, 2, 1, -3 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ 0, -1, 1, 2, 1, -2 ] ], 0.25 ] - ], - [ - [ [ [ -3, 1, 1, 3, 1, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ 0, -1, 1, 2, 1, -2 ] ], 0 ] - ], - [ - [ [ [ -2, 0, 1, 2, 2, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ 0, -1, 1, 2, 1, -2 ] ], 1 ] - ], - [ - [ [ [ -2, 0, 1, 2, 2, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -2, 0, 1, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ -2, 0, 1, 2, 2, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -1, -1, 1, 2, 2, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], 0.625 ] - ], - [ - [ [ [ -1, 0, 1, 2, 0, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -1, -1, 1, 2, 2, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], 0.125 ] - ], - [ - [ [ [ -1, 0, 1, 2, 0, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ -1, 0, 1, 2, 0, -2 ], [ 0, 0, 1, 2, -1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], 0.25 ] - ], - [ - [ [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], 1.25 ] - ], - [ - [ [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ 0, -1, 0, 2, 2, -2 ] ], 0.625 ], - [ [ [ "Rest" ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ 0, -1, 0, 2, 2, -2 ] ], 0.625 ], - [ [ [ "Rest" ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ "Rest" ] ], 0.375 ], - [ [ [ "Rest" ], [ "Rest" ], [ -1, -1, 0, 3, 1, -2 ], [ "Rest" ] ], 0.875 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1.375 ] - ] - ] -], -"last_changes": -[ - [ [ -1, 0, 1, 2, 0, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -1, -1, 1, 2, 2, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], - [ [ -1, 0, 1, 2, 0, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], - [ [ -1, 0, 1, 2, 0, -2 ], [ 0, 0, 1, 2, -1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], - [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, 0, 0, 3, 1, -2 ] ], - [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ 0, -1, 0, 2, 2, -2 ] ] -], -"cur_uid": "5ec14635", -"ref_uid": "7c2de94c", -"order_seed": 733231, -"dur_seed": 711733, -"motifs_seed": 934821, -"entrances_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2170, 338 ], [ -2373.9938080495, 1453 ], [ -1650, 1676 ], [ -1370.8978328173, 1694 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.063786008230453, 0.92613636363636, 0.12757201646091, 0, 0.54732510288066, 0, 0.71604938271605, 0, 1, 0 ], -"passages_weights": [ 1, 0, 0.2, 0.74, 0.68 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.61 ], -"order_size": [ 30, 30 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/69c568c6/69c568c6_code.scd b/resources/string_quartet_3/69c568c6/69c568c6_code.scd deleted file mode 100644 index a40da01..0000000 --- a/resources/string_quartet_3/69c568c6/69c568c6_code.scd +++ /dev/null @@ -1,973 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array2) - hsArrayToCents.value(array1); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - //if(pDistance >= 0, {stepFunc.value(abs(pDistance))}, {0.01}); - stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum == 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0.01); - - - - if(rangeScore.value(candidate.collect({0}), voices[ins], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { - isInRangeScore = 1 - rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0] + 500, ranges[ins][1] - 500, 0, true); - isInRangeScore = isInRangeScore * rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true) - }, { - isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - }); - - - //isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - //old way - worked but actually by accident (I think) - //isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - - - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/69c568c6/69c568c6_mus_model.json b/resources/string_quartet_3/69c568c6/69c568c6_mus_model.json deleted file mode 100644 index a490727..0000000 --- a/resources/string_quartet_3/69c568c6/69c568c6_mus_model.json +++ /dev/null @@ -1,535 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ "Rest" ] ], 1.625 ], - [ [ [ "R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[ -2, 1, -1, -1, 0, 1 ], [ 1, 1, -1, -2, 0, 0 ], [ 0, 1, 0, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 1.25 ] - ], - [ - [ [ [ -2, 1, -1, -1, 0, 1 ], [ 1, 1, -1, -2, 0, 0 ], [ 1, 0, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 0.625 ], - [ [ [ -2, 1, -1, -1, 0, 1 ], [ -1, 2, -1, -1, 0, 1 ], [ 1, 0, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ -2, 1, -1, -1, 0, 1 ], [ 0, 1, -2, -1, 0, 1 ], [ 1, 0, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 1.25 ] - ], - [ - [ [ [ -2, 1, -1, -1, 0, 1 ], [ 1, 1, -1, -1, -1, 0 ], [ 1, 0, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 0.75 ], - [ [ [ -2, 1, -1, -1, 0, 1 ], [ 1, 1, -1, -1, -1, 0 ], [ 0, 2, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 1, 1, -1, -1, -1, 0 ], [ 0, 2, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 2, -1, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 1.375 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 2, -1, -1, 0, 0 ], [ 1, 2, -1, -2, 0, 0 ], [ 1, 1, -1, -1, 0, 0 ] ], 1.125 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 2, -1, -1, 0, 0 ], [ 1, 2, -1, -2, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 0, 2, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1.625 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 0, 2, -1, -2, 0, 0 ], [ 0, 2, 0, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 0.75 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 2, 0, -1, 0, 0 ], [ 0, 2, 0, -1, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1.375 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 2, 0, -1, 0, 0 ], [ 1, 2, 0, -2, 0, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 2, 0, -1, 0, 0 ], [ 0, 2, -1, -2, 1, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, -1 ], [ 0, 2, -1, -2, 1, 0 ], [ 0, 2, -1, -1, 0, 0 ] ], 1.125 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, -1 ], [ 0, 2, -1, -2, 1, 0 ], [ 1, 2, -1, -2, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, -1 ], [ 0, 3, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, 0 ] ], 1.375 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, -1 ], [ 0, 3, -1, -2, 0, 0 ], [ 1, 2, -1, -1, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ -1, 2, -1, -2, 0, 0 ], [ 1, 2, -1, -2, 0, -1 ], [ 0, 3, -1, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 0.75 ], - [ [ [ -1, 2, -1, -2, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ 0, 3, -1, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 1.5 ], - [ [ [ -1, 3, -1, -2, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ 0, 3, -1, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 1 ] - ], - [ - [ [ [ 0, 2, -2, -2, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ 0, 3, -1, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ 0, 2, -2, -2, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ 1, 2, -2, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 1.375 ] - ], - [ - [ [ [ 0, 2, -2, -2, 0, 0 ], [ -1, 3, -1, -1, 0, 0 ], [ 0, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 1.625 ], - [ [ [ 0, 2, -2, -2, 0, 0 ], [ 0, 2, -2, -1, 0, 0 ], [ 0, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -2, 0, 0 ] ], 1.75 ], - [ [ [ 0, 2, -2, -2, 0, 0 ], [ 0, 2, -2, -1, 0, 0 ], [ 0, 3, -2, -2, 0, 0 ], [ 1, 2, -2, -2, 0, 1 ] ], 1 ] - ], - [ - [ [ [ 0, 1, -2, -2, 0, 1 ], [ 0, 2, -2, -1, 0, 0 ], [ 0, 3, -2, -2, 0, 0 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.875 ], - [ [ [ 0, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 0, 3, -2, -2, 0, 0 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.5 ], - [ [ [ 0, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 0, 2, -2, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.875 ] - ], - [ - [ [ [ 0, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 0, 1, -2, -2, 0, 2 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.375 ], - [ [ [ 0, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 0, 1, -2, -2, 0, 2 ], [ 1, 1, -2, -2, 0, 2 ] ], 0.625 ] - ], - [ - [ [ [ 0, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 0, 1, -2, -2, 0, 2 ], [ 1, 2, -1, -2, 0, 1 ] ], 0.625 ], - [ [ [ -1, 1, -1, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 0, 1, -2, -2, 0, 2 ], [ 1, 2, -1, -2, 0, 1 ] ], 0.5 ] - ], - [ - [ [ [ -1, 1, -1, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 1, -2, -2, 0, 2 ], [ 1, 2, -1, -2, 0, 1 ] ], 0.75 ] - ], - [ - [ [ [ -1, 1, -1, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 1, -1, -2, 1, 1 ], [ 1, 2, -1, -2, 0, 1 ] ], 0.875 ] - ], - [ - [ [ [ -1, 1, -1, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 1, 2, -1, -2, 0, 1 ] ], 1.5 ], - [ [ [ -2, 3, -1, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 1, 2, -1, -2, 0, 1 ] ], 1.125 ] - ], - [ - [ [ [ -1, 2, -2, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 1, 2, -1, -2, 0, 1 ] ], 0.625 ], - [ [ [ -1, 2, -2, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 2, -1, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.75 ], - [ [ [ -1, 2, -2, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 0, 2, -2, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.625 ] - ], - [ - [ [ [ -1, 2, -2, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.625 ], - [ [ [ 0, 1, -3, -2, 0, 1 ], [ 1, 1, -2, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.25 ] - ], - [ - [ [ [ 0, 1, -3, -2, 0, 1 ], [ 1, 0, -3, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.375 ], - [ [ [ -1, 2, -3, -2, 0, 1 ], [ 1, 0, -3, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.5 ] - ], - [ - [ [ [ -1, 2, -3, -2, 0, 1 ], [ 0, 2, -3, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1 ], - [ [ [ 0, 1, -4, -2, 0, 1 ], [ 0, 2, -3, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.5 ] - ], - [ - [ [ [ 0, 1, -4, -2, 0, 1 ], [ 1, 1, -4, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.75 ], - [ [ [ -2, 3, -2, -2, 0, 1 ], [ 1, 1, -4, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.625 ] - ], - [ - [ [ [ -2, 2, -2, -2, 0, 2 ], [ 1, 1, -4, -2, 0, 1 ], [ 1, 1, -3, -2, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.25 ], - [ [ [ -2, 2, -2, -2, 0, 2 ], [ 1, 1, -4, -2, 0, 1 ], [ 1, 2, -2, -3, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 1.25 ], - [ [ [ -2, 2, -2, -2, 0, 2 ], [ -1, 2, -2, -2, 0, 2 ], [ 1, 2, -2, -3, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.5 ] - ], - [ - [ [ [ -2, 2, -2, -2, 0, 2 ], [ 0, 3, -2, -3, 0, 1 ], [ 1, 2, -2, -3, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.625 ], - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 1, 2, -2, -3, 0, 1 ], [ 1, 2, -2, -2, 0, 1 ] ], 0.625 ] - ], - [ - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 1, 2, -2, -3, 0, 1 ], [ 2, 2, -2, -3, 0, 1 ] ], 0.75 ] - ], - [ - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 2, 2, -2, -3, 0, 1 ] ], 0.75 ], - [ [ [ 0, 3, -2, -4, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 2, 2, -2, -3, 0, 1 ] ], 0.875 ] - ], - [ - [ [ [ 0, 3, -2, -4, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ] ], 0.875 ] - ], - [ - [ [ [ -1, 3, -1, -3, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ] ], 1.25 ] - ], - [ - [ [ [ 0, 2, -2, -3, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ] ], 1.25 ] - ], - [ - [ [ [ 0, 2, -2, -3, 0, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 3, -1, -3, 0, 1 ] ], 1.125 ], - [ [ [ 0, 3, -2, -3, -1, 1 ], [ 0, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 3, -1, -3, 0, 1 ] ], 1.25 ] - ], - [ - [ [ [ 0, 3, -2, -3, -1, 1 ], [ 0, 4, -2, -3, -1, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 3, -1, -3, 0, 1 ] ], 0.875 ], - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, -1, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 3, -1, -3, 0, 1 ] ], 1.625 ], - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 4, -2, -3, -1, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 0, 4, -2, -2, 0, 1 ] ], 0.375 ] - ], - [ - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 3, -1, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 0, 4, -2, -2, 0, 1 ] ], 0.5 ], - [ [ [ -1, 3, -2, -3, 0, 1 ], [ 0, 3, -1, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ] ], 0.5 ] - ], - [ - [ [ [ -1, 4, -2, -3, 0, 0 ], [ 0, 3, -1, -3, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ] ], 0.75 ], - [ [ [ -1, 4, -2, -3, 0, 0 ], [ -1, 4, -2, -2, 0, 1 ], [ 0, 4, -2, -3, 0, 1 ], [ 1, 4, -2, -3, 0, 1 ] ], 1.5 ] - ], - [ - [ [ [ -1, 4, -2, -3, 0, 0 ], [ -1, 4, -2, -2, 0, 1 ], [ 0, 4, -2, -2, 0, 0 ], [ 1, 4, -2, -3, 0, 1 ] ], 1.125 ], - [ [ [ -1, 4, -2, -3, 0, 0 ], [ -1, 4, -2, -2, 0, 1 ], [ 0, 4, -2, -2, 0, 0 ], [ 2, 3, -2, -3, 0, 0 ] ], 1.5 ] - ], - [ - [ [ [ -1, 3, -2, -2, 0, 0 ], [ -1, 4, -2, -2, 0, 1 ], [ 0, 4, -2, -2, 0, 0 ], [ 2, 3, -2, -3, 0, 0 ] ], 0.625 ], - [ [ [ -1, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 0, 4, -2, -2, 0, 0 ], [ 2, 3, -2, -3, 0, 0 ] ], 1.125 ], - [ [ [ -1, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 1, 4, -2, -3, 0, 0 ], [ 2, 3, -2, -3, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ -1, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 1, 4, -2, -3, 0, 0 ], [ 1, 5, -2, -3, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ -1, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 1, 4, -2, -3, 0, 0 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.75 ], - [ [ [ -1, 3, -2, -2, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 2, 3, -3, -3, 0, 0 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.5 ], - [ [ [ 0, 3, -2, -3, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 2, 3, -3, -3, 0, 0 ], [ 3, 3, -2, -3, 0, -1 ] ], 1.25 ] - ], - [ - [ [ [ 0, 3, -2, -3, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 2, 2, -2, -3, 0, 0 ], [ 3, 3, -2, -3, 0, -1 ] ], 1.5 ] - ], - [ - [ [ [ 0, 3, -2, -3, 0, 0 ], [ 1, 3, -2, -3, 0, 0 ], [ 1, 4, -2, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 1 ], - [ [ [ 0, 3, -2, -2, 0, -1 ], [ 1, 3, -2, -3, 0, 0 ], [ 1, 4, -2, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 1.375 ], - [ [ [ 0, 3, -2, -2, 0, -1 ], [ 1, 3, -2, -2, 0, -1 ], [ 1, 4, -2, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, 3, -2, -2, 0, -1 ], [ 2, 3, -2, -3, 0, -1 ], [ 1, 4, -2, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.75 ], - [ [ [ 1, 3, -2, -3, 0, -1 ], [ 2, 3, -2, -3, 0, -1 ], [ 1, 4, -2, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.375 ] - ], - [ - [ [ [ 1, 3, -2, -3, 0, -1 ], [ 2, 3, -2, -3, 0, -1 ], [ 2, 3, -3, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 1.75 ], - [ [ [ 1, 3, -2, -3, 0, -1 ], [ 2, 3, -2, -3, 0, -1 ], [ 2, 3, -3, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ] ], 1.25 ] - ], - [ - [ [ [ 1, 3, -2, -3, 0, -1 ], [ 2, 3, -2, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ] ], 1.75 ], - [ [ [ 1, 3, -2, -3, 0, -1 ], [ 1, 3, -3, -3, 0, 0 ], [ 3, 3, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ] ], 0.5 ], - [ [ [ 2, 2, -3, -3, 0, -1 ], [ 1, 3, -3, -3, 0, 0 ], [ 3, 3, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ] ], 1.625 ] - ], - [ - [ [ [ 2, 2, -3, -3, 0, -1 ], [ 3, 1, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ] ], 0.875 ] - ], - [ - [ [ [ 2, 2, -3, -3, 0, -1 ], [ 3, 1, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 4, 2, -4, -3, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ 2, 2, -3, -3, 0, -1 ], [ 3, 1, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 4, 3, -3, -4, 0, -1 ] ], 1.625 ], - [ [ [ 3, 2, -3, -4, 0, -1 ], [ 3, 1, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 4, 3, -3, -4, 0, -1 ] ], 1.375 ] - ], - [ - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 3, 1, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 4, 3, -3, -4, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 5, -3, -4, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 4, 3, -3, -4, 0, -1 ] ], 1.5 ], - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 5, -3, -4, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ], [ 4, 4, -3, -4, -1, -1 ] ], 0.875 ], - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 5, -3, -4, 0, -1 ], [ 3, 4, -3, -4, -1, -1 ], [ 4, 4, -3, -4, -1, -1 ] ], 1.625 ] - ], - [ - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 5, -3, -4, 0, -1 ], [ 3, 4, -4, -4, 0, -1 ], [ 4, 4, -3, -4, -1, -1 ] ], 0.5 ], - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 2, 4, -4, -4, 0, -1 ], [ 3, 4, -4, -4, 0, -1 ], [ 4, 4, -3, -4, -1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 2, 4, -4, -4, 0, -1 ], [ 3, 4, -4, -4, 0, -1 ], [ 3, 4, -2, -4, 0, -1 ] ], 1.75 ], - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 3, 4, -4, -4, 0, -1 ], [ 3, 4, -2, -4, 0, -1 ] ], 0.625 ], - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 2, 4, -3, -3, 0, -1 ], [ 3, 4, -2, -4, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 2, 4, -3, -3, 0, -1 ], [ 2, 5, -3, -3, 0, -1 ] ], 0.75 ], - [ [ [ 2, 4, -3, -4, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 3, 4, -3, -4, 0, -1 ], [ 2, 5, -3, -3, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 2, 3, -3, -3, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 3, 4, -3, -4, 0, -1 ], [ 2, 5, -3, -3, 0, -1 ] ], 0.75 ], - [ [ [ 2, 3, -3, -3, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 2, 4, -2, -3, 0, -1 ], [ 2, 5, -3, -3, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ 2, 3, -3, -3, 0, -1 ], [ 1, 4, -3, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 2, 5, -3, -3, 0, -1 ] ], 1 ], - [ [ [ 2, 3, -3, -3, 0, -1 ], [ 2, 3, -4, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 2, 5, -3, -3, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ 2, 3, -3, -3, 0, -1 ], [ 2, 3, -4, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 1.5 ], - [ [ [ 2, 3, -3, -3, 0, -1 ], [ 2, 2, -3, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 1.625 ], - [ [ [ 3, 3, -3, -4, 0, -1 ], [ 2, 2, -3, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 3, 3, -3, -4, 0, -1 ], [ 3, 2, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ 2, 3, -2, -3, 0, -1 ], [ 3, 2, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -2, -3, 0, -1 ] ], 0.875 ], - [ [ [ 2, 3, -2, -3, 0, -1 ], [ 3, 2, -3, -4, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 2, 3, -3, -3, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ 2, 3, -2, -3, 0, -1 ], [ 2, 3, -4, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 2, 3, -3, -3, 0, -1 ] ], 0.875 ], - [ [ [ 3, 2, -3, -3, 0, -1 ], [ 2, 3, -4, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 2, 3, -3, -3, 0, -1 ] ], 0.875 ] - ], - [ - [ [ [ 3, 2, -3, -3, 0, -1 ], [ 2, 3, -4, -3, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ] ], 1.25 ], - [ [ [ 3, 2, -3, -3, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ] ], 1.25 ], - [ [ [ 2, 4, -3, -3, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 3, 3, -3, -4, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ 2, 4, -3, -3, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 1, 4, -3, -2, 0, -1 ] ], 0.625 ] - ], - [ - [ [ [ 2, 3, -3, -2, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 3, 3, -3, -3, 0, -1 ], [ 1, 4, -3, -2, 0, -1 ] ], 1.25 ], - [ [ [ 2, 3, -3, -2, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 2, 3, -2, -2, 0, -1 ], [ 1, 4, -3, -2, 0, -1 ] ], 1.375 ] - ], - [ - [ [ [ 1, 3, -2, -2, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 2, 3, -2, -2, 0, -1 ], [ 1, 4, -3, -2, 0, -1 ] ], 0.875 ] - ], - [ - [ [ [ 1, 3, -2, -2, 0, -1 ], [ 1, 3, -3, -2, 0, -1 ], [ 2, 3, -2, -2, 0, -1 ], [ 2, 2, -2, -2, 0, -1 ] ], 1.5 ] - ], - [ - [ [ [ 1, 3, -2, -2, 0, -1 ], [ 2, 1, -2, -2, 0, -1 ], [ 2, 3, -2, -2, 0, -1 ], [ 2, 2, -2, -2, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 1, 3, -2, -2, 0, -1 ], [ 2, 1, -2, -2, 0, -1 ], [ 3, 1, -2, -2, 0, -1 ], [ 2, 2, -2, -2, 0, -1 ] ], 1.625 ], - [ [ [ 2, 0, -2, -2, 0, -1 ], [ 2, 1, -2, -2, 0, -1 ], [ 3, 1, -2, -2, 0, -1 ], [ 2, 2, -2, -2, 0, -1 ] ], 1.5 ], - [ [ [ 2, 0, -2, -2, 0, -1 ], [ 2, 1, -2, -2, 0, -1 ], [ 3, 1, -2, -2, 0, -1 ], [ 3, 1, -3, -2, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ 2, 0, -2, -2, 0, -1 ], [ 3, 0, -3, -2, 0, -1 ], [ 3, 1, -2, -2, 0, -1 ], [ 3, 1, -3, -2, 0, -1 ] ], 1.5 ] - ], - [ - [ [ [ 2, 0, -2, -2, 0, -1 ], [ 3, 0, -3, -2, 0, -1 ], [ 4, 0, -3, -2, 0, -1 ], [ 3, 1, -3, -2, 0, -1 ] ], 1 ], - [ [ [ 2, 0, -3, -2, 0, -1 ], [ 3, 0, -3, -2, 0, -1 ], [ 4, 0, -3, -2, 0, -1 ], [ 3, 1, -3, -2, 0, -1 ] ], 1.25 ], - [ [ [ 2, 0, -3, -2, 0, -1 ], [ 3, 0, -3, -2, 0, -1 ], [ 4, 0, -3, -2, 0, -1 ], [ 4, 0, -4, -2, 0, -1 ] ], 1.25 ] - ], - [ - [ [ [ 2, 0, -3, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -3, -2, 0, -1 ], [ 4, 0, -4, -2, 0, -1 ] ], 0.5 ], - [ [ [ 3, -1, -4, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -3, -2, 0, -1 ], [ 4, 0, -4, -2, 0, -1 ] ], 1.125 ], - [ [ [ 3, -1, -4, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 5, -1, -4, -2, 0, -1 ], [ 4, 0, -4, -2, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 3, -1, -4, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 5, -1, -4, -2, 0, -1 ], [ 4, -1, -4, -2, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ 2, 0, -4, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 5, -1, -4, -2, 0, -1 ], [ 4, -1, -4, -2, 0, 0 ] ], 0.5 ], - [ [ [ 2, 0, -4, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 5, -1, -4, -2, 0, -1 ], [ 3, 1, -4, -2, 0, 0 ] ], 1.125 ], - [ [ [ 2, 0, -4, -2, 0, -1 ], [ 2, 0, -4, -2, 0, 0 ], [ 3, 0, -4, -1, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ] ], 0.5 ] - ], - [ - [ [ [ 2, -1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 3, 0, -4, -1, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ] ], 1.625 ], - [ [ [ 2, -1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 1, -4, -2, 0, -1 ], [ 3, 1, -4, -2, 0, 0 ] ], 0.75 ] - ], - [ - [ [ [ 2, -1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ] ], 1.75 ], - [ [ [ 2, -1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 4, -1, -4, -2, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 2, -1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 1.75 ] - ], - [ - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 0.875 ], - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 3, 0, -4, -1, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 1, -4, -2, 0, -1 ], [ 2, 0, -4, -1, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 4, 1, -4, -2, 0, -1 ], [ 2, 0, -4, -1, 0, 0 ] ], 0.5 ], - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 0.875 ], - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ 0, 2, -4, -2, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ] ], 1.625 ] - ], - [ - [ [ [ 0, 2, -4, -2, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 1, 3, -4, -2, 0, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, 2, -4, -3, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 1, 3, -4, -2, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ 1, 2, -4, -3, 0, 0 ], [ 1, 2, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, -1 ] ], 1.5 ], - [ [ [ 1, 2, -4, -3, 0, 0 ], [ 2, 2, -4, -3, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, -1 ] ], 1.5 ] - ], - [ - [ [ [ 1, 2, -4, -3, 0, 0 ], [ 2, 2, -4, -3, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 0.5 ], - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 2, 2, -4, -3, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 0.5 ], - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 0.5 ] - ], - [ - [ [ [ 1, 1, -4, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 1.375 ], - [ [ [ 2, 0, -5, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 0.875 ], - [ [ [ 2, 0, -5, -2, 0, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 0.625 ] - ], - [ - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 0.625 ], - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 4, 0, -5, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 1.375 ], - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 3, 1, -4, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 1.125 ] - ], - [ - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ], [ 3, 0, -4, -2, 0, 0 ] ], 1.625 ], - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ], [ 4, 0, -4, -3, 0, 0 ] ], 1.25 ] - ], - [ - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 4, 0, -4, -3, 0, 0 ] ], 0.75 ], - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -4, -2, 0, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ] ], 1.375 ] - ], - [ - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 1, -4, -2, 0, 0 ] ], 1.625 ], - [ [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, 0, -5, -2, 1, 0 ], [ 2, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 1.375 ], - [ [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], 1.75 ], - [ [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 4, 0, -5, -2, 0, -1 ] ], 1.25 ] - ], - [ - [ [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -6, -2, 1, 0 ], [ 4, 0, -5, -2, 0, -1 ] ], 1.375 ], - [ [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -6, -2, 1, 0 ], [ "Rest" ] ], 0.625 ], - [ [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ "Rest" ], [ "Rest" ] ], 0.875 ], - [ [ [ 1, 0, -5, -2, 1, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1.375 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 6.75 ] - ] - ] -], -"last_changes": -[ - [ [ 1, 0, -4, -2, 0, 0 ], [ 2, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], - [ [ 1, 0, -5, -2, 1, 0 ], [ 2, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], - [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 2, 0, -4, -1, 0, 0 ] ], - [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -5, -2, 0, 0 ], [ 4, 0, -5, -2, 0, -1 ] ], - [ [ 1, 0, -5, -2, 1, 0 ], [ 3, 0, -5, -2, -1, 0 ], [ 3, 0, -6, -2, 1, 0 ], [ 4, 0, -5, -2, 0, -1 ] ] -], -"cur_uid": "69c568c6", -"ref_uid": "nil", -"order_seed": 712406, -"dur_seed": 506999, -"motifs_seed": 551883, -"entrances_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 3.2936507936508, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2400, 1200 ], [ -1200, 1200 ], [ -702, 1200 ], [ -702, 1200 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61316872427983, 0, 0.98971193415638, 0 ], -"passages_weights": [ 0.48, 0.46, 0.48, 1, 1 ], -"hd_exp": 9, -"hd_invert": 0, -"order": -[ - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 0, 3 ], [ 1, 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 0, 2 ], [ 1, 3 ], [ ] ], - [ [ 1 ], [ 0, 2, 3 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 3 ], [ 1, 0, 2 ], [ ] ], - [ [ 3, 1 ], [ 2, 0 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 0, 3 ], [ 2, 1 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 3, 0 ], [ 1, 2 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 0, 1 ], [ 2, 3 ], [ ] ], - [ [ 3, 0 ], [ 1, 2 ], [ ] ], - [ [ 0, 3 ], [ 1, 2 ], [ ] ], - [ [ 0 ], [ 2, 1, 3 ], [ ] ], - [ [ 0, 1 ], [ 2, 3 ], [ ] ], - [ [ 2 ], [ 3, 1, 0 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 0 ], [ 2, 1, 3 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 0, 1 ], [ 2, 3 ], [ ] ], - [ [ 2, 1 ], [ 3, 0 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 1 ], [ 0, 3, 2 ], [ ] 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 3, 2 ], [ 1 ], [ ] ], - [ [ 1, 2 ], [ 0, 3 ], [ ] ], - [ [ 3, 2 ], [ 1, 0 ], [ ] ], - [ [ 2 ], [ 3, 1, 0 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 1 ], [ 2, 0, 3 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 1 ], [ 2, 0, 3 ], [ ] ], - [ [ 3 ], [ 1, 0, 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 1 ], [ 0, 3, 2 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 0 ], [ 1, 2, 3 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 2, 0 ], [ 3, 1 ], [ ] ], - [ [ 2 ], [ 3, 0, 1 ], [ ] ], - [ [ 3 ], [ 2, 0, 1 ], [ ] ], - [ [ 3 ], [ 0, 1, 2 ], [ ] ], - [ [ 0, 1 ], [ 2, 3 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 0, 2 ], [ 1, 3 ], [ ] ], - [ [ 2 ], [ 0, 1, 3 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/6a9928d6/6a9928d6_code.scd b/resources/string_quartet_3/6a9928d6/6a9928d6_code.scd deleted file mode 100644 index 49436ca..0000000 --- a/resources/string_quartet_3/6a9928d6/6a9928d6_code.scd +++ /dev/null @@ -1,973 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array2) - hsArrayToCents.value(array1); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - //if(pDistance >= 0, {stepFunc.value(abs(pDistance))}, {0.01}); - stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0.01); - - - - if(rangeScore.value(candidate.collect({0}), voices[ins], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { - isInRangeScore = 1 - rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0] + 500, ranges[ins][1] - 500, 0, true); - isInRangeScore = isInRangeScore * rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true) - }, { - isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - }); - - - //isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - //old way - worked but actually by accident (I think) - //isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - - - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/6a9928d6/6a9928d6_mus_model.json b/resources/string_quartet_3/6a9928d6/6a9928d6_mus_model.json deleted file mode 100644 index 7ef872c..0000000 --- a/resources/string_quartet_3/6a9928d6/6a9928d6_mus_model.json +++ /dev/null @@ -1,554 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ 2, -4, 0, 3, -1, 0 ], [ "Rest" ] ], 1.5 ], - [ [ [ "Rest" ], [ "Rest" ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ], 0.5 ], - [ [ [ "Rest" ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.75 ], - [ [ [ 1, -5, 0, 3, -1, -1 ], [ 2, -5, 0, 3, -1, -1 ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 1, -5, 0, 3, -1, -1 ], [ 4, -5, -1, 2, -1, -2 ], [ 2, -4, 0, 3, -1, 0 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.125 ], - [ [ [ 1, -5, 0, 3, -1, -1 ], [ 4, -5, -1, 2, -1, -2 ], [ 4, -5, -2, 2, -1, -1 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.625 ], - [ [ [ 2, -5, 0, 2, -1, -1 ], [ 4, -5, -1, 2, -1, -2 ], [ 4, -5, -2, 2, -1, -1 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.875 ] - ], - [ - [ [ [ 2, -5, 0, 2, -1, -1 ], [ 4, -5, -1, 2, -1, -2 ], [ 3, -5, 0, 2, 0, -1 ], [ 4, -5, -1, 2, -1, -1 ] ], 1.125 ], - [ [ [ 2, -5, 0, 2, -1, -1 ], [ 4, -5, -1, 2, -1, -2 ], [ 3, -5, 0, 2, 0, -1 ], [ 4, -6, 0, 2, -1, -1 ] ], 0.5 ], - [ [ [ 2, -5, 0, 2, -1, -1 ], [ 3, -6, 0, 2, -1, -1 ], [ 3, -5, 0, 2, 0, -1 ], [ 4, -6, 0, 2, -1, -1 ] ], 1.875 ] - ], - [ - [ [ [ 2, -5, 0, 2, -1, -1 ], [ 2, -5, 0, 2, 0, -2 ], [ 3, -5, 0, 2, 0, -1 ], [ 4, -6, 0, 2, -1, -1 ] ], 0.75 ], - [ [ [ 1, -5, 0, 2, 0, 0 ], [ 2, -5, 0, 2, 0, -2 ], [ 3, -5, 0, 2, 0, -1 ], [ 4, -6, 0, 2, -1, -1 ] ], 0.5 ], - [ [ [ 1, -5, 0, 2, 0, 0 ], [ 2, -5, 0, 2, 0, -2 ], [ 3, -5, 0, 2, 0, -1 ], [ 3, -5, -1, 2, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ 1, -5, 0, 2, 0, 0 ], [ 2, -5, 0, 2, 0, -2 ], [ 3, -5, 0, 2, 1, -2 ], [ 3, -5, -1, 2, 0, -1 ] ], 1.625 ], - [ [ [ 3, -5, 0, 1, 0, -2 ], [ 2, -5, 0, 2, 0, -2 ], [ 3, -5, 0, 2, 1, -2 ], [ 3, -5, -1, 2, 0, -1 ] ], 1.625 ] - ], - [ - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 2, -5, 0, 2, 0, -2 ], [ 3, -5, 0, 2, 1, -2 ], [ 3, -5, -1, 2, 0, -1 ] ], 1.875 ] - ], - [ - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 2, -5, 0, 2, 0, -2 ], [ 4, -5, 1, 2, 0, -3 ], [ 3, -5, -1, 2, 0, -1 ] ], 0.625 ], - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 2, -5, 0, 3, 0, -3 ], [ 4, -5, 1, 2, 0, -3 ], [ 3, -5, -1, 2, 0, -1 ] ], 1.125 ], - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 2, -5, 0, 3, 0, -3 ], [ 4, -5, 1, 2, 0, -3 ], [ 5, -5, 0, 1, 0, -3 ] ], 1.625 ] - ], - [ - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 4, -5, -1, 2, 0, -3 ], [ 4, -5, 1, 2, 0, -3 ], [ 5, -5, 0, 1, 0, -3 ] ], 1 ], - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 4, -5, -1, 2, 0, -3 ], [ 4, -5, 1, 2, 0, -3 ], [ 5, -5, 0, 2, 0, -4 ] ], 0.5 ], - [ [ [ 3, -5, 0, 2, 0, -3 ], [ 4, -5, -1, 2, 0, -3 ], [ 4, -5, 0, 2, 1, -3 ], [ 5, -5, 0, 2, 0, -4 ] ], 1.5 ] - ], - [ - [ [ [ 3, -5, 0, 3, 0, -4 ], [ 4, -5, -1, 2, 0, -3 ], [ 4, -5, 0, 2, 1, -3 ], [ 5, -5, 0, 2, 0, -4 ] ], 0.5 ] - ], - [ - [ [ [ 3, -5, 0, 2, 1, -4 ], [ 4, -5, -1, 2, 0, -3 ], [ 4, -5, 0, 2, 1, -3 ], [ 5, -5, 0, 2, 0, -4 ] ], 1.875 ], - [ [ [ 3, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -3 ], [ 5, -5, 0, 2, 0, -4 ] ], 1.75 ], - [ [ [ 3, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -3 ], [ 3, -4, 0, 2, 1, -3 ] ], 0.5 ] - ], - [ - [ [ [ 3, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -3 ], [ 3, -5, 0, 2, 1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 3, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 2, -4 ], [ 3, -5, 0, 2, 1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 2, 2, -4 ], [ 3, -5, 0, 2, 1, -2 ] ], 1.375 ], - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, 0, 2, 1, -4 ], [ 4, -5, 0, 1, 1, -2 ], [ 3, -5, 0, 2, 1, -2 ] ], 0.875 ], - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 2, -5, 0, 3, 1, -2 ], [ 4, -5, 0, 1, 1, -2 ], [ 3, -5, 0, 2, 1, -2 ] ], 1.875 ] - ], - [ - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 4, -5, 0, 1, 1, -2 ], [ 3, -5, 0, 2, 1, -2 ] ], 0.875 ], - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 4, -5, 0, 1, 1, -2 ], [ 4, -6, -1, 2, 1, -2 ] ], 1.75 ], - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 3, -4, -1, 2, 1, -2 ], [ 4, -6, -1, 2, 1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 3, -4, -1, 2, 1, -2 ], [ 5, -5, -1, 1, 1, -3 ] ], 1.125 ], - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 4, -6, -1, 2, 1, -2 ], [ 5, -5, -1, 1, 1, -3 ] ], 1 ] - ], - [ - [ [ [ 2, -5, -1, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 4, -6, -1, 2, 1, -2 ], [ 3, -6, -1, 3, 1, -2 ] ], 0.625 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -5, -1, 2, 1, -3 ], [ 4, -6, -1, 2, 1, -2 ], [ 3, -6, -1, 3, 1, -2 ] ], 0.75 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 2, -6, -1, 2, 1, -1 ], [ 4, -6, -1, 2, 1, -2 ], [ 3, -6, -1, 3, 1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 4, -6, -1, 2, 1, -2 ], [ 3, -6, -1, 3, 1, -2 ] ], 1.5 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 4, -6, -1, 2, 1, -2 ], [ 5, -6, -2, 2, 1, -3 ] ], 0.75 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 5, -7, -2, 2, 1, -2 ], [ 5, -6, -2, 2, 1, -3 ] ], 0.875 ] - ], - [ - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -6, -2, 2, 1, -3 ], [ 5, -7, -2, 2, 1, -2 ], [ 5, -6, -2, 2, 1, -3 ] ], 1 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -6, -2, 2, 1, -3 ], [ 5, -7, -2, 2, 1, -2 ], [ 4, -6, -2, 2, 2, -2 ] ], 0.5 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 4, -6, -2, 2, 1, -3 ], [ 5, -6, -2, 2, 0, -2 ], [ 4, -6, -2, 2, 2, -2 ] ], 1.125 ] - ], - [ - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 3, -6, -2, 2, 2, -2 ], [ 5, -6, -2, 2, 0, -2 ], [ 4, -6, -2, 2, 2, -2 ] ], 1.75 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 3, -6, -2, 2, 2, -2 ], [ 5, -6, -2, 2, 0, -2 ], [ 5, -6, -2, 1, 1, -2 ] ], 0.5 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 3, -6, -2, 2, 2, -2 ], [ 4, -6, -2, 2, 2, -2 ], [ 5, -6, -2, 1, 1, -2 ] ], 1.75 ] - ], - [ - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 5, -7, -2, 1, 1, -2 ], [ 4, -6, -2, 2, 2, -2 ], [ 5, -6, -2, 1, 1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 5, -7, -2, 1, 1, -2 ], [ 6, -7, -2, 1, 0, -2 ], [ 5, -6, -2, 1, 1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 5, -7, -2, 1, 1, -2 ], [ 6, -7, -3, 1, 1, -2 ], [ 5, -6, -2, 1, 1, -2 ] ], 1.625 ], - [ [ [ 3, -6, -2, 2, 1, -2 ], [ 5, -7, -2, 1, 1, -2 ], [ 6, -7, -3, 1, 1, -2 ], [ 5, -7, -2, 1, 1, -1 ] ], 1.375 ], - [ [ [ 5, -7, -2, 1, 0, -2 ], [ 5, -7, -2, 1, 1, -2 ], [ 6, -7, -3, 1, 1, -2 ], [ 5, -7, -2, 1, 1, -1 ] ], 1.375 ] - ], - [ - [ [ [ 5, -7, -2, 1, 0, -2 ], [ 5, -7, -2, 1, 1, -2 ], [ 7, -7, -2, 1, 0, -3 ], [ 5, -7, -2, 1, 1, -1 ] ], 1.5 ], - [ [ [ 5, -7, -2, 1, 0, -2 ], [ 5, -6, -2, 1, 0, -2 ], [ 7, -7, -2, 1, 0, -3 ], [ 5, -7, -2, 1, 1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 5, -7, -2, 1, 0, -2 ], [ 5, -6, -2, 1, 0, -2 ], [ 7, -7, -2, 1, 0, -3 ], [ 5, -6, -2, 1, 0, -1 ] ], 0.75 ], - [ [ [ 6, -8, -2, 1, 0, -3 ], [ 5, -6, -2, 1, 0, -2 ], [ 7, -7, -2, 1, 0, -3 ], [ 5, -6, -2, 1, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ 6, -8, -2, 1, 0, -3 ], [ 5, -6, -2, 1, 0, -2 ], [ 5, -6, -2, 2, 0, -2 ], [ 5, -6, -2, 1, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 6, -8, -2, 1, 0, -3 ], [ 5, -6, -2, 1, 0, -2 ], [ 5, -6, -2, 2, 0, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.375 ], - [ [ [ 6, -8, -2, 1, 0, -3 ], [ 5, -6, -2, 1, 0, -2 ], [ 6, -6, -3, 1, 0, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 5, -6, -3, 1, -1, -2 ], [ 5, -6, -2, 1, 0, -2 ], [ 6, -6, -3, 1, 0, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.75 ], - [ [ [ 5, -6, -3, 1, -1, -2 ], [ 5, -5, -2, 1, -1, -2 ], [ 6, -6, -3, 1, 0, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.375 ], - [ [ [ 5, -6, -3, 1, -1, -2 ], [ 5, -5, -2, 1, -1, -2 ], [ 4, -5, -2, 1, -1, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 5, -6, -3, 1, -1, -2 ], [ 6, -6, -3, 1, -1, -2 ], [ 4, -5, -2, 1, -1, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.375 ], - [ [ [ 4, -6, -2, 2, -1, -2 ], [ 6, -6, -3, 1, -1, -2 ], [ 4, -5, -2, 1, -1, -2 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.125 ], - [ [ [ 4, -6, -2, 2, -1, -2 ], [ 6, -6, -3, 1, -1, -2 ], [ 4, -6, -2, 1, -1, -1 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.75 ] - ], - [ - [ [ [ 4, -6, -2, 2, -1, -2 ], [ 5, -6, -2, 2, -1, -3 ], [ 4, -6, -2, 1, -1, -1 ], [ 6, -6, -2, 1, -1, -2 ] ], 1.625 ], - [ [ [ 4, -6, -2, 2, -1, -2 ], [ 5, -6, -2, 2, -1, -3 ], [ 4, -6, -2, 1, -1, -1 ], [ 5, -6, -1, 2, -1, -2 ] ], 0.875 ], - [ [ [ 4, -6, -2, 2, -1, -2 ], [ 5, -6, -2, 2, -1, -3 ], [ 3, -6, -2, 3, -1, -2 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 4, -6, -2, 2, -1, -2 ], [ 5, -6, -2, 2, -1, -3 ], [ 3, -5, -1, 2, -1, -2 ], [ 5, -6, -1, 2, -1, -2 ] ], 0.875 ], - [ [ [ 3, -6, -1, 3, -1, -2 ], [ 5, -6, -2, 2, -1, -3 ], [ 3, -5, -1, 2, -1, -2 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.375 ] - ], - [ - [ [ [ 3, -6, -1, 3, -1, -2 ], [ 4, -6, 0, 2, -1, -2 ], [ 3, -5, -1, 2, -1, -2 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.25 ], - [ [ [ 3, -6, -1, 3, -1, -2 ], [ 4, -6, 0, 2, -1, -2 ], [ 4, -6, -2, 2, -1, -2 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.25 ], - [ [ [ 3, -5, -1, 2, -1, -2 ], [ 4, -6, 0, 2, -1, -2 ], [ 4, -6, -2, 2, -1, -2 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 3, -5, -1, 2, -1, -2 ], [ 4, -6, 0, 2, -1, -2 ], [ 4, -5, -1, 2, -1, -3 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.5 ], - [ [ [ 3, -5, -1, 2, -1, -2 ], [ 5, -7, -1, 2, -1, -2 ], [ 4, -5, -1, 2, -1, -3 ], [ 5, -6, -1, 2, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 3, -5, -1, 2, -1, -2 ], [ 5, -7, -1, 2, -1, -2 ], [ 4, -5, -1, 2, -1, -3 ], [ 5, -7, 0, 2, -1, -2 ] ], 0.75 ], - [ [ [ 3, -5, -1, 2, -1, -2 ], [ 5, -7, -1, 2, -1, -2 ], [ 4, -6, -1, 2, -1, -2 ], [ 5, -7, 0, 2, -1, -2 ] ], 1.5 ], - [ [ [ 5, -7, -1, 2, -1, -3 ], [ 5, -7, -1, 2, -1, -2 ], [ 4, -6, -1, 2, -1, -2 ], [ 5, -7, 0, 2, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -7, -1, 2, -1, -3 ], [ 4, -7, 0, 3, -1, -2 ], [ 4, -6, -1, 2, -1, -2 ], [ 5, -7, 0, 2, -1, -2 ] ], 1.375 ], - [ [ [ 5, -7, -1, 2, -1, -3 ], [ 4, -7, 0, 3, -1, -2 ], [ 6, -8, -1, 2, -1, -3 ], [ 5, -7, 0, 2, -1, -2 ] ], 0.375 ] - ], - [ - [ [ [ 5, -7, -1, 2, -1, -3 ], [ 4, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 3, -1, -1 ], [ 5, -7, 0, 2, -1, -2 ] ], 1.125 ], - [ [ [ 4, -7, 0, 2, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 3, -1, -1 ], [ 5, -7, 0, 2, -1, -2 ] ], 0.875 ], - [ [ [ 4, -7, 0, 2, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 3, -1, -1 ], [ 5, -7, 0, 3, -1, -3 ] ], 1.125 ] - ], - [ - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 3, -1, -1 ], [ 5, -7, 0, 3, -1, -3 ] ], 0.75 ], - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 3, -1, -1 ], [ 5, -8, 0, 3, -1, -2 ] ], 0.625 ], - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 4, -1, -2 ], [ 5, -8, 0, 3, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, 0, 4, -1, -3 ], [ 3, -7, 0, 4, -1, -2 ], [ 5, -8, 0, 3, -1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, -1, 3, -1, -2 ], [ 3, -7, 0, 4, -1, -2 ], [ 5, -8, 0, 3, -1, -2 ] ], 0.625 ], - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, -1, 3, -1, -2 ], [ 4, -8, 0, 3, 0, -2 ], [ 5, -8, 0, 3, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, -1, 3, -1, -2 ], [ 4, -8, 0, 3, 0, -2 ], [ 5, -7, 0, 3, -2, -2 ] ], 1.125 ], - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, -1, 3, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 5, -7, 0, 3, -2, -2 ] ], 1.625 ], - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 4, -1, -2 ], [ 4, -7, 0, 3, -1, -2 ], [ 5, -7, 0, 3, -2, -2 ] ], 1 ] - ], - [ - [ [ [ 3, -7, 0, 3, -1, -2 ], [ 3, -7, 0, 4, -1, -2 ], [ 4, -7, 0, 4, -1, -3 ], [ 5, -7, 0, 3, -2, -2 ] ], 0.875 ] - ], - [ - [ [ [ 4, -7, 0, 3, -3, -2 ], [ 3, -7, 0, 4, -1, -2 ], [ 4, -7, 0, 4, -1, -3 ], [ 5, -7, 0, 3, -2, -2 ] ], 1.625 ], - [ [ [ 4, -7, 0, 3, -3, -2 ], [ 3, -7, 0, 3, -1, -2 ], [ 4, -7, 0, 4, -1, -3 ], [ 5, -7, 0, 3, -2, -2 ] ], 1 ] - ], - [ - [ [ [ 4, -7, 0, 3, -3, -2 ], [ 3, -7, 0, 4, -1, -3 ], [ 4, -7, 0, 4, -1, -3 ], [ 5, -7, 0, 3, -2, -2 ] ], 0.75 ], - [ [ [ 4, -7, 0, 3, -3, -2 ], [ 3, -7, 0, 4, -1, -3 ], [ 4, -7, 0, 4, -1, -3 ], [ 5, -7, 0, 4, -1, -4 ] ], 1.5 ] - ], - [ - [ [ [ 4, -7, 0, 3, -3, -2 ], [ 3, -7, 0, 4, -1, -3 ], [ 3, -6, 0, 4, -1, -3 ], [ 5, -7, 0, 4, -1, -4 ] ], 1 ], - [ [ [ 3, -7, 0, 5, -1, -4 ], [ 3, -7, 0, 4, -1, -3 ], [ 3, -6, 0, 4, -1, -3 ], [ 5, -7, 0, 4, -1, -4 ] ], 0.625 ] - ], - [ - [ [ [ 3, -7, 0, 5, -1, -4 ], [ 3, -7, 0, 4, -1, -3 ], [ 5, -8, 0, 4, -1, -4 ], [ 5, -7, 0, 4, -1, -4 ] ], 1 ], - [ [ [ 3, -7, 0, 5, -1, -4 ], [ 3, -7, 0, 4, 0, -4 ], [ 5, -8, 0, 4, -1, -4 ], [ 5, -7, 0, 4, -1, -4 ] ], 0.5 ] - ], - [ - [ [ [ 3, -7, 0, 5, -1, -4 ], [ 3, -7, 0, 4, 0, -4 ], [ 5, -8, 0, 4, -1, -4 ], [ 4, -7, 1, 5, -1, -4 ] ], 1.25 ] - ], - [ - [ [ [ 4, -8, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 0, -4 ], [ 5, -8, 0, 4, -1, -4 ], [ 4, -7, 1, 5, -1, -4 ] ], 1.75 ], - [ [ [ 4, -8, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 0, -3 ], [ 4, -7, 1, 5, -1, -4 ] ], 1.75 ], - [ [ [ 4, -8, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 0, -3 ], [ 4, -7, 0, 4, 1, -4 ] ], 1 ] - ], - [ - [ [ [ 4, -8, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 0, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 4, -7, 0, 4, 1, -4 ] ], 1.25 ], - [ [ [ 4, -8, 0, 4, 0, -4 ], [ 3, -7, -1, 4, 1, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 4, -7, 0, 4, 1, -4 ] ], 0.625 ], - [ [ [ 2, -7, 0, 5, 1, -4 ], [ 3, -7, -1, 4, 1, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 4, -7, 0, 4, 1, -4 ] ], 0.875 ] - ], - [ - [ [ [ 2, -7, 0, 5, 1, -4 ], [ 3, -7, -1, 4, 1, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 3, -7, 0, 4, 2, -3 ] ], 0.875 ] - ], - [ - [ [ [ 2, -7, 0, 5, 1, -4 ], [ 3, -7, -1, 4, 1, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 4, -8, 0, 4, 2, -4 ] ], 0.5 ], - [ [ [ 2, -7, 0, 5, 1, -4 ], [ 3, -7, 0, 4, 2, -5 ], [ 3, -7, 0, 4, 2, -4 ], [ 4, -8, 0, 4, 2, -4 ] ], 1.375 ], - [ [ [ 2, -7, 0, 4, 3, -4 ], [ 3, -7, 0, 4, 2, -5 ], [ 3, -7, 0, 4, 2, -4 ], [ 4, -8, 0, 4, 2, -4 ] ], 0.5 ] - ], - [ - [ [ [ 2, -7, 0, 4, 3, -4 ], [ 3, -7, 0, 4, 2, -5 ], [ 3, -7, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.375 ], - [ [ [ 2, -7, 0, 4, 3, -4 ], [ 3, -8, 0, 4, 2, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 0.375 ] - ], - [ - [ [ [ 1, -5, 0, 4, 2, -4 ], [ 3, -8, 0, 4, 2, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.375 ], - [ [ [ 1, -5, 0, 4, 2, -4 ], [ 2, -6, 0, 4, 2, -4 ], [ 3, -7, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.125 ], - [ [ [ 1, -5, 0, 4, 2, -4 ], [ 2, -6, 0, 4, 2, -4 ], [ 2, -5, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.5 ] - ], - [ - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 2, -6, 0, 4, 2, -4 ], [ 2, -5, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.5 ], - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 1, -4, 0, 4, 2, -4 ], [ 2, -5, 0, 4, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.125 ], - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 1, -4, 0, 4, 2, -4 ], [ 2, -5, 0, 4, 2, -4 ], [ 3, -5, 0, 4, 1, -4 ] ], 0.625 ] - ], - [ - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 1, -4, 0, 4, 2, -4 ], [ 2, -4, 0, 4, 1, -4 ], [ 3, -5, 0, 4, 1, -4 ] ], 1.25 ] - ], - [ - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 2, -4, 0, 4, 1, -4 ], [ 3, -5, 0, 4, 1, -4 ] ], 1.75 ], - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 3, -5, 0, 3, 2, -5 ], [ 3, -5, 0, 4, 1, -4 ] ], 1.625 ], - [ [ [ 2, -5, 0, 3, 2, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 3, -5, 0, 3, 2, -5 ], [ 3, -5, 0, 3, 2, -4 ] ], 0.625 ] - ], - [ - [ [ [ 3, -5, 0, 3, 0, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 3, -5, 0, 3, 2, -5 ], [ 3, -5, 0, 3, 2, -4 ] ], 1.625 ], - [ [ [ 3, -5, 0, 3, 0, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 3, -6, 0, 3, 2, -4 ], [ 3, -5, 0, 3, 2, -4 ] ], 1 ] - ], - [ - [ [ [ 3, -5, 0, 3, 0, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 3, -6, 0, 3, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.375 ], - [ [ [ 2, -6, 1, 3, 2, -4 ], [ 3, -5, 0, 3, 1, -4 ], [ 3, -6, 0, 3, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1 ], - [ [ [ 2, -6, 1, 3, 2, -4 ], [ 3, -6, 1, 3, 2, -4 ], [ 3, -6, 0, 3, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 0.75 ] - ], - [ - [ [ [ 2, -6, 1, 3, 2, -4 ], [ 3, -6, 0, 3, 3, -4 ], [ 3, -6, 0, 3, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 0.875 ] - ], - [ - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 3, -6, 0, 3, 3, -4 ], [ 3, -6, 0, 3, 2, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 1.5 ], - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 3, -6, 0, 3, 3, -4 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, 0, 4, 2, -4 ] ], 0.5 ], - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 3, -6, 0, 3, 3, -4 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, 0, 3, 4, -4 ] ], 1.5 ] - ], - [ - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 3, -6, -1, 3, 4, -4 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, 0, 3, 4, -4 ] ], 1.125 ] - ], - [ - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 4, -6, -2, 3, 3, -4 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, 0, 3, 4, -4 ] ], 1 ] - ], - [ - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 4, -6, -2, 3, 3, -4 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 1.625 ], - [ [ [ 2, -6, 0, 3, 3, -4 ], [ 4, -6, -2, 3, 3, -4 ], [ 3, -6, -2, 3, 4, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 0.625 ], - [ [ [ 2, -6, -2, 4, 3, -4 ], [ 4, -6, -2, 3, 3, -4 ], [ 3, -6, -2, 3, 4, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 1.625 ] - ], - [ - [ [ [ 2, -6, -2, 4, 3, -4 ], [ 3, -6, -1, 4, 3, -4 ], [ 3, -6, -2, 3, 4, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 1.375 ], - [ [ [ 2, -6, -2, 4, 3, -4 ], [ 3, -6, -1, 4, 3, -4 ], [ 2, -6, -2, 5, 3, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 0.5 ], - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 3, -6, -1, 4, 3, -4 ], [ 2, -6, -2, 5, 3, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 1.625 ] - ], - [ - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 2, -6, -2, 4, 3, -4 ], [ 2, -6, -2, 5, 3, -4 ], [ 3, -6, -2, 4, 3, -4 ] ], 1.125 ], - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 2, -6, -2, 4, 3, -4 ], [ 3, -6, -2, 4, 3, -5 ], [ 3, -6, -2, 4, 3, -4 ] ], 1.125 ] - ], - [ - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 2, -6, -2, 4, 3, -4 ], [ 3, -6, -2, 4, 3, -5 ], [ 3, -7, -2, 4, 3, -3 ] ], 1 ], - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 2, -6, -2, 4, 3, -4 ], [ 1, -6, -2, 4, 3, -2 ], [ 3, -7, -2, 4, 3, -3 ] ], 0.875 ], - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 2, -7, -2, 4, 3, -3 ], [ 1, -6, -2, 4, 3, -2 ], [ 3, -7, -2, 4, 3, -3 ] ], 1.125 ] - ], - [ - [ [ [ 1, -6, -2, 4, 3, -3 ], [ 3, -7, -2, 3, 3, -3 ], [ 1, -6, -2, 4, 3, -2 ], [ 3, -7, -2, 4, 3, -3 ] ], 1.75 ], - [ [ [ 1, -7, -2, 5, 3, -3 ], [ 3, -7, -2, 3, 3, -3 ], [ 1, -6, -2, 4, 3, -2 ], [ 3, -7, -2, 4, 3, -3 ] ], 1.5 ], - [ [ [ 1, -7, -2, 5, 3, -3 ], [ 3, -7, -2, 3, 3, -3 ], [ 2, -7, -2, 4, 4, -3 ], [ 3, -7, -2, 4, 3, -3 ] ], 0.75 ] - ], - [ - [ [ [ 1, -7, -2, 5, 3, -3 ], [ 3, -7, -2, 3, 3, -3 ], [ 2, -6, -2, 4, 3, -3 ], [ 3, -7, -2, 4, 3, -3 ] ], 0.625 ] - ], - [ - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 3, -7, -2, 3, 3, -3 ], [ 2, -6, -2, 4, 3, -3 ], [ 3, -7, -2, 4, 3, -3 ] ], 1.375 ], - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 3, -7, -2, 4, 3, -4 ], [ 2, -6, -2, 4, 3, -3 ], [ 3, -7, -2, 4, 3, -3 ] ], 1.625 ] - ], - [ - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 3, -7, -2, 4, 3, -4 ], [ 2, -6, -1, 4, 3, -4 ], [ 3, -7, -2, 4, 3, -3 ] ], 0.875 ], - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 3, -7, -2, 4, 3, -4 ], [ 2, -6, -1, 4, 3, -4 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.625 ], - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 2, -6, -1, 4, 2, -3 ], [ 2, -6, -1, 4, 3, -4 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.375 ] - ], - [ - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 0, -6, -1, 4, 3, -2 ], [ 2, -6, -1, 4, 3, -4 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.5 ] - ], - [ - [ [ [ 1, -5, -1, 3, 3, -3 ], [ 0, -6, -1, 4, 3, -2 ], [ 2, -6, -1, 4, 3, -4 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.625 ], - [ [ [ 1, -5, -1, 3, 3, -3 ], [ 0, -6, -1, 4, 3, -2 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.625 ] - ], - [ - [ [ [ 1, -5, -1, 3, 3, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 3, -6, -1, 3, 3, -4 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.875 ], - [ [ [ 1, -5, -1, 3, 3, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 1, -6, -1, 4, 3, -3 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.5 ], - [ [ [ 2, -6, -2, 3, 3, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 1, -6, -1, 4, 3, -3 ], [ 3, -6, -1, 3, 3, -3 ] ], 0.625 ] - ], - [ - [ [ [ 2, -6, -1, 3, 2, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 1, -6, -1, 4, 3, -3 ], [ 3, -6, -1, 3, 3, -3 ] ], 1 ] - ], - [ - [ [ [ 0, -6, -1, 5, 3, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 1, -6, -1, 4, 3, -3 ], [ 3, -6, -1, 3, 3, -3 ] ], 1.75 ] - ], - [ - [ [ [ 0, -6, -1, 5, 3, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 2, -6, -1, 2, 3, -2 ], [ 3, -6, -1, 3, 3, -3 ] ], 0.625 ], - [ [ [ 1, -6, -1, 4, 3, -3 ], [ 1, -6, -1, 3, 3, -2 ], [ 2, -6, -1, 2, 3, -2 ], [ 3, -6, -1, 3, 3, -3 ] ], 0.875 ] - ], - [ - [ [ [ 1, -5, -1, 2, 3, -2 ], [ 1, -6, -1, 3, 3, -2 ], [ 2, -6, -1, 2, 3, -2 ], [ 3, -6, -1, 3, 3, -3 ] ], 0.875 ], - [ [ [ 1, -5, -1, 2, 3, -2 ], [ 1, -6, -1, 3, 3, -2 ], [ 2, -6, -1, 2, 3, -2 ], [ 4, -6, -1, 1, 3, -2 ] ], 1 ] - ], - [ - [ [ [ 3, -6, -1, 1, 2, -2 ], [ 1, -6, -1, 3, 3, -2 ], [ 2, -6, -1, 2, 3, -2 ], [ 4, -6, -1, 1, 3, -2 ] ], 1.375 ], - [ [ [ 3, -6, -1, 1, 2, -2 ], [ 2, -6, -1, 1, 3, -1 ], [ 2, -6, -1, 2, 3, -2 ], [ 4, -6, -1, 1, 3, -2 ] ], 0.5 ], - [ [ [ 3, -6, -1, 1, 2, -2 ], [ 2, -6, -1, 1, 3, -1 ], [ 3, -6, -1, 1, 3, -2 ], [ 4, -6, -1, 1, 3, -2 ] ], 1.5 ] - ], - [ - [ [ [ 3, -6, -1, 1, 2, -2 ], [ 2, -6, -1, 1, 3, -1 ], [ 3, -6, -1, 1, 3, -2 ], [ 3, -6, -1, 2, 3, -2 ] ], 0.625 ], - [ [ [ 3, -6, -2, 1, 3, -2 ], [ 2, -6, -1, 1, 3, -1 ], [ 3, -6, -1, 1, 3, -2 ], [ 3, -6, -1, 2, 3, -2 ] ], 1.75 ] - ], - [ - [ [ [ 3, -6, -2, 1, 3, -2 ], [ 2, -6, -1, 1, 3, -1 ], [ 3, -6, -2, 1, 4, -2 ], [ 3, -6, -1, 2, 3, -2 ] ], 1.25 ], - [ [ [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 0, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 3, -6, -1, 2, 3, -2 ] ], 1.625 ], - [ [ [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 0, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 5, -6, -2, 1, 3, -3 ] ], 0.875 ] - ], - [ - [ [ [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 0, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 4, -6, -2, 1, 3, -2 ] ], 1.125 ], - [ [ [ 3, -7, -2, 0, 3, -2 ], [ 4, -6, -2, 0, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 4, -6, -2, 1, 3, -2 ] ], 0.375 ] - ], - [ - [ [ [ 3, -7, -2, 0, 3, -2 ], [ 2, -6, -2, 2, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 4, -6, -2, 1, 3, -2 ] ], 1 ] - ], - [ - [ [ [ 1, -6, -2, 2, 3, -2 ], [ 2, -6, -2, 2, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 4, -6, -2, 1, 3, -2 ] ], 0.5 ] - ], - [ - [ [ [ 2, -6, -2, 1, 2, -2 ], [ 2, -6, -2, 2, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 4, -6, -2, 1, 3, -2 ] ], 0.875 ] - ], - [ - [ [ [ 2, -6, -2, 1, 2, -2 ], [ 2, -6, -2, 2, 3, -2 ], [ 3, -6, -2, 1, 4, -2 ], [ 4, -6, -2, 2, 3, -3 ] ], 1.125 ], - [ [ [ 2, -6, -2, 1, 2, -2 ], [ 2, -6, -2, 2, 3, -2 ], [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 2, 3, -3 ] ], 0.5 ] - ], - [ - [ [ [ 2, -6, -2, 1, 2, -2 ], [ 2, -6, -2, 2, 3, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 4, -6, -2, 2, 3, -3 ] ], 1 ], - [ [ [ 2, -6, -2, 1, 2, -2 ], [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 4, -6, -2, 2, 3, -3 ] ], 1.625 ] - ], - [ - [ [ [ 2, -6, -2, 1, 2, -2 ], [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 1.375 ], - [ [ [ 3, -6, -2, 1, 0, -2 ], [ 3, -6, -2, 1, 3, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 1.5 ], - [ [ [ 3, -6, -2, 1, 0, -2 ], [ 3, -5, -2, 1, 1, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 3, -6, -2, 1, 0, -2 ], [ 5, -6, -2, 0, 0, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 1.25 ], - [ [ [ 4, -6, -2, 0, 0, -2 ], [ 5, -6, -2, 0, 0, -2 ], [ 4, -6, -2, 1, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 0.5 ], - [ [ [ 4, -6, -2, 0, 0, -2 ], [ 5, -6, -2, 0, 0, -2 ], [ 5, -6, -2, 0, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 0.625 ] - ], - [ - [ [ [ 5, -6, -2, -1, 0, -2 ], [ 5, -6, -2, 0, 0, -2 ], [ 5, -6, -2, 0, 1, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 1.625 ], - [ [ [ 5, -6, -2, -1, 0, -2 ], [ 5, -6, -2, 0, 0, -2 ], [ 5, -5, -2, 0, 0, -2 ], [ 6, -6, -2, 0, 1, -2 ] ], 1.625 ], - [ [ [ 5, -6, -2, -1, 0, -2 ], [ 5, -6, -2, 0, 0, -2 ], [ 5, -5, -2, 0, 0, -2 ], [ 7, -6, -2, 0, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 5, -6, -2, -1, 0, -2 ], [ 4, -4, -2, 0, 0, -2 ], [ 5, -5, -2, 0, 0, -2 ], [ 7, -6, -2, 0, -1, -2 ] ], 1.625 ] - ], - [ - [ [ [ 5, -6, -2, -1, 0, -2 ], [ 4, -4, -2, 0, 0, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -6, -2, 0, -1, -2 ] ], 1 ] - ], - [ - [ [ [ 6, -6, -2, -1, -2, -2 ], [ 4, -4, -2, 0, 0, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -6, -2, 0, -1, -2 ] ], 0.5 ], - [ [ [ 6, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -6, -2, 0, -1, -2 ] ], 1.375 ], - [ [ [ 6, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -5, -2, -1, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 6, -6, -2, -1, -2, -2 ], [ 7, -6, -3, -1, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -5, -2, -1, -1, -2 ] ], 0.625 ], - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 7, -6, -3, -1, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -5, -2, -1, -1, -2 ] ], 0.875 ] - ], - [ - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 7, -6, -3, -1, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 8, -6, -3, -1, -1, -2 ] ], 0.625 ], - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 8, -6, -3, -2, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 8, -6, -3, -1, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 8, -6, -3, -2, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -6, -2, 0, -1, -2 ] ], 1.125 ] - ], - [ - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 8, -6, -3, -2, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -5, -3, -2, -1, -2 ] ], 0.375 ] - ], - [ - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 8, -6, -3, -2, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 7, -6, -2, -1, -2, -2 ] ], 1.5 ] - ], - [ - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 8, -6, -3, -2, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 6, -6, -2, -1, -1, -1 ] ], 1.25 ] - ], - [ - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 8, -6, -3, -2, -1, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1.625 ], - [ [ [ 6, -6, -3, -1, -1, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1.75 ], - [ [ [ 5, -6, -2, 0, -1, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 5, -6, -2, 0, -1, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -5, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1.5 ] - ], - [ - [ [ [ 5, -6, -2, 0, -1, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 7, -5, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1.375 ], - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 7, -5, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 1.25 ] - ], - [ - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 8, -5, -2, -1, -4, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], 0.75 ], - [ [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ "Rest" ], [ 6, -6, -2, 0, -1, -2 ] ], 1.25 ], - [ [ [ "Rest" ], [ 7, -5, -2, -1, -3, -2 ], [ "Rest" ], [ 6, -6, -2, 0, -1, -2 ] ], 0.5 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ 6, -6, -2, 0, -1, -2 ] ], 1.25 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 6.625 ] - ] - ] -], -"last_changes": -[ - [ [ 5, -6, -2, 0, -1, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -6, -2, -1, -1, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], - [ [ 5, -6, -2, 0, -1, -2 ], [ 7, -6, -2, -1, -2, -2 ], [ 7, -5, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], - [ [ 5, -6, -2, 0, -1, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 7, -5, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], - [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 7, -5, -2, -1, -2, -2 ], [ 6, -6, -2, 0, -1, -2 ] ], - [ [ 5, -5, -2, 0, -2, -2 ], [ 7, -5, -2, -1, -3, -2 ], [ 8, -5, -2, -1, -4, -2 ], [ 6, -6, -2, 0, -1, -2 ] ] -], -"cur_uid": "6a9928d6", -"ref_uid": "55f9b81e", -"order_seed": 963124, -"dur_seed": 397683, -"motifs_seed": 845264, -"entrances_probs_vals": [ 0, 0, 0, 0.41, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0.41, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0.41, 1.8406593406593, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2430, -293.49845201238 ], [ -869, 1211.1455108359 ], [ -832.19814241486, 1285 ], [ -702, 1211.1455108359 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61316872427983, 0, 0.98971193415638, 0 ], -"passages_weights": [ 0.48, 0.46, 0.48, 1, 1 ], -"hd_exp": 1.52, -"hd_invert": 0, -"order": -[ - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 3 ], [ 1, 2, 0 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ], - [ [ 2 ], [ 1, 0, 3 ], [ ] ], - [ [ 3, 1 ], [ 2, 0 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 0 ], [ 2, 1, 3 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 2 ], [ 0, 1, 3 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 3 ], [ 0, 2, 1 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 2 ], [ 3, 0, 1 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1 ], [ 2, 3, 0 ], [ ] ], - [ [ 3, 0 ], [ 2, 1 ], [ ] ], - [ [ 2, 1 ], [ 3, 0 ], [ ] ], - [ [ 1, 0, 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[ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 2 ], [ 3, 1, 0 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 3, 2 ], [ 1, 0 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/6f0f638f/6f0f638f_code.scd b/resources/string_quartet_3/6f0f638f/6f0f638f_code.scd deleted file mode 100644 index c194eef..0000000 --- a/resources/string_quartet_3/6f0f638f/6f0f638f_code.scd +++ /dev/null @@ -1,945 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance); -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/6f0f638f/6f0f638f_mus_model.json b/resources/string_quartet_3/6f0f638f/6f0f638f_mus_model.json deleted file mode 100644 index e65877d..0000000 --- a/resources/string_quartet_3/6f0f638f/6f0f638f_mus_model.json +++ /dev/null @@ -1,105 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 0 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ 1, 0, 0, -1, -1, 1 ], [ "Rest" ] ], 0 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 1.25 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ 0, 0, 0, -1, -2, 2 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 1.5 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ 0, -1, 0, -1, -1, 2 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 2.625 ] - ], - [ - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 0 ], - [ [ [ -1, 0, -1, -1, -1, 2 ], [ "Rest" ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 0 ], - [ [ [ -1, 0, -1, -1, -1, 2 ], [ "Rest" ], [ 1, -1, 0, -1, -1, 2 ], [ 1, 0, 0, -1, -1, 2 ] ], 1.25 ], - [ [ [ -1, 0, -1, -1, -1, 2 ], [ "Rest" ], [ 1, 0, 0, -1, -2, 2 ], [ 1, 0, 0, -1, -1, 2 ] ], 0.75 ], - [ [ [ -1, 0, -1, -1, -1, 2 ], [ "Rest" ], [ 0, 0, 0, -1, 0, 2 ], [ 1, 0, 0, -1, -1, 2 ] ], 1.5 ] - ], - [ - [ [ [ -1, 0, -1, -1, -1, 2 ], [ "Rest" ], [ 0, 0, 0, -1, 0, 2 ], [ "Rest" ] ], 0 ], - [ [ [ -1, 0, 0, -1, 0, 1 ], [ "Rest" ], [ 0, 0, 0, -1, 0, 2 ], [ "Rest" ] ], 0 ], - [ [ [ -1, 0, 0, -1, 0, 1 ], [ -1, 0, 0, -1, 0, 2 ], [ 0, 0, 0, -1, 0, 2 ], [ "Rest" ] ], 1.125 ], - [ [ [ -2, 0, 1, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 2 ], [ 0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 0, 0, 0, -2, 0, 2 ], [ -1, 0, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ 1, 0, 0, -1, -1, 2 ] ], 0 ], - [ [ [ 0, 0, 0, -1, 0, 1 ], [ -1, 0, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ 1, 0, 0, -1, -1, 2 ] ], 1.125 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ 1, 0, 0, -1, -1, 2 ] ], 2.5 ] - ], - [ - [ [ [ 0, -1, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ -1, 0, 1, -1, 0, 3 ] ], 1.125 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ 1, 0, 0, -2, 0, 2 ] ], 3 ] - ], - [ - [ [ [ 0, -1, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 0 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ 0, -1, 0, -1, -1, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 1.375 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ 0, -2, 0, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 2.5 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ -1, -1, 1, -1, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 1 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ -2, 0, 0, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 2.125 ], - [ [ [ 0, -1, 0, -1, 0, 2 ], [ 0, -1, 0, -2, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 1.375 ] - ], - [ - [ [ [ -2, 1, 0, -1, 0, 3 ], [ 0, -1, 0, -2, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 1.625 ], - [ [ [ -2, 1, 0, -1, 0, 3 ], [ 0, -1, 0, -2, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, -1, 0, -1, 0, 3 ] ], 0.5 ], - [ [ [ -2, 1, 0, -1, 0, 3 ], [ -1, 0, 1, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, -1, 0, -1, 0, 3 ] ], 0 ], - [ [ [ -2, 1, 0, -1, 0, 3 ], [ -1, 0, 1, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, 0, 0, -1, -1, 3 ] ], 2.5 ], - [ [ [ -2, 1, 0, -1, 0, 3 ], [ 0, -1, 0, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, 0, 0, -1, -1, 3 ] ], 0 ], - [ [ [ -2, 0, 0, -1, 1, 3 ], [ 0, -1, 0, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, 0, 0, -1, -1, 3 ] ], 1.125 ], - [ [ [ -2, 0, 0, -1, 1, 3 ], [ 0, -1, 0, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 0 ], - [ [ [ -2, 0, 0, -1, 1, 3 ], [ "Rest" ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 0 ], - [ [ [ "Rest" ], [ "Rest" ], [ -1, 0, 0, -1, 0, 3 ], [ "Rest" ] ], 0 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 0.875 ] - ] - ] -], -"last_changes": -[ - [ [ -2, 1, 0, -1, 0, 3 ], [ 0, -1, 0, -2, 0, 2 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, -1, 0, -1, 0, 3 ] ], - [ [ -2, 1, 0, -1, 0, 3 ], [ -1, 0, 1, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, -1, 0, -1, 0, 3 ] ], - [ [ -2, 1, 0, -1, 0, 3 ], [ -1, 0, 1, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, 0, 0, -1, -1, 3 ] ], - [ [ -2, 1, 0, -1, 0, 3 ], [ 0, -1, 0, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, 0, 0, -1, -1, 3 ] ], - [ [ -2, 0, 0, -1, 1, 3 ], [ 0, -1, 0, -1, 0, 3 ], [ -1, 0, 0, -1, 0, 3 ], [ 0, 0, 0, -1, -1, 3 ] ] -], -"cur_uid": "6f0f638f", -"ref_uid": "781442dc", -"order_seed": 778672, -"dur_seed": 554838, -"motifs_seed": 420644, -"entrances_probs_vals": [ 0.76, 0, 0, 0.38461538461538, 3.08, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0.76, 0, 0, 0.38461538461538, 3.08, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0.76, 0, 0, 0.38461538461538, 3.08, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -1984, 932.50773993808 ], [ -999, 951.08359133127 ], [ -15, 1043.9628482972 ], [ 78, 1081.1145510836 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.076131687242798, 0.91477272727273, 0.17489711934156, 0, 0.57818930041152, 0, 1, 0 ], -"passages_weights": [ 1, 1, 1, 1, 1 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 0, 2, 3 ], [ 1, 1 ], [ ] ], - [ [ 3 ], [ 0, 2, 2, 2 ], [ 1 ] ], - [ [ 2 ], [ 0, 1, 0, 0, 0, 1 ], [ 3 ] ], - [ [ 0, 3 ], [ 2, 1, 1, 2, 1, 2 ], [ ] ], - [ [ 1, 3 ], [ 2, 0, 0 ], [ ] ], - [ [ 2, 1, 0 ], [ 3, 3 ], [ ] ], - [ [ 2, 0 ], [ 1, 1, 1, 1, 1 ], [ 3 ] ], - [ [ 2 ], [ 0, 3, 1, 3, 1, 0 ], [ ] ] -], -"sus_weights": [ 1, 1, 1 ], -"order_size": [ 5, 10 ], -"passages_size": [ 0, 5 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/726a40c7/726a40c7_code.scd b/resources/string_quartet_3/726a40c7/726a40c7_code.scd deleted file mode 100644 index f822edb..0000000 --- a/resources/string_quartet_3/726a40c7/726a40c7_code.scd +++ /dev/null @@ -1,946 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - if(pDistance < 0, {stepFunc.value(abs(pDistance))}, {0.001}); - //stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/726a40c7/726a40c7_mus_model.json b/resources/string_quartet_3/726a40c7/726a40c7_mus_model.json deleted file mode 100644 index 06e11db..0000000 --- a/resources/string_quartet_3/726a40c7/726a40c7_mus_model.json +++ /dev/null @@ -1,163 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ 0, -1, 0, 2, 1, -2 ], [ "Rest" ], [ "Rest" ] ], 0.5 ], - [ [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ "Rest" ], [ "Rest" ] ], 0.625 ], - [ [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ "Rest" ] ], 0.25 ], - [ [ [ -1, 0, 1, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, -1, 0, 3, 1, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, -1, 0, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -1, -1, 0, 3, 1, -2 ], [ -1, -1, 0, 3, 1, -1 ] ], 1 ] - ], - [ - [ [ [ 0, -1, 0, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -2, -1, 1, 3, 1, -1 ], [ -1, -1, 0, 3, 1, -1 ] ], 0.375 ] - ], - [ - [ [ [ 0, -1, 0, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -2, -1, 1, 3, 1, -1 ], [ -2, -1, 1, 3, 1, 0 ] ], 0.625 ] - ], - [ - [ [ [ 0, -1, 0, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -2, -1, 1, 3, 1, -1 ], [ 1, -1, 0, 2, 0, -2 ] ], 1.125 ] - ], - [ - [ [ [ 0, -1, 0, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -2, -1, 1, 3, 1, -1 ], [ 0, 0, 0, 2, 1, -2 ] ], 0.125 ] - ], - [ - [ [ [ 0, -1, 0, 2, 0, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -2, -1, 1, 3, 1, -1 ], [ 0, -1, 0, 2, 1, -1 ] ], 0.75 ] - ], - [ - [ [ [ -1, 0, 0, 2, 1, -2 ], [ 0, -1, 0, 2, 1, -2 ], [ -2, -1, 1, 3, 1, -1 ], [ 0, -1, 0, 2, 1, -1 ] ], 0.625 ] - ], - [ - [ [ [ -1, 0, 0, 2, 1, -2 ], [ 0, -2, 0, 2, 1, -1 ], [ -2, -1, 1, 3, 1, -1 ], [ 0, -1, 0, 2, 1, -1 ] ], 0.875 ] - ], - [ - [ [ [ -1, 0, 0, 2, 1, -2 ], [ 0, -2, 0, 2, 1, -1 ], [ -2, -1, 1, 3, 1, -1 ], [ 1, -2, -1, 2, 1, -1 ] ], 1.125 ] - ], - [ - [ [ [ -1, 0, 0, 2, 1, -2 ], [ 0, -2, 0, 2, 1, -1 ], [ -1, 0, 1, 2, 1, -2 ], [ 1, -2, -1, 2, 1, -1 ] ], 0.375 ] - ], - [ - [ [ [ -1, 0, 0, 2, 1, -2 ], [ 0, -2, 0, 2, 1, -1 ], [ -1, 0, 1, 2, 1, -2 ], [ 1, 0, 0, 2, 1, -3 ] ], 0.875 ] - ], - [ - [ [ [ -1, 0, 0, 2, 1, -2 ], [ 0, -2, 0, 2, 1, -1 ], [ -1, 0, 1, 2, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.5 ] - ], - [ - [ [ [ 0, -2, 0, 2, 0, -1 ], [ 0, -2, 0, 2, 1, -1 ], [ -1, 0, 1, 2, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ 0, -2, 0, 2, 0, -1 ], [ 0, 0, 1, 2, 1, -3 ], [ -1, 0, 1, 2, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -2, 0, 1, 3, 1, -2 ], [ 0, 0, 1, 2, 1, -3 ], [ -1, 0, 1, 2, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.625 ] - ], - [ - [ [ [ -2, 0, 1, 3, 1, -2 ], [ -1, 0, 1, 3, 0, -2 ], [ -1, 0, 1, 2, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.5 ] - ], - [ - [ [ [ -2, 0, 1, 3, 1, -2 ], [ -1, 0, 1, 3, 0, -2 ], [ -1, 0, 0, 3, 0, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 1.125 ] - ], - [ - [ [ [ -2, 0, 1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -1, 0, 0, 3, 0, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.125 ] - ], - [ - [ [ [ -2, 0, 1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.125 ] - ], - [ - [ [ [ -3, 1, 0, 4, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.25 ] - ], - [ - [ [ [ -3, 2, 1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.5 ] - ], - [ - [ [ [ -2, 0, 2, 2, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ 0, 0, 1, 2, 1, -2 ] ], 0.875 ] - ], - [ - [ [ [ -2, 0, 2, 2, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ -2, 1, 0, 3, 1, -3 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], 0 ] - ], - [ - [ [ [ -3, 1, 1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], 0.5 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], 0.75 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -1, 0, -1, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], 0.875 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -1, 0, -1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -1 ] ], 0.75 ] - ], - [ - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -3, 1, 1, 4, 1, -2 ], [ -2, 1, 1, 3, 1, -1 ] ], 0.125 ], - [ [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -3, 1, 1, 4, 1, -2 ], [ "Rest" ] ], 1 ], - [ [ [ -2, 0, 0, 3, 1, -2 ], [ "Rest" ], [ -3, 1, 1, 4, 1, -2 ], [ "Rest" ] ], 0.875 ], - [ [ [ "Rest" ], [ "Rest" ], [ -3, 1, 1, 4, 1, -2 ], [ "Rest" ] ], 0 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1.75 ] - ] - ] -], -"last_changes": -[ - [ [ -3, 1, 1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], - [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -2, 1, 0, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], - [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -1, 0, -1, 3, 1, -2 ], [ -1, 1, 0, 3, 1, -2 ] ], - [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -1, 0, -1, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -1 ] ], - [ [ -2, 0, 0, 3, 1, -2 ], [ -2, 1, 1, 3, 1, -2 ], [ -3, 1, 1, 4, 1, -2 ], [ -2, 1, 1, 3, 1, -1 ] ] -], -"cur_uid": "726a40c7", -"ref_uid": "5ec14635", -"order_seed": 439818, -"dur_seed": 544932, -"motifs_seed": 109123, -"entrances_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2170, 338 ], [ -2373.9938080495, 1453 ], [ -1650, 1676 ], [ -1370.8978328173, 1694 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.063786008230453, 0.92613636363636, 0.12757201646091, 0, 0.54732510288066, 0, 0.71604938271605, 0, 1, 0 ], -"passages_weights": [ 1, 0, 0.2, 0.74, 0.68 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 1, 3, 2 ], [ 0 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.61 ], -"order_size": [ 30, 30 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/75316bf0/75316bf0_code.scd b/resources/string_quartet_3/75316bf0/75316bf0_code.scd deleted file mode 100644 index 49436ca..0000000 --- a/resources/string_quartet_3/75316bf0/75316bf0_code.scd +++ /dev/null @@ -1,973 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array2) - hsArrayToCents.value(array1); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - //if(pDistance >= 0, {stepFunc.value(abs(pDistance))}, {0.01}); - stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0.01); - - - - if(rangeScore.value(candidate.collect({0}), voices[ins], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { - isInRangeScore = 1 - rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0] + 500, ranges[ins][1] - 500, 0, true); - isInRangeScore = isInRangeScore * rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true) - }, { - isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - }); - - - //isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - //old way - worked but actually by accident (I think) - //isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - - - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/75316bf0/75316bf0_mus_model.json b/resources/string_quartet_3/75316bf0/75316bf0_mus_model.json deleted file mode 100644 index e03d000..0000000 --- a/resources/string_quartet_3/75316bf0/75316bf0_mus_model.json +++ /dev/null @@ -1,550 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ 2, -1, -2, 2, -3, 0 ], [ "Rest" ], [ "Rest" ] ], 0.625 ], - [ [ [ "Rest" ], [ 2, -1, -2, 2, -3, 0 ], [ 2, -1, -2, 1, -3, 0 ], [ "Rest" ] ], 1 ], - [ [ [ "Rest" ], [ 2, -1, -2, 2, -3, 0 ], [ 2, -1, -2, 1, -3, 0 ], [ 1, 0, -2, 2, -3, 0 ] ], 1.5 ], - [ [ [ 1, -2, -2, 2, -3, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 2, -1, -2, 1, -3, 0 ], [ 1, 0, -2, 2, -3, 0 ] ], 1.875 ] - ], - [ - [ [ [ 1, -2, -2, 2, -3, 0 ], [ 2, -1, -2, 2, -3, 0 ], [ 2, -1, -2, 1, -3, 0 ], [ 2, -2, -1, 2, -3, 0 ] ], 1.625 ], - [ [ [ 1, -2, -2, 2, -3, 0 ], [ 3, -2, -2, 1, -3, 0 ], [ 2, -1, -2, 1, -3, 0 ], [ 2, -2, -1, 2, -3, 0 ] ], 1.5 ] - ], - [ - [ [ [ 1, -2, -2, 2, -3, 0 ], [ 3, -2, -2, 1, -3, 0 ], [ 2, -3, -2, 2, -3, 0 ], [ 2, -2, -1, 2, -3, 0 ] ], 1.5 ], - [ [ [ 1, -2, -2, 2, -3, 0 ], [ 3, -2, -2, 1, -3, 0 ], [ 2, -3, -2, 2, -3, 0 ], [ 3, -3, -2, 2, -3, 0 ] ], 0.875 ] - ], - [ - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 3, -2, -2, 1, -3, 0 ], [ 2, -3, -2, 2, -3, 0 ], [ 3, -3, -2, 2, -3, 0 ] ], 1.125 ], - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 3, -2, -2, 1, -3, 0 ], [ 3, -3, -2, 1, -3, 0 ], [ 3, -3, -2, 2, -3, 0 ] ], 1.75 ] - ], - [ - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 3, -2, -2, 1, -3, 0 ], [ 3, -3, -2, 1, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.5 ], - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 4, -3, -3, 1, -3, 0 ], [ 3, -3, -2, 1, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.5 ] - ], - [ - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 3, -3, -2, 2, -3, 0 ], [ 3, -3, -2, 1, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.75 ], - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 3, -3, -2, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.5 ] - ], - [ - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 3, -3, -2, 2, -3, 0 ], [ 2, -2, -3, 2, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 0.5 ] - ], - [ - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 2, -2, -3, 2, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 0.5 ], - [ [ [ 2, -3, -3, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 0.75 ], - [ [ [ 3, -4, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 0.625 ] - ], - [ - [ [ [ 3, -4, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 3, -5, -3, 2, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 0.625 ] - ], - [ - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 3, -5, -3, 2, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.25 ], - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 2, -4, -4, 3, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.375 ], - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 2, -4, -4, 3, -3, 0 ], [ 5, -4, -4, 1, -3, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 3, -4, -4, 2, -3, 0 ], [ 5, -4, -4, 1, -3, 0 ] ], 1.375 ] - ], - [ - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 4, -4, -4, 2, -3, 0 ], [ 3, -4, -4, 2, -3, 0 ], [ 4, -3, -5, 2, -3, 0 ] ], 1.5 ], - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 3, -2, -4, 2, -3, 0 ], [ 3, -4, -4, 2, -3, 0 ], [ 4, -3, -5, 2, -3, 0 ] ], 0.5 ] - ], - [ - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 3, -2, -4, 2, -3, 0 ], [ 3, -4, -4, 2, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.75 ], - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 3, -2, -4, 2, -3, 0 ], [ 2, -2, -4, 2, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -2, -4, 2, -4, 0 ], [ 3, -2, -4, 2, -3, 0 ], [ 2, -2, -4, 2, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.625 ] - ], - [ - [ [ [ 1, -2, -4, 2, -4, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 2, -2, -4, 2, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.875 ], - [ [ [ 1, -4, -4, 3, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 2, -2, -4, 2, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -4, -4, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 2, -2, -4, 2, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -4, -4, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 2, -3, -4, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.5 ] - ], - [ - [ [ [ 1, -4, -4, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 2, -4, -4, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -4, -4, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 1, -4, -3, 4, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.75 ], - [ [ [ 0, -4, -3, 4, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 1, -4, -3, 4, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.25 ], - [ [ [ 0, -4, -3, 4, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 1, -4, -3, 4, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1.25 ] - ], - [ - [ [ [ 0, -4, -3, 4, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 1, -4, -3, 4, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1 ], - [ [ [ 0, -4, -3, 4, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 0.375 ], - [ [ [ 1, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1.375 ] - ], - [ - [ [ [ 1, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.625 ], - [ [ [ 2, -4, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 4, -4, -3, 2, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 2, -4, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 2, -3, 1 ] ], 1.625 ], - [ [ [ 2, -4, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 3, -5, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 1 ] ], 1.75 ] - ], - [ - [ [ [ 2, -4, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -3, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 1 ] ], 1.75 ], - [ [ [ 2, -4, -3, 2, -3, 0 ], [ 3, -4, -3, 2, -3, 0 ], [ 2, -3, -3, 2, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1.75 ] - ], - [ - [ [ [ 2, -4, -3, 2, -3, 0 ], [ 2, -2, -3, 2, -3, 0 ], [ 2, -3, -3, 2, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1 ] - ], - [ - [ [ [ 2, -5, -3, 3, -3, 0 ], [ 2, -2, -3, 2, -3, 0 ], [ 2, -3, -3, 2, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1.625 ], - [ [ [ 2, -5, -3, 3, -3, 0 ], [ 2, -2, -3, 2, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1.75 ], - [ [ [ 2, -5, -3, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -3, -3, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 3, -4, -3, 3, -3, 0 ] ], 1 ], - [ [ [ 1, -3, -3, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -4, -3, 3, -3, 0 ], [ 2, -2, -3, 3, -3, 0 ] ], 1 ], - [ [ [ 1, -3, -3, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 1, -2, -3, 3, -3, 0 ], [ 2, -2, -3, 3, -3, 0 ] ], 1.25 ] - ], - [ - [ [ [ 1, -3, -3, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -3, -4, 3, -3, 0 ], [ 2, -2, -3, 3, -3, 0 ] ], 0.875 ], - [ [ [ 1, -3, -3, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -3, -4, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.625 ], - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -3, -4, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.875 ] - ], - [ - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -3, -3, 3, -3, 0 ], [ 2, -4, -4, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.75 ], - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 3, -4, -4, 3, -3, 0 ], [ 2, -4, -4, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.5 ], - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 3, -4, -4, 3, -3, 0 ], [ 2, -4, -4, 3, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 1.125 ] - ], - [ - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 3, -4, -4, 3, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -2, -4, 3, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 1.75 ] - ], - [ - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -2, -4, 3, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 2, -2, -3, 3, -3, 0 ] ], 1.75 ], - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -2, -4, 3, -3, 0 ], [ 2, -3, -5, 3, -3, 0 ], [ 2, -2, -3, 3, -3, 0 ] ], 0.75 ] - ], - [ - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -2, -4, 3, -3, 0 ], [ 2, -3, -5, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.375 ], - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -3, -4, 3, -3, 0 ], [ 2, -3, -5, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.125 ] - ], - [ - [ [ [ 1, -3, -4, 3, -3, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 2, -3, -5, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 0.5 ], - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 2, -3, -5, 3, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.75 ], - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.25 ] - ], - [ - [ [ [ 1, -3, -4, 2, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 3, -3, -4, 3, -3, 0 ] ], 1.75 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 0, -1, -4, 4, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 1.375 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 0, -1, -4, 4, -3, 0 ], [ 1, -1, -4, 4, -3, 0 ] ], 1.25 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 0, -1, -4, 4, -3, 0 ], [ 1, -1, -4, 4, -3, 0 ] ], 0.625 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 0, -1, -4, 4, -3, 0 ], [ 1, -2, -3, 4, -3, 0 ] ], 0.625 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -2, -4, 3, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 1, -2, -3, 4, -3, 0 ] ], 0.5 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 0, -2, -3, 4, -3, 0 ], [ 0, -2, -4, 4, -3, 0 ], [ 1, -2, -3, 4, -3, 0 ] ], 0.75 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 0, -2, -3, 4, -3, 0 ], [ -1, -2, -3, 5, -3, 0 ], [ 1, -2, -3, 4, -3, 0 ] ], 1.125 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ -1, -2, -3, 5, -3, 0 ], [ 1, -2, -3, 4, -3, 0 ] ], 1.625 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ -1, -2, -3, 5, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 0.875 ], - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 0, -2, -3, 4, -3, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 1.25 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -4, 0 ], [ 2, -3, -4, 4, -3, 0 ] ], 1 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -3, 0 ], [ 1, -3, -4, 4, -4, 0 ], [ 1, -1, -4, 4, -3, 0 ] ], 1.5 ] - ], - [ - [ [ [ -1, -2, -4, 4, -3, 0 ], [ 1, -2, -4, 4, -4, 0 ], [ 1, -3, -4, 4, -4, 0 ], [ 1, -1, -4, 4, -3, 0 ] ], 1 ], - [ [ [ 1, -3, -4, 3, -4, 0 ], [ 1, -2, -4, 4, -4, 0 ], [ 1, -3, -4, 4, -4, 0 ], [ 1, -1, -4, 4, -3, 0 ] ], 1.25 ], - [ [ [ 1, -3, -4, 3, -4, 0 ], [ 1, -2, -4, 4, -4, 0 ], [ 1, -3, -4, 4, -4, 0 ], [ 2, -2, -4, 4, -4, 0 ] ], 0.5 ] - ], - [ - [ [ [ 1, -3, -4, 3, -4, 0 ], [ 1, -2, -4, 4, -4, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 2, -2, -4, 4, -4, 0 ] ], 1 ] - ], - [ - [ [ [ 1, -3, -4, 3, -4, 0 ], [ 2, -2, -4, 3, -4, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 2, -2, -4, 4, -4, 0 ] ], 0.875 ], - [ [ [ 0, -2, -4, 3, -4, 0 ], [ 2, -2, -4, 3, -4, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 2, -2, -4, 4, -4, 0 ] ], 1.75 ] - ], - [ - [ [ [ 0, -2, -4, 3, -4, 0 ], [ 2, -2, -4, 3, -4, 0 ], [ 2, -3, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 1.75 ], - [ [ [ 0, -2, -4, 3, -4, 0 ], [ 2, -2, -4, 3, -4, 0 ], [ 1, -1, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 1.75 ], - [ [ [ 1, -2, -4, 3, -4, 0 ], [ 2, -2, -4, 3, -4, 0 ], [ 1, -1, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 1.125 ] - ], - [ - [ [ [ 1, -2, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 1, -1, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 0.875 ] - ], - [ - [ [ [ 0, 0, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 1, -1, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 1.75 ], - [ [ [ 0, 0, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 0, 1, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 0.625 ] - ], - [ - [ [ [ -1, 1, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 0, 1, -4, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 0.75 ], - [ [ [ -1, 1, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 1, 0, -5, 3, -4, 0 ], [ 2, -1, -4, 3, -4, 0 ] ], 0.75 ] - ], - [ - [ [ [ -1, 1, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 1, 0, -5, 3, -4, 0 ], [ 1, 1, -4, 3, -4, 0 ] ], 1.5 ], - [ [ [ -1, 1, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 0, 0, -4, 4, -4, 0 ], [ 1, 1, -4, 3, -4, 0 ] ], 1.25 ], - [ [ [ -1, 0, -4, 3, -4, 0 ], [ 1, 0, -4, 3, -4, 0 ], [ 0, 0, -4, 4, -4, 0 ], [ 1, 1, -4, 3, -4, 0 ] ], 0.875 ] - ], - [ - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, 0, -4, 3, -4, 0 ], [ 0, 0, -4, 4, -4, 0 ], [ 1, 1, -4, 3, -4, 0 ] ], 0.75 ], - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, 0, -4, 3, -4, 0 ], [ 0, 0, -4, 4, -4, 0 ], [ 0, 1, -4, 4, -4, 0 ] ], 1 ], - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 0, 0, -3, 4, -4, 0 ], [ 0, 0, -4, 4, -4, 0 ], [ 0, 1, -4, 4, -4, 0 ] ], 1.5 ] - ], - [ - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, 0, -5, 4, -4, -1 ], [ 0, 0, -4, 4, -4, 0 ], [ 0, 1, -4, 4, -4, 0 ] ], 1.625 ], - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, 0, -5, 4, -4, -1 ], [ 0, 0, -4, 4, -4, 0 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.5 ], - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, 0, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.75 ] - ], - [ - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.5 ], - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.375 ], - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.625 ] - ], - [ - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.625 ], - [ [ [ 0, -1, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1 ], - [ [ [ 0, -1, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 0, 0, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1 ] - ], - [ - [ [ [ 0, -1, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 0, -1, -4, 5, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 0, -1, -4, 5, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.375 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.25 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 3, -3, -4, 4, -4, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, -3, -4, 4, -3, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 3, -3, -4, 4, -4, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 3, -3, -4, 4, -4, -1 ] ], 0.875 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.5 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, 0, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -3, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.5 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -3, -4, 4, -4, -1 ], [ 2, -2, -4, 4, -4, 0 ] ], 0.375 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -3, -4, 4, -4, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 0.5 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 0, 0, -4, 4, -4, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 0.75 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 0.5 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, -2, -4, 4, -3, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 0.5 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 1, -2, -4, 4, -3, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 1.125 ], - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 1, -2, -4, 4, -3, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.625 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.875 ] - ], - [ - [ [ [ 0, -2, -4, 4, -4, -1 ], [ 0, 0, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.375 ], - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 0, 0, -4, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.875 ] - ], - [ - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.5 ], - [ [ [ -1, 0, -4, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 0.5 ], - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 1, -1, -4, 5, -4, -1 ] ], 1.375 ] - ], - [ - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 1, -1, -4, 4, -4, -1 ], [ 3, -1, -5, 4, -4, -2 ] ], 0.625 ], - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 1, -1, -5, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 3, -1, -5, 4, -4, -2 ] ], 1.5 ] - ], - [ - [ [ [ 0, -1, -5, 4, -4, -1 ], [ 2, -3, -5, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 3, -1, -5, 4, -4, -2 ] ], 1.5 ], - [ [ [ 1, -2, -5, 4, -4, -2 ], [ 2, -3, -5, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 3, -1, -5, 4, -4, -2 ] ], 0.5 ], - [ [ [ 1, -2, -5, 4, -4, -2 ], [ 2, -3, -5, 4, -4, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 3, -2, -5, 4, -4, -1 ] ], 1.25 ] - ], - [ - [ [ [ 1, -2, -5, 4, -4, -2 ], [ 2, -2, -5, 4, -5, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 3, -2, -5, 4, -4, -1 ] ], 0.625 ], - [ [ [ 1, -3, -5, 4, -4, -1 ], [ 2, -2, -5, 4, -5, -1 ], [ 2, -2, -5, 4, -4, -1 ], [ 3, -2, -5, 4, -4, -1 ] ], 0.75 ], - [ [ [ 1, -3, -5, 4, -4, -1 ], [ 2, -2, -5, 4, -5, -1 ], [ 2, -3, -5, 4, -4, -1 ], [ 3, -2, -5, 4, -4, -1 ] ], 1.625 ] - ], - [ - [ [ [ 1, -2, -5, 4, -5, -1 ], [ 2, -2, -5, 4, -5, -1 ], [ 2, -3, -5, 4, -4, -1 ], [ 3, -2, -5, 4, -4, -1 ] ], 1.5 ], - [ [ [ 1, -2, -5, 4, -5, -1 ], [ 2, -2, -5, 4, -5, -1 ], [ 3, -2, -5, 4, -5, -1 ], [ 3, -2, -5, 4, -4, -1 ] ], 0.5 ], - [ [ [ 1, -2, -5, 4, -5, -1 ], [ 2, -2, -5, 4, -5, -1 ], [ 3, -2, -5, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 1.5 ] - ], - [ - [ [ [ 1, -2, -5, 4, -5, -1 ], [ 2, -2, -5, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 1.375 ], - [ [ [ 1, -2, -5, 4, -5, -1 ], [ 1, -2, -4, 5, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 0.625 ], - [ [ [ 0, -2, -4, 5, -5, -1 ], [ 1, -2, -4, 5, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 0.75 ] - ], - [ - [ [ [ 0, -2, -4, 5, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 0.875 ], - [ [ [ 0, -2, -4, 5, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 4, -2, -4, 3, -5, -1 ] ], 1 ] - ], - [ - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 4, -2, -4, 3, -5, -1 ] ], 0.75 ] - ], - [ - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.75 ] - ], - [ - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 0.875 ], - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.25 ], - [ [ [ 0, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1.125 ] - ], - [ - [ [ [ 1, -1, -4, 3, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -4, -1 ] ], 1 ], - [ [ [ 1, -1, -4, 3, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, 0, -4, 4, -5, -1 ] ], 1.375 ] - ], - [ - [ [ [ 0, -1, -3, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 1, -1, -4, 4, -5, -1 ], [ 2, 0, -4, 4, -5, -1 ] ], 0.75 ], - [ [ [ 0, -1, -3, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 3, -5, -1 ], [ 2, 0, -4, 4, -5, -1 ] ], 1.5 ], - [ [ [ 0, -1, -3, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 3, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 0.5 ] - ], - [ - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 2, -1, -4, 3, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 1.375 ], - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 2, -1, -4, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 0.875 ], - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 3, -2, -5, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -2, -4, 4, -5, -1 ] ], 0.5 ] - ], - [ - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 3, -2, -5, 4, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 4, -3, -5, 4, -5, -1 ] ], 0.875 ] - ], - [ - [ [ [ 1, -2, -4, 4, -5, -1 ], [ 2, -2, -4, 5, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 4, -3, -5, 4, -5, -1 ] ], 1 ], - [ [ [ 2, -3, -5, 4, -5, -1 ], [ 2, -2, -4, 5, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 4, -3, -5, 4, -5, -1 ] ], 1.5 ] - ], - [ - [ [ [ 2, -3, -5, 4, -5, -1 ], [ 2, -2, -4, 5, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.375 ], - [ [ [ 1, -3, -4, 5, -5, -1 ], [ 2, -2, -4, 5, -5, -1 ], [ 2, -2, -4, 4, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.25 ], - [ [ [ 1, -3, -4, 5, -5, -1 ], [ 2, -2, -4, 5, -5, -1 ], [ 2, -3, -4, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 0.5 ] - ], - [ - [ [ [ 1, -3, -4, 5, -5, -1 ], [ 2, -2, -4, 5, -5, -1 ], [ 1, -2, -4, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 0.75 ], - [ [ [ 1, -3, -4, 5, -5, -1 ], [ 2, -3, -4, 5, -5, -1 ], [ 1, -2, -4, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.5 ] - ], - [ - [ [ [ 1, -3, -4, 5, -5, -1 ], [ 2, -4, -4, 5, -5, -1 ], [ 1, -2, -4, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.75 ], - [ [ [ 1, -3, -4, 5, -5, -1 ], [ 2, -4, -4, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.125 ], - [ [ [ 1, -4, -4, 5, -5, -1 ], [ 2, -4, -4, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.75 ] - ], - [ - [ [ [ 2, -4, -4, 4, -5, -1 ], [ 2, -4, -4, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -4, 5, -5, -1 ] ], 1.25 ], - [ [ [ 2, -4, -4, 4, -5, -1 ], [ 2, -4, -4, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1.5 ] - ], - [ - [ [ [ 1, -3, -5, 5, -5, -1 ], [ 2, -4, -4, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1.375 ], - [ [ [ 1, -3, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1.625 ] - ], - [ - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 2, -3, -5, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1 ] - ], - [ - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 3, -4, -6, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1 ] - ], - [ - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 3, -3, -6, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1.75 ] - ], - [ - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 4, -5, -5, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ] ], 1.375 ], - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 4, -5, -5, 5, -5, -1 ], [ 4, -4, -6, 5, -5, -1 ] ], 0.75 ] - ], - [ - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 3, -3, -5, 5, -5, -1 ], [ 4, -4, -6, 5, -5, -1 ] ], 1.5 ] - ], - [ - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 5, -5, -1 ], [ 3, -4, -5, 6, -5, -1 ], [ 4, -4, -6, 5, -5, -1 ] ], 1.375 ], - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -5, -5, 5, -5, -1 ], [ 3, -4, -5, 6, -5, -1 ], [ 4, -4, -6, 5, -5, -1 ] ], 1.375 ], - [ [ [ 1, -4, -5, 5, -5, -1 ], [ 3, -5, -5, 5, -5, -1 ], [ 3, -4, -5, 6, -5, -1 ], [ 2, -4, -5, 5, -5, 0 ] ], 1.25 ] - ], - [ - [ [ [ 1, -5, -5, 5, -5, 0 ], [ 3, -5, -5, 5, -5, -1 ], [ 3, -4, -5, 6, -5, -1 ], [ 2, -4, -5, 5, -5, 0 ] ], 0.5 ], - [ [ [ 1, -5, -5, 5, -5, 0 ], [ 3, -5, -5, 5, -5, -1 ], [ 4, -4, -5, 4, -5, 0 ], [ 2, -4, -5, 5, -5, 0 ] ], 1 ] - ], - [ - [ [ [ 2, -5, -5, 4, -5, 0 ], [ 3, -5, -5, 5, -5, -1 ], [ 4, -4, -5, 4, -5, 0 ], [ 2, -4, -5, 5, -5, 0 ] ], 1.375 ], - [ [ [ 2, -5, -5, 4, -5, 0 ], [ 2, -3, -5, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 2, -4, -5, 5, -5, 0 ] ], 1 ] - ], - [ - [ [ [ 2, -5, -5, 4, -5, 0 ], [ 2, -3, -5, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 3, -4, -5, 4, -5, 0 ] ], 1.625 ] - ], - [ - [ [ [ 1, -4, -5, 4, -5, 0 ], [ 2, -3, -5, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 3, -4, -5, 4, -5, 0 ] ], 1.375 ], - [ [ [ 1, -4, -5, 4, -5, 0 ], [ 2, -3, -5, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 2, -2, -5, 4, -5, 0 ] ], 1.75 ] - ], - [ - [ [ [ 2, -4, -5, 3, -5, 0 ], [ 2, -3, -5, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 2, -2, -5, 4, -5, 0 ] ], 1.375 ], - [ [ [ 2, -4, -5, 3, -5, 0 ], [ 3, -4, -6, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 2, -2, -5, 4, -5, 0 ] ], 1.25 ], - [ [ [ 2, -4, -5, 3, -5, 0 ], [ 3, -4, -6, 4, -5, 0 ], [ 4, -4, -5, 4, -5, 0 ], [ 3, -4, -4, 4, -5, 0 ] ], 0.75 ] - ], - [ - [ [ [ 2, -4, -5, 3, -5, 0 ], [ 3, -4, -6, 4, -5, 0 ], [ 4, -4, -6, 4, -5, 0 ], [ 3, -4, -4, 4, -5, 0 ] ], 1.125 ], - [ [ [ 2, -4, -5, 3, -5, 0 ], [ 3, -4, -6, 4, -5, 0 ], [ 4, -4, -6, 4, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 0.875 ] - ], - [ - [ [ [ 2, -4, -5, 3, -5, 0 ], [ 3, -4, -7, 4, -5, 0 ], [ 4, -4, -6, 4, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 1.375 ], - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 3, -4, -7, 4, -5, 0 ], [ 4, -4, -6, 4, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 1.75 ] - ], - [ - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 3, -4, -7, 4, -5, 0 ], [ 5, -5, -7, 4, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 1.125 ], - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 3, -4, -7, 4, -5, 0 ], [ 5, -5, -7, 4, -5, 0 ], [ 5, -5, -7, 3, -5, 0 ] ], 1.5 ] - ], - [ - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 3, -4, -7, 4, -5, 0 ], [ 5, -5, -7, 4, -5, 0 ], [ 4, -5, -6, 4, -5, 0 ] ], 0.625 ], - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -5, -7, 4, -5, 0 ], [ 4, -5, -6, 4, -5, 0 ] ], 1.375 ], - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -5, -6, 4, -5, 0 ] ], 1.375 ] - ], - [ - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 5, -5, -6, 3, -5, 0 ] ], 0.75 ] - ], - [ - [ [ [ 3, -5, -6, 3, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 6, -5, -6, 2, -5, 0 ] ], 0.5 ], - [ [ [ 4, -5, -6, 2, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 6, -5, -6, 2, -5, 0 ] ], 1.125 ] - ], - [ - [ [ [ 4, -5, -6, 2, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 1.25 ], - [ [ [ 4, -5, -6, 2, -5, 0 ], [ 4, -4, -7, 3, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 1.25 ], - [ [ [ 4, -5, -6, 2, -5, 0 ], [ "Rest" ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 0.5 ], - [ [ [ "Rest" ], [ "Rest" ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], 1.75 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ 4, -4, -6, 3, -5, 0 ] ], 1.125 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 7.25 ] - ] - ] -], -"last_changes": -[ - [ [ 3, -5, -6, 3, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 5, -5, -6, 3, -5, 0 ] ], - [ [ 3, -5, -6, 3, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 6, -5, -6, 2, -5, 0 ] ], - [ [ 4, -5, -6, 2, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 6, -5, -6, 2, -5, 0 ] ], - [ [ 4, -5, -6, 2, -5, 0 ], [ 5, -5, -6, 2, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ], - [ [ 4, -5, -6, 2, -5, 0 ], [ 4, -4, -7, 3, -5, 0 ], [ 5, -4, -6, 3, -5, 0 ], [ 4, -4, -6, 3, -5, 0 ] ] -], -"cur_uid": "75316bf0", -"ref_uid": "55bd25a1", -"order_seed": 144453, -"dur_seed": 681001, -"motifs_seed": 933698, -"entrances_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0.41, 1.84, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2430, -293 ], [ -869, 1211 ], [ -832, 1285 ], [ -702, 1211 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61316872427983, 0, 0.98971193415638, 0 ], -"passages_weights": [ 0.48, 0.46, 0.48, 1, 1 ], -"hd_exp": 9, -"hd_invert": 0, -"order": -[ - [ [ 1 ], [ 2, 3, 0 ], [ ] ], - [ [ 0, 2 ], [ 3, 1 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 1, 3 ], [ 0, 2 ], [ ] ], - [ [ 0, 2 ], [ 3, 1 ], [ ] ], - [ [ 3, 0 ], [ 1, 2 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3 ], [ 1, 2, 0 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 1 ], [ 0, 2, 3 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 0, 2 ], [ 3, 1 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 2, 3 ], [ 1, 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 1, 3, 0 ], [ 2 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 1 ], [ 2, 0, 3 ], [ ] ], - [ [ 3 ], [ 1, 2, 0 ], [ ] ], - [ [ 2, 1 ], [ 3, 0 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 1, 0 ], [ 2, 3 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 3 ], [ 0, 2, 1 ], [ ] ], - [ [ 1 ], [ 0, 3, 2 ], [ ] ], - [ [ 1 ], [ 2, 3, 0 ], [ ] ], - [ [ 0 ], [ 2, 1, 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [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], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/781442dc/781442dc_code.scd b/resources/string_quartet_3/781442dc/781442dc_code.scd deleted file mode 100644 index c194eef..0000000 --- a/resources/string_quartet_3/781442dc/781442dc_code.scd +++ /dev/null @@ -1,945 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance); -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/781442dc/781442dc_mus_model.json b/resources/string_quartet_3/781442dc/781442dc_mus_model.json deleted file mode 100644 index d2de366..0000000 --- a/resources/string_quartet_3/781442dc/781442dc_mus_model.json +++ /dev/null @@ -1,117 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ] ], 0.25 ], - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ] ], 0.5 ], - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 0 ], - [ [ [ 1, 0, -1, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0,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, -1, 1 ], [ 0, 0, 0, 0, -1, 1 ] ], 0.625 ], - [ [ [ 0, 0, -1, 0, -1, 1 ], [ 1, -1, 0, 0, -1, 0 ], [ 1, -1, 0, 0, -1, 1 ], [ 0, 0, 0, 0, -1, 1 ] ], 0 ], - [ [ [ 0, 0, -1, 0, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, -1, 0, 0, -1, 1 ], [ 0, 0, 0, 0, -1, 1 ] ], 1.125 ] - ], - [ - [ [ [ 0, 0, -1, 0, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, -1, 0, 0, -1, 1 ], [ "Rest" ] ], 0 ], - [ [ [ 0, 0, -1, 0, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, -1, 0, -1, -1, 2 ], [ "Rest" ] ], 0.625 ], - [ [ [ 0, 0, -1, 0, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 2, -1, -1, -1, -1, 1 ], [ "Rest" ] ], 0.5 ], - [ [ [ 0, 0, -1, 0, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ "Rest" ] ], 1.375 ] - ], - [ - [ [ [ 0, 0, 0, -1, 0, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ "Rest" ] ], 0 ], - [ [ [ 0, 0, 0, -1, 0, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, -1, 1, -1, -1, 1 ] ], 0.375 ], - [ [ [ 2, -1, 0, -2, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, -1, 1, -1, -1, 1 ] ], 0 ], - [ [ [ 2, -1, 0, -2, -1, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 1 ] - ], - [ - [ [ [ 1, 0, 0, -1, -2, 1 ], [ 1, -1, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 0 ], - [ [ [ 1, 0, 0, -1, -2, 1 ], [ 0, 0, 1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 0.625 ], - [ [ [ 1, 0, 0, -1, -2, 1 ], [ 1, 0, -2, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 0.25 ], - [ [ [ 1, 0, 0, -1, -2, 1 ], [ 0, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 1.375 ] - ], - [ - [ [ [ 1, 1, -1, -1, -1, 0 ], [ 0, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 0.375 ], - [ [ [ 0, 0, 0, -2, -1, 1 ], [ 0, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 0.375 ], - [ [ [ -1, 1, -1, -1, -1, 1 ], [ 0, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, -1, -1, -1, 1 ] ], 1.25 ] - ], - [ - [ [ [ -1, 1, -1, -1, -1, 1 ], [ 0, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, -1, -1, 2 ] ], 0 ], - [ [ [ -1, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, -1, -1, 2 ] ], 0 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, -1, -1, 2 ] ], 0.25 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, 0, -1, 1 ] ], 0.625 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 1.375 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ], 0 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ 1, 0, 0, -1, -1, 1 ], [ "Rest" ] ], 0 ], - [ [ [ 0, 0, 0, -1, -1, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 0 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 5.625 ] - ] - ] -], -"last_changes": -[ - [ [ -1, 1, -1, -1, -1, 1 ], [ 0, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, -1, -1, 2 ] ], - [ [ -1, 1, -1, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, -1, -1, 2 ] ], - [ [ 0, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, -1, -1, 2 ] ], - [ [ 0, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 0, 0, 0, 0, -1, 1 ] ], - [ [ 0, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 0 ], [ 1, 0, 0, -1, -1, 1 ], [ 1, 0, 0, -1, -1, 2 ] ] -], -"cur_uid": "781442dc", -"ref_uid": "nil", -"order_seed": 479669, -"dur_seed": 398026, -"motifs_seed": 801394, -"entrances_probs_vals": [ 0.43, 0, 0, 0, 0.85164835164835, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 1, 0, 0.99206349206349, 0.16483516483516, 0.66, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 1, 0, 0.95238095238095, 0, 1.043956043956, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -1983.9009287926, 1100 ], [ -999, 1322.600619195 ], [ -14.860681114551, 1676 ], [ 78.018575851393, 1694 ] ], -"step_probs_vals": [ 0, 1200, 0, 0.5, 0.076131687242798, 0.91477272727273, 0.17489711934156, 0, 0.57818930041152, 0, 1, 0 ], -"passages_weights": [ 0.54, 0.47, 0.52, 0.57, 0.58 ], -"hd_exp": -0.22, -"hd_invert": 0, -"order": -[ - [ [ 3, 1 ], [ 2, 0, 0, 2 ], [ ] ], - [ [ 0 ], [ 3, 1, 2, 3, 2 ], [ ] ], - [ [ 2 ], [ 0, 1, 0, 0, 0 ], [ 3 ] ], - [ [ 0, 3 ], [ 1, 2, 1, 2 ], [ ] ], - [ [ 2, 3 ], [ 0, 1, 0, 0, 1 ], [ ] ], - [ [ 1, 0 ], [ 2, 2, 2 ], [ 3 ] ], - [ [ 1, 2 ], [ 0, 3, 0, 3 ], [ ] ], - [ [ 3, 2 ], [ 0, 1, 1, 1 ], [ ] ], - [ [ 1, 2, 3 ], [ 0, 0, 0 ], [ ] ], - [ [ 2 ], [ 3, 1, 0, 3, 3 ], [ ] ] -], -"sus_weights": [ 0.44, 0.41, 0.28 ], -"order_size": [ 10, 10 ], -"passages_size": [ 2, 4 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/7c2de94c/7c2de94c_code.scd b/resources/string_quartet_3/7c2de94c/7c2de94c_code.scd deleted file mode 100644 index dc13462..0000000 --- a/resources/string_quartet_3/7c2de94c/7c2de94c_code.scd +++ /dev/null @@ -1,945 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array1) - hsArrayToCents.value(array2); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - if(pDistance < 0, {stepFunc.value(pDistance)}, {0}); -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength - minMotifLength).rand + minMotifLength).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - noProgIns = (popSize - noSusIns).rand + 1; - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength - minProgLength).rand + minProgLength).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0); - isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-5); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[-3, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[-3, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0], [-3, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/7c2de94c/7c2de94c_mus_model.json b/resources/string_quartet_3/7c2de94c/7c2de94c_mus_model.json deleted file mode 100644 index 37e7285..0000000 --- a/resources/string_quartet_3/7c2de94c/7c2de94c_mus_model.json +++ /dev/null @@ -1,163 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ 1, -1, 0, 0, 0, 0 ], [ "Rest" ] ], 0.125 ], - [ [ [ "Rest" ], [ "Rest" ], [ 1, -1, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0, 0 ] ], 1.125 ], - [ [ [ "Rest" ], [ 1, 0, 0, 0, 0, 0 ], [ 1, -1, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0, 0 ] ], 1.125 ], - [ [ [ -1, 0, 1, 0, 0, 1 ], [ 1, 0, 0, 0, 0, 0 ], [ 1, -1, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ 1, 0, 0, -1, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ], [ 1, -1, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0, 0 ] ], 0.375 ] - ], - [ - [ [ [ 1, 0, 0, -1, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ], [ 1, -1, 0, 0, 0, 0 ], [ 2, -1, 0, -1, 0,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 0, 0, -1 ], [ 2, 0, 0, 0, 0, -1 ], [ 1, -1, -1, 1, 0, 0 ] ], 0.875 ] - ], - [ - [ [ [ 0, -1, 0, 0, 0, -1 ], [ 2, -1, 1, 0, 0, -1 ], [ 2, 0, 0, 0, 0, -1 ], [ 3, -1, 0, 0, 0, -2 ] ], 1.125 ] - ], - [ - [ [ [ 0, -1, 0, 0, 0, -1 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.625 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.125 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 1, -1, 0, -1 ] ], 0.5 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 2, -1, 2, 0, 0, -1 ] ], 0.25 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ -1, 0, 1, 0, 0, -1 ], [ 2, -1, 2, 0, 0, -1 ] ], 0.75 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ -1, 0, 2, 0, 0, -1 ], [ 2, -1, 2, 0, 0, -1 ] ], 0.125 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 0, 0, 0, -2 ], [ 2, -1, 2, 0, 0, -1 ] ], 0.625 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 2, -1, 2, 0, 0, -1 ] ], 1 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 2, -1, 1, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.125 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 4, -1, 0, -1, 0, -2 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.5 ] - ], - [ - [ [ [ 1, -1, 1, 0, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.625 ] - ], - [ - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.75 ] - ], - [ - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ 3, -1, 0, 1, -1, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.5 ] - ], - [ - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ 3, -1, 0, 1, -1, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 1 ] - ], - [ - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ 3, -1, -1, 1, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.125 ] - ], - [ - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ 3, -1, 0, 0, 0, -2 ] ], 0.875 ], - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ "Rest" ] ], 0.375 ], - [ [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ "Rest" ], [ "Rest" ] ], 0.5 ], - [ [ [ 1, -1, 0, 1, 0, -2 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 0.625 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 6.5 ] - ] - ] -], -"last_changes": -[ - [ [ 1, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ 3, -1, 1, 0, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], - [ [ 1, -1, 0, 1, 0, -2 ], [ 0, -1, 0, 0, 0, -1 ], [ 3, -1, 0, 1, -1, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], - [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ 3, -1, 0, 1, -1, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], - [ [ 1, -1, 0, 1, 0, -2 ], [ 1, -2, 0, 1, 0, -2 ], [ 3, -1, -1, 1, 0, -2 ], [ 3, -1, 0, 0, 0, -2 ] ], - [ [ -2, -1, 0, 1, 0, -2 ], [ -2, -2, 0, 1, 0, -2 ], [ -2, -1, 0, 0, 0, -1 ], [ -2, -1, 0, 0, 0, -2 ] ] -], -"cur_uid": "7c2de94c", -"ref_uid": "5201b8af", -"order_seed": 869423, -"dur_seed": 680450, -"motifs_seed": 533263, -"entrances_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 0, 1.2087912087912, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2169.6594427245, 338 ], [ -2522.600619195, 1453 ], [ -1649.5356037152, 1676 ], [ -2894.1176470588, 1694 ] ], -"step_probs_vals": [ 0, 1200, 0, 0, 0.063786008230453, 0.92613636363636, 0.12757201646091, 0, 0.54732510288066, 0, 0.71604938271605, 0, 1, 0 ], -"passages_weights": [ 1, 0, 0.2, 0.74, 0.68 ], -"hd_exp": 2, -"hd_invert": 0, -"order": -[ - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 2, 0, 3 ], [ 1 ], [ ] ], - [ [ 2, 1, 3 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 3, 2, 0 ], [ 1 ], [ ] ], - [ [ 2, 0, 1 ], [ 3 ], [ ] ], - [ [ 0, 1, 3 ], [ 2 ], [ ] ], - [ [ 3, 2, 1 ], [ 0 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 1, 2, 3 ], [ 0 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 0, 2, 3 ], [ 1 ], [ ] ], - [ [ 3, 0, 1 ], [ 2 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ] -], -"sus_weights": [ 0, 0, 0.61 ], -"order_size": [ 30, 30 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/7e230015/7e230015_code.scd b/resources/string_quartet_3/7e230015/7e230015_code.scd deleted file mode 100644 index 7c7b526..0000000 --- a/resources/string_quartet_3/7e230015/7e230015_code.scd +++ /dev/null @@ -1,975 +0,0 @@ -( -// helper funcs -var hsArrayToCents, pDist, hdSum, hsChordalDistance, hsArrayToFreq; - -// score funcs -var isInRange, spacingScore, rangeScore, intervalScore, inclusionScore; - -// subroutines -var genTuples, initVoices, genOrders, genSubMotif, updateVoices, genDurFunc, genStepFunc; - -// primary routines -var genMotif, genSecondarySeq; - -// audition funcs -var genPatterns, genMidiPatterns; - -// resource management funcs -var seedFunc, genUID, writeResources, stringifyToDepth, setSeeds, sanityCheck, -msgInterpret, loadLedgerFile, loadLedgerJSON, loadModelFile, loadModelJSON, -setGlobalVars, globalVarsToDict, saveLedger; - -// model vars -//(model and global vars mostly set by OSC funcs -var seq, lastXChanges, -curUID, refUID, orderSeed, durSeed, motifSeed, -entrancesProbVals, passagesProbVals, exitsProbVals, -ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, -orders, susWeights, orderSize, passagesSize, -motifEdited, orderEdited; - -// model aux vars -var entrancesDurFunc, passagesDurFunc, exitsDurFunc, stepFunc; - -// other global vars -var popSize, exPath, dir, primes, dims, tuples, -group, player, resourceDir, ledgerPath, ledger, currentlyPlayingUID, -nameSpaces; - -// install JSON quark (not used) -/* -if(Quarks.isInstalled("JSONlib").not, { - Quarks.install("https://github.com/musikinformatik/JSONlib.git"); - thisProcess.recompile; - //HelpBrowser.openHelpFor("Classes/JSONlib"); -}); -*/ - - -//------helper funcs - -hsArrayToCents = { - arg hsArray; - hsArray.collect({arg dist, p; dist * 1200 * log2(primes[p][0]/primes[p][1])}).sum -}; - -pDist = { - arg array1, array2, signed = false; - var pDistance; - pDistance = hsArrayToCents.value(array2) - hsArrayToCents.value(array1); - if(signed, {pDistance}, {abs(pDistance)}) -}; - -hdSum = { - arg hsArrays; - var size, distances, mean; - size = hsArrays.size; - distances = (size - 1).collect({arg i; - ((i + 1)..(size - 1)).collect({arg j; - abs(hsArrays[i] - hsArrays[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsChordalDistance = { - arg hsArrays1, hsArrays2; - var size, distances, mean; - size = hsArrays1.size; - distances = hsArrays1.size.collect({arg i; - hsArrays2.size.collect({arg j; - abs(hsArrays1[i] - hsArrays2[j]).collect({arg dist, p; dist * log2(primes[p].product)}).sum - }); - }).flat; - mean = distances.sum / distances.size; - distances.sum - //mean + ((1 / sqrt((pow(distances - mean, 2)).sum / distances.size)) * mean) -}; - -hsArrayToFreq = { - arg array; - array.collect({arg dim, d; pow(primes[d][0]/primes[d][1], dim)}).product -}; - -//------score funcs - -/* -isInRange = { - arg hsArray, min, max; - var cents; - cents = hsArrayToCents.value(hsArray); - (cents >= min) && (cents <= max) -}; -*/ - -spacingScore = { - arg hsArrays, min; - var centsArray; - centsArray = hsArrays.collect({arg hsArray; hsArrayToCents.value(hsArray)}).sort({arg a, b; a < b}); - centsArray.differentiate.drop(1).collect({arg pDistance; if(pDistance >= min, {1}, {0.01})}).sum; -}; - -rangeScore = { - arg hsArray1, hsArray2, min, max, low, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - if((pDistance >= min) && (pDistance <= max), {1}, {low}); -}; - -/* -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = false; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - stepFunc.value(pDistance) -}; -*/ - -intervalScore = { - arg hsArray1, hsArray2, mean, sd, signed = true; - var pDistance; - pDistance = pDist.value(hsArray1, hsArray2, signed); - //pDistance.gaussCurve(1, mean, sd) - //if(pDistance >= 0, {stepFunc.value(abs(pDistance))}, {0.01}); - stepFunc.value(pDistance) -}; - -inclusionScore = { - arg array, test, min = 0.01; - if(array.collect({arg v; v.hash}).includes(test.hash), {min}, {1}); -}; - - -//------subroutines - -genTuples = { - var tuples; - tuples = dims.collect({[-1, 0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum <= 1) && (tuple[0] == 0)}); - //tuples = dims.collect({[0, 1]}).allTuples.select({arg tuple; (abs(tuple.drop(1)).sum == 1) && (tuple[0] == 0)}); - tuples = tuples ++ tuples.collect({arg tuple; [-3, -2, -1, 1, 2, 3].collect({arg octTrans; tuple.deepCopy.put(0, octTrans)})}).flatten; -}; - -initVoices = { - var init, voicesInit; - voicesInit = popSize.collect({dims.collect({0})}); - /* - voicesInit = [dims.collect({0})]; - (popSize - 1).do({ - arg rep, new; - rep = dims.rand; - new = voicesInit.last.deepCopy; - new[rep] = new[rep] + [-1, 1].choose(); - voicesInit = voicesInit.add(new); - }); - */ - voicesInit.deepCopy; -}; - -genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; - var env, pTable, durFunc; - env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; - pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; - durFunc = {arg allowChord, pad = false; - var res; - res = if(allowChord.not, { - pTable.tableRand * (maxDur - minDur) + minDur - }, { - if(1.0.rand < chordProb, {0}, {pTable.tableRand * (maxDur - minDur) + minDur}); - }).round(0.125); - if(pad, {res = res + rrand(minPad.asFloat, maxPad.asFloat).round(0.125)}); - if(res.asInteger == res, {res = res.asInteger}); - res - }; - seedFunc.value(durFunc, seed); -}; - -genStepFunc = {arg minStep, maxStep, envData, seed; - var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; - envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; - envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; - env = Env.pairs(envDataNorm); - stepFunc = {arg pDist; - env.at(pDist).clip(0.001, 1); - }; - seedFunc.value(stepFunc, seed); -}; - -genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxProgLength = 5; - ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ - var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; - noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); - //noProgIns = (popSize - noSusIns).rand + 1; - noProgIns = (popSize - noSusIns); - noSilentIns = popSize - noSusIns - noProgIns; - - # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); - - prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); - if(silent == nil, {silent = []}); - [sus.scramble, prog, silent.scramble] - }); -}; - -updateVoices = {arg ins, sus; - var voices, candidates, nWeights, nProbs, sel; - - voices = lastXChanges.deepCopy.last; - - candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; - candidates = difference(candidates.asSet, voices.asSet).asList; - nProbs = candidates.collect({arg candidate; - var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; - - //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); - stepScore = intervalScore.value(voices[ins], candidate, 100, 100); - recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0.01); - - - - /* - if(rangeScore.value(candidate.collect({0}), voices[ins], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { - isInRangeScore = 1 - rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0] + 500, ranges[ins][1] - 500, 0, true); - isInRangeScore = isInRangeScore * rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true) - }, { - isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - }); - */ - - - isInRangeScore = rangeScore.value(candidate.collect({0}), candidate, ranges[ins][0], ranges[ins][1], 0, true); - //old way - worked but actually by accident (I think) - //isInRangeScore = rangeScore.value(candidate, candidate.collect({0}), ranges[ins][0], ranges[ins][1], 0, true); - - - regScore = spacingScore.value(voices.deepCopy.put(ins, candidate), 300); - hdScore = pow(hdSum.value(voices.deepCopy.put(ins, candidate)), hdExp); - if(hdInvert == 0, {hdScore = 1/hdScore}); - //maybe what you want here is a vector to another root and then favoring movement towards it. - //distScore = pow(hsChordalDistance.value(voices, voices.put(ins, candidate)), 2); - - [stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore] - }); - - nWeights = passagesWeights; - - //this handles nWeights of 0; mainly for testing - nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; - nWeights = nWeights.select({arg weight; weight != 0}); - nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) - }); - nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; - - sel = candidates.wchoose(nProbs); - - voices[ins] = sel; - lastXChanges = lastXChanges.add(voices).keep(-10); -}; - -genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLast = false, isLastOrder = false; - var sus, prog, silent, flatOrder, res, isInChord, allowChord, pad, lastXChangesHold, voices, adder; - # sus, prog, silent = order; - flatOrder = silent ++ sus ++ prog; - lastXChangesHold = lastXChanges.deepCopy; - voices = lastState.deepCopy; - isInChord = popSize.collect({false}); - allowChord = false; - pad = false; - res = []; - "------generating motif".postln; - //need to figure out here if voices move between motifs - flatOrder.do({arg ins, i; - - if(prog.includes(ins) && repeatLast.not, {updateVoices.value(ins, sus)}); - adder = if(silent.includes(ins), {["Rest"]}, {lastXChanges.last.deepCopy[ins]}); - - if(voices[ins] != adder, { - var dur; - - if((sus ++ silent).includes(ins), { - allowChord = (ins != sus.last); - pad = (ins == sus.last); - }, { - if(i < (flatOrder.size - 1), { - allowChord = (isInChord[flatOrder[i + 1]] || (ins == flatOrder[i + 1])).not; - pad = false; - }, { - allowChord = false; - pad = true - }); - }); - if((orderIndex == 0) && sus.includes(ins), { - dur = entrancesDurFunc.value(allowChord, pad); - }, { - dur = passagesDurFunc.value(allowChord, pad); - }); - if(dur == 0, {isInChord[ins] = true}, {isInChord = popSize.collect({false})}); - - voices[ins] = adder; - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - - // pad ending - if(orderIndex == (orders.size - 1), { - (0..(popSize-1)).scramble.do({arg ins; - if(res.last.first[ins] != ["Rest"], { - var dur; - voices[ins] = ["Rest"]; - allowChord = (voices != popSize.collect({["Rest"]})); - pad = allowChord.not; - dur = exitsDurFunc.value(allowChord, pad); - res = res.add([voices.deepCopy.postln, dur]); - }); - }); - }); - - //format and return - if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); - res; -}; - - -//------primary routines - -genMotif = { - var repeats, fSeq, fDur, durAdd; - - repeats = 1; - fSeq = []; - - repeats.do({arg index; - var motif; - - motif = []; - - orders.do({arg order, o; - var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); - subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); - motif = motif.add(subMotif); - - }); - - sanityCheck.value(motif, index); - - fSeq = fSeq.add(motif); - }); - - //round last duration to measure - fDur = fSeq.flatten.flatten.slice(nil, 1).sum; - durAdd = fDur.round(4) - fDur; - if(durAdd < 0, {durAdd = 4 - durAdd}); - fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; - - fSeq -}; - -genSecondarySeq = {arg seq; - var curdles, fSeq; - curdles = []; - while({curdles.sum < seq.size}, {curdles = curdles ++ [3.rand + 1]}); - - fSeq = seq.clumps(curdles).collect({arg clump, m; - var repeats, paddedSeq; - - //add rest - paddedSeq = clump.add([[[popSize.collect({["Rest"]}), 0.5.rand]]]); - - //implement repeats - repeats = [0.rand + 1, 1].wchoose([1, 0].normalizeSum); - repeats.collect({paddedSeq}); - }); - fSeq -}; - - -//------audition funcs - -/* -Event.addEventType(\osc, { - if (~addr.postln.notNil) { - ~addr.sendMsg(~indexPath, ~indexMsg); - ~addr.sendMsg(~seqPath, stringifyToDepth.value(~seqMsg, 3)); - //~addr.sendMsg("/STATE/OPEN", (dir.replace("supercollider", "resources") +/+ ~idMsg +/+ ~idMsg ++ "_gui_state" ++ ".state").standardizePath.postln); - }; -}); -*/ - -Event.addEventType(\osc, { - if (~addr.notNil) { - ~msg; - ~addr.sendMsg(~path, *~msg); - }; -}); - -genPatterns = {arg inSeq, addr, oneShot = false; - var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; - seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - pbinds = voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs, attacks, rels, amps; - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); - attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); - //rels = freqs.drop(2).collect({rrand(0.3, 0.5)}) ++ 2.collect({rrand(1, 3)}); - rels = (clumps.size - 1).collect({arg c; - if(clumps[c + 1][0] == ["Rest"], {rrand(1.0, 3.0)}, {rrand(0.3, 0.5)}); - }); - rels = rels.add(rrand(1.0, 3.0)); - amps = freqs.collect({rrand(0.6, 0.99)}); - - [ - Pbind( - \instrument, \string_model, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \attack, Pseq(attacks, 1), - \sustain, Pseq(fDurs, 1), - \release, Pseq(rels, 1), - //\amp, Pseq(amps, 1), - \amp, Pbrown(0.5, 1, 0.5), - \busIndex, v - ), - Pbind( - \instrument, \sine, - \group, group, - \freq, Pseq(freqs, 1), - \dur, Pseq(fDurs, 1), - \sustain, Pseq(fDurs, 1), - \busIndex, v - ) - ] - }).flatten; - if(oneShot.not, { - msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); - //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); - pbinds = pbinds ++ - [ - Pbind( - \type, \osc, - \addr, addr, - \path, "/playing", - \msg, Pseq(msg, 1), - \dur, Pseq(sectionDurs, 1) - ); - ] - }); - res = Ppar(pbinds); - res -}; - -/* -genMidiPatterns = {arg seq; - var voices, durs, patterns, res, mOut, pbRange; - pbRange = 1; //semitones - change this as needed for your situation - mOut = MIDIOut.newByName("TiMidity", "TiMidity port 0").latency_(Server.default.latency); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; - res = Ppar( - voices.flop.collect({arg voice, v; - var clumps, hdScores, freqs, fDurs; - - mOut.program(v, 70); - - clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); - fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); - - Pbind( - \type, \midi, - \chan, v, - \noteval, Pseq(freqs.cpsmidi - 24, 1), - \note, Pfunc({ | event | event[\noteval].floor }), - \dur, Pseq(fDurs, 1), - \midiout, mOut, - \amp, 1, - \bend, Pfunc({ - | event | - if (event[\note].isRest.not) { - var pitchbendvalue = event[\noteval].frac.linlin(0, pbRange, 8192, 8192*2).asInteger; - m.bend(v, pitchbendvalue); - }; - 0; // return something other than nil to avoid stopping the pattern - }), - ); - }); - ); - res -}; -*/ - - -//------resource management funcs - -genUID = {Date.seed.asHexString.toLower}; - -seedFunc = {arg func, seed; - var funcArgs, next; - next = Routine({loop{func.valueArray(funcArgs).yield }}); - next.randSeed_(seed); - {arg ...args; funcArgs = args; next.value} -}; - -stringifyToDepth = {arg data, maxDepth = 1; - var prettyString = "", rCount = 0, writeArray, indent; - - if(maxDepth == 0, { - data.asCompileString - }, { - indent = {arg size; size.collect({" "}).join("")}; - writeArray = {arg array; - prettyString = prettyString ++ indent.value(rCount) ++ "[\n"; - rCount = rCount + 1; - if(rCount < maxDepth, { - array.do({arg subArray; writeArray.value(subArray)}); - }, { - prettyString = prettyString ++ array.collect({arg subArray; - indent.value(rCount + 1) ++ subArray.asCompileString - }).join(",\n"); - }); - rCount = rCount - 1; - prettyString = prettyString ++ "\n" ++ indent.value(rCount) ++ "],\n"; - }; - - writeArray.value(data); - prettyString.replace(",\n\n", "\n").drop(-2); - }) -}; - -sanityCheck = {arg motif, index; - //print functions = very helpful - ("----------" + index + "------------").postln; - - motif.flatten.do({arg val, v; - if(v > 0, { - if(motif.flatten[v-1][0].hammingDistance(val[0]) > 1, {"problem 1".postln}); - if(motif.flatten[v-1][0].hammingDistance(val[0]) == 0, {"problem 2".postln}); - }); - val.postln - }); - "***********".postln; -}; - -msgInterpret = {arg in, escapeDoubleQuotes = true, escapeSingleQuotes = true; - var res; - - res = in; - if(res.isNil.not, { - if((res.isArray && res.isString.not), { - res = res.asCompileString; - res = res.replace(" ", "").replace("\n", "").replace("\t", ""); - if(escapeSingleQuotes, {res = res.replace("\'", "")}); - if(escapeDoubleQuotes, {res = res.replace("\"", "")}); - res = res.replace("Rest", "\"Rest\""); - res = res.interpret; - }, { - var tmpRes; - if(res.every({arg char; char.isDecDigit}), {tmpRes = res.asInteger}); - if(res.contains("."), {tmpRes = res.asFloat}); - if(tmpRes != nil, {res = tmpRes}); - }); - }); - res -}; - -writeResources = {arg path, dict; - var file, modelItems, resString; - file = File(path,"w"); - - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - - resString = nameSpaces.collect({arg nameSpace; - var depth = 0, insert = " "; - if(nameSpace == "music_data", {depth = 3; insert = "\n"}); - if(nameSpace == "last_changes", {depth = 1; insert = "\n"}); - if(nameSpace == "order", {depth = 1; insert = "\n"}); - if((nameSpace == "ref_uid") && (dict[nameSpace] == nil), {dict[nameSpace] = "nil"}); - "\"" ++ nameSpace ++ "\":" ++ insert ++ stringifyToDepth.value(dict[nameSpace], depth) - }).join(",\n"); - - resString = "{\n" ++ resString ++ "\n}"; - - file.write(resString); - file.close; - resString -}; - -loadModelFile = {arg path; loadModelJSON.value(File(path, "r").readAllString.parseJSON)}; - -loadModelJSON = {arg jsonObject; - var dict; - dict = Dictionary.with(*nameSpaces.collect({arg nS; nS->msgInterpret.value(jsonObject[nS])})); - dict -}; - -setGlobalVars = {arg dict, skipLastXChanges = false; - var tmpLastXChanges; - tmpLastXChanges = lastXChanges.deepCopy; - // order really matters!!!! - # seq, lastXChanges, curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited = nameSpaces.collect({arg nS; dict[nS]}); - if(skipLastXChanges, {lastXChanges = tmpLastXChanges}); - dict -}; - -globalVarsToDict = { - var modelItems, dict; - // order really matters!!!! - modelItems = [ - seq, lastXChanges, - curUID, refUID, orderSeed, durSeed, motifSeed, - entrancesProbVals, passagesProbVals, exitsProbVals, - ranges, stepProbsVals, passagesWeights, hdExp, hdInvert, - orders, susWeights, orderSize, passagesSize, - motifEdited, orderEdited - ]; - dict = Dictionary.with(*nameSpaces.collect({arg nS, n; nS->modelItems[n]})); -}; - -loadLedgerFile = {arg path; - ledgerPath = path; - resourceDir = path.splitext(".").drop(-1).join; - loadLedgerJSON.value(File(ledgerPath, "r").readAllString.parseJSON) -}; - -loadLedgerJSON = {arg jsonObject; ledger = jsonObject["ledger"]}; - -saveLedger = {arg ledger, path; - var file, curResourceDir; - file = File(path, "w"); - curResourceDir = resourceDir; - resourceDir = path.splitext(".").drop(-1).join; - if(curResourceDir != resourceDir, { - File.mkdir(resourceDir); - ledger.do({arg id; - File.copy(curResourceDir +/+ id, resourceDir +/+ id); - }); - }); - file.write("{\n\"ledger\":\n" ++ stringifyToDepth.value(ledger, 1) ++ "\n}"); - file.close; -}; - -//------global vars - -primes = [[2, 1], [3, 2], [5, 4], [7, 4], [11, 8], [13, 8]]; -//ranges = [[-2400, 0], [-1200, 1200], [0, 2400], [0, 2400]]; -exPath = thisProcess.nowExecutingPath; -dir = exPath.dirname; -//popSize = 4; -dims = primes.size; -tuples = genTuples.value(); -//refUID = nil; -group = Group.new; -~group = group; -loadLedgerFile.value(dir +/+ ".." +/+ "resources" +/+ "piece_ledger.json"); -resourceDir = (dir +/+ ".." +/+ "resources" +/+ "piece_ledger"); -//passagesWeights = [1, 1, 1, 1, 1]; -//susWeights = [1, 1, 1]; -// order really matters!!!! -nameSpaces = [ - "music_data", "last_changes", "cur_uid", "ref_uid", "order_seed", "dur_seed", "motifs_seed", - "entrances_probs_vals","passages_probs_vals", "exits_probs_vals", - "ranges", "step_probs_vals", "passages_weights", "hd_exp", "hd_invert", - "order", "sus_weights", "order_size", "passages_size", - "motif_edited", "order_edited" -]; - - -//------OSC funcs - -OSCdef(\load_ledger, {arg msg, time, addr, port; - loadLedgerFile.value(msg[1].asString); -}, \load_ledger); - -OSCdef(\load_model, {arg msg, time, addr, port; - var dict; - dict = loadModelFile.value(msg[1].asString); - setGlobalVars.value(dict); -}, \load_model); - -OSCdef(\save_ledger, {arg msg, time, addr, port; - msg.postln; - ledger = msgInterpret.value(msg[1].asString.parseJSON["ledger"], false).postln; - //loadLedgerJSON.value(msg[0]) - saveLedger.value(ledger, msg[2].asString); - //loadLedgerFile.value(msg[1].asString); -}, \save_ledger); - -OSCdef(\generate, {arg msg, time, addr, port; - var path, dict, durSeeds, musPath, modelString; - msg.postln; - - path = msg[1].asString; - - dict = loadModelFile.value(path); - setGlobalVars.value(dict, true); - - popSize = ranges.size; - - //refUID.postln; - - loadLedgerFile.value(ledgerPath); - if(ledger == nil, {ledger = ["tmp"]}); - if(ledger.last != "tmp", {ledger = ledger.add("tmp")}); - - if(refUID == nil, {lastXChanges = [initVoices.value().deepCopy]}); - if((refUID != nil) && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - lastXChanges = msgInterpret.value(file.readAllString.parseJSON["last_changes"]); - }); - - refUID.postln; - lastXChanges.collect({arg item; item.postln}); - - durSeeds = seedFunc.value({3.collect({rrand(100000, 999999)})}, durSeed).value.postln; - entrancesDurFunc = genDurFunc.valueArray(entrancesProbVals[..4] ++ [entrancesProbVals[5..]] ++ [durSeeds[0]]); - passagesDurFunc = genDurFunc.valueArray(passagesProbVals[..4] ++ [passagesProbVals[5..]] ++ [durSeeds[1]]); - exitsDurFunc = genDurFunc.valueArray(exitsProbVals[..4] ++ [exitsProbVals[5..]] ++ [durSeeds[2]]); - - if(orders == nil, { - orders = seedFunc.value(genOrders, orderSeed).valueArray(orderSize ++ passagesSize); - //addr.sendMsg("/order", stringifyToDepth.value(orders, 1)); - }); - - stepFunc = genStepFunc.valueArray(stepProbsVals[..1] ++ [stepProbsVals[2..]] ++ [motifSeed]); - seq = seedFunc.value(genMotif, motifSeed).value; - - lastXChanges.collect({arg item; item.postln}); - - dict = globalVarsToDict.value; - modelString = writeResources.value(path, dict); - - //addr.sendMsg("/generated", musPath, stringifyToDepth.value(seq, 3)); - //~seq = seq; - - addr.sendMsg("/generated", path, modelString, ledgerPath); -}, \generate); - - -OSCdef(\commit, {arg msg, time, addr, port; - var musicData, musicChanged, dict, newLedger, modelPath, musString, musFile, test1, test2, lastCurUID, commitType, commitPos, equalityLedger; - //msg.postln; - - /* - test1 = msg[1].asString.parseJSON; - test2 = (dir +/+ ".." +/+ "resources/tmp/tmp_music" ++ ".json").standardizePath.parseJSONFile; - msgInterpret.value(test1["music"])[0][0][0][1].class.postln; - msgInterpret.value(test2["music_data"])[0][0][0][1].class.postln; - (test1["music"] == test2["music_data"]).postln; - */ - - musicData = loadModelJSON.value(msg[1].asString.parseJSON)["music_data"].postln; - musicChanged = (musicData != seq).postln; - commitType = msg[2].asString; - commitPos = msg[3].postln.asInteger; - - lastCurUID = curUID.deepCopy; - curUID = genUID.value; - - File.mkdir((resourceDir +/+ curUID).standardizePath); - File.copy(exPath, (resourceDir +/+ curUID +/+ curUID ++ "_code" ++ ".scd").standardizePath); - - modelPath = (resourceDir +/+ curUID +/+ curUID ++ "_mus_model" ++ ".json").standardizePath; - dict = globalVarsToDict.value; - if(musicChanged, { - seq = musicData; - dict["music_data"] = seq; - dict["motif_edited"] = "true" - }); - dict["cur_uid"] = curUID; - - writeResources.value(modelPath, dict); - - File.delete(ledgerPath ++ "_bak"); - File.copy(ledgerPath, ledgerPath ++ "_bak"); - File.delete(ledgerPath); - - /* - if(commitType == "add", { - if(lastCurUID == "tmp", { - ledger = ledger.drop(-1).add(curUID); - }, { - ledger = ledger.add(curUID); - }) - }); - */ - - ledger.postln; - - if(commitType == "add", {ledger = ledger.add(curUID)}); - - if(commitType == "insert", {ledger = ledger.insert(commitPos + 1, curUID)}); - - if(commitType == "replace", {ledger = ledger.put(commitPos, curUID)}); - - equalityLedger = ledger.collect({arg item; item.asSymbol}); - if(equalityLedger.includes(\tmp).postln, {ledger.removeAt(equalityLedger.indexOf(\tmp).postln)}); - - ledger.postln; - - saveLedger.value(ledger, ledgerPath); - - addr.sendMsg("/committed", curUID, ledgerPath); - //refUID = curUID; - -}, \commit); - -OSCdef(\transport, {arg msg, time, addr, port; - msg.postln; - if(msg[1] == 0, { - group.set(\release, 2); - group.set(\gate, 0); - player.stop; - }, { - // the cued sequence can now be read from file, so this can be cleaned up - var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; - if(msg[1] == 1, { - pSeq = []; - cuedSeek = (seq != nil); - indexStart = msg[2].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.postln.parseJSON["music_data"]), path, indexStart + index, uid]); - file.close; - }); - }); - if(cuedSeek, { - var path, file; - path = (resourceDir +/+ "tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - patterns = genPatterns.value(pSeq, addr); - }, { - pSeq = [loadModelJSON.value(msg[2].asString.parseJSON)["music_data"].postln]; - patterns = genPatterns.value(pSeq, addr, true); - }); - player = Pfset(pattern: patterns, cleanupFunc: { - addr.sendMsg("/transport", 0); - addr.sendMsg("/one_shot", 0); - }); - player = player.play - }); -}, \transport); - - -OSCdef(\transcribe_motif, {arg msg, time, addr, port; - var tSeq, refChord, refUID; - - msg.postln; - - tSeq = [loadModelJSON.value(msg[1].asString.parseJSON)["music_data"]]; - refUID = msg[2].asString.postln; - - if((refUID != "nil") && (refUID != "tmp"), { - var file; - file = File((resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }, { - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - }); - - ~transcribe.value(tSeq, refChord, (dir +/+ ".." +/+ "lilypond" +/+ "includes").standardizePath, addr, "/transcribe_motif"); -}, \transcribe_motif); - - -OSCdef(\transcribe_all, {arg msg, time, addr, port; - var cSize, patterns, cuedSeek, indexStart, indexEnd, tmpLedger; - if(true, { - cuedSeek = (seq != nil); - indexStart = msg[1].asInteger; - indexEnd = ledger.size - if(cuedSeek, {2}, {1}); - - //tmp for testing transcription - //indexEnd = (indexStart+5); - - //ledger.postln; - if(((indexStart == (ledger.size - 1)) && cuedSeek).not, { - var lilyPartLedgerFiles; - - lilyPartLedgerFiles = 4.collect({arg p; - File((dir +/+ ".." +/+ "lilypond" +/+ "includes" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly").standardizePath, "w"); - }); - - ledger[indexStart..indexEnd].do({arg uid, index; - var path, file, fileString, tSeq, refUID, refChord; - path = (resourceDir +/+ uid +/+ uid ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - fileString = file.readAllString; - tSeq = msgInterpret.value(fileString.parseJSON["music_data"]); - refUID = msgInterpret.value(fileString.parseJSON["ref_uid"]); - file.close; - - //uid.postln; - //(refUID == "nil").postln; - - refChord = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; - - if(refUID != "nil", { - path = (resourceDir +/+ refUID +/+ refUID ++ "_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - refChord = msgInterpret.value(file.readAllString.parseJSON["last_changes"]).last; - file.close; - }); - - if(index != indexEnd, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath); - }, { - ~transcribe.value(tSeq, refChord, (resourceDir +/+ uid +/+ "lilypond").standardizePath, addr, "/transcribe_all"); - }); - - lilyPartLedgerFiles.do({arg f, p; - f.write("\\include \"" ++ resourceDir +/+ uid +/+ "lilypond" +/+ "part_" ++ ["IV", "III", "II", "I"][p] ++ ".ly\"\n"); - }); - - }); - - lilyPartLedgerFiles.do({arg f; - f.close - }); - }); - /* - if(cuedSeek, { - var path, file; - path = (dir +/+ ".." +/+ "resources/tmp/tmp_mus_model" ++ ".json").standardizePath; - file = File(path, "r"); - pSeq = pSeq.add([msgInterpret.value(file.readAllString.parseJSON["music_data"]), path, ledger.size - 1, "tmp"]); - file.close; - }); - */ - }, { - - }); - -}, \transcribe_all); - -) - - diff --git a/resources/string_quartet_3/7e230015/7e230015_mus_model.json b/resources/string_quartet_3/7e230015/7e230015_mus_model.json deleted file mode 100644 index 7948320..0000000 --- a/resources/string_quartet_3/7e230015/7e230015_mus_model.json +++ /dev/null @@ -1,532 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ -1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ -2, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ -2, 1, 0, 0, 0, 0 ], [ -1, 1, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ] - ], - [ - [ [ [ -2, 1, 0, 0, 0, 0 ], [ -1, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0,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, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], 1 ], - [ [ [ -6, 6, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], 1 ] - ], - [ - [ [ [ -6, 7, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], 1 ], - [ [ [ -6, 7, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -5, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], 1 ] - ], - [ - [ [ [ -6, 7, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -5, 7, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ] ], 1 ], - [ [ [ -6, 7, -2, 1, 1, 0 ], [ "Rest" ], [ -5, 7, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ] ], 1 ], - [ [ [ -6, 7, -2, 1, 1, 0 ], [ "Rest" ], [ -5, 7, -2, 1, 1, 0 ], [ "Rest" ] ], 1 ], - [ [ [ -6, 7, -2, 1, 1, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1 ] - ] - ] -], -"last_changes": -[ - [ [ -5, 5, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], - [ [ -6, 6, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], - [ [ -6, 7, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], - [ [ -6, 7, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -5, 7, -2, 1, 1, 0 ], [ -4, 6, -2, 1, 1, 0 ] ], - [ [ -6, 7, -2, 1, 1, 0 ], [ -5, 6, -2, 1, 1, 0 ], [ -5, 7, -2, 1, 1, 0 ], [ -4, 7, -2, 1, 1, 0 ] ] -], -"cur_uid": "7e230015", -"ref_uid": "nil", -"order_seed": 389930, -"dur_seed": 736878, -"motifs_seed": 479673, -"entrances_probs_vals": [ 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 0, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2400, 1200 ], [ -1200, 1200 ], [ -702, 1200 ], [ -702, 1200 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61111111111111, 0, 0.78600823045268, 0.068181818181818, 0.98971193415638, 0.0625 ], -"passages_weights": [ 1, 1, 0.48, 1, 1 ], -"hd_exp": 10, -"hd_invert": 0, -"order": -[ - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 0, 3 ], [ 2, 1 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 1 ], [ 3, 0, 2 ], [ ] ], - [ [ 3, 1 ], [ 2, 0 ], [ ] ], - [ [ 2 ], [ 1, 3, 0 ], [ ] ], - [ [ 2, 1 ], [ 3, 0 ], [ ] ], - [ [ 0, 3 ], [ 1, 2 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 0, 3 ], [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2, 1 ], [ 3, 0 ], [ ] ], - [ [ 0, 3, 1 ], [ 2 ], [ ] ], - [ [ 3, 0, 2 ], [ 1 ], [ ] ], - [ [ 2, 1 ], [ 0, 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 3, 2 ], [ 1, 0 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 2, 3 ], [ 0, 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 1 ], [ 0, 3, 2 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 2, 3 ], [ 0, 1 ], [ ] ], - [ [ 3 ], [ 2, 1, 0 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3/tmp/tmp_mus_model.json b/resources/string_quartet_3/tmp/tmp_mus_model.json deleted file mode 100644 index 487fc67..0000000 --- a/resources/string_quartet_3/tmp/tmp_mus_model.json +++ /dev/null @@ -1,532 +0,0 @@ -{ -"music_data": -[ - [ - [ - [ [ [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ "Rest" ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 1 ], - [ [ [ "Rest" ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0 ] ], 2.375 ], - [ [ [ -1, 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, -2, 0, 0 ], [ -2, 3, 1, -1, 0, 0 ], [ 0, 3, 1, -2, 0, 0 ] ], 1.375 ] - ], - [ - [ [ [ 0, 3, 1, -1, 0, 0 ], [ -1, 3, 1, -1, 0, -1 ], [ -2, 3, 1, -1, 0, 0 ], [ 0, 3, 1, -2, 0, 0 ] ], 1 ], - [ [ [ 0, 3, 1, -1, 0, 0 ], [ -1, 3, 1, -1, 0, -1 ], [ -2, 3, 1, -1, 0, 0 ], [ 0, 3, 1, -1, 0, -1 ] ], 1 ], - [ [ [ 0, 3, 1, -1, 0, 0 ], [ -1, 3, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, 0 ], [ 0, 3, 1, -1, 0, -1 ] ], 1.25 ] - ], - [ - [ [ [ 0, 3, 1, -1, 0, 0 ], [ -1, 2, 1, -1, 0, 0 ], [ -2, 4, 1, -1, 0, 0 ], [ 0, 3, 1, -1, 0, -1 ] ], 2.75 ] - ], - [ - [ [ [ -1, 3, 1, 0, 0, -1 ], [ -1, 2, 1, -1, 0, 0 ], [ -2, 4, 1, -1, 0, 0 ], [ 0, 3, 1, -1, 0, -1 ] ], 1 ], - [ [ [ -1, 3, 1, 0, 0, -1 ], [ -1, 3, 1, -1, 0, 0 ], [ -2, 4, 1, -1, 0, 0 ], [ 0, 3, 1, -1, 0, -1 ] ], 1 ], - [ [ [ -1, 3, 1, 0, 0, -1 ], [ -1, 3, 1, -1, 0, 0 ], [ -1, 3, 1, -1, 0, -1 ], [ 0, 3, 1, -1, 0, -1 ] ], 1.5 ] - ], - [ - [ [ [ -1, 3, 1, 0, 0, -1 ], [ -2, 3, 1, 0, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ 0, 3, 1, -1, 0, -1 ] ], 1.625 ] - ], - [ - [ [ [ 0, 4, 1, -1, 0, -1 ], [ -2, 3, 1, 0, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ 0, 3, 1, -1, 0, -1 ] ], 1 ], - [ [ [ 0, 4, 1, -1, 0, -1 ], [ -2, 3, 1, 0, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ] ], 1 ], - [ [ [ 0, 4, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ] ], 3 ] - ], - [ - [ [ [ 0, 4, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ -2, 4, 1, 0, 0, -1 ] ], 1 ], - [ [ [ 1, 3, 0, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ -2, 4, 1, 0, 0, -1 ] ], 2.625 ] - ], - [ - [ [ [ 1, 3, 0, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ -1, 4, 2, -1, 0, -1 ] ], 1 ], - [ [ [ 0, 3, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ], [ -1, 4, 2, -1, 0, -1 ] ], 1 ], - [ [ [ 0, 3, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 4, 2, -1, 0, -1 ] ], 2.75 ] - ], - [ - [ [ [ 0, 3, 1, -1, 0, -1 ], [ -3, 4, 2, 0, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 4, 2, -1, 0, -1 ] ], 2.375 ] - ], - [ - [ [ [ 0, 3, 1, -1, 0, -1 ], [ -3, 4, 2, 0, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 4, 2, 0, 0, -2 ] ], 3.375 ] - ], - [ - [ [ [ 0, 3, 1, -1, 0, -1 ], [ -3, 4, 2, 0, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 3, 2, -1, 0, -1 ] ], 2.875 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -3, 4, 2, 0, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 3, 2, -1, 0, -1 ] ], 1 ], - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -2, 4, 2, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 3, 2, -1, 0, -1 ] ], 1 ], - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -2, 4, 2, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ] ], 1.875 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ] ], 3.25 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -2, 5, 1, -1, -1, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ] ], 1 ], - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -2, 5, 1, -1, -1, -1 ], [ -2, 5, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ] ], 3.625 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -2, 5, 1, -1, 0, -1 ], [ -1, 3, 1, -1, 0, -1 ] ], 1 ], - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -2, 5, 1, -1, 0, -1 ], [ -2, 4, 1, -1, 0, -1 ] ], 3.25 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -2, 5, 1, -1, 0, -1 ], [ -3, 6, 1, -1, 0, -1 ] ], 1.375 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -1, 4, 1, -1, 0, -1 ], [ -3, 7, 1, -1, 0, -1 ], [ -3, 6, 1, -1, 0, -1 ] ], 1.125 ] - ], - [ - [ [ [ -1, 5, 1, -1, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -3, 7, 1, -1, 0, -1 ], [ -3, 6, 1, -1, 0, -1 ] ], 1.5 ] - ], - [ - [ [ [ -2, 7, 1, -1, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -3, 7, 1, -1, 0, -1 ], [ -3, 6, 1, -1, 0, -1 ] ], 1 ], - [ [ [ -2, 7, 1, -1, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -3, 6, 1, -1, 0, -1 ] ], 2.375 ] - ], - [ - [ [ [ -1, 6, 0, -1, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -3, 6, 1, -1, 0, -1 ] ], 3.625 ] - ], - [ - [ [ [ -1, 6, 0, -1, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 5, 0, -1, 0, -1 ] ], 1 ], - [ [ [ -4, 6, 1, 0, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 5, 0, -1, 0, -1 ] ], 2.125 ] - ], - [ - [ [ [ -3, 6, 1, -1, 0, -1 ], [ -2, 6, 1, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 5, 0, -1, 0, -1 ] ], 1 ], - [ [ [ -3, 6, 1, -1, 0, -1 ], [ -1, 5, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 5, 0, -1, 0, -1 ] ], 3.375 ] - ], - [ - [ [ [ -3, 6, 0, -1, 0, -1 ], [ -1, 5, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 5, 0, -1, 0, -1 ] ], 1 ], - [ [ [ -3, 6, 0, -1, 0, -1 ], [ -1, 5, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -3, 7, 0, -1, 0, -1 ] ], 1.625 ] - ], - [ - [ [ [ -3, 6, 0, -1, 0, -1 ], [ -1, 5, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 6, -1, -1, 0, -1 ] ], 1 ], - [ [ [ -3, 6, 0, -1, 0, -1 ], [ -2, 7, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 0, -1 ], [ -2, 6, -1, -1, 0, -1 ] ], 1 ], - [ [ [ -3, 6, 0, -1, 0, -1 ], [ -2, 7, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 1, -1 ], [ -2, 6, -1, -1, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ -3, 6, 0, -1, 0, -1 ], [ -2, 7, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 1, -1 ], [ -2, 6, 0, -1, 0, -1 ] ], 1 ], - [ [ [ -3, 7, 0, -1, 0, -1 ], [ -2, 7, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 1, -1 ], [ -2, 6, 0, -1, 0, -1 ] ], 2.625 ] - ], - [ - [ [ [ -3, 7, 0, -1, 0, -1 ], [ -2, 7, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 1, -1 ], [ -3, 6, 0, -1, 1, -1 ] ], 1 ], - [ [ [ -2, 6, 0, -1, 1, -2 ], [ -2, 7, 0, -1, 0, -1 ], [ -2, 6, 0, -1, 1, -1 ], [ -3, 6, 0, -1, 1, -1 ] ], 2.25 ] - ], - [ - [ [ [ -2, 6, 0, -1, 1, -2 ], [ -2, 7, 0, -1, 0, -1 ], [ -3, 7, 0, -1, 1, -1 ], [ -3, 6, 0, -1, 1, -1 ] ], 2.125 ] - ], - [ - [ [ [ -2, 6, 0, -1, 1, -2 ], [ -2, 7, -1, -1, 1, -1 ], [ -3, 7, 0, -1, 1, -1 ], [ -3, 6, 0, -1, 1, -1 ] ], 1.375 ] - ], - [ - [ [ [ -3, 6, -1, -1, 1, -1 ], [ -2, 7, -1, -1, 1, -1 ], [ -3, 7, 0, -1, 1, -1 ], [ -3, 6, 0, -1, 1, -1 ] ], 1 ], - [ [ [ -3, 6, -1, -1, 1, -1 ], [ -2, 7, -1, -1, 1, -1 ], [ -3, 7, 0, -1, 1, -1 ], [ -3, 7, -1, -1, 1, -1 ] ], 1.5 ] - ], - [ - [ [ [ -3, 6, -1, -1, 1, -1 ], [ -2, 7, -1, -1, 1, -1 ], [ -2, 6, -1, -1, 1, -1 ], [ -3, 7, -1, -1, 1, -1 ] ], 3.125 ] - ], - [ - [ [ [ -1, 7, -1, -1, 1, -1 ], [ -2, 7, -1, -1, 1, -1 ], [ -2, 6, -1, -1, 1, -1 ], [ -3, 7, -1, -1, 1, -1 ] ], 1 ], - [ [ [ -1, 7, -1, -1, 1, -1 ], [ -2, 7, -1, -1, 1, -1 ], [ -3, 8, -1, -1, 1, -1 ], [ -3, 7, -1, -1, 1, -1 ] ], 2.625 ] - ], - [ - [ [ [ -1, 7, -1, -1, 1, -1 ], [ -2, 7, -1, -2, 1, -1 ], [ -3, 8, -1, -1, 1, -1 ], [ -3, 7, -1, -1, 1, -1 ] ], 1 ], - [ [ [ -2, 9, -1, -1, 1, -1 ], [ -2, 7, -1, -2, 1, -1 ], [ -3, 8, -1, -1, 1, -1 ], [ -3, 7, -1, -1, 1, -1 ] ], 2.625 ] - ], - [ - [ [ [ -2, 9, -1, -1, 1, -1 ], [ -2, 7, -1, -2, 1, -1 ], [ -3, 8, -1, -1, 1, -1 ], [ -4, 9, -1, -1, 1, -1 ] ], 1 ], - [ [ [ -2, 9, -1, -1, 1, -1 ], [ -2, 7, -1, -2, 1, -1 ], [ -4, 10, -1, -1, 1, -1 ], [ -4, 9, -1, -1, 1, -1 ] ], 3.5 ] - ], - [ - [ [ [ -2, 9, -1, -2, 1, -1 ], [ -2, 7, -1, -2, 1, -1 ], [ -4, 10, -1, -1, 1, -1 ], [ -4, 9, -1, -1, 1, -1 ] ], 1 ], - [ [ [ -2, 9, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -4, 10, -1, -1, 1, -1 ], [ -4, 9, -1, -1, 1, -1 ] ], 3.125 ] - ], - [ - [ [ [ -2, 9, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 9, -2, -1, 1, -1 ], [ -4, 9, -1, -1, 1, -1 ] ], 1.25 ] - ], - [ - [ [ [ -2, 9, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 9, -2, -1, 1, -1 ], [ -3, 9, -1, -2, 1, -1 ] ], 3.125 ] - ], - [ - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 9, -2, -1, 1, -1 ], [ -3, 9, -1, -2, 1, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 9, -2, -1, 1, -1 ], [ -3, 8, -1, -2, 1, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 8, -1, -1, 1, -1 ], [ -3, 8, -1, -2, 1, -1 ] ], 2.375 ] - ], - [ - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 8, -1, -1, 1, -1 ], [ -4, 8, 0, -1, 1, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -2, 8, -1, -2, 0, -1 ], [ -4, 8, 0, -1, 1, -1 ] ], 2.875 ] - ], - [ - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 8, -1, -2, 1, 0 ], [ -4, 8, 0, -1, 1, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, 0, -2, 1, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, 0, -2, 1, -1 ] ], 1.625 ] - ], - [ - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, 0, -2, 1, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 0, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 1, -1 ], [ -4, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 1.875 ] - ], - [ - [ [ [ -2, 7, -1, -2, 1, -1 ], [ -4, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 1 ], - [ [ [ -2, 7, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -3, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 2.125 ] - ], - [ - [ [ [ -2, 7, -1, -2, 1, -1 ], [ -4, 8, -1, -1, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 1 ], - [ [ [ -2, 7, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 1 ], - [ [ [ -2, 8, -1, -2, 0, -1 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 1.75 ] - ], - [ - [ [ [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 1 ], - [ [ [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], 3.375 ] - ], - [ - [ [ [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, -1, -2, 1, -1 ], [ -3, 8, -2, -2, 1, -1 ] ], 2.125 ], - [ [ [ -3, 8, -1, -2, 1, 0 ], [ "Rest" ], [ -2, 8, -1, -2, 1, -1 ], [ -3, 8, -2, -2, 1, -1 ] ], 1 ], - [ [ [ -3, 8, -1, -2, 1, 0 ], [ "Rest" ], [ -2, 8, -1, -2, 1, -1 ], [ "Rest" ] ], 1 ], - [ [ [ -3, 8, -1, -2, 1, 0 ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1 ], - [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 3.25 ] - ] - ] -], -"last_changes": -[ - [ [ -2, 7, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], - [ [ -2, 8, -1, -2, 0, -1 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], - [ [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, 0, -2, 0, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], - [ [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, -1, -2, 1, -1 ], [ -3, 8, -1, -2, 0, -1 ] ], - [ [ -3, 8, -1, -2, 1, 0 ], [ -3, 8, -1, -2, 1, -1 ], [ -2, 8, -1, -2, 1, -1 ], [ -3, 8, -2, -2, 1, -1 ] ] -], -"cur_uid": "tmp", -"ref_uid": "nil", -"order_seed": 389930, -"dur_seed": 362766, -"motifs_seed": 479673, -"entrances_probs_vals": [ 0, 0, 2.9365079365079, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"passages_probs_vals": [ 0, 0, 2.7380952380952, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"exits_probs_vals": [ 0, 0, 2.7380952380952, 1, 1, 0, 0.5, 0.5, 0.5, 1, 0.5 ], -"ranges": [ [ -2400, 1200 ], [ -1200, 1200 ], [ -702, 1200 ], [ -702, 1200 ] ], -"step_probs_vals": [ -1200, 1200, 0.0020576131687243, 0.068181818181818, 0.074074074074074, 0.0625, 0.20576131687243, 0.0625, 0.45679012345679, 0.011363636363636, 0.53086419753086, 0, 0.54320987654321, 0.92045454545455, 0.58641975308642, 0.92613636363636, 0.61111111111111, 0, 0.78600823045268, 0.068181818181818, 0.98971193415638, 0.0625 ], -"passages_weights": [ 1, 1, 0.48, 1, 1 ], -"hd_exp": 10, -"hd_invert": 0, -"order": -[ - [ [ 2, 3, 1 ], [ 0 ], [ ] ], - [ [ 1, 3 ], [ 2, 0 ], [ ] ], - [ [ 0, 3 ], [ 2, 1 ], [ ] ], - [ [ 2, 3, 0 ], [ 1 ], [ ] ], - [ [ 1 ], [ 3, 0, 2 ], [ ] ], - [ [ 3, 1 ], [ 2, 0 ], [ ] ], - [ [ 2 ], [ 1, 3, 0 ], [ ] ], - [ [ 2, 1 ], [ 3, 0 ], [ ] ], - [ [ 0, 3 ], [ 1, 2 ], [ ] ], - [ [ 1, 2, 0 ], [ 3 ], [ ] ], - [ [ 1, 0, 3 ], [ 2 ], [ ] ], - [ [ 2 ], [ 0, 3, 1 ], [ ] ], - [ [ 3, 2 ], [ 0, 1 ], [ ] ], - [ [ 2, 1, 0 ], [ 3 ], [ ] ], - [ [ 0, 1, 2 ], [ 3 ], [ ] ], - [ [ 3 ], [ 2, 1, 0 ], [ ] ], - [ [ 3, 1, 2 ], [ 0 ], [ ] ], - [ [ 0, 3, 2 ], [ 1 ], [ ] ], - [ [ 2 ],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], - [ [ 2, 3 ], [ 0, 1 ], [ ] ], - [ [ 3, 1, 0 ], [ 2 ], [ ] ], - [ [ 1, 0, 2 ], [ 3 ], [ ] ], - [ [ 1 ], [ 0, 3, 2 ], [ ] ], - [ [ 0, 1 ], [ 3, 2 ], [ ] ], - [ [ 0 ], [ 2, 3, 1 ], [ ] ], - [ [ 0 ], [ 1, 3, 2 ], [ ] ], - [ [ 2, 3 ], [ 0, 1 ], [ ] ], - [ [ 3 ], [ 2, 1, 0 ], [ ] ], - [ [ 3, 1 ], [ 0, 2 ], [ ] ], - [ [ 0, 2, 1 ], [ 3 ], [ ] ] -], -"sus_weights": [ 0.35, 0.37, 0.38 ], -"order_size": [ 100, 100 ], -"passages_size": [ 0, 0 ], -"motif_edited": "false", -"order_edited": "false" -} \ No newline at end of file diff --git a/resources/string_quartet_3_rise.json b/resources/string_quartet_3_rise.json index 6adddb6..a51a77e 100644 --- a/resources/string_quartet_3_rise.json +++ b/resources/string_quartet_3_rise.json @@ -28,6 +28,6 @@ "4dd2a130", "767e70f0", "536cac90", - "67633b5a" + "5ededd80" ] } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4dd2a130/4dd2a130_mus_model.json b/resources/string_quartet_3_rise/4dd2a130/4dd2a130_mus_model.json index bf4b64e..65401bc 100644 --- a/resources/string_quartet_3_rise/4dd2a130/4dd2a130_mus_model.json +++ b/resources/string_quartet_3_rise/4dd2a130/4dd2a130_mus_model.json @@ -3,29 +3,29 @@ [ [ [ - [ [ [ -5, 5, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -4, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -5, 5, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -4, 4, 0, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 5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5, 4, 1, 2, -1, 2 ] ], 0 ], + [ [ [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_I.ly b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_I.ly index 07fa029..609f925 100644 --- a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_I.ly @@ -1,6 +1,5 @@ { - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} + \time 3/2 + { f'1.^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< IV"\normal-size-super " 1↑" }} ~ } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_II.ly b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_II.ly index 702338f..dff90cd 100644 --- a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_II.ly @@ -1,6 +1,5 @@ { - { f''8^\markup { \pad-markup #0.2 "-38"}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ ais'8[ c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] f''4^\markup { \pad-markup #0.2 "-38"} } - \bar "|" - { cis'1^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}} + { f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< II"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ ais'8[ c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] f''4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} } + { cis''2^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_III.ly b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_III.ly index 683b743..bce6f96 100644 --- a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_III.ly @@ -1,6 +1,5 @@ { - { ais2^\markup { \pad-markup #0.2 "-40"} c'4^\markup { \pad-markup #0.2 "-37"} cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] ~ } - \bar "|" - { f8[ g8^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}] a8^\markup { \pad-markup #0.2 "-11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] ~ ais2} + { ais2^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< IV"\normal-size-super " 3↓" }} c'4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] ~ } + { f8[ g8^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}] a8^\markup { \pad-markup #0.2 "-11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_IV.ly b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_IV.ly index 74ec7e4..4e1dec3 100644 --- a/resources/string_quartet_3_rise/4dd2a130/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/4dd2a130/lilypond/part_IV.ly @@ -1,6 +1,6 @@ { - { c''4^\markup { \pad-markup #0.2 "-37"} cis''2.^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} ~ } - \bar "|" - { cis''8[ c''8^\markup { \pad-markup #0.2 "-37"}] cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ ais'2} + { c'4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< III"\normal-size-super " 1↑" }} cis'2.^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} ~ } + + { cis'8[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis'8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4f53a446/lilypond/part_I.ly b/resources/string_quartet_3_rise/4f53a446/lilypond/part_I.ly index 629df46..9402701 100644 --- a/resources/string_quartet_3_rise/4f53a446/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/4f53a446/lilypond/part_I.ly @@ -17,6 +17,7 @@ \bar "|" { gis1 ~ } \bar "|" - { gis1} + { gis1 \laissezVibrer} + \break \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4f53a446/lilypond/part_II.ly b/resources/string_quartet_3_rise/4f53a446/lilypond/part_II.ly index 74ba4e1..5895980 100644 --- a/resources/string_quartet_3_rise/4f53a446/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/4f53a446/lilypond/part_II.ly @@ -5,7 +5,7 @@ \bar "|" { d'1 } \bar "|" - { cis'1^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} ~ } + { cis'1^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} ~ } \bar "|" { cis'1 ~ } \bar "|" @@ -17,6 +17,6 @@ \bar "|" { cis'1 ~ } \bar "|" - { cis'1} + { cis'1 \laissezVibrer} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4f53a446/lilypond/part_III.ly b/resources/string_quartet_3_rise/4f53a446/lilypond/part_III.ly index 69d6915..956ee96 100644 --- a/resources/string_quartet_3_rise/4f53a446/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/4f53a446/lilypond/part_III.ly @@ -13,10 +13,10 @@ \bar "|" { f'4 ~ f'16[ fis'8.^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↓" }}] ~ fis'2 ~ } \bar "|" - { fis'4 gis'2.^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} ~ } + { fis'4 gis'2.^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }} ~ } \bar "|" { gis'1 ~ } \bar "|" - { gis'1} + { gis'1 \laissezVibrer} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/4f53a446/lilypond/part_IV.ly b/resources/string_quartet_3_rise/4f53a446/lilypond/part_IV.ly index 21a8095..d899504 100644 --- a/resources/string_quartet_3_rise/4f53a446/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/4f53a446/lilypond/part_IV.ly @@ -1,4 +1,5 @@ { + \clef treble { a'2^\markup { \pad-markup #0.2 "+28"} ~ a'16[ ais'8.^\markup { \pad-markup #0.2 "-45"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ ais'4 ~ } \bar "|" { ais'2 c''2^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }} ~ } @@ -13,10 +14,10 @@ \bar "|" { g'4 ~ g'16[ a'8.^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }}] ~ a'2 ~ } \bar "|" - { a'4 gis,2.^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } + { a'4 \clef bass gis,2.^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }} ~ } \bar "|" { gis,1 ~ } \bar "|" - { gis,1} + { gis,1 \laissezVibrer} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/50c2b0ad/50c2b0ad_mus_model.json b/resources/string_quartet_3_rise/50c2b0ad/50c2b0ad_mus_model.json index 10eff06..e91ef34 100644 --- a/resources/string_quartet_3_rise/50c2b0ad/50c2b0ad_mus_model.json +++ b/resources/string_quartet_3_rise/50c2b0ad/50c2b0ad_mus_model.json @@ -25,34 +25,34 @@ [ [ [ -4, 4, -1, 1, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], [ [ [ -5, 4, -1, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -5, 4, -1, 2, -2, 2 ], [ -4, 3, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -5, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -5, 4, -1, 2, -2, 2 ], [ -4, 3, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] + [ [ [ -5, 4, -1, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, -1, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -5, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -2, 4, -1, 1, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -4, 3, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -4, 3, -1, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] + [ [ [ -5, 4, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -2, 4, -1, 1, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 4, 0, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 4, -1, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -3, 3, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -5, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -3, 3, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -4, 3, -1, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 5, 0, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, -1, 3, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], - [ [ [ -4, 4, -1, 2, -1, 2 ], [ -4, 4, -1, 3, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -3, 4, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 5, 0, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, -1, 3, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0 ], + [ [ [ -5, 4, -1, 2, -1, 2 ], [ -4, 4, -1, 3, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_I.ly b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_I.ly index e1ef119..fb30c3e 100644 --- a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_I.ly @@ -1,8 +1,10 @@ { - { cis''2^\markup { \pad-markup #0.2 "-29"} d'2^\markup { \pad-markup #0.2 "-18"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} } + { cis''2^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< II"\normal-size-super " 1↑" }} d'2^\markup { \pad-markup #0.2 "-18"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} } \bar "|" - { dis'1^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} ~ } + { dis'1^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }} ~ } \bar "|" - { dis'1} + \time 7/8 + { dis'2 ~ dis'4. ~} + \time 2/2 \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_II.ly b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_II.ly index 02fc9d9..41b013e 100644 --- a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_II.ly @@ -1,8 +1,8 @@ { - { a'2^\markup { \pad-markup #0.2 "-16"} b'8^\markup { \pad-markup #0.2 "-33"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] d''8^\markup { \pad-markup #0.2 "-18"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}] } + { a'2^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} b'8^\markup { \pad-markup #0.2 "-33"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] d''8^\markup { \pad-markup #0.2 "-18"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}] } \bar "|" - { fis''8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ ais'8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ ais'2 dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ fis''8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}] } + { fis''8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ ais'8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ ais'2 dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ fis''8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}] } \bar "|" - { dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ gis'8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] g'4^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ais2^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}} + { dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ gis'8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] g'4^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} ais4.^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} ~} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_III.ly b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_III.ly index 2c18edf..838910c 100644 --- a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_III.ly @@ -1,8 +1,8 @@ { - { d'8^\markup { \pad-markup #0.2 "-18"}[ dis'8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}[ fis'8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] ~ fis'2 ~ } + { d'8^\markup { \pad-markup #0.2 "-18"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 3↓" }}[ dis'8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}[ fis'8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] ~ fis'2 ~ } \bar "|" - { fis'8[ g'8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] gis8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}[ ais8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] gis8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}[ ais8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] ~ ais4 } + { fis'8[ g'8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] gis'8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}[ ais'8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] gis'8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}[ ais'8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] ~ ais'4 } \bar "|" - { gis4^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↓" }} g8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ d''8^\markup { \pad-markup #0.2 "+26"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] cis''4^\markup { \pad-markup #0.2 "+6"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}} + { gis'4^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} g'8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis''8^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ dis''8[ d''8^\markup { \pad-markup #0.2 "+26"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↑" }} cis''8^\markup { \pad-markup #0.2 "+6"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}]} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_IV.ly b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_IV.ly index 5f683d4..0bd8aeb 100644 --- a/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/50c2b0ad/lilypond/part_IV.ly @@ -1,8 +1,8 @@ { - { ais2^\markup { \pad-markup #0.2 "+40"} fis2^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } + { ais2 fis2^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } \bar "|" - { fis8[ g8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] dis2^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} ais'4^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } + { fis8[ g8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] dis2^\markup { \pad-markup #0.2 "+38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} ais4^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } \bar "|" - { ais'2 gis'8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}[ g'8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] a'4^\markup { \pad-markup #0.2 "-11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}} + { ais2 gis8^\markup { \pad-markup #0.2 "+36"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}[ g8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} a8^\markup { \pad-markup #0.2 "-11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}] ~} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/536cac90/536cac90_mus_model.json b/resources/string_quartet_3_rise/536cac90/536cac90_mus_model.json index c479c84..cf23fc2 100644 --- a/resources/string_quartet_3_rise/536cac90/536cac90_mus_model.json +++ b/resources/string_quartet_3_rise/536cac90/536cac90_mus_model.json @@ -9,30 +9,30 @@ [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ] ], 0.25 ], - [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ] ], 0 ], - [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ] ], 0.25 ], - [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, 0, 2 ], [ -6, 3, 1, 3, -1, 2 ] ], 0.25 ], - [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -4, 2, 1, 2, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ] ], 0.25 ], - [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 2, 2, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ] ], 0.25 ] + [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 3, 1, 3, -1, 2 ] ], 0.25 ], + [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 3, 1, 3, -1, 2 ] ], 0 ], + [ [ [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, 1, 2, -1, 2 ], [ -5, 3, 2, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -4, 3, 1, 2, -1, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/536cac90/lilypond/part_I.ly b/resources/string_quartet_3_rise/536cac90/lilypond/part_I.ly index 3694e4e..15327de 100644 --- a/resources/string_quartet_3_rise/536cac90/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/536cac90/lilypond/part_I.ly @@ -1,10 +1,10 @@ { - { f'2^\markup { \pad-markup #0.2 "-38"} g2^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↑" }} ~ } + \time 2/2 + { f'2^\markup { \pad-markup #0.2 "-38"} g'2^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↑" }} ~ } \bar "|" - { g8[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ ais'2. ~ } - \bar "|" - { ais'1 ~ } - \bar "|" - { ais'1} -\bar "||" + { g'8[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ ais'2. ~ } + \bar "|" +\time 7/8 + { ais'2 ~ ais'4.} +\bar "|" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/536cac90/lilypond/part_II.ly b/resources/string_quartet_3_rise/536cac90/lilypond/part_II.ly index 0db5273..721ffe2 100644 --- a/resources/string_quartet_3_rise/536cac90/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/536cac90/lilypond/part_II.ly @@ -1,10 +1,8 @@ { - { d'2^\markup { \pad-markup #0.2 "+30"} ~ d'8[ f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] dis'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] } + { d'2^\markup { \pad-markup #0.2 "+30"} ~ d'8[ f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] dis'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] } \bar "|" - { cis'4^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} c'8^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}[ fis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] ~ fis'2 } + { cis'4^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} c'8^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}[ fis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] ~ fis'2 } \bar "|" - { f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}[ dis'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}] f'4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} dis''4^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} ~ } - \bar "|" - { dis''1} -\bar "||" + { f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}] f'4.^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}} +\bar "|" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/536cac90/lilypond/part_III.ly b/resources/string_quartet_3_rise/536cac90/lilypond/part_III.ly index 482b168..4532b3a 100644 --- a/resources/string_quartet_3_rise/536cac90/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/536cac90/lilypond/part_III.ly @@ -1,10 +1,8 @@ { - { ais8^\markup { \pad-markup #0.2 "+13"}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] b8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] ~ ais2 ~ } + { ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] b8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] ~ ais2 ~ } \bar "|" - { ais4 ~ ais8[ c'8^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}] cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] cis'8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ } + { ais4 ~ ais8[ c'8^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}] cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] cis'8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ } \bar "|" - { ais4 c'4^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }} cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ dis'8[ f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ } - \bar "|" - { f'8[ dis'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] e'2.^\markup { \pad-markup #0.2 "+8"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}} -\bar "||" + { ais4 c'4^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }} cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ dis'8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}} +\bar "|" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/536cac90/lilypond/part_IV.ly b/resources/string_quartet_3_rise/536cac90/lilypond/part_IV.ly index d228079..1593bf8 100644 --- a/resources/string_quartet_3_rise/536cac90/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/536cac90/lilypond/part_IV.ly @@ -1,10 +1,8 @@ { { f2^\markup { \pad-markup #0.2 "-38"} ~ f8[ ais,8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ ais,4 ~ } \bar "|" - { ais,4 ~ ais,8[ c8^\markup { \pad-markup #0.2 "-9"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] cis2^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }} } + { ais,4 ~ ais,8[ g8^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}] ~ g4 ~ g8[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ } \bar "|" - { dis1^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }} } - \bar "|" - { f8^\markup { \pad-markup #0.2 "-38"}[ dis8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}] e2.^\markup { \pad-markup #0.2 "+8"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}} -\bar "||" + { ais8 dis4^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} ~ dis2} +\bar "|" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/567a9375/lilypond/part_I.ly b/resources/string_quartet_3_rise/567a9375/lilypond/part_I.ly index 07fa029..010fba1 100644 --- a/resources/string_quartet_3_rise/567a9375/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/567a9375/lilypond/part_I.ly @@ -1,6 +1,6 @@ { - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} + \time 10/8 + { f'2^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< II"\normal-size-super " 1↑" }} ~ } + { f'2. } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/567a9375/lilypond/part_II.ly b/resources/string_quartet_3_rise/567a9375/lilypond/part_II.ly index 720922d..e174f98 100644 --- a/resources/string_quartet_3_rise/567a9375/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/567a9375/lilypond/part_II.ly @@ -1,6 +1,4 @@ { - { cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}[ b8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}] ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] ais4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c'4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} ~ } - \bar "|" - { c'1} + { cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< II"\normal-size-super " 5↓" }}[ b8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }} ] ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} [ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] ais4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c'2^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/567a9375/lilypond/part_III.ly b/resources/string_quartet_3_rise/567a9375/lilypond/part_III.ly index 1098871..d6e4887 100644 --- a/resources/string_quartet_3_rise/567a9375/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/567a9375/lilypond/part_III.ly @@ -1,6 +1,5 @@ { - { d4^\markup { \pad-markup #0.2 "+30"} f4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} e8^\markup { \pad-markup #0.2 "+8"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}[ dis8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] f4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} } - \bar "|" - { g8^\markup { \pad-markup #0.2 "-35"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}[ gis8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}] ~ gis2.} + { d4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} f4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} e8^\markup { \pad-markup #0.2 "+8"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}[ dis8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] f4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} } + { g8^\markup { \pad-markup #0.2 "-35"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}[ gis8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}] } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/567a9375/lilypond/part_IV.ly b/resources/string_quartet_3_rise/567a9375/lilypond/part_IV.ly index 4b11c42..2ee0a1e 100644 --- a/resources/string_quartet_3_rise/567a9375/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/567a9375/lilypond/part_IV.ly @@ -1,6 +1,5 @@ { - { ais,2.^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} c8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ cis8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}] ~ } - \bar "|" - { cis8[ d8^\markup { \pad-markup #0.2 "-5"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↓" }}] ~ d2.} + { ais,2.^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< II"\normal-size-super " 3↓" }} c8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}[ cis8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}] ~ } + { cis8[ d8^\markup { \pad-markup #0.2 "-5"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↓" }}] } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3/4ff624b0/4ff624b0_code.scd b/resources/string_quartet_3_rise/5ededd80/5ededd80_code.scd similarity index 96% rename from resources/string_quartet_3/4ff624b0/4ff624b0_code.scd rename to resources/string_quartet_3_rise/5ededd80/5ededd80_code.scd index 0d8c24b..d8f0e14 100644 --- a/resources/string_quartet_3/4ff624b0/4ff624b0_code.scd +++ b/resources/string_quartet_3_rise/5ededd80/5ededd80_code.scd @@ -172,7 +172,7 @@ genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; var env, pTable, durFunc; env = Env.pairs([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).asSignal(256).asList.asArray; pTable = env.asRandomTable; - [chordProb, minPad, maxPad, minDur, maxDur, envData].postln; + //[chordProb, minPad, maxPad, minDur, maxDur, envData].postln; durFunc = {arg allowChord, pad = false; var res; res = if(allowChord.not, { @@ -189,7 +189,7 @@ genDurFunc = {arg chordProb, minPad, maxPad, minDur, maxDur, envData, seed; genStepFunc = {arg minStep, maxStep, envData, seed; var envDataNorm, env, pTable, stepFunc; - [minStep, maxStep, envData].postln; + //[minStep, maxStep, envData].postln; envDataNorm = ([[0, 0]] ++ envData.clump(2) ++ [[1, 0]]).flop; envDataNorm = [envDataNorm[0].normalize(minStep, maxStep), envDataNorm[1]].flop; env = Env.pairs(envDataNorm); @@ -203,13 +203,21 @@ genOrders = {arg minMotifLength = 1, maxMotifLength = 5, minProgLength = 0, maxP ((maxMotifLength.asInteger - minMotifLength.asInteger).rand + minMotifLength.asInteger).collect({ var noProgIns, noSusIns, noSilentIns, prog, sus, silent, order; noSusIns = [1, 2, 3].wchoose(susWeights.normalizeSum); + //noProgIns = (popSize - noSusIns).rand + 1; noProgIns = (popSize - noSusIns); noSilentIns = popSize - noSusIns - noProgIns; + /* + noSilentIns = (popSize - noSusIns).rand.clip(0, 1); + noProgIns = popSize - noSusIns - noSilentIns; + */ + # prog, sus, silent = (0..(popSize-1)).scramble.clumps([noProgIns, noSusIns, noSilentIns]); prog = (prog.scramble ++ ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}).scramble); + //prog = ((maxProgLength.asInteger - minProgLength.asInteger).rand + minProgLength.asInteger).collect({prog.choose}); + if(silent == nil, {silent = []}); [sus.scramble, prog, silent.scramble] }); @@ -222,14 +230,14 @@ updateVoices = {arg ins, sus; candidates = sus.collect({arg v; tuples.collect({arg t; voices[v] + t})}).flatten; candidates = difference(candidates.asSet, voices.asSet).asList; + //candidates.select({arg item; (item ++ voices).asSet.size >= 4}); nProbs = candidates.collect({arg candidate; var stepScore, recentlySoundedScore, isInRangeScore, regScore, hdScore; //stepScore = intervalScore.value(voices[ins], candidate, 30, 400, 0.1); stepScore = intervalScore.value(voices[ins], candidate, 100, 100); recentlySoundedScore = inclusionScore.value(lastXChanges.flop[ins], candidate, 0.01); - - + //recentlySoundedScore = inclusionScore.value(lastXChanges.flatten.collect({arg item; item.drop(1)}), candidate.drop(1), 0.01); /* if(rangeScore.value(candidate.collect({0}), voices[ins], ranges[ins][1] - 500, ranges[ins][1], 0, true) == 1, { @@ -261,10 +269,13 @@ updateVoices = {arg ins, sus; nProbs = nProbs.flop.select({arg scores, s; nWeights[s] != 0}).flop; nWeights = nWeights.select({arg weight; weight != 0}); nProbs = nProbs.flop.collect({arg scores, s; - if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}) + if(scores.sum == 0, {scores}, {scores.normalizeSum * nWeights[s]}).postln; }); nProbs = nProbs.flop.collect({arg scores, s; scores.product}).normalizeSum; + nProbs.round(0.001).postln; + [candidates, nProbs.round(0.001)].flop.postln; + sel = candidates.wchoose(nProbs); voices[ins] = sel; @@ -316,6 +327,7 @@ genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLa }); // pad ending + /* if(orderIndex == (orders.size - 1), { (0..(popSize-1)).scramble.do({arg ins; if(res.last.first[ins] != ["Rest"], { @@ -328,6 +340,7 @@ genSubMotif = {arg order, orderIndex, lastState, repeatLast = false, startFromLa }); }); }); + */ //format and return if(startFromLast, {lastXChanges = lastXChangesHold.deepCopy}); @@ -350,7 +363,8 @@ genMotif = { orders.do({arg order, o; var lastState, subMotif; - lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); + //lastState = if(o == 0, {popSize.collect({["Rest"]})}, {motif.last.last.first}); + lastState = if(o == 0, {lastXChanges.last.deepCopy}, {motif.last.last.first}); subMotif = genSubMotif.value(order, o, lastState, isLastOrder: o == (orders.size - 1)); motif = motif.add(subMotif); @@ -362,10 +376,12 @@ genMotif = { }); //round last duration to measure + /* fDur = fSeq.flatten.flatten.slice(nil, 1).sum; durAdd = fDur.round(4) - fDur; if(durAdd < 0, {durAdd = 4 - durAdd}); fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] = fSeq[0][orders.size - 1][fSeq[0][orders.size - 1].size - 1][1] + durAdd; + */ fSeq }; @@ -411,11 +427,12 @@ Event.addEventType(\osc, { genPatterns = {arg inSeq, addr, oneShot = false; var voices, durs, pbinds, res, indices, sectionDurs, msg, ids, seq; seq = inSeq.collect({arg mSeq; mSeq[0]}); - # voices, durs = seq.flatten2(seq.maxDepth - 5).flop; + //# voices, durs = seq.flatten2(seq.maxDepth - 5).flop; + # voices, durs = seq.flatten2(if(oneShot, {2}, {3})).flop; pbinds = voices.flop.collect({arg voice, v; var clumps, hdScores, freqs, fDurs, attacks, rels, amps; clumps = voice.separate({arg a, b; a != b }); - freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(60.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); + freqs = clumps.collect({arg clump; if(clump[0] != ["Rest"], {(62.midicps * hsArrayToFreq.value(clump[0]))}, {Rest(0)})}); fDurs = durs.clumps(clumps.collect({arg clump; clump.size})).collect({arg clump; clump.sum}); //attacks = 2.collect({rrand(1, 3)}) ++ freqs.drop(2).collect({rrand(0.3, 0.5)}); attacks = fDurs.collect({arg dur; dur * rrand(0.2, 0.4)}); @@ -452,7 +469,7 @@ genPatterns = {arg inSeq, addr, oneShot = false; if(oneShot.not, { msg = inSeq.collect({arg mSeq, m; mSeq[1..]}); //ids = inSeq.collect({arg mSeq, m; mSeq[2]}); - sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(mSeq.maxDepth - 5).flop[1].sum}); + sectionDurs = seq.collect({arg mSeq; mSeq.flatten2(2).flop[1].sum}); pbinds = pbinds ++ [ Pbind( @@ -843,6 +860,8 @@ OSCdef(\transport, {arg msg, time, addr, port; }, { // the cued sequence can now be read from file, so this can be cleaned up var cSize, patterns, pSeq, cuedSeek, indexStart, indexEnd, tmpLedger; + group.freeAllMsg; + //group = Group.new; if(msg[1] == 1, { pSeq = []; cuedSeek = (seq != nil); diff --git a/resources/string_quartet_3_rise/5ededd80/5ededd80_mus_model.json b/resources/string_quartet_3_rise/5ededd80/5ededd80_mus_model.json new file mode 100644 index 0000000..c740609 --- /dev/null +++ b/resources/string_quartet_3_rise/5ededd80/5ededd80_mus_model.json @@ -0,0 +1,54 @@ +{ +"music_data": +[ + [ + [ + [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 3, -1, 2 ], [ -4, 3, 2, 2, -1, 2 ] ], 0.25 ], + [ [ [ -5, 2, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 3 ], [ -4, 3, 1, 2, 0, 2 ] ], 0.25 ], + + [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -4, 3, 1, 2, 0, 2 ] ], 0.25 ], + [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, 0, 2 ], [ -4, 4, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ -7, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 2, 2, -1, 2 ], [ -4, 3, 1, 2, -1, 3 ] ], 0.25 ], + [ [ [ -7, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -4, 3, 1, 3, -1, 2 ] ], 0.25 ], + [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 3, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ -6, 3, 1, 2, -1, 2 ], [ "Rest" ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 3, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ -6, 3, 1, 2, -1, 2 ], [ "Rest" ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 3, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ "Rest" ], [ "Rest" ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 3, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ "Rest" ], [ "Rest" ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 3, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 1.5 ], + [ [ [ "Rest" ], [ "Rest" ], [ "Rest" ], [ "Rest" ] ], 2.25 ] + ] + ] +], +"last_changes": +[ + [ [ -4, 2, 1, 3, -1, 2 ], [ -4, 2, 0, 2, -1, 2 ], [ -3, 2, 1, 2, -1, 2 ], [ -3, 1, 1, 2, -1, 2 ] ], + [ [ -4, 2, 1, 3, -1, 2 ], [ -4, 2, 0, 2, -1, 2 ], [ -3, 2, 1, 2, -1, 2 ], [ -4, 2, 2, 2, -1, 2 ] ], + [ [ -3, 2, 0, 2, -1, 2 ], [ -4, 2, 0, 2, -1, 2 ], [ -3, 2, 1, 2, -1, 2 ], [ -4, 2, 2, 2, -1, 2 ] ], + [ [ -3, 2, 0, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 2, 1, 2, -1, 2 ], [ -4, 2, 2, 2, -1, 2 ] ], + [ [ -4, 3, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -3, 2, 1, 2, -1, 2 ], [ -4, 2, 2, 2, -1, 2 ] ] +], +"cur_uid": "5ededd80", +"ref_uid": "536cac90", +"order_seed": 445563, +"dur_seed": 232539, +"motifs_seed": 702074, +"entrances_probs_vals": [ 0.78, 0, 0, 0, 1.02, 0.0098039215686275, 0, 0.20915032679739, 0, 0.24183006535948, 0.82432432432432, 0.28758169934641, 0, 1, 0 ], +"passages_probs_vals": [ 0.78, 0, 0, 0, 1.02, 0.0098039215686275, 0, 0.20915032679739, 0, 0.24183006535948, 0.82432432432432, 0.28758169934641, 0, 1, 0 ], +"exits_probs_vals": [ 0.78, 0, 0, 0, 1.02, 0.0098039215686275, 0, 0.20915032679739, 0, 0.24183006535948, 0.82432432432432, 0.28758169934641, 0, 1, 0 ], +"ranges": [ [ -2400, 1200 ], [ -1200, 1453 ], [ -702, 1694 ], [ -702, 1973 ] ], +"step_probs_vals": [ -1200, 1200, 0, 0, 0.41358024691358, 0.0056818181818177, 0.45884773662551, 0.5, 0.52057613168724, 0, 0.56378600823045, 0.85795454545455, 0.60082304526749, 0, 1, 0 ], +"passages_weights": [ 1, 0.15, 0.43, 1, 1 ], +"hd_exp": 10, +"hd_invert": 0, +"order": +[ + [ [ 2 ], [ 3, 0, 1, 1, 3, 0, 1 ], [ ] ], + [ [ 2 ], [ 3, 0, 1, 0 ], [ ] ] +], +"sus_weights": [ 0.7, 0, 0 ], +"order_size": [ 2, 2.0102040816327 ], +"passages_size": [ 0, 6 ], +"motif_edited": "true", +"order_edited": "false" +} \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ededd80/lilypond/part_I.ly b/resources/string_quartet_3_rise/5ededd80/lilypond/part_I.ly new file mode 100644 index 0000000..f805aa2 --- /dev/null +++ b/resources/string_quartet_3_rise/5ededd80/lilypond/part_I.ly @@ -0,0 +1,5 @@ +{ + \time 2/2 + { cis''8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 5↑" }}[ dis''8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 11↑" }}] ~ dis''8[ f''8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 1↑" }}] fis''8^\markup { \pad-markup #0.2 "+0"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 13↑" }}[ g''8^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 7↑" }}] ais''4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 1↑" }} ~ } +\bar "|." +} \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ededd80/lilypond/part_II.ly b/resources/string_quartet_3_rise/5ededd80/lilypond/part_II.ly new file mode 100644 index 0000000..4495835 --- /dev/null +++ b/resources/string_quartet_3_rise/5ededd80/lilypond/part_II.ly @@ -0,0 +1,4 @@ +{ + { g'8^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 7↑" }}[ fis'8^\markup { \pad-markup #0.2 "+0"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 13↑" }}] f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 3↑" }}[ dis'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 11↑" }}] cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 5↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 3↑" }}] ais4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} ~ } +\bar "||" +} \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ededd80/lilypond/part_III.ly b/resources/string_quartet_3_rise/5ededd80/lilypond/part_III.ly new file mode 100644 index 0000000..a9b05e8 --- /dev/null +++ b/resources/string_quartet_3_rise/5ededd80/lilypond/part_III.ly @@ -0,0 +1,4 @@ +{ + { g1^\markup { \pad-markup #0.2 "-38"} } +\bar "||" +} \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ededd80/lilypond/part_IV.ly b/resources/string_quartet_3_rise/5ededd80/lilypond/part_IV.ly new file mode 100644 index 0000000..e81d92e --- /dev/null +++ b/resources/string_quartet_3_rise/5ededd80/lilypond/part_IV.ly @@ -0,0 +1,4 @@ +{ + { f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 3↑" }}[ dis8^\markup { \pad-markup #0.2 "-42"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 3↓" }}] f4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 3↑" }} f,4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 3↑" }} ais,4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ ""\normal-size-super " 1↑" }} ~ } +\bar "|." +} \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ef20586/5ef20586_mus_model.json b/resources/string_quartet_3_rise/5ef20586/5ef20586_mus_model.json index bee7f3b..2e25b90 100644 --- a/resources/string_quartet_3_rise/5ef20586/5ef20586_mus_model.json +++ b/resources/string_quartet_3_rise/5ef20586/5ef20586_mus_model.json @@ -3,29 +3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, 1, 2, -1, 2 ], [ -6, 4, 2, 2, -1, 2 ], [ -4, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, 0, 2 ] ], 0 ], + [ [ [ -5, 4, 1, 2, -1, 2 ], [ -6, 4, 1, 2, 0, 2 ], [ -4, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, 0, 2 ] ], 0.25 ], + [ [ [ -5, 4, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -4, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, 0, 2 ] ], 0 ], + [ [ [ -5, 4, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -4, 4, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/5ef20586/lilypond/part_I.ly b/resources/string_quartet_3_rise/5ef20586/lilypond/part_I.ly index 07fa029..d11e1ac 100644 --- a/resources/string_quartet_3_rise/5ef20586/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/5ef20586/lilypond/part_I.ly @@ -1,6 +1,6 @@ { - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} + { ais'2.^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 3↓" }} ~ ais'8[ gis'8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] } + { ais'8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↑" }}[ c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] } \bar "||" +\break } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ef20586/lilypond/part_II.ly b/resources/string_quartet_3_rise/5ef20586/lilypond/part_II.ly index 5701ebe..ccdb9b3 100644 --- a/resources/string_quartet_3_rise/5ef20586/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/5ef20586/lilypond/part_II.ly @@ -1,6 +1,5 @@ { - { d''8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}[ f''8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] g''8^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] gis4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }} f''4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} ~ } - \bar "|" - { f''1} + { d''8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 7↑" }}[ f''8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] g''8^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] gis'4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} f''2^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} } + \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ef20586/lilypond/part_III.ly b/resources/string_quartet_3_rise/5ef20586/lilypond/part_III.ly index 3195a24..f1cb2cc 100644 --- a/resources/string_quartet_3_rise/5ef20586/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/5ef20586/lilypond/part_III.ly @@ -1,6 +1,6 @@ { - { cis'4^\markup { \pad-markup #0.2 "-25"} d'4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }} cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ ais8[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↑" }}] } - \bar "|" - { ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}] ~ c'2.} + { cis'4^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< II"\normal-size-super " 1↑" }} d'4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }} cis'8^\markup { \pad-markup #0.2 "+46"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ ais8[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] } + + { ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}]} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5ef20586/lilypond/part_IV.ly b/resources/string_quartet_3_rise/5ef20586/lilypond/part_IV.ly index 2385283..a2aad51 100644 --- a/resources/string_quartet_3_rise/5ef20586/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/5ef20586/lilypond/part_IV.ly @@ -1,6 +1,6 @@ { - { ais'2.^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} ~ ais'8[ gis'8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] } - \bar "|" - { ais'8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 11↑" }}[ c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ c''2.} + { f'2^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} ~ } + + { f'2.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5f0075ab/5f0075ab_mus_model.json b/resources/string_quartet_3_rise/5f0075ab/5f0075ab_mus_model.json index 11843ff..59ba63a 100644 --- a/resources/string_quartet_3_rise/5f0075ab/5f0075ab_mus_model.json +++ b/resources/string_quartet_3_rise/5f0075ab/5f0075ab_mus_model.json @@ -19,7 +19,7 @@ [ [ [ [ -6, 4, 1, 1, -1, 2 ], [ -5, 4, 2, 1, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], [ [ [ -6, 4, 1, 1, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -7, 4, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] + [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] ], [ [ [ [ -5, 3, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], diff --git a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_I.ly b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_I.ly index 07fa029..d0aefbb 100644 --- a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_I.ly @@ -1,6 +1,5 @@ { - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} + { f'2^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< III"\normal-size-super " 1↑" }} ~ } + { f'2.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_II.ly b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_II.ly index 775b507..5e0b680 100644 --- a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_II.ly @@ -1,6 +1,4 @@ { - { c''8^\markup { \pad-markup #0.2 "-37"}[ ais'8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↑" }}] g'8^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ gis'8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ais'4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} c''8^\markup { \pad-markup #0.2 "-37"}[ cis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] ~ } - \bar "|" - { cis''1} + { c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }}[ ais'8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↑" }} ] g'8^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} [ gis'8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ais'4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} cis''4.^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_III.ly b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_III.ly index 46fcd27..3db9246 100644 --- a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_III.ly @@ -1,6 +1,6 @@ { - { g4^\markup { \pad-markup #0.2 "-7"} ~ g8[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] ~ gis8[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] b8^\markup { \pad-markup #0.2 "-21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}[ cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] } - \bar "|" - { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ c'2.} + { g4^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }} ~ g8[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ~ gis8[ ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] b8^\markup { \pad-markup #0.2 "-21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}[ cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] } + + { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_IV.ly b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_IV.ly index a3fcbc8..b3e4c71 100644 --- a/resources/string_quartet_3_rise/5f0075ab/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/5f0075ab/lilypond/part_IV.ly @@ -1,6 +1,5 @@ { - { f,4^\markup { \pad-markup #0.2 "-38"} g,2^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ g,8[ f,8^\markup { \pad-markup #0.2 "-38"}] } - \bar "|" - { fis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ f2.} + { f,4^\markup { \pad-markup #0.2 "-38"} g,2^\markup { \pad-markup #0.2 "-7"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ g,8[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] } + { fis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↓" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/61207e49/61207e49_mus_model.json b/resources/string_quartet_3_rise/61207e49/61207e49_mus_model.json index 55a3e7c..f28e746 100644 --- a/resources/string_quartet_3_rise/61207e49/61207e49_mus_model.json +++ b/resources/string_quartet_3_rise/61207e49/61207e49_mus_model.json @@ -3,95 +3,95 @@ [ [ [ - [ [ [ -6, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 6, -2, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 3 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 3 ] ], 0.25 ] ], [ - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 2, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 3 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 2, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 3 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 7, -1, 0, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 7, -1, 0, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 3 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 0, -2, 2 ] ], 0 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 0, -2, 2 ] ], 0.25 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 3 ] ], 0.25 ] ], [ - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -6, 8, -1, 1, -2, 3 ], [ -5, 7, -1, 1, -2, 3 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -6, 8, -1, 1, -2, 3 ], [ -5, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -6, 9, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -6, 8, -1, 1, -2, 3 ], [ -5, 7, -1, 1, -2, 3 ] ], 0 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -6, 8, -1, 1, -2, 3 ], [ -5, 8, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -6, 9, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -6, 9, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 8, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 7, -2, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -6, 9, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 8, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 7, -1, 1, -1, 2 ], [ -4, 7, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 7, -1, 1, -1, 2 ], [ -5, 7, -1, 1, -1, 2 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 7, -1, 1, -1, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 7, -1, 1, -1, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 7, -1, 1, -1, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -1, 2 ], [ -4, 7, -2, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 7, -1, 1, -1, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 8, -1, 1, -2, 2 ], [ -4, 7, -2, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 3 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -3, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 3 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 3 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -3, 6, -2, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 6, -2, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 3 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 3 ], [ -3, 6, -1, 1, -2, 1 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 3 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -4, 7, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 1 ], [ -3, 6, -2, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 6, -2, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -5, 6, 0, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -5, 6, 0, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -4, 6, -2, 1, -3, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ] ], 0.25 ] + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -3, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -3, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -3, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -3, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 5, -1, 1, -3, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 1, -3, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 1, -3, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -3, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -4, 5, -1, 1, -3, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -4, 4, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -4, 4, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -4, 5, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -3, 2 ] ], 0 ], + [ [ [ -4, 5, -1, 1, -3, 2 ], [ -5, 7, -1, 1, -3, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -3, 2 ] ], 0 ], + [ [ [ -4, 5, -1, 1, -3, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -3, 2 ] ], 0.25 ], + [ [ [ -4, 5, -1, 1, -3, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -4, 4, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -4, 4, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -4, 5, -1, 0, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 5, 0, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -4, 5, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -4, 5, -1, 0, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, 0, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -4, 5, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 5, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -4, 5, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 2, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/61207e49/lilypond/part_I.ly b/resources/string_quartet_3_rise/61207e49/lilypond/part_I.ly index 4059675..fdce0c4 100644 --- a/resources/string_quartet_3_rise/61207e49/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/61207e49/lilypond/part_I.ly @@ -1,14 +1,15 @@ { - { gis2^\markup { \pad-markup #0.2 "-27"} gis''2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} } + \time 2/2 + { cis''2^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< III"\normal-size-super " 1↑" }} dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}[ e''8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] f''8^\markup { \pad-markup #0.2 "+41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}[ dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] } \bar "|" - { dis'1^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} ~ } + { e''8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}[ dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ dis''2 f'8^\markup { \pad-markup #0.2 "+6"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }}[ g'8^\markup { \pad-markup #0.2 "-39"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] } \bar "|" - { dis'2. ~ dis'8[ e'8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}] } + { ais'8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ b'8^\markup { \pad-markup #0.2 "+15"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 13↑" }}] ais'4^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} b'4^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} ~ b'8[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] } \bar "|" - { c'2^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} ais8^\markup { \pad-markup #0.2 "+35"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }}[ a8^\markup { \pad-markup #0.2 "+23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}] ~ a4 } + { dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}[ e''8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] ~ e''8[ d''8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}] ~ d''2 } \bar "|" - { gis8^\markup { \pad-markup #0.2 "-27"}[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ cis''2. ~ } - \bar "|" - { cis''1} + \time 9/8 + { g'8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 11↓" }} fis'4^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↓" }} gis'4.^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }} ~ gis'8 a'4^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} } +\time 2/2 \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/61207e49/lilypond/part_II.ly b/resources/string_quartet_3_rise/61207e49/lilypond/part_II.ly index 396cce5..9b0f13e 100644 --- a/resources/string_quartet_3_rise/61207e49/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/61207e49/lilypond/part_II.ly @@ -1,14 +1,12 @@ { - { cis'2^\markup { \pad-markup #0.2 "-29"} dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}[ e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] f'8^\markup { \pad-markup #0.2 "+41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}[ dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] } + { dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 3↑" }}[ e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] f'8^\markup { \pad-markup #0.2 "+41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ gis'2 ~ } \bar "|" - { e''8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}[ dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ dis''2 f''8^\markup { \pad-markup #0.2 "+6"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }}[ g''8^\markup { \pad-markup #0.2 "-39"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] } + { gis'8[ ais'8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] b'8^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}[ c''8^\markup { \pad-markup #0.2 "+43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↑" }}] b'8^\markup { \pad-markup #0.2 "+15"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 13↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}] ~ gis'4 } \bar "|" - { ais'8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ b'8^\markup { \pad-markup #0.2 "+15"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}] ais'4^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} b'4^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} ~ b'8[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] } + { g'4^\markup { \pad-markup #0.2 "-39"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }} fis'8^\markup { \pad-markup #0.2 "+17"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}[ f'8^\markup { \pad-markup #0.2 "-21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] fis'8^\markup { \pad-markup #0.2 "+34"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 13↓" }}[ gis'8^\markup { \pad-markup #0.2 "+26"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↑" }}] ais'8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}[ b'8^\markup { \pad-markup #0.2 "+32"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↓" }}] ~ } \bar "|" - { dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}[ e''8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] ~ e''8[ d''8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}] ~ d''2 } + { b'4 cis''4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }} c''4^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] ~ } \bar "|" - { g'8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ fis'8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}] ~ fis'8[ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] ~ gis'4 ~ gis'8[ a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ } - \bar "|" - { a'1} + { cis''2. ~ cis''4.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/61207e49/lilypond/part_III.ly b/resources/string_quartet_3_rise/61207e49/lilypond/part_III.ly index 557b99b..b5f44bf 100644 --- a/resources/string_quartet_3_rise/61207e49/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/61207e49/lilypond/part_III.ly @@ -1,14 +1,12 @@ { - { dis'8^\markup { \pad-markup #0.2 "-25"}[ e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] f'8^\markup { \pad-markup #0.2 "+41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}] ~ gis'2 ~ } + { gis2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} gis''2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} } \bar "|" - { gis'8[ ais'8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}] b'8^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c''8^\markup { \pad-markup #0.2 "+43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↑" }}] b'8^\markup { \pad-markup #0.2 "+15"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 13↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}] ~ gis'4 } + { dis'1^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} ~ } \bar "|" - { g'4^\markup { \pad-markup #0.2 "-39"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} fis'8^\markup { \pad-markup #0.2 "+17"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}[ f'8^\markup { \pad-markup #0.2 "-21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] fis'8^\markup { \pad-markup #0.2 "+34"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}[ gis'8^\markup { \pad-markup #0.2 "+26"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ais'8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}[ b'8^\markup { \pad-markup #0.2 "+32"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↓" }}] ~ } + { dis'2. ~ dis'8[ e'8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}] } \bar "|" - { b'4 cis''4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }} c''4^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}[ cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] ~ } + { c'2^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} ais8^\markup { \pad-markup #0.2 "+35"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ a8^\markup { \pad-markup #0.2 "+23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ a4 } \bar "|" - { cis'1 ~ } - \bar "|" - { cis'1} + { gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }} cis'4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} ~ cis'2.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/61207e49/lilypond/part_IV.ly b/resources/string_quartet_3_rise/61207e49/lilypond/part_IV.ly index 1d4967b..4a1c871 100644 --- a/resources/string_quartet_3_rise/61207e49/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/61207e49/lilypond/part_IV.ly @@ -1,14 +1,13 @@ { - { gis,2^\markup { \pad-markup #0.2 "-27"} gis2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } + { gis,2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} gis2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} ~ } \bar "|" - { gis8[ ais8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] b2^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }} ais4^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} ~ } + { gis8[ ais8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] b2^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} ais4^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }} ~ } \bar "|" - { ais2 b8^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ gis8^\markup { \pad-markup #0.2 "+26"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}] gis4^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} ~ } + { ais2 b8^\markup { \pad-markup #0.2 "-12"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}[ gis8^\markup { \pad-markup #0.2 "+26"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↑" }}] gis4^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }} ~ } \bar "|" { gis1 } \bar "|" - { g8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↓" }}[ fis8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] cis8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}[ dis8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }}] f8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}[ gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] a4^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} } - \bar "|" - { ais1^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↑" }}} + { g8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 11↓" }}[ fis8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↓" }} cis8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] dis8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }}[ f8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }} gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] a4^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} } + { ais8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↑" }} ~} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/624f7439/624f7439_mus_model.json b/resources/string_quartet_3_rise/624f7439/624f7439_mus_model.json index 835be59..7e36c60 100644 --- a/resources/string_quartet_3_rise/624f7439/624f7439_mus_model.json +++ b/resources/string_quartet_3_rise/624f7439/624f7439_mus_model.json @@ -10,55 +10,55 @@ ], [ [ [ [ -6, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 0, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 0, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -3, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -4, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 0, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 6, -1, 0, -2, 2 ], [ -4, 6, -1, 1, -3, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 6, -1, 1, -1, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 6, -1, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 0, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 6, -1, 0, -2, 2 ], [ -4, 6, -1, 1, -3, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 6, -1, 1, -1, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -2, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 6, -1, 0, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 6, -1, 1, -1, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 6, -1, 1, -1, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -6, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -6, 7, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ], - [ [ [ -6, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0.25 ] + [ [ [ -6, 7, -1, 1, -2, 2 ], [ -5, 6, -1, 2, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -6, 7, -1, 1, -2, 2 ], [ -5, 7, 0, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], + [ [ [ -6, 7, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -5, 6, -1, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 5, -2, 1, -2, 2 ] ], 0 ], - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -4, 5, -2, 1, -2, 2 ] ], 0.25 ], - [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -4, 5, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -5, 6, 0, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ] ], 0 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -4, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ] ], 0.25 ], + [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ] ], 0 ], [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -4, 5, 0, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], [ [ [ -5, 5, -1, 1, -2, 2 ], [ -3, 5, -2, 1, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ], [ [ [ -5, 5, -1, 1, -2, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -3, 4, -1, 1, -2, 2 ], [ -4, 6, -1, 1, -2, 2 ] ], 0.25 ] diff --git a/resources/string_quartet_3_rise/624f7439/lilypond/part_I.ly b/resources/string_quartet_3_rise/624f7439/lilypond/part_I.ly index 7901a68..bfd4b77 100644 --- a/resources/string_quartet_3_rise/624f7439/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/624f7439/lilypond/part_I.ly @@ -1,14 +1,13 @@ { - { gis2^\markup { \pad-markup #0.2 "-27"} gis''2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} } + { \offset Y-offset 4 \textMark \markup \musicglyph "scripts.coda" gis2^\markup { \pad-markup #0.2 "-27"} \repeatTie gis''2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} } \bar "|" - { gis1^\markup { \pad-markup #0.2 "-27"} ~ } + { gis'1^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } \bar "|" - { gis2. ~ gis8[ a8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] } + { gis'2. ~ gis'8[ a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] } \bar "|" { gis'2^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }} a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}[ g'8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 11↓" }}] ~ g'4 } \bar "|" - { a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ gis'2. ~ } - \bar "|" - { gis'1} + \time 9/8 + { a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }} gis'4^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }} ~ gis'2.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/624f7439/lilypond/part_II.ly b/resources/string_quartet_3_rise/624f7439/lilypond/part_II.ly index 79346aa..bd074b3 100644 --- a/resources/string_quartet_3_rise/624f7439/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/624f7439/lilypond/part_II.ly @@ -1,14 +1,13 @@ { - { cis'2^\markup { \pad-markup #0.2 "-29"} gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}[ ais8^\markup { \pad-markup #0.2 "+4"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }}] c'8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}[ cis'8^\markup { \pad-markup #0.2 "-29"}] } + { cis'2^\markup { \pad-markup #0.2 "-29"} \repeatTie gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}[ ais8^\markup { \pad-markup #0.2 "+4"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }}] c'8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}[ cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] } \bar "|" - { dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}[ e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}] ~ e'2 dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}[ c''8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] } + { dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}[ e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] ~ e'2 dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}[ c''8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] } \bar "|" - { cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}[ dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] gis'4^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} c'4^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} ~ c'8[ cis'8^\markup { \pad-markup #0.2 "-29"}] } + { cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}[ dis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] gis'4^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }} c'4^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} ~ c'8[ cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] } \bar "|" { f'8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}[ fis'8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] ~ fis'8[ e'8^\markup { \pad-markup #0.2 "-14"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] ~ e'2 } - \bar "|" - { dis'8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }}[ f'8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] ~ f'8[ fis'8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}] ~ fis'4 ~ fis'8[ f'8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] ~ } - \bar "|" - { f'1} + \bar "|" + \time 9/8 + { dis'8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 7↓" }} f'4^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }} fis'4.^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }} ~ fis'8 f'4^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/624f7439/lilypond/part_III.ly b/resources/string_quartet_3_rise/624f7439/lilypond/part_III.ly index f4cbb75..3615e9e 100644 --- a/resources/string_quartet_3_rise/624f7439/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/624f7439/lilypond/part_III.ly @@ -1,14 +1,12 @@ { - { a'8^\markup { \pad-markup #0.2 "-16"}[ gis'8^\markup { \pad-markup #0.2 "-27"}] a'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 13↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}] ~ gis'2 ~ } + { a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }} [ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] a'8^\markup { \pad-markup #0.2 "+11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 13↑" }}[ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ gis'2 ~ } \bar "|" - { gis'8[ cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] d'8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}[ dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis'8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ~ c'4 } + { gis'8[ cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] d'8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}[ dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis'8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ~ c'4 } \bar "|" - { cis'4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ f'8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] f'8^\markup { \pad-markup #0.2 "+41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}[ g'8^\markup { \pad-markup #0.2 "-39"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] gis'8^\markup { \pad-markup #0.2 "-27"}[ a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] ~ } + { cis'4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} dis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}[ f'8^\markup { \pad-markup #0.2 "-43"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] f'8^\markup { \pad-markup #0.2 "+41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}[ g'8^\markup { \pad-markup #0.2 "-39"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }}] gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ a'8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}] ~ } \bar "|" { a'4 ais'4^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↑" }} cis''4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} d''8^\markup { \pad-markup #0.2 "-45"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↑" }}[ cis''8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ~ } \bar "|" - { cis''1 ~ } - \bar "|" - { cis''1} + { cis''2. ~ cis''4.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/624f7439/lilypond/part_IV.ly b/resources/string_quartet_3_rise/624f7439/lilypond/part_IV.ly index dc2b6a7..b6c98c9 100644 --- a/resources/string_quartet_3_rise/624f7439/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/624f7439/lilypond/part_IV.ly @@ -1,14 +1,12 @@ { - { gis,2^\markup { \pad-markup #0.2 "-27"} cis''2^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} ~ } + { gis,2^\markup { \pad-markup #0.2 "-27"} \repeatTie cis2^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }} ~ } \bar "|" - { cis''8[ gis'8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ais,2^\markup { \pad-markup #0.2 "+4"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }} c4^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } + { cis8[ gis,8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ais,2^\markup { \pad-markup #0.2 "+4"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↓" }} c4^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } \bar "|" - { c2 cis8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ dis8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }} ~ } + { c2 cis8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ dis8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} ~ } \bar "|" { cis1 } \bar "|" - { a8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}[ gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] g8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↓" }}[ fis8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] cis'4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} } - \bar "|" - { d'1^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}} + { a8^\markup { \pad-markup #0.2 "-16"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}[ gis8^\markup { \pad-markup #0.2 "-27"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }} g8^\markup { \pad-markup #0.2 "+19"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↓" }}] fis8^\markup { \pad-markup #0.2 "-31"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}[ cis'8^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} c'8^\markup { \pad-markup #0.2 "-41"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} ] cis'4^\markup { \pad-markup #0.2 "-29"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} d'8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/65120e88/65120e88_mus_model.json b/resources/string_quartet_3_rise/65120e88/65120e88_mus_model.json index 7e0733c..c76bc8b 100644 --- a/resources/string_quartet_3_rise/65120e88/65120e88_mus_model.json +++ b/resources/string_quartet_3_rise/65120e88/65120e88_mus_model.json @@ -3,29 +3,29 @@ [ [ [ - [ [ [ -6, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -6, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 5, 1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -7, 5, 1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 5, 1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -6, 4, 1, 2, 0, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -7, 5, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ], [ -6, 4, 1, 2, 0, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 5, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] + [ [ [ -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 ], [ -6, 4, 1, 3, -1, 1 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 4, 1, 3, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -7, 4, 0, 3, -1, 2 ], [ -6, 3, 1, 3, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] + [ [ [ -7, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ] ], 0 ], + [ [ [ -7, 4, 1, 3, -1, 2 ], [ -5, 4, 1, 3, -1, 1 ], [ -5, 4, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ] ], 0.25 ], + [ [ [ -7, 4, 1, 3, -1, 2 ], [ -5, 3, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ] ], 0 ], + [ [ [ -7, 4, 0, 3, -1, 2 ], [ -5, 3, 1, 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -6, 4, 1, 3, -1, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/65120e88/lilypond/part_I.ly b/resources/string_quartet_3_rise/65120e88/lilypond/part_I.ly index 07fa029..3b33560 100644 --- a/resources/string_quartet_3_rise/65120e88/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/65120e88/lilypond/part_I.ly @@ -1,6 +1,5 @@ { - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} + + { cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }} ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 11↑" }} ] c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'4^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 13↑" }} d'4.^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↑" }} } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/65120e88/lilypond/part_II.ly b/resources/string_quartet_3_rise/65120e88/lilypond/part_II.ly index 0ef467c..b0d124c 100644 --- a/resources/string_quartet_3_rise/65120e88/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/65120e88/lilypond/part_II.ly @@ -1,6 +1,5 @@ { - { cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'4^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} d'4^\markup { \pad-markup #0.2 "+30"} ~ } - \bar "|" - { d'1} + { f'2.^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} ~ } + { f'4.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/65120e88/lilypond/part_III.ly b/resources/string_quartet_3_rise/65120e88/lilypond/part_III.ly index 6a69661..3861845 100644 --- a/resources/string_quartet_3_rise/65120e88/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/65120e88/lilypond/part_III.ly @@ -1,6 +1,5 @@ { - { cis''4^\markup { \pad-markup #0.2 "-25"} c''4^\markup { \pad-markup #0.2 "-37"} cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}[ d''8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}] f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ fis8^\markup { \pad-markup #0.2 "-10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↓" }}] } - \bar "|" - { g1^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}} + { cis''4^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} ~ c''8 [ cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 13↑" }} d''8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↑" }}] f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ fis'8^\markup { \pad-markup #0.2 "-10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}} + { g'8^\markup { \pad-markup #0.2 "+28"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}]} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/65120e88/lilypond/part_IV.ly b/resources/string_quartet_3_rise/65120e88/lilypond/part_IV.ly index 68e695e..c93511b 100644 --- a/resources/string_quartet_3_rise/65120e88/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/65120e88/lilypond/part_IV.ly @@ -1,6 +1,5 @@ { - { cis8^\markup { \pad-markup #0.2 "-25"}[ c8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ c2 cis8^\markup { \pad-markup #0.2 "-25"}[ d8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] } - \bar "|" - { ais,1^\markup { \pad-markup #0.2 "+44"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }}} + { cis8^\markup { \pad-markup #0.2 "-25"} c4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 3↑" }} ~ c4. cis8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 5↓" }}[ d8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}} + { ais,8^\markup { \pad-markup #0.2 "+44"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}]} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/66b20499/66b20499_mus_model.json b/resources/string_quartet_3_rise/66b20499/66b20499_mus_model.json index 2a8636b..8e02a12 100644 --- a/resources/string_quartet_3_rise/66b20499/66b20499_mus_model.json +++ b/resources/string_quartet_3_rise/66b20499/66b20499_mus_model.json @@ -3,27 +3,27 @@ [ [ [ - [ [ [ -4, 4, -1, 2, -1, 2 ], [ -4, 4, -1, 2, -2, 3 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 4, -1, 2, -1, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 4, -1, 2, -1, 2 ], [ -3, 4, -2, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], - [ [ [ -4, 4, -1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] + [ [ [ -5, 4, -1, 2, -1, 2 ], [ -4, 4, -1, 2, -2, 3 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, -1, 2, -1, 2 ], [ -4, 5, -1, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, -1, 2, -1, 2 ], [ -3, 4, -2, 2, -2, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ], + [ [ [ -5, 4, -1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, -1, 2, -2, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 4, -1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, -1, 2, -1, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], - [ [ [ -4, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -6, 5, 0, 2, -1, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ] + [ [ [ -5, 4, -1, 2, -1, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 5, -1, 2, -2, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, -1, 2, -1, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ], + [ [ [ -5, 4, 0, 2, -2, 2 ], [ -4, 4, 0, 2, -1, 2 ], [ -6, 5, 0, 2, -1, 2 ], [ -4, 4, 0, 1, -1, 2 ] ], 0.25 ] ], [ - [ [ [ -4, 4, 0, 2, -2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, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 3 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], [ [ [ -6, 4, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], diff --git a/resources/string_quartet_3_rise/66b20499/lilypond/part_I.ly b/resources/string_quartet_3_rise/66b20499/lilypond/part_I.ly index 148c963..51a42be 100644 --- a/resources/string_quartet_3_rise/66b20499/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/66b20499/lilypond/part_I.ly @@ -3,8 +3,7 @@ \bar "|" { dis'8[ f'8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }}] ~ f'2. ~ } \bar "|" - { f'1 ~ } - \bar "|" - { f'1} + \time 9/8 + { f'2. ~ f'4.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/66b20499/lilypond/part_II.ly b/resources/string_quartet_3_rise/66b20499/lilypond/part_II.ly index 3e62d03..97577ba 100644 --- a/resources/string_quartet_3_rise/66b20499/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/66b20499/lilypond/part_II.ly @@ -1,10 +1,8 @@ { { ais2^\markup { \pad-markup #0.2 "+40"} ~ ais8[ cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] a8^\markup { \pad-markup #0.2 "-11"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}[ g8^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] } \bar "|" - { gis8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}[ ais8^\markup { \pad-markup #0.2 "-45"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}] c'2^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↓" }}[ d'8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}] } + { gis8^\markup { \pad-markup #0.2 "-23"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}[ ais8^\markup { \pad-markup #0.2 "-45"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 7↓" }}] c'2^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ d'8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }}] } \bar "|" - { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis'4^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} d'2^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }} ~ } - \bar "|" - { d'1} + { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] ~ cis'8 d'4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }} ~ d'4.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/66b20499/lilypond/part_III.ly b/resources/string_quartet_3_rise/66b20499/lilypond/part_III.ly index e12cc1e..dc2e177 100644 --- a/resources/string_quartet_3_rise/66b20499/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/66b20499/lilypond/part_III.ly @@ -1,10 +1,8 @@ { - { c''8^\markup { \pad-markup #0.2 "-22"}[ ais'8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] c''8^\markup { \pad-markup #0.2 "-49"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ cis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] ~ cis''2 ~ } + { c''8^\markup { \pad-markup #0.2 "-22"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}[ ais'8^\markup { \pad-markup #0.2 "+40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] c''8^\markup { \pad-markup #0.2 "-49"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ cis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }}] ~ cis''2 ~ } \bar "|" - { cis''4 c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 13↑" }}] c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] gis'4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 5↑" }} } + { cis''4 c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}[ cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}] c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ ais'8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↓" }}] gis'4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} } \bar "|" - { ais'4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ cis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] d''4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }}[ c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] ~ } - \bar "|" - { c''1} + { ais'4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c''8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} cis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }} d''4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }} cis''8^\markup { \pad-markup #0.2 "+2"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↑" }} c''4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/66b20499/lilypond/part_IV.ly b/resources/string_quartet_3_rise/66b20499/lilypond/part_IV.ly index 845aaae..7caa8fc 100644 --- a/resources/string_quartet_3_rise/66b20499/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/66b20499/lilypond/part_IV.ly @@ -1,10 +1,9 @@ { - { a'2^\markup { \pad-markup #0.2 "-11"} g'2^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↓" }} ~ } + { a2^\markup { \pad-markup #0.2 "-11"} g2^\markup { \pad-markup #0.2 "+24"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↓" }} ~ } \bar "|" - { g'4 gis'8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ f4 ais,4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} ~ } + { g4 gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ f4 ais,4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }} ~ } \bar "|" - { ais,2 b,8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}[ d8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ d4 } - \bar "|" - { cis1^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}} + { ais,4. ~ ais,8 [ b,8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }} d8^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ d4 } + { cis8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} ~} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/736745da/736745da_mus_model.json b/resources/string_quartet_3_rise/736745da/736745da_mus_model.json index 859dd7a..6a53117 100644 --- a/resources/string_quartet_3_rise/736745da/736745da_mus_model.json +++ b/resources/string_quartet_3_rise/736745da/736745da_mus_model.json @@ -3,29 +3,29 @@ [ [ [ - [ [ [ -6, 5, 1, 1, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -6, 5, 1, 1, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -7, 4, 1, 2, 0, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 4, 1, 2, 0, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -2, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 4, 1, 2, 0, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 4, 1, 2, 0, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -7, 4, 1, 2, 0, 2 ], [ -6, 4, 2, 2, -1, 2 ], [ -6, 4, 1, 2, 0, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ], - [ [ [ -7, 4, 1, 2, 0, 2 ], [ -6, 4, 2, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] + [ [ [ -6, 5, 1, 1, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ] ], 0 ], + [ [ [ -6, 5, 1, 1, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ] ], 0 ], + [ [ [ -7, 4, 1, 2, 0, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4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 ] ], 0.25 ] + [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ] ], 0 ], + [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ -6, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ] ], 0.25 ], + [ [ [ -7, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ], [ -5, 5, 1, 2, -1, 2 ] ], 0.25 ] ] ] ], diff --git a/resources/string_quartet_3_rise/736745da/lilypond/part_I.ly b/resources/string_quartet_3_rise/736745da/lilypond/part_I.ly index 07fa029..1e67794 100644 --- a/resources/string_quartet_3_rise/736745da/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/736745da/lilypond/part_I.ly @@ -1,6 +1,5 @@ { - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} + { cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 5↓" }}[ b8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 11↓" }} ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] ais'4^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c''2^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }} } + \break \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/736745da/lilypond/part_II.ly b/resources/string_quartet_3_rise/736745da/lilypond/part_II.ly index a55b3bd..26c7bc7 100644 --- a/resources/string_quartet_3_rise/736745da/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/736745da/lilypond/part_II.ly @@ -1,6 +1,6 @@ { - { cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ b8^\markup { \pad-markup #0.2 "+10"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↓" }}] ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}] ais'4^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }} c''4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ } - \bar "|" - { c''1} + { ais4^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 3↓" }} gis4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↑" }} ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 5↓" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↑" }}] } + + { f'4^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/736745da/lilypond/part_III.ly b/resources/string_quartet_3_rise/736745da/lilypond/part_III.ly index 52edbce..2ddf31d 100644 --- a/resources/string_quartet_3_rise/736745da/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/736745da/lilypond/part_III.ly @@ -1,6 +1,6 @@ { - { ais4^\markup { \pad-markup #0.2 "-40"} gis4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }}] cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}] } - \bar "|" - { f1^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}} + { f'2^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 1↑" }} ~ } + + { f'2.} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/736745da/lilypond/part_IV.ly b/resources/string_quartet_3_rise/736745da/lilypond/part_IV.ly index 13044d9..b42a9e3 100644 --- a/resources/string_quartet_3_rise/736745da/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/736745da/lilypond/part_IV.ly @@ -1,6 +1,6 @@ { - { ais,2.^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }} c8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 1↑" }}[ ais,8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}] ~ } - \bar "|" - { ais,8[ f,8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~ f,2.} + { ais,2.^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "< I"\normal-size-super " 11↑" }} c8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ ais,8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 3↓" }}] ~ } + + { ais,8[ f,8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }}] ~} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/767e70f0/767e70f0_mus_model.json b/resources/string_quartet_3_rise/767e70f0/767e70f0_mus_model.json index 8421367..1c5521c 100644 --- a/resources/string_quartet_3_rise/767e70f0/767e70f0_mus_model.json +++ b/resources/string_quartet_3_rise/767e70f0/767e70f0_mus_model.json @@ -3,28 +3,28 @@ [ [ [ - [ [ [ -4, 3, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 4, 0, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -4, 3, 1, 2, -1, 2 ], [ -6, 5, 1, 2, -1, 2 ], [ -5, 3, 1, 2, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0 ], - [ [ [ -5, 5, 1, 2, -1, 2 ], [ -6, 5,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 3, -1, 2 ], [ -5, 4, 1, 2, -1, 2 ] ], 0.25 ] ] ] diff --git a/resources/string_quartet_3_rise/767e70f0/lilypond/part_I.ly b/resources/string_quartet_3_rise/767e70f0/lilypond/part_I.ly index 07fa029..f65f356 100644 --- a/resources/string_quartet_3_rise/767e70f0/lilypond/part_I.ly +++ b/resources/string_quartet_3_rise/767e70f0/lilypond/part_I.ly @@ -1,6 +1,7 @@ -{ - { f'1^\markup { \pad-markup #0.2 "-38"} ~ } - \bar "|" - { f'1} +{ + \time 10/8 + { f'2^\markup { \pad-markup #0.2 "-38"} ~ } + + { f'2. ~} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/767e70f0/lilypond/part_II.ly b/resources/string_quartet_3_rise/767e70f0/lilypond/part_II.ly index e7ebc1a..72f1bda 100644 --- a/resources/string_quartet_3_rise/767e70f0/lilypond/part_II.ly +++ b/resources/string_quartet_3_rise/767e70f0/lilypond/part_II.ly @@ -1,6 +1,5 @@ { - { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'4^\markup { \pad-markup #0.2 "-25"} d'4^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }} ~ } - \bar "|" - { d'1} + { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}[ gis8^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }}] ais8^\markup { \pad-markup #0.2 "+13"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 11↑" }}[ c'8^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 1↑" }}] cis'4^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} d'2^\markup { \pad-markup #0.2 "+30"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 7↑" }} ~ } + \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/767e70f0/lilypond/part_III.ly b/resources/string_quartet_3_rise/767e70f0/lilypond/part_III.ly index 95e6e0a..1c5f12e 100644 --- a/resources/string_quartet_3_rise/767e70f0/lilypond/part_III.ly +++ b/resources/string_quartet_3_rise/767e70f0/lilypond/part_III.ly @@ -1,6 +1,6 @@ { - { c'4^\markup { \pad-markup #0.2 "-37"} cis'4^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ g8^\markup { \pad-markup #0.2 "-35"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] gis4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} } - \bar "|" - { ais8^\markup { \pad-markup #0.2 "-40"}[ gis8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}] ~ gis2.} + { c'4^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} cis'4^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }} f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}[ g8^\markup { \pad-markup #0.2 "-35"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "IV"\normal-size-super " 3↑" }}] gis4^\markup { \pad-markup #0.2 "+48"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↑" }} } + + { ais8^\markup { \pad-markup #0.2 "-40"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↓" }}[ gis8^\markup { \pad-markup #0.2 "+21"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 13↓" }}]} \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise/767e70f0/lilypond/part_IV.ly b/resources/string_quartet_3_rise/767e70f0/lilypond/part_IV.ly index 85ee8f1..8074860 100644 --- a/resources/string_quartet_3_rise/767e70f0/lilypond/part_IV.ly +++ b/resources/string_quartet_3_rise/767e70f0/lilypond/part_IV.ly @@ -1,6 +1,6 @@ { - { c''2.^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "III"\normal-size-super " 1↑" }} ~ c''8[ cis''8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] } - \bar "|" - { c''8^\markup { \pad-markup #0.2 "-1"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↑" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ f2.} + { c'2.^\markup { \pad-markup #0.2 "-37"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 3↑" }} ~ c'8[ cis'8^\markup { \pad-markup #0.2 "-25"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 5↓" }}] } + + { c'8^\markup { \pad-markup #0.2 "-1"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "II"\normal-size-super " 7↑" }}[ f8^\markup { \pad-markup #0.2 "-38"}_\markup { \lower #3 \pad-markup #0.2 \concat{ "I"\normal-size-super " 1↑" }}] ~ } \bar "||" } \ No newline at end of file diff --git a/resources/string_quartet_3_rise_coda_only/4f53a446/lilypond/part_IV.pdf b/resources/string_quartet_3_rise_coda_only/4f53a446/lilypond/part_IV.pdf deleted file mode 100644 index 6aecdbd..0000000 Binary files a/resources/string_quartet_3_rise_coda_only/4f53a446/lilypond/part_IV.pdf and /dev/null differ diff --git a/supercollider/seeds_and_ledgers_main.scd b/supercollider/seeds_and_ledgers_main.scd index d3f7a4c..a16ad4c 100644 --- a/supercollider/seeds_and_ledgers_main.scd +++ b/supercollider/seeds_and_ledgers_main.scd @@ -12,8 +12,8 @@ s.waitForBoot({ c = Condition.new; // load all files - "seeds_and_ledgers_backend.scd".loadRelative; - //"seeds_and_ledgers_backend_rise.scd".loadRelative; + //"seeds_and_ledgers_backend.scd".loadRelative; + "seeds_and_ledgers_backend_rise.scd".loadRelative; "seeds_and_ledgers_transcriber.scd".loadRelative; "seeds_and_ledgers_synthdefs.scd".loadRelative; s.sync(c);