The right way to switch between groups
What is the right way to switch between groups with ksp script?
I want to write script that switch group according to the held note.
for example: play note c(0) will switch to group a, play note D#(3) will switch to group D
Best Answers
-
So, in your case you have 12 groups, and you want each C to trigger group 1, each C# to trigger group 2, etc.?
That's pretty simple:
on note disallow_group($ALL_GROUPS) allow_group($EVENT_NOTE mod 12) end on
0 -
Yes, group allowing is only scanned before actually playing a note, you cannot change this during a note. You would have to kill your first pressed note then play the right one based on user input, I suppose.
0 -
Yes you can simply play all groups at the same time then modify their volume, but this will possibly play a lot of voices (depending on number of groups you have) and is definitely not gonna be CPU efficient.
0
Answers
-
So, in your case you have 12 groups, and you want each C to trigger group 1, each C# to trigger group 2, etc.?
That's pretty simple:
on note disallow_group($ALL_GROUPS) allow_group($EVENT_NOTE mod 12) end on
0 -
@EvilDragon Thanks for your response. First, I wanted to verify I've got the point of allow/disallow groups.
Now, on my script it quite different, I want to allow_group based on played chord.
I wrote a script that runs "on note", and each time verify if it's a combination of chord. I mean it starts the calculation on each note played, and if at least 3 notes are held It could be a chord.
as you know midi sent message per note. so to calculate chord, "on note" called at least three time. I managed to recognize chord by patterns.
One note: This script written for specific use case. So In my use-case when consumer play C major, I received a chord notes between 0-45 (C/E/G) and the base note (C) on higher octave ( that helps me to know the base before I know the chord type)
Now I want to play loops/sample accordingly. I thought to play the loop/sample based on the base note immediately and when I got the chord pattern to switch between groups Major/Minor etc...
However it seems that allow_groups/disallow_group works for each note and not globally ( like mute/unmute groups), am I right? if, yes. do you have any thoughts?
0 -
Yes, group allowing is only scanned before actually playing a note, you cannot change this during a note. You would have to kill your first pressed note then play the right one based on user input, I suppose.
0 -
@EvilDragon Is there a workaround for this limitation like changing the volume of the group? Or something you can think of
thanks
0 -
Yes you can simply play all groups at the same time then modify their volume, but this will possibly play a lot of voices (depending on number of groups you have) and is definitely not gonna be CPU efficient.
0 -
Yeah there is a trade-off. well, with that implementation it gonna play only one note per chord, which means one voice (loop) from each group at the same time. max of 8 group so it will be worth case 8 voices at the same time. wdyt? :) Is it really terrible trad-off?
thanks a lot
0
Categories
- All Categories
- 19 Welcome
- 1.2K Hangout
- 58 NI News
- 634 Tech Talks
- 3.3K Native Access
- 14K Komplete
- 1.6K Komplete General
- 3.6K Komplete Kontrol
- 4.8K Kontakt
- 1.5K Reaktor
- 337 Battery 4
- 741 Guitar Rig & FX
- 382 Massive X & Synths
- 1K Other Software & Hardware
- 4.8K Maschine
- 6.2K Traktor
- 6.2K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators