Created
August 10, 2013 08:52
-
-
Save 6r1d/6199662 to your computer and use it in GitHub Desktop.
CSound-Python test to debug
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
| # http://www.csounds.com/journal/issue14/realtimeCsoundPython.html | |
| from csoundSession import * | |
| cs = CsoundSession("simple.csd") | |
| print cs.scoreEvent('e', ()) | |
| print cs.resetSession() | |
| print cs.scoreEvent('a', (0, 0, 6000)) | |
| print cs.GetScoreTime() | |
| cs.scoreEvent('a', (0, 6100, 500), 1) | |
| cs.scoreEvent('f', [1, 0, 4096, 10, 1]) | |
| #for note in range(9): | |
| #time.sleep(0.5) | |
| #cs.ChanIKSet("my_test_ch", 1) | |
| # http://www.csounds.com/node/134 | |
| import time | |
| import random | |
| while True: | |
| icps = random.randrange(20,1000,1) | |
| imeth = 6 # 1-6 | |
| cs.note([1, 0, icps, imeth]) | |
| time.sleep( random.random()*2 ) | |
| cs.Stop() | |
| input("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment