Question concerning python scripting

20 views
Skip to first unread message

Peter O'Doherty

unread,
Jan 26, 2011, 6:44:59 AM1/26/11
to athe...@googlegroups.com
Hi,
Is it possible to create a multiset path in python? At the moment is seems that only one dimensional paths are possible.
Regards,
Peter  

christopher ariza

unread,
Jan 26, 2011, 9:20:41 AM1/26/11
to athe...@googlegroups.com

hi peter. can you describe a bit more of what you mean?

paths in athenacl are an ordered sequence of pitch collections (multisets), which can be interpreted as pitch space, pitch class, and set class values.

Peter O'Doherty

unread,
Jan 26, 2011, 10:53:52 AM1/26/11
to athe...@googlegroups.com
In the "Example 3-1. Creating a new PathInstance with PIn" example in the tutorials four multisets are created and allocated to a path. They are also automatically allocated a "durFraction" which treats them as 4 members of a path.
Whereas in "F.1.12. script03c.py: Tendency Mask: Random Values between Triangle Generators" the pin has the members "d,e,g,a,b" which just seems to be one multiset. Is it possible to use multiple multisets in this field in a python script? If, so what is the syntax for this?
Hope that clarifies.
Thanks again.

Peter O'Doherty

unread,
Jan 28, 2011, 2:45:02 PM1/28/11
to athe...@googlegroups.com
Hi Christopher,
Any pointers on creating a multiset path? Is it even possible in a python script?
Many thanks,
Peter

christopher ariza

unread,
Jan 28, 2011, 3:24:43 PM1/28/11
to athe...@googlegroups.com

sorry for the delay! i see your question. in short: spaces.

in demo/midi/script03c.py, command-line arguments are being fed to an Interpreter instance.

when using this approach, each string works the same as a command-line string in an interactive session.

so, in an interactive session, you can use a space to delimit multipaths within a path. any syntax that works for a path works here, it just needs to be given all without spaces, and spaces delimit path components.

for example, here i create 1 path with 4 multisets; the first from pitch classes, the second from a xenakis sieve, the third from a set class, and the fourth from pitch space values.

pi{}ti{} :: pin a 3,4 3@7 3-11 f2,f#9
PI a added to PathInstances.

pi{a}ti{} :: piv
PI: a
psPath 3,4 -11,-8,-5,-2,1,4,7,10 0,3,7 -19,66
D#4,E4 C#3,E3,G3,A#3,C#4,E4,G4,A#4 C4,D#4,G4 F2,F#9
pcsPath 3,4 1,4,7,10,1,4,7,10 0,3,7 5,6
scPath 2-1 4-28 3-11A 2-1
durFraction 1(25%) 1(25%) 1(25%) 1(25%)
TI References: none.


in a script feeding strings to an Interpreter, you can provide 'pin a 3,4 3@7 3-11 f2,f#9' to get the same result.

does that answer your question?

Peter O'Doherty

unread,
Jan 29, 2011, 5:01:30 AM1/29/11
to athe...@googlegroups.com
Absolutely! Exactly what I was looking for, thanks.

Incidentally, many thanks for your work on athenacl and congratulations on producing such a great system. I've been dipping in to it on and off for a few years (I mostly use SuperCollider) but I just recently discovered the possibility of using python scripts (has it always been possible and did I just miss it?!) and that's made it even more attractive for me to use now.
Thanks again.
Peter

christopher ariza

unread,
Jan 29, 2011, 8:34:37 AM1/29/11
to athe...@googlegroups.com

great! thanks for your comments; feel free to send any further questions.
Reply all
Reply to author
Forward
0 new messages