Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor.

  • Loading branch information...
commit 5a46d87f9f5b72a88bc853c1f1342f21c19ecf71 1 parent 757cb29
@jacobjoaquin authored
Showing with 45 additions and 3 deletions.
  1. +7 −3 demo/pfunc.py
  2. +38 −0 notes.txt
View
10 demo/pfunc.py
@@ -159,15 +159,19 @@ def fround(x, n=8):
return float(('%.' + str(n) + 'f') % x)
-def pfunc(score, statement, identifier, pfield):
+def pfunc(score, statement, identifier, pfield, formula):
+ global eval_
+ eval_ = formula
return sco.map_(score, {0: statement, 1: identifier}, pfield, __eval_this)
+eval_ = 'x'
+
if __name__ == '__main__':
# Get argv from command-line
statement = list(sys.argv[1])
identifier = eval(sys.argv[2])
pfield = eval(sys.argv[3])
- eval_ = sys.argv[4]
+ formula = sys.argv[4]
if len(sys.argv) == 6:
seed(sys.argv[5])
@@ -175,5 +179,5 @@ def pfunc(score, statement, identifier, pfield):
s = ''.join(sys.stdin.readlines())
# Where the magic happens
- print pfunc(s, statement, identifier, pfield),
+ print pfunc(s, statement, identifier, pfield, formula),
View
38 notes.txt
@@ -1,3 +1,41 @@
+:> preview
+f 1 0 8192 10 1
+
+i 1 0 0.25 0.5 343.0 1.0 # p6 is pan
+i 1 + 0.25 0.5 343.0 0.5
+i 1 + 0.25 0.5 512.0 0.222
+i 1 + 0.25 0.5 512.0 0.1
+
+i 2 + 0.25 0.6 7.06 1.0
+i 2 + 0.25 0.6 7.06 0.5
+i 2 + 0.25 0.6 6.06 0.222
+i 2 + 0.25 0.6 6.06 0.1
+
+# auto-reads from pbpaste
+:> pfunc(i, 1, 6, 1.0 - x), sco_align
+f 1 0 8192 10 1
+
+i 1 0 0.25 0.5 7.00 0.0 # p6 is pan
+i 1 + 0.25 0.5 7.00 0.5
+i 1 + 0.25 0.5 8.00 0.778
+i 1 + 0.25 0.5 8.00 0.9
+
+i 2 + 0.25 0.6 7.06 1.0
+i 2 + 0.25 0.6 7.06 0.5
+i 2 + 0.25 0.6 6.06 0.222
+i 2 + 0.25 0.6 6.06 0.1
+
+# pbcopy the last buffer command
+:> set
+
+
+
+
+
+
+
+
+
csd/
__init__py
Please sign in to comment.
Something went wrong with that request. Please try again.