8. Project tutorials
8a. Create a simple sinewave instrument and accompanying score

Here is the orchestra file

ode.orc:
;;; header
sr = 44100  ; sample rate in Hz 
kr = 4410   ; control rate 
ksmps = 10  ; sr/kr 
nchnls = 1  ; nr of channels
;;; end of header

;;; ode to joy
instr 1
iamp  = ampdb(p4)   ; p4 in dB --> 16bit amp for oscil
ifreq = cpspch(p5)  ; p5 in octave.pitch --> frequ in Hz 
; ahandle opcode            
afoo      oscil   iamp, ifreq, 1
out afoo
endin	

and the companion score file

ode.sco:
;;; score file (Ode to Joy)
; wave table name
; starting time 
; size in powers of 2  
; GENerator 
; and its parameters 
f1  0  4096  10  1  ; a sine wave 
; 
; calls to instrument 1
; at this time 
; for duration
; dB (some pcs have weak sound cards)
; octave.pitch (half tones) 

i1   0  .9  90  7.06
i1   1  .9  92  7.06 
i1   2  .9  93  7.07
i1   3  .9  94  7.09
i1   4  .9  98  7.09
i1   5  .9  96  7.07
i1   6  .9  95  7.06
i1   7  .9  94  7.04

; end, do't forget it
e

Things yet to come

8b. Use the function tables (GEN10) to create different waveshapes
8c. Add p-fields for amplitude and frequency
8d. Create an amplitude envelope, change the frequency over time
8e. Add chorusing, vibrato, filters, etc. to the single sound
8f. Create sounds using different opcodes
8g. Create a sound and sequence a piece of music from it


Return to Table of Contents.