Fragments of a Bohlen-Pierce Composition Jacob Joaquin March 1, 2010 jacobjoaquin@gmail.com csound.noisepages.com sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 0dbfs = 1.0 ; Tune Instruments # define TUNE # 264.99816498389697 # ; 440 * 3 ^ (-6 / 13) ; Instruments # define Synth # 1 # # define Echo # 2 # ; F-Tables # define T_Sine # 1 # ; Sine wave ; Sine wave gitemp ftgen $T_Sine, 0, 2 ^ 16, 10, 1 instr $Synth inote_play = p4 ivelocity = p5 kgate adsr 0.05, 0.05, 1, 0.25 ; This doesn't play back correctly. ; Close enough for my needs. ; Frequency ifreq = $TUNE * 3 ^ ((inote_play - 60) / 13) ; FM Synth a1 foscil kgate * ivelocity, ifreq, 1, 2, 6 * ivelocity, $T_Sine ; Outputs a1 = a1 * 0.5 outs a1, a1 chnmix a1, "Send" endin instr $Echo iamp = p4 ; Amplitude itime = p5 ; Time of delay ifb = p6 ; Delay feedback amount iroom_size = p7 ; Size of room, for reverb idamp = p8 ; High frequency dampening of reverb ; Receive send signal from MIDI_Synth a0 chnget "Send" ; Effects adelay delayr itime delayw a0 + adelay * ifb al, ar freeverb adelay, adelay, 0.1, 0.2 ; Outputs outs al * iamp, ar * iamp chnclear "Send" endin ; Instruments # define Synth # 1 # # define Echo # 2 # ; Turn on echo effects i $Echo 0 10000 1 0.333 0.333 0.2 0.2 # include "./fragments_10_captured.csd"