From 8241ad977cd828ffad1a57de01aa7cf0861bb588 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Wed, 24 Dec 2014 22:22:09 +0000 Subject: [PATCH] Wont run headless for some reason --- README | 20 ++++++++++++++++++- delay.csd | 57 ++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/README b/README index c5531b7..376d9a8 100644 --- a/README +++ b/README @@ -1 +1,19 @@ -m i l c h l o d e +TODO: +Two or three channels + +Global Sliders: +- BPM +- Input gain +- Amount of input to send to delay line +- Feedback amount + +Global Switches: +- OSC Master/Minion + +Channel Sliders: +- Gain + +Channel buttons: +- Clear +- Mute/unmute +- Pitch down diff --git a/delay.csd b/delay.csd index 60fed04..7f93fce 100644 --- a/delay.csd +++ b/delay.csd @@ -1,5 +1,7 @@ - -iadc -odac -dm0 + +-iadc -odac -dm0 + ; CSound parameters @@ -9,19 +11,44 @@ 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 +gkporttime init 0.3 ; Portamento time +;gkdlt init 5 ; Max delay +;gkmix init .5 ; Dry/wet +;gkfeedamt init .95 ; Feedback ratio +;gkamp init .7 ; Output amplitude rescaling +;gkingain init .5 ; Input gain +;gkOnOff init 1 ; Input on off + +;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 ; Instr 1 is the source instr 1 ; Turn off with the switch if gkOnOff=0 then -turnoff + turnoff endif ; Get input from mic/line @@ -33,15 +60,6 @@ endin ; Instr 2 is the delay line instr 2 -; Sense keyboard -kKey FLkeyIn -kChanged changed kKey -printk2 kKey -;if kKey=112&&kChanged=1 then - ;printf_i "awd" - ;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 @@ -60,8 +78,8 @@ delayw gasigR + (adelsigR * gkfeedamt) ;Feedback aL ntrpol gasigL, adelsigL, gkmix aR ntrpol gasigR, adelsigR, gkmix -outs aL * gkamp, aR * gkamp ;Mix wet/dry -clear gasigL, gasigR ;Clear global audio sends +outs aL * gkamp, aR * gkamp ; Mix wet/dry +clear gasigL, gasigR ; Clear global audio sends endin @@ -71,4 +89,5 @@ endin i 2 0 -1 ;Instrument 2 plays a held note f 0 3600 ;Keep performance going +