/*Getting started.. 1.6 Instrument Control from the Score Instrument no. 1 provides two control possibilities for a sine oscillator. Volume and pitch can be determined from the score. The different values for a score instruction are called parameter-fields. For example the score below uses 5 p-fields: i1 0 2 0.8 440 When used inside an instrument, the values from the score are referenced using a 'p' and the number of the p-field. p1, p2 & p3 are required arguments for each instrument, and they have fixed meaning. All values after that can be freely assigned. p1 - instrument number p2 - start time p3 - duration --- p4 - amplitude (0-1) p5 - frequency (Hz) */ sr = 44100 ksmps = 128 nchnls = 2 0dbfs = 1 instr 1 aSine poscil3 p4, p5, 1 ; Here, a different oscillator type is used, which has more flexibility and higher precision. outs aSine, aSine endin f 1 0 1024 10 1 ;ins strt dur amp freq i 1 0 2 0.8 440 ; loud i 1 3 2 0.1 554.365 ; quiet i 1 6 2 0.4 659.255 i 1 9 3 0.1 440 ; you can layer more instances of the same instrument easily i 1 9.5 3.5 0.2 554.365 i 1 10 3 0.1 659.255 i 1 10.2 2.5 0.15 783.991 i 1 10.8 2 0.3 932.328 e ; Keep in mind, that in "realtime mode", the number of layers is limited by your machines CPU power. ; written by Alex Hofmann (Nov. 2009) - Incontri HMT-Hannover 1013 279 563 397 true 160 158 162 28 282 255 150 {d7080d2c-9587-414f-bd0d-3f9d6f393a49} true 0 -3 -255.00000000 scope 2.00000000 1.00000000 1.00000000 1.00000000 0.00000000 29 230 254 53 {ede4c1b4-2e64-4b98-98f8-f6179b09cb0f} true 0 -3 left Lucida Grande 14 3 0 0 0 255 255 255 noborder 1 1 29 80 251 109 {1c65da94-898d-49f2-b94f-472fb9a72903} true 0 -3 0 1.00000000 1.00000000 1.00000000 1.00000000 auto auto true 29 20 251 61 {3c3dcb27-288d-4ae0-8022-28c33c7021c5} true 0 -3 left DejaVu Sans 14 3 0 0 0 255 255 255 noborder 1 1