#!/usr/bin/env python from pmask import Range, UniformRandom from pmask import PowerSegment, LinearSegment from pmask import Mask, Quantizer, List, Summer from pmask import FStatement, ScoreSection from pmask import Lorenz, CircleSqr, Bifurcation, Hopalong, Mandelbrot, Julia, Henon fs1 = FStatement(1, 0, 65536, 10, 1) fs2 = FStatement(5, 0, 65536, -8, 1, 16384, 1, 16384, .5, 8192, .3, 8192, .1, 8192, .01, 8192, .001) # 8192, 16384 sf = open('pmask.sco','w') sf.write(str(fs1)+'\n') sf.write(str(fs2)+'\n') cdur = 32 sta = 0 inst1 = 34 inst2 = 10 l1 = Lorenz('x') sta0 = 0.01 ryl0 = [.25, .65, .25, .1, .75] ry0 = List(ryl0,'cycle') acl0 = [2800, 2700, 6000, 3000, 6000] ac0 = List(acl0,'cycle') # Sta Dur1 Instr Rhyth Dur Amp Pitch Pan HitQ SprDec SprTone SprMix SprQ PBend PBTime PMod ss0 = ScoreSection(sta0, cdur, inst1, ry0, .2, ac0, 6.00, .2, l1, 2, .5, 1, .5, 1.05, .02, 1) sta1 = 0.5 ryl1 = [1] ry1 = List(ryl1,'cycle') acl1 = [8000, 9000] ac1 = List(acl1,'cycle') ss1 = ScoreSection(sta1, cdur, inst1, ry1, .4, ac1, 5.05, .8, .3, 2, .5, 1, .6, 1.25, .12, 1) sta2 = 1.75 ryl2 = [4] ry2 = List(ryl2,'cycle') acl2 = [5000] ac2 = List(acl2,'cycle') ss2 = ScoreSection(sta2, cdur, inst1, ry2, .1, ac2, 6.05, .6, .6, 1, .8, 1, .5, 0.90, .04, 1) sta3 = 4.25 ryl3 = [.06, .06, .06, 7.82] ry3 = List(ryl3,'cycle') acl3 = [3000, 3500, 4000, 5000] ac3 = List(acl3,'cycle') pnl3 = [.3, .4, .5, .6] pn3 = List(pnl3,'cycle') ss3 = ScoreSection(sta3, cdur, inst1, ry3, .1, ac3, 6.05, pn3, .5, 1, .3, 1, .3, 0.90, .14, 1) sta4 = 0.01 ryl4 = [.25, .65, .25, .1, .75] ry4 = List(ryl4,'cycle') acl4 = [-2800, -2700, -4500, -2900, -4500] ac4 = List(acl4,'cycle') # Sta Dur1 Instr Rhyth Dur Amp Pitch Pan HitQ SprDec SprTone SprMix SprQ PBend PBTime PMod ss4 = ScoreSection(sta4, cdur, inst1, ry4, .1, ac4, 5.00, .4, .3, 2, .5, 1, .5, .85, .05, 1) sta5 = 0.51 acl5 = [-2000, -6500] ac5 = List(acl5,'cycle') # Sta Dur1 Instr Rhyth Dur Amp Pitch Pan HitQ SprDec SprTone SprMix SprQ PBend PBTime PMod ss5 = ScoreSection(sta5, cdur, inst1, ry4, .2, ac5, 6.05, .3, .9, 1, 1, 1, .6, 1.15, .02, 1) sta6 = 1.76 acl6 = [-2900] ac6 = List(acl6,'cycle') # Sta Dur1 Instr Rhyth Dur Amp Pitch Pan HitQ SprDec SprTone SprMix SprQ PBend PBTime PMod ss6 = ScoreSection(sta6, cdur, inst1, ry4, .1, ac6, 6.00, .8, .1, 2, 1.3, 1, .8, 1.05, .12, 1) i1 = 'i1 '+str(sta)+' '+str(cdur+1)+' .12345 1\n'; i2 = 'i1 '+str(sta)+' '+str(cdur+1)+' .34512 2\n'; sf.write(i1) sf.write(i2) sf.write(str(ss0)+'\n') sf.write(str(ss1)+'\n') sf.write(str(ss2)+'\n') sf.write(str(ss3)+'\n') sf.write(str(ss4)+'\n') sf.write(str(ss5)+'\n') sf.write(str(ss6)+'\n')