| 1 | # lists all instruments in the current orc |
| 2 | # and inserts as a string at curser position |
| 3 | # joachim heintz mar 2012 |
| 4 | |
| 5 | orc = q.getOrc() |
| 6 | lines = orc.splitlines() |
| 7 | allinstrs = "" |
| 8 | for line in lines: |
| 9 | line = line.lstrip() |
| 10 | els = line.split() |
| 11 | if els and els[0] == "instr": |
| 12 | allinstrs = "%s %s" % (allinstrs, els[1]) |
| 13 | print("instruments in this csd:") |
| 14 | print('"' + allinstrs[1:] + '"') |
| 15 | q.insertText('"' + allinstrs[1:] + '"') |
| 16 | |
| 17 | |
| 18 | |
| 19 |