Csound Csound-dev Csound-tekno Search About

new printi opcode

Date1999-09-10 12:13
FromPeter Neubacker
Subjectnew printi opcode
I found it useful to print out some information for the user
at orchestra start, especially for MIDI realtime instruments.
I wrote a little opcode for that purpose, that just outputs
an info string at i-time. It will output that string even if
all message output is disabled with flag -+O in DirectCsound.

Maybe you find it in the next release - if you want to
compile yourself, you can find source and desription at:

http://www.harmonik.de/femc/femcdown.html

See decription below.
I also changed phasorbnk to use double phase internally
according to the new phasor implementation.

Peter



printi
------

        printi   "infostring"

DESCRIPTION
This opcode outputs "infostring" at i-time only.
A carriage return is added automatically.

INITIALIZATION
infostring  -  string to be printed out. Must be in double quotes.

EXAMPLE
printi can be used to output some information about the orchestra
for the user. It will print even if all output is disabled for better
realtime performance (Flag -+O in DirectCsound).
It will normally be used in an instrument that is turned on at orchestra
start and turns itself off immediately. This example outputs some info
about the orchestra with some ASCII-graphics concerning slider assignment:

turnon 100

;========================================================================
instr 100                     ; Print Information
;------------------------------------------------------------------------

printi "                                                                 "
printi "                 SAMPLE PLAYER REALTIME CONTROL                  "
printi " _______________________________________________________________ "
printi "     Time     Form    Detun   Follow    Sound       Amplitudes   "
printi " --------------------------------------------------------------- "
printi "  |   |   |   |   |   |   |   |   |   .   |    .   |  127  |   | "
printi "  |   |   |   |   |   |   |   |   |   .   |    .   |   |   |   | "
printi "  |   |   |   |   |   |   |   |   |   .   |    .   |   |   |   | "
printi "  |   |   |   |   |   |   |   |   |   .   |    .   |   |   |   | "
printi "  |   |   |   |   |   |   |   |   |   .  Rooh  .   |   |   |   | "
printi "  |   |   |   |   |   |   |   |   |   .  Baah  .   |   |   |   | "
printi "  |   |   |   |   |   |   |   |   |   .  Tuba  .   |   |   |   | "
printi "  |   |   |   |  64  64  64   |  60   .  Trump .   |   |   |  64 "
printi "  |   |   |   |   |   |   |   |   |   .  Sax2  .   |   |   |   | "
printi "  |   |   |  40   |   |   |  42   |   .  Sax1  .   |   |   |   | "
printi " 30   |   |   |   |   |   |   |   |   .  Gong  .   |   |  30   | "
printi "  |   |   |   |   |   |   |   |   |   .  Koto  .   |   |   |   | "
printi "  |   |   |   |   |   |   |   |   |   . Theorb .   |   |   |   | "
printi "  |   0    0  |   |   |   |   |   |   . String .   0   |   |   | "
printi " ----------------------------------------------------------------"
printi "  1   2   3   4   5   6   7   8   9  10   11   12  13  14  15  16"
printi " ________________________________________________________________"
printi " DUR STR STR FRM RAW FIN VEL KEY REF     SEL      ENV ENV ENV AMP"
printi "     SPD POS 0-2 0-2 -0+     FOL KEY              Atk Dcy Rel    "

turnoff
endin