finished rychta
This commit is contained in:
parent
7b6aed5d81
commit
4f02f491a5
|
@ -1,4 +1,13 @@
|
|||
<Cabbage> bounds(0, 0, 0, 0)
|
||||
; RYCHTA
|
||||
;
|
||||
; drum sequencer made out of necessity
|
||||
;
|
||||
; use with WaggonBAU or Sitala
|
||||
;
|
||||
; (s) Severák 2019
|
||||
; licensed with MIT license
|
||||
<Cabbage>
|
||||
bounds(0, 0, 0, 0)
|
||||
form caption("Rychta") size(700, 370), colour(58, 110, 182), pluginid("rych")
|
||||
|
||||
; UI was generated using profi method called copy&paste
|
||||
|
@ -155,11 +164,12 @@ label bounds(590, 252, 30, 24) text("15") identchannel("s15")
|
|||
label bounds(624, 250, 30, 25) text("16") identchannel("s16")
|
||||
label bounds(14, 280, 166, 39) text("RYCHTA")
|
||||
label bounds(14, 322, 166, 18) text("drum sequencer")
|
||||
checkbox bounds(566, 298, 126, 30) text("external clock") channel("external_clock")
|
||||
rslider bounds(186, 286, 95, 55) range(60, 180, 120, 1, 1) text("BPM") channel("bpm")
|
||||
button bounds(290, 294, 80, 40) text("RUN", "STOP") channel("running")
|
||||
combobox bounds(378, 292, 80, 20) populate("*.snaps")
|
||||
filebutton bounds(378, 320, 80, 40) text("Save") mode("snapshot")
|
||||
checkbox bounds(288, 334, 126, 30) text("external clock") channel("extclock")
|
||||
rslider bounds(186, 286, 95, 55) range(1, 500, 120, 1, 1) text("BPM") channel("bpm") identchannel("bpmw")
|
||||
button bounds(288, 288, 80, 40) text("RUN", "STOP") channel("running") identchannel("runningw")
|
||||
|
||||
|
||||
label bounds(378, 298, 292, 17) text("there will be more features in 2020")
|
||||
</Cabbage>
|
||||
<CsoundSynthesizer>
|
||||
<CsOptions>
|
||||
|
@ -175,14 +185,40 @@ nchnls = 2
|
|||
instr GUI
|
||||
kstep init 0
|
||||
|
||||
kextclock chnget "extclock"
|
||||
|
||||
krunning chnget "running"
|
||||
kbpm chnget "bpm"
|
||||
if kextclock==1 then
|
||||
kbpm chnget "HOST_BPM"
|
||||
kbpm limit kbpm,1,2000
|
||||
krunning chnget "IS_PLAYING"
|
||||
chnset kbpm, "bpm"
|
||||
chnset krunning, "running"
|
||||
else
|
||||
krunning chnget "running"
|
||||
kbpm chnget "bpm"
|
||||
endif
|
||||
|
||||
kcps = kbpm / 60
|
||||
if changed:k(kextclock)==1 then
|
||||
if kextclock==1 then
|
||||
; we display native clock values and disable buttons
|
||||
chnset "active(0)", "runningw"
|
||||
chnset "active(0)", "bpmw"
|
||||
|
||||
else
|
||||
; we enable buttons
|
||||
chnset "active(1)", "runningw"
|
||||
chnset "active(1)", "bpmw"
|
||||
endif
|
||||
endif
|
||||
|
||||
kcps = kbpm / 15
|
||||
|
||||
ktrig metro kcps
|
||||
|
||||
if changed:k(krunning)==1 then
|
||||
kstep = 0
|
||||
endif
|
||||
|
||||
if krunning==1 && ktrig==1 then
|
||||
Stepiden sprintfk "s%d", (kstep+1)
|
||||
chnset " fontcolour(255, 255, 0, 255)", Stepiden
|
||||
|
@ -193,7 +229,7 @@ instr GUI
|
|||
endif
|
||||
chnset " fontcolour(192, 192, 192, 255)", Stepidenprev
|
||||
|
||||
|
||||
; another massive copypasta section:
|
||||
|
||||
krow = 1
|
||||
|
||||
|
@ -296,7 +332,6 @@ endin
|
|||
|
||||
</CsInstruments>
|
||||
<CsScore>
|
||||
;causes Csound to run for about 7000 years...
|
||||
i "GUI" 0 3600
|
||||
</CsScore>
|
||||
</CsoundSynthesizer>
|
||||
|
|
Loading…
Reference in New Issue