Csound Csound-dev Csound-tekno Search About

Use of Csound instruments (includes) + Midi2Cs Part 2

Date1997-07-17 23:45
FromRĂ¼diger
SubjectUse of Csound instruments (includes) + Midi2Cs Part 2
    To use *.orc files (I better should have named them *.iif -
     instrument include files) as instrument input is a little tricky.
     Csound expects functions for lots of instruments to be included
     in the header section of your resulting score file. That means
     that all functions used by your *.orc instruments should be
     defined in a 'midi2cs.hdr' file in Midi2Cs's home directory. Do
     not forget to enable 'scoreheader'-reading of the *.hdr file by
     editing the global 'midi2cs.pro'-file. e.g.:

          scoreheader c:\csound\midi2cs.hdr ; file to be included into
scorefile (readonly)

     My current midi2cs.hdr looks like Russel Pinkston's (I think he
     was it but I won't swear) header section defined for lots of
     instruments in his tutorials:

          ; Simple Sine Function
          f01     0       512    10       1
          ; Ramp
          f02     0       513     7       0       512     1
          ; Exponential rise
          f03     0       513     5       .001    512     1
          ; Quarter Sine Wave in 128 locs + extended guard point
          f04     0       129     9       .25     1       0
          ; Quarter Cosine
          f05     0       129     9       .25     1       90
          ; Triangular Wave
          f06     0       512     10      1   0 .111   0  .04    0  .02
0 .012
          ; Sawtooth Wave
          f07     0       512     10      1  .5   .3 .25   .2 .167  .14
.125 .111
          ; Square Wave
          f08     0       512     10      1   0   .3   0   .2    0  .14
0 .111
          ; Narrow Pulse
          f09     0       512     10      1 1  1   1 .7 .5 .3 .1
          ; Exponential rise and decay
          f10     0       513     5       .1      32      1       480     .01

     The string instrument I used for testing looks like the
     following. Please do not add instr or out/outs lines. 'instr' and
     'out/outs' lines are added automatically by Midi2Cs as needed
     depending on mono/stereo settings in the 'midi2cs.pro' file and
     automatic instrument numbering.