Cabbage Logo
Back to Cabbage Site

How to force monophonic on a synth?

hey all - i’d like to be able to force a synth to be monophonic. so far i’ve been looking for simple synths and trying them out in Cabbage and they always play polyphonically, even if there’s supposed to be a mono mode (i tried this in the Analog Nomad synth ) example. anyway let’s take a super simple example:

instr inst0
a1 expon .1, 0.5, 0.001
p5 = p5/127
aOut oscili a1*p5, cpsmidinn(p4)
outs aOut, aOut

endin

this is being played by several rows in a 16 x 16 sequence with each row getting a voice so ostensibly it’s a 16 voice synth, but i wanted to see if it was possible to limit the polyphony. thanks for any help!

after this
ksmps = 128
nchnls = 2
0dbfs = 1
seed 0

add this
maxalloc inst0,1

1 Like

this will limit max running instances on inst0 to 1.
other way is use
kanz active inst0,0,0
if kanz > cabbageGetValue:k(“vox”) then
turnoff2 inst0, 1, 0
endif

this should run in other instrumen(always run) and will control amount of maximum voices with “vox” channel, in your case you can just write 1 instead cabbageGetValue:k(“vox”)… this turn off older voices if new midi coming.

1 Like

excellent @Kzz i’ll give this a try when i have some time. thanks!