Help with syntax for an if/while statement involving simultaneous note events.

First, sorry about the code below. The paragraph/code bIock isn't showing up for me on the highlighted text.
For my question... I want to have a group allowed/disallowed when a pair of keyswitches are pressed and have a button reflect that change. I have things working fine with 1 keyswitch as follows...
---------------------------------
if ($btn_001 = 0) while ($EVENT_NOTE = $keyswitch1) $btn_001 := 1 $grp_001_active := 1 end while end if if ($btn_001 = 1) while ($EVENT_NOTE = $keyswitch1) $btn_001 := 0 $grp_001_active := 0 end while end if
---------------------------------
But the following doesn't seem to work. I also tried nesting a while within a while to no avail...
---------------------------------
if ($btn_001 = 0) while ($EVENT_NOTE = $keyswitch1 and $EVENT_NOTE = $keyswitch2) $btn_001 := 1 $grp_001_active := 1 end while end if if ($btn_001 = 1) while ($EVENT_NOTE = $keyswitch1 and $EVENT_NOTE = $keyswitch2) $btn_001 := 0 $grp_001_active := 0 end while end if
---------------------------------
Any thoughts on the proper syntax in this case?
Answers
-
-
I read that post a half dozen times before posting. Still not seeing that paragraph icon. Pasted the code. Selected it. Nothing. Is it working for you? I tried both Chrome and Brave.
0 -
Yes it works here. You need to scroll up a bit, the icon (stupidly) shows in the middle of the selected area, which is going to be off-screen if you paste a lot of code.
As for your issue, you probably want to use %KEY_DOWN instead of a while loop.
0 -
Much appreciated! I will investigate %KEY_DOWN. As for the code block, I've still had no luck lol. I've tried 3 browsers and 2 PCs and still no sign of that damn paragraph icon. Lots of code... a little code.. doesn't matter. I've read your "how to paste code..." post over and over again, trying to unearth some hidden clue like I'm solving a puzzle in the Dvinci Code. I'm starting to think I'm being gaslit by the forum software. 🤣 Oh well, thanks again and be well. :)
0 -
Oh, it seems this is really the case currently. Something got disabled in the forum back end I suppose. Reporting this to @Matt_NI.
0 -
Right on 👍️
0 -
Here, at home with Firefox, the same for the paragraph icon .
0 -
Sorry folks, a little bit of hiccup on our side. This is fixed now. The paragraph icon should now be displayed and a code block is now possible again.
0 -
Ok, it's work fine, now _ 😎
0 -
Hi @EvilDragon the codeblock is now displayed correctly. Do you mind helping Alcot60890 with their syntax above?
0 -
Already did!
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 62 NI News
- 788 Tech Talks
- 4.1K Native Access
- 16.6K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 380 Battery 4
- 850 Guitar Rig & FX
- 429 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.3K Traktor
- 7.3K 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