| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
import sys,os |
| 5 |
import PythonQt.QtGui as pqt |
| 6 |
|
| 7 |
sys.path.append(os.getcwd()) |
| 8 |
|
| 9 |
def bytesong(PAT): |
| 10 |
stopsong() |
| 11 |
q.loadDocument('bytesong.csd') |
| 12 |
options = '-m0 -odac --omacro:PAT=' + PAT |
| 13 |
q.setOptionsText(options) |
| 14 |
q.stop() |
| 15 |
q.play() |
| 16 |
index = q.getDocument('bytesongs.py') |
| 17 |
q.setDocument(index) |
| 18 |
|
| 19 |
|
| 20 |
def stopsong(): |
| 21 |
index = q.getDocument('bytesong.csd') |
| 22 |
q.stop(index) |
| 23 |
|
| 24 |
q.loadDocument('bytesongs.py') |
| 25 |
q.setDocument(q.getDocument('bytesongs.py')) |
| 26 |
|
| 27 |
pqt.QMessageBox.information(0, 'OK', 'Bytesong functions loaded.\n Now execute the bytesong lines.') |
| 28 |
|
| 29 |
1/0 |