Still exploring diverse things with musical applications of Set Theory through Sonic Pi.
In this case, I found a relatively simple Ruby script which does several operations with pitch class sets.
I’ve adapted it a bit to make it work in Sonic Pi. So I clumsily forked it.
Now I can do all sorts of fun little things. (Except for
info which returns
Also, I can’t apply the “destructive methods” with exclamation mark. But that’s pretty much just convenience, AFAICT.
run_file "/Users/alex/Documents/GitHub/Ruby-PCSet/pcset.rb" noodl = PCSet.new([0,1,4,5,6,7,10]) puts noodl.transpose(55) puts noodl.invert puts noodl.complement puts noodl.transpositions puts noodl.normal_form puts noodl.prime puts noodl.interval_vector puts noodl.huron puts noodl.vector_of_relations puts noodl.is_unique? puts noodl.is_coherent? puts noodl.notes puts noodl.invert.transpose(55).notes puts noodl.inspect puts noodl.transpose(55).notes puts noodl.invert.transpose(55).notes puts noodl.prime.transpose(55).notes puts noodl.invert(2).normal_form.notes puts noodl.invariance_vector puts noodl.transpose(7).notes puts noodlprime=noodl.prime