浏览代码

Tidied up. Now have a working line in...

master
Pete Shadbolt 10 年前
父节点
当前提交
277e19e239
共有 2 个文件被更改,包括 20 次插入47 次删除
  1. +19
    -46
      delay.csd
  2. +1
    -1
      makefile

+ 19
- 46
delay.csd 查看文件

@@ -1,46 +1,20 @@
main.csd
Pete Shadbolt.2014
Based on code by Iain McCurdy, 2006
ksmps MAY NEED TO BE LOW (AND kr THEREFORE HIGH) WHEN WORKING WITH SHORT DELAY TIMES DEFINED INITIALLY AT KRATE
TODO: implement octave down/up (like old delay pedal), key control, panic button
<CsoundSynthesizer>
<CsOptions>
-iadc -odac -dm0
</CsOptions>
<CsOptions> -iadc -odac -dm0 </CsOptions>
<CsInstruments>
sr = 44100 ;Sample rate
ksmps = 20 ;Number of audio samples in each control cycle
nchnls = 2 ;Number of channels (2=stereo)
0dbfs = 1 ;Maximum amplitude
gkporttime = 0.3; portamento time
;FLTK GUI interface
FLcolor 200, 200, 255, 0, 0, 0
FLpanel "M I L C H L O D E", 500, 300, 0, 0, 0, 1
gkOnOff,ihOnOff FLbutton "Input On/Off", 1, 0, 22, 180, 25, 5, 5, 0, 1, 0, -1
; Sliders
gkdlt,ihdlt FLslider "Delay Time (sec)", .001, 5, 0, 23, -1, 490, 25, 5, 50
gkmix,ihmix FLslider "Dry/Wet Mix", 0, 1, 0, 23, -1, 490, 25, 5, 100
gkfeedamt,ihfeedamt FLslider "Feedback Ratio", -1, 1, 0, 23, -1, 490, 25, 5, 150
gkamp,ihamp FLslider "Output Amplitude Rescaling", 0, 1, 0, 23, -1, 490, 25, 5, 200
gkingain,ihingain FLslider "Input Gain", 0, 1, 0, 23, -1, 140, 20, 350, 5
ih FLbox "Keys: ", 1, 5, 14, 490, 20, 0, 250
;Set defaults
FLsetVal_i 1, ihOnOff
FLsetVal_i .5, ihingain
FLsetVal_i 4, ihdlt
FLsetVal_i 0.5, ihmix
FLsetVal_i 0.95, ihfeedamt
FLsetVal_i .7, ihamp
FLpanel_end ;End of GUI
FLrun ;Run the FLTK thread
; CSound parameters
sr = 44100 ; Sample rate
ksmps = 20 ; Number of audio samples in each control cycle
nchnls = 2 ; Number of channels (2=stereo)
0dbfs = 1 ; Maximum amplitude
; Delay parameters
gkporttime = 0.3 ; Portamento time
gkdlt = 5 ; Max delay
gkmix = .5 ; Dry/wet
gkfeedamt = .95 ; Feedback ratio
gkamp = .7 ; Output amplitude rescaling
gkingain = .5 ; Input gain
; Instr 1 is the source
instr 1
@@ -68,10 +42,10 @@ printk2 kKey
;FLsetVal_i 0.0, gkfeedamt
;endif
kporttime linseg 0, .001, 1, 1, 1 ;A short envelope
kporttime = kporttime * gkporttime ;TODO: remove this
kdlt portk gkdlt, kporttime ;Apply portamento
adlt interp kdlt ;Interpolate
kporttime linseg 0, .001, 1, 1, 1 ; A short envelope
kporttime = kporttime * gkporttime ; TODO: remove this
kdlt portk gkdlt, kporttime ; Apply portamento
adlt interp kdlt ; Interpolate
;Left channel
abufferL delayr 5 ;Buffer
@@ -92,10 +66,9 @@ endin
</CsInstruments>
<CsScore>
i 2 0 -1 ;Instrument 2 plays a held note
f 0 3600 ;Keep performance going
</CsScore>
</CsoundSynthesizer>

+ 1
- 1
makefile 查看文件

@@ -1,4 +1,4 @@
all: run

run:
csound main.csd
csound delay.csd

正在加载...
取消
保存