First time here? Check out the FAQ!
x

!KeyDown trigs

0 votes
861 views
Hello Kyma people, Is bpm: the only way to generate trigs that behave like !KeyDown trigs?
asked Sep 11, 2016 in Capytalk & Smalltalk by domenico-cipriani (Master) (3,110 points)
Ciao Domenico, another way to generate voice-stealing gates is with the StepSequencer module.

2 Answers

0 votes
 
Best answer

Hi Domenico,

you are almost there!

Take a look at this http://kyma.symbolicsound.com/qa/322/how-euclidean-expressions-send-triggers-with-voice-stealing?show=322#q322

and a little more convoluted... http://kyma.symbolicsound.com/qa/484/what-most-reliable-convert-changing-value-with-voice-stealing?show=484#q484

basically you could multiply the whole expression by the same BPM trigger clock, so thereby it will have the voice stealing.


(

((1 bpm: !BPM *8) countTriggersMod:32) of: #(!Step01  !Tie01 !Step02  !Tie02 !Step03  !Tie03 !Step04  !Tie04 !Step05  !Tie05 !Step06 !Tie06 !Step07  !Tie07 !Step08  !Tie08 !Step09  !Tie09 !Step10  !Tie10 !Step11  !Tie11 !Step12 !Tie12 !Step13 !Tie13 !Step14 !Tie14 !Step15 !Tie15 !Step16 !Tie16)

) * (1 bpm: !BPM*8)

answered Sep 14, 2016 by cristian-vogel (Master) (8,460 points)
selected Sep 19, 2016 by domenico-cipriani
or do a test and construct a voicestealing trigger, only when the step is different.
To see things more clearly, you could write it all as a short Capytalk/Smalltalk program and paste this whole program into the parameter field.....

| masterClock mySequencerStages stageValue voiceStealingGate |  "this line declares the variables"

masterClock := 1 bpm: (!BPM*8).

mySequencerStages := #(!Step01  !Tie01 !Step02  !Tie02 !Step03  !Tie03 !Step04  !Tie04 !Step05  !Tie05 !Step06 !Tie06 !Step07  !Tie07 !Step08  !Tie08 !Step09  !Tie09 !Step10  !Tie10 !Step11  !Tie11 !Step12 !Tie12 !Step13 !Tie13 !Step14 !Tie14 !Step15 !Tie15 !Step16 !Tie16).

stageValue := (masterClock countTriggersMod: 32) of: mySequencerStages.

voiceStealingGate := ((stageValue gt: 0) fullRamp: 10 ms) sign * (stageValue gt: 0).

 "the result of this script - the value of the variable voiceStealingGate, is there on its own line at the end"

voiceStealingGate
I would also consider seperating the !Ties from the !Steps.... You could read through the Tie sequence and test its  current value in order to set a Legato effect in your envelope or not retrigger the sample on that step.
thanks a lot Cristian,
I ill try with the short Capytalk Program!
I did an experiment with 4 SoundsToGlobalControllers and it works better,
the first one generates the event !count ( that can be also used to see the position in the sequencer)

(!Run bpm: !BPM * 4) nextIndexMod: 16 reset: !Reset

then the second one generates with the expression:
!Count of: # (!Step01 !Step02 !Step03 !Step04 !Step05 !Step06 !Step07 !Step08 !Step09 !Step10 !Step11 !Step12 !Step13 !Step14 !Step15 !Step16)
the event !Hit

that I use as an on/off switch for the 3rd STGC, which value is:
!Hit bpm: !BPM dutyCycle: !Duty
and which generate the value !Trig , that can be use in any gate fileld that expect a !KeyDown

finally I have the last STGC that generates the event: !Duty with the value:
!Count of: #(!Duty01 !Duty02 !Duty03 !Duty04 !Duty05 !Duty06 !Duty07 !Duty08 !Duty09 !Duty10 !Duty11 !Duty12 !Duty13 !Duty14 !Duty15 !Duty16)

so, in the sequencer when contiguous steps are activated and !Duty = 1, you will have a tied step, if you wants staccato steps, you use for !Duty a value that is less than 1.



of course, another STGC must be add to controls the pitch of the steps.
+1 vote

Hi Domenico,

good to see you here in the forum! I read that you finaly bought a Paca... Excellent choice!

There are so many ways in Kyma to generate triggers. It all depends of what you want to do with it.

!KeyDown is a HotValue which is generated each time you press a MIDI Key. You can send several messages to !KeyDown for example: !KeyDown gateWhen: (!KeyNumber eq: 72) to only trigger when MIDI Note Number 72 is pressed.

bpm:  on the other hand is a message. You can send for example the message bpm: to the number "one" with an !HotValue as an  arrgument...

(1 bpm: !BPM) countTriggers

...which counts the number of 0 to 1 triggers.

A sound and envelope, a global controller almost anything what changes the value from under zero above zero or from zero upwards could directly be used as a trigger in Kyma.

Bascially a trigger in Kyma is a condition when a value changes from <=0 to anythin above >0.

Do you have an specific problem to solve?

All the best

Chris (from dNp)

 

 

answered Sep 11, 2016 by christian-schloesser (Adept) (2,920 points)
hello Chris!!!
thanks for your reply!

I am trying to build a very simple sequencer based on a capytalk expression to add durations to the triggers. I need !KeyDown -like trigs because if you donĀ“t have the -1, 1 succesion you hear clicks on the sound...
Could you post or send me your capytalk expression or your .kym file?
I found a solution with this expression (for a 16 step 1 bar sequencer):

((1 bpm: !BPM *8) countTriggersMod:32) of: #(!Step01  !Tie01 !Step02  !Tie02 !Step03  !Tie03 !Step04  !Tie04 !Step05  !Tie05 !Step06 !Tie06 !Step07  !Tie07 !Step08  !Tie08 !Step09  !Tie09 !Step10  !Tie10 !Step11  !Tie11 !Step12 !Tie12 !Step13 !Tie13 !Step14 !Tie14 !Step15 !Tie15 !Step16 !Tie16)

where !Step can be -1 or 0 or 1
and !Tie can be 0 or 1.

it is kind of an ugly code but it works ;)
Thanks, Chris, and another way to generate voice-stealing gates is the construct:

1 s tick

where the receiver is a duration with units and the message is tick.  This gives you a 50% duty cycle gate with voice-stealing
...