Welcome to the new and improved Native Instruments online community. Join our active forum of 40,000+ members for discussions and much more.
QML Modifications. On today's menu: Double-Tap buttons.

Sûlherokhh
Member Posts: 538 Guru
Inspired by Patch & dj_estrela, i decided to publish the basic code i used for all my double-tap modifications i've done. Hopefully you can implement it if you need something like this. The button distinguishes between a single tap (function call in the first timer) and a double tap (function call in the ButtonScriptAdapter) that interrupts the first timer before it has run out of time and made it's call.
ButtonScriptAdapter { name: "BUTTON" onPress: { if (holdButton_countdown.running) { tapButton_countdown.stop() holdButton_countdown.stop() // PLACE DOUBLE-TAP FUNCTION HERE } else holdButton_countdown.restart() } onRelease: { if (holdButton_countdown.running) tapButton_countdown.restart() } } Timer { id: holdButton_countdown; interval: 250 onTriggered: { if (tapButton_countdown.running) { // PLACE SINGLE-TAP FUNCTION HERE } } } Timer { id: tapButton_countdown; interval: 250 } Wire { from: "%surface%.controllerButton"; to: "BUTTON" }
🦋
P.S: onTriggered executes when the timer reaches ZERO and doesn't execute if it gets stopped prematurely.
Tagged:
2
Back To Top
Categories
- 10.8K All Categories
- 22 Welcome
- 451 Hangout
- 59 NI News
- 210 Tech Talks
- 1.1K Native Access
- 5K Komplete
- 626 Komplete General
- 1.1K Komplete Kontrol
- 1.9K Kontakt
- 492 Reaktor
- 160 Battery 4
- 272 Guitar Rig & FX
- 203 Massive X & Synths
- 211 Other Software & Hardware
- 2.3K Maschine
- 14 Sampling Room
- 2.7K Traktor
- 2.4K 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