src/Examples/FLOSS Manual Examples/14 Miscellanea/14B05_dialog.csd
raw| 1 | <CsoundSynthesizer> |
| 2 | <CsOptions> |
| 3 | -n |
| 4 | </CsOptions> |
| 5 | <CsInstruments> |
| 6 | ksmps = 32 |
| 7 | |
| 8 | pyinit |
| 9 | pyruni {{ |
| 10 | from PythonQt.Qt import * |
| 11 | dia = QInputDialog() |
| 12 | dia.setDoubleDecimals(4) |
| 13 | }} |
| 14 | |
| 15 | giNumber pyevali {{ |
| 16 | dia.getDouble(dia,"CS question","Enter number: ") |
| 17 | }} ; get the number from Qt dialog |
| 18 | |
| 19 | instr 1 |
| 20 | print giNumber |
| 21 | endin |
| 22 | |
| 23 | </CsInstruments> |
| 24 | <CsScore> |
| 25 | i 1 0 0 |
| 26 | </CsScore> |
| 27 | </CsoundSynthesizer> |
| 28 | ;example by tarmo johannes |