You will definitely have a lot of friends here, but I am pretty sure you will have even more that will help you to learn scripting if you tries to
I was learning some app-scripting stuff while ago, so I think I just need to get familiar with fundaments. I really love the response from this community, you guys help me a lot, and this is my day 2 here <3
This is true. The only way that GP will know any length of time of the switch press is if you have some sort of a timer scripted into a Rackspace.
And, by the way, I love my FCB1010…
Yep. I am pretty new to that, but for some piece of harware which is roughly 20 years old…
Honestly, I think it is not rocket science and was really wondering why there is almost no good midi foot controllers at the market, which are affordable and from 21st century… I just played with the thought to develop one, fully programable, based on raspbery Pi. Something like FCB2020
You’re in good company here in the forum. Have you seen these?
Yes, I checked both… Actually it is still on the table, as I started to see really weird behaviour with my FCB1010 and a few scripts. In my next message.
So I made mistake somewhere. Cannot find where for many hours. The problem is somewhere between binding global midi and scripting. I have only one binding in GPs global MIDI, it is channel 22 CC, which moves variation down. It is pretty obvious in video I attached… The mystery is that when I do the racks from scratch (or from the first and 6th rack, it works, actually for hours. Than it start to behave in a strange ways. That is the moment where I am getting lost.
Here is the rig. Now I am starting to dig deep into it, bypass bindings, scripts…
Daff_Rig.gig (135.6 KB)
The weird gets weirder. It works like supposed when i rebind the controller. So it is somehow stacked or filled in time (maybe loop) - but it is about binding not-meant-to-work-this-way value to global midi assignement.
And when I am trying to switch from rackspace to rackspace and variations, GP crashes in a few attempts.
It started to act normally just when I removed the script from bot racks… Mhm. Cannot see what can cause the problem there.
Try this:
Daff_Rig.gig (135.3 KB)
I changed the code, because with this you created an endless loop.
The callback is executed as soon as you enter the rackspace.
So the widget has value 1.0 => switch rack
The code LONG_PRESS.SetWidgetValue(0.0) makes sure that when you enter the rackspace
you have to press the widget
// When the Long Press widget is active, open the tuner plugin window.
On WidgetValueChanged(newValue : double) from LONG_PRESS
if newValue == 1.0 then
LONG_PRESS.SetWidgetValue(0.0)
SwitchToRack(2,0)
end
End
And I changed a property of your Widget, Ignore Variations is checked,
Oh, thank you very much. I was suspicious about endless loop, but I did not fully understand the if else serie rank13 gave me.
It works like a charm! Thanks once again, you saved me lot of work!