Created
May 4, 2015 15:55
-
-
Save iani/1bf3ad4aa154172a24bd to your computer and use it in GitHub Desktop.
playing glitch from tolix chair to sc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~file = FileReader.read("/Users/labuser/Documents/Tolix_A_Chair.obj"); | |
| ~file[10..15]; | |
| ~file select: { | x | x.size < 1 }; | |
| ( | |
| ~groups = nil; | |
| ~group = nil; | |
| ~file do: { | x | | |
| if (x.size < 2) { | |
| ~groups = ~groups add: ~group; | |
| ~group = nil; | |
| "==========================".postln; | |
| ~groups.postln; | |
| "==========================".postln; | |
| }{ | |
| ~group = ~group add: x; | |
| ~group.postln; | |
| }; | |
| } | |
| ) | |
| ( | |
| { | |
| ~groups.sort({ | a, b | a.size < b.size }) do: { | g | | |
| g do: { | sg | | |
| sg.postln; | |
| { GrayNoise.ar * | |
| EnvGen.kr(Env.sine(0.1, 0.1 * sg.size.postln), | |
| doneAction: 2); | |
| }.play; | |
| 0.1.wait; | |
| }; | |
| 0.2.wait; | |
| } | |
| }.fork; | |
| ) | |
| Server.killAll; | |
| ~groups[..20] do: _.postln; | |
| ~groups[0]; | |
| ~groups[4]; | |
| ~group[..20] do: { | g, i | postf("%: %\n\n", i, g) }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment