« Return to Thread: Harry Partch's 43-note scale

Re: Harry Partch's 43-note scale [LONG]

by Mark Ballora :: Rate this Message:

Reply to Author | View in Thread


>Has anybody ever used Harry Partch's beautiful scale in a
>supercollider piece before?
>
>If not, is there any way one can use this scale in supercollider
>without having to figure out each individual frequency of each
>individual note?
>
>Thanks!
>
>--
>Andrew Grathwohl
>G-Wohl Productions
><http://www.gwohlproductions.com>www.gwohlproductions.com
>Cell: 203-331-6688
>Alternate Email:
><mailto:andrew@...>andrew@...
>IU Email: <mailto:andgrath@...>andgrath@...
>AIM: Gwohl1

I created this backdrop of shifting tones from his scale for a piece.
I defined the ratios and multiplied them by a fundamental.

~p1=1.round(1); // 1/1
~p2=1.0125.round(1.0125); // 81/80
~p3=1.03125.round(1.03125); // 33/32
~p4=1.05.round(1.05); // 21/20
~p5=1.06667.round(1.06667); // 16/15
~p6=1.09091.round(1.09091); // 12/11
~p7=1.1.round(1.1); // 11/10
~p8=1.11111.round(1.11111); // 10/9
~p9=1.125.round(1.125); // 9/8
~p10=1.14286.round(1.14286);// 8/7
~p11=1.16667.round(1.16667);// 7/6
~p12=1.18519.round(1.18519);// 32/27
~p13=1.2.round(1.2); // 6/5
~p14=1.22222.round(1.22222);// 11/9
~p15=1.25.round(1.25); // 5/4
~p16=1.27273.round(1.27273);// 14/11
~p17=1.28571.round(1.28571);// 9/7
~p18=1.3125.round(1.3125);  // 21/16
~p19=1.33333.round(1.33333);// 4/3
~p20=1.35.round(1.35); // 27/20
~p21=1.375.round(1.375); // 11/8
~p22=1.4.round(1.4); // 7/5
~p23=1.42857.round(1.42857);// 10/7
~p24=1.45455.round(1.45455);// 16/11
~p25=1.48148.round(1.48148);// 40/27
~p26=1.5.round(1.5); // 3/2
~p27=1.52381.round(1.52381);// 32/21
~p28=1.55556.round(1.55556);// 14/9
~p29=1.57143.round(1.57143);// 11/7
~p30=1.6.round(1.6); // 8/5
~p31=1.63636.round(1.63636);// 18/11
~p32=1.66667.round(1.66667);// 5/3
~p33=1.6875.round(1.6875); // 27/16
~p34=1.71429.round(1.71429);// 12/7
~p35=1.75.round(1.75); // 7/4
~p36=1.77778.round(1.77778);// 16/9
~p37=1.8.round(1.8); // 9/5
~p38=1.81818.round(1.81818);// 20/11
~p39=1.83333.round(1.83333);// 11/6
~p40=1.875.round(1.875); // 15/8
~p41=1.90476.round(1.90476);// 40/21
~p42=1.93939.round(1.93939);// 64/33
~p43=1.97531.round(1.97531);// 160/81
~p44=2.round(2); // 2/1

~fundlist=[~p1, ~p2, ~p3, ~p4, ~p5, ~p6, ~p7, ~p8, ~p9, ~p10, ~p11,
~p12, ~p13, ~p14, ~p15, ~p16, ~p17];
~p1list=[~p18, ~p19, ~p20, ~p22, ~p24, ~p25, ~p26, ~p27, ~p28, ~p29,
~p30, ~p33, ~p43];


~nlist=[2000, 2001, 2002, 2003];
~currentnode=~nlist.choose;
~lastnode=~currentnode;

~partchBackdrop=Task({ var harmchoice;
                decay=0.35;
                fund=220;
                p1list=[~p18, ~p19, ~p20, ~p22, ~p24, ~p25, ~p26,
~p27, ~p28, ~p29, ~p30, ~p33, ~p43];
                p2list=[~p11, ~p12, ~p13, ~p16, ~p20, ~p23, ~p26,
~p27, ~p31, ~p33, ~p35, ~p40, ~p43, ~p44];
                p3list=[~p16, ~p21, ~p26, ~p27, ~p28, ~p34];
                p4list=[~p15, ~p18, ~p21, ~p22, ~p28, ~p29];
                p5list=[~p16, ~p17, ~p18, ~p19, ~p22, ~p23, ~p29, ~p30];
                p6list=[~p14, ~p16, ~p21, ~p22, ~p23, ~p24, ~p27,
~p30, ~p31, ~p38, ~p43];
                p7list=[~p6, ~p16, ~p18, ~p19, ~p20, ~p21, ~p24,
~p25, ~p31, ~p32];
                p8list=[~p7, ~p14, ~p16, ~p22, ~p25, ~p31, ~p32];
                p9list=[~p18, ~p19, ~p20, ~p21, ~p22, ~p26, ~p29, ~p32, ~p33];
                p10list=[~p16, ~p17, ~p18, ~p19, ~p20, ~p21, ~p22,
~p23, ~p27, ~p32, ~p33, ~p34, ~p35];
                p11list=[~p20, ~p21, ~p22, ~p24, ~p28, ~p32, ~p34, ~p35, ~p36];
                p12list=[~p19, ~p20, ~p21, ~p22, ~p25, ~p29, ~p33,
~p34, ~p35, ~p36];
                p13list=[~p19, ~p21, ~p22, ~p23, ~p30, ~p33, ~p36, ~p37, ~p38];
                p14list=[~p20, ~p21, ~p24, ~p27, ~p31, ~p37, ~p39];
                p15list=[~p32, ~p35, ~p40];
                p16list=[~p17, ~p23, ~p30, ~p32, ~p33, ~p41];
                p17list=[~p23, ~p30, ~p40, ~p42];
                p18list=[~p29, ~p35, ~p41, ~p42, ~p43];
                p19list=[~p20, ~p32, ~p36, ~p43, ~p44];
                p20list=[~p21, ~p33, ~p37, ~p43, ~p44];
                p21list=[~p31, ~p38, ~p39];
                p22list=[~p34, ~p35];
                p23list=[~p32, ~p41];
                p24list=[~p38, ~p41];
                p25list=[~p38, ~p43];
                p26list=[~p44, ~p37, ~p40];
                p27list=[~p35, ~p37];
                p28list=[~p38];
                p30list=[~p36, ~p40, ~p42, ~p44];
                p31list=[~p42];
                p33list=[~p43];
                p34list=[~p41];
                p35list=[~p1, ~p6, ~p7, ~p17, ~p18, ~p22, ~p23, ~p24, ~p30];
                p36list=[~p3, ~p4, ~p5, ~p8, ~p12, ~p18, ~p19, ~p20, ~p25];
                p37list=[~p4, ~p5, ~p6, ~p7, ~p8, ~p9, ~p12, ~p13, ~p19, ~p20];
                p38list=[~p4, ~p6, ~p9, ~p16, ~p20];
                p39list=[~p3, ~p4, ~p5, ~p6, ~p7, ~p8, ~p9, ~p14, ~p20, ~p21];
                p40list=[~p4, ~p5, ~p6, ~p7, ~p8, ~p9, ~p10, ~p15, ~p21, ~p22];
                p41list=[~p6, ~p7, ~p8, ~p15, ~p23];
                p42list=[~p10, ~p11, ~p23, ~p24];
                p43list=[~p1, ~p24, ~p25];
                p44list=p1list*0.5;

                masterlist=[~p1, ~p2, ~p3, ~p4, ~p5, ~p6, ~p7, ~p8,
~p9, ~p10, ~p11, ~p12, ~p13, ~p14,
             ~p15, ~p16, ~p17, ~p18, ~p19, ~p20, ~p21, ~p22, ~p23,
~p24, ~p25, ~p26,
             ~p28, ~p29, ~p30, ~p31, ~p32, ~p33, ~p34, ~p35, ~p36,
~p37, ~p38, ~p39,
             ~p40, ~p41, ~p42, ~p43, ~p44];
           
          consonancelist=[ p1list, p2list, p3list, p4list, p5list,
p6list, p7list,
          p8list, p9list, p10list, p11list, p12list,
p13list, p14list,
          p15list, p16list, p17list, p18list, p19list,
p20list, p21list,
          p22list, p23list, p24list, p25list, p26list,
p27list, p28list,
                        p30list, p31list, p33list, p34list, p35list,
p36list, p37list,
                        p38list, p39list, p40list, p41list, p42list,
p43list, p44list ];

                //harmchoice=#[17, 10, 11, 19, 13, 7];
                harmchoice=#[5, 7, 11, 10, 17];
                currentFundIndex=(~fundlist.size).rand;
                osc2index=0;
                osc2freq=0;
                osc3freq=0;
                osc3index=0;

                inf.do({ arg i; var f, hm1, hm2, thisIndex,
nextIndex, p1, p2, p3, a1, a2, a3, f1, f2, f3, maxLev, percattack;
                                p1=1.0.rand2;
                                p2=1.0.rand2;
                                p3=1.0.rand2;
                                a1=rrand(0.4, 0.6);
                                a2=rrand(0.1, 0.2);
                                a3=rrand(0.1, 0.26);
                                hm1=harmchoice.choose;
                                hm2=harmchoice.choose;
                                f1=rrand(0.2, 0.5);
                                f2=rrand(0.2, 0.5);
                                f3=rrand(0.2, 0.5);
                                attack=exprand(0.45, 0.8);
                                //maxLev=rrand(0.3, 0.6);
                                percattack=0.1;

                                while ( { ~lastnode==~currentnode },
{ ~currentnode=~nlist.choose;});
                                ~lastnode=~currentnode;


                                // Choose a node (synth) to change
this time through
                                if ( (i>3), {n=~currentnode;
maxLev=rrand(0.3, 0.6);},
                                                   { if ( (i==0),
{n=2000;  maxLev=0.07; },
                                                   
                { if ( (i==1), {n=2001; maxLev=0.07; },
                                                   
                                      { if ( (i==2), {n=2002;
maxLev=0.07; }, {n=2003; maxLev=0.07; ~lastnode=2003;}
                                                   
                                             ) }
                                                   
                        )}
                                                   
                )}
                                                   );
                                //n.postln;
                                //("current node:  "++~currentnode).postln;
                                //("last node:  "++~lastnode).postln;
(" ").postln;
                                         
                                if ( (n==2000),
                                        {
                                        if ( (currentFundIndex==0),
                                                { thisIndex=[
                                                                2, 2, 2, 2,
                                                                3, 3, 3,
                                                                4, 4,
                                                                5, 5,
                                                                6, 6,
                                                                7, 8,
9, 10, 11, 12, 13, 14, 15].choose; },
                                                { thisIndex=[
                                                                -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
                                                                2, 2, 2, 2,
                                                                3, 3, 3,
                                                                4, 4,
                                                                5, 5,
                                                                6,
6].choose; });

 
        //("currentFundIndex="++currentFundIndex).postln;
                                        //("thisIndex="++thisIndex).postln;
                                        nextIndex=currentFundIndex+thisIndex;
                                        if (
(nextIndex>~fundlist.size), { nextIndex=(nextIndex%(~fundlist.size))
});
                                        //("nextIndex="++nextIndex).postln;
                                        f=fund*(~fundlist.wrapAt(nextIndex));
 
        currentFundIndex=masterlist.indexOf(~fundlist.wrapAt(nextIndex));
 
        //("currentFundIndex="++currentFundIndex).postln;
                                        s.sendMsg("/n_set", 2000, "gate", 0);
                            (decay+0.1).wait;
                                        //nextIndex.postln;
                                        //f.postln;
                                        s.sendMsg("/s_new",
"threeSines", 2000, 1, 0,
 
        "freq", f,
 
        "a1", a1, "a2", a2, "a3", a3,
 
        "lfo1", f1, "lfo2", f2, "lfo3", f3,
 
        "harmMult1", hm1,
 
        "harmMult2", hm2,
 
        "p1", p1, "p2", p2, "p3", p3,
                                       
        "attack", attack,
                                       
        "envMax", maxLev,
                                       
        "cutoff", rrand(f, f*2),
                                       
        "percattack", percattack
                                      );
                                      },
                                    {  if ( (n==2001),
                                                        {
osc2index=consonancelist.at(currentFundIndex).size.rand;
                                     
osc2freq=fund*(consonancelist.at(currentFundIndex).at(osc2index));
                                     
s.sendMsg("/n_set", 2001, "gate", 0);
                                       (decay+0.1).wait;
                                     
s.sendMsg("/s_new", "threeSines", 2001, 1, 0,
                                     
                                "freq", osc2freq,
                                     
                                "a1", a1, "a2", a2, "a3", a3,
 
                                "lfo1", f1, "lfo2", f2, "lfo3", f3,
 
                                "harmMult1", hm1,
                                     
                                "harmMult2", hm2,
                                     
                                "p1", p1, "p2", p2, "p3", p3,
                                       
                                "attack", attack,
                                       
                                "envMax", maxLev,
                                       
                      "cutoff", rrand(osc2freq, osc2freq*2),
                                       
                      "percattack", percattack
                                       
                                );
                                      },
                                      { if ( (n==2002),
                                       
        { osc3index=consonancelist.at(osc2index).size.rand;
                                       
 
osc3freq=osc2freq*(consonancelist.at(osc2index).at(osc3index));
                                       
          if ( (osc2index>34), { sentfreq=osc3freq*([0.5, 1].choose)
}, { sentfreq=osc3freq });
                                       
          s.sendMsg("/n_set", 2002, "gate", 0);
                                       
          (decay+0.1).wait;
                                       
          s.sendMsg("/s_new", "threeSines", 2002, 1, 0,
                                       
                                         "freq", sentfreq,
                                       
                                         "a1", a1, "a2", a2, "a3", a3,
 
                                         "lfo1", f1, "lfo2", f2,
"lfo3", f3,
 
                                         "harmMult1", hm1,
                                       
                                         "harmMult2", hm2,
                                       
                                         "p1", p1, "p2", p2, "p3", p3,
                                       
                                         "attack", attack,
                                       
                                         "envMax", maxLev,
                                       
                               "cutoff", rrand(sentfreq, sentfreq*2),
                                       
                               "percattack", percattack
                                       
                                     );
                                      },
                                       
        { osc4index=consonancelist.at(osc3index).size.rand;
                                       
 
osc4freq=osc3freq*(consonancelist.at(osc3index).at(osc4index));
                                       
          osc4freq=osc4freq*([1, 0.5].choose);
                                       
          s.sendMsg("/n_set", 2003, "gate", 0);
                                       
          (decay+0.1).wait;
                                       
          s.sendMsg("/s_new", "threeSines", 2003, 1, 0,
                                       
                               "freq", osc4freq,
                                       
                               "a1", a1, "a2", a2, "a3", a3,
                                       
                               "lfo1", f1, "lfo2", f2, "lfo3", f3,
                                       
                               "harmMult1", hm1,
                                       
                               "harmMult2", hm2,
                                       
                               "p1", p1, "p2", p2, "p3", p3,
                                       
                               "attack", attack,
                                       
                                         "envMax", maxLev,
                                       
                               "cutoff", rrand(osc4freq, osc4freq*2),
                                       
                                         "percattack", percattack
                                       
                               );
                                       })
                                       });
                                       
             
                                     });
                                         if ( (i>3), {
duration=([1.0, 1.5, 2.0, 2.0, 2.0, 2.5, 3.0, 3.5, 4.0, 3.5,
3.5].choose)+attack },
                                                            {
duration=0.03/*rrand(0.4, 0.6)*/});
                     duration.wait;
        })
});

~stopPartch = {
                        s.sendBundle(0.0, ["/n_set", 2000, "gate", 0],
                                ["/n_set", 2001, "decay", 3.0, "gate", 0],
                                ["/n_set", 2002, "decay", 3.0, "gate", 0],
                                ["/n_set", 2003, "decay", 3.0, "gate", 0]);
s.sendBundle(3.0, ["/n_free", 2000],
                                ["/n_free", 2001],
                                ["/n_free", 2002],
                                ["/n_free", 2003]);
s.sendBundle(3.1, [~partchBackdrop.stop;~partchBackdrop.reset;]);
              // ~partchBackdrop.stop;
              // ~partchBackdrop.reset;
              // [2000, 2001, 2002, 2003].do({ arg item;
s.sendMsg("/n_set", item, "gate", 0); s.sendMsg("/n_free", item) });
               };

>_______________________________________________
>sc-users mailing list
>sc-users@...
>http://lists.create.ucsb.edu/mailman/listinfo/sc-users

_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

 « Return to Thread: Harry Partch's 43-note scale