To compile PySCLang on OSX
Start with a fresh default build of superCollider (not the modified
build above)
Open SuperCollider3/Psycollider/PySCLang/PySCLang.xcodeproj
In the Groups & Files pane in Xcode:
-Navigate to Frameworks
-if libsndfile.a is red in color
- Click on libsndfile.a
- Click the info button
- Click choose
- Navigate to and select your copy of libsndfile.a
(usually in /usr/local/lib/)
- In the Project Menu (top of the screen):
- In the Project Menu:
Choose the Build Tab
Choose "Deployment" from the Configuration Dropdown
Choose "Customized Settings" from the Collection Dropdown
Change "Library Search Paths" to ../../build
Change Instruction Scheduling to match your processor
Make sure Prebinding and ZeroLink are NOT checked
Close the window
- Back in xCode
(then type apple-shift-B, if you want to watch it go)
- Copy PySCLang.so from PySCLang/build/ to ~/sclang/
- add ~sclang/ to your PYTHONPATH environmental variable
- Open a Terminal
- Type: import PySCLang
- If there are no errors, things are looking good!
- Type: langPath = os.path.expanduser('~/sclang/')
- Type: PySCLang.setCmdLine("s = Server.local; s.boot; ")
- Type: PySCLang.sendMain('interpretPrintCmdLine')
- Wait for the server to boot
- Type: PySCLang.setCmdLine("s.initTree;
s.serverRunning=true")
- Type: PySCLang.sendMain('interpretPrintCmdLine')
- Wait for a few seconds
- Type: PySCLang.setCmdLine(" { SinOsc.ar(442, 0, 0.4)
}.play(s) ")
- Type: PySCLang.sendMain('interpretPrintCmdLine')
- A sine wave should play
- Type: PySCLang.setCmdLine("s.quit; s.serverRunning=false")
- Type: PySCLang.sendMain('interpretPrintCmdLine')
- This should quit the server