For those that need some small help texts, here’s a way.
By default the timer function is disabled, and its period is set to a quarter second.
When touching a pot, the onPotTouch is triggered.It looks for the text to display, based on the control touched, and then triggers the showHelp function.
The showHelp (that can be triggered from elsewhere too) then displays the text in the lower right screen corner.and enables the timer.
The onTick will revert the display back to its default text after about a second (4 ticks).
The reason to do it like this, is that during preset use , the display is not delaying the speed of operation. If you touch pots faster than within a second, you’ll immediately get to see the last applicable text, and the timer resets to display the last one for 4 ticks.
timer.setPeriod(250)
amountTicks = 0
events.subscribe(POTS)
function timer.onTick()
amountTicks = amountTicks + 1
if amountTicks > 4 then
timer.disable()
info.setText(authorDate)
end
end
function showHelp(helpText)
info.setText(helpText)
amountTicks = 0
timer.enable()
end
function events.onPotTouch(potId, controlId, touched)
if touched == false then return end
helpTexts = {{7,"shift + Volume"},{85,"shift + Portamento"},{48,"hold + Unison"},{53,"hold + Unison"},{42,"shift + OSC2 detune"},
{55,"shift + Sync"},{60,"hoshiftld + Sync"},{49,"shift + Sync"},{65,"shift + Sync"},
{88,"hold + Sync"},{94,"hold + Sync"},{54,"hold + Sync"},{60,"hold + Sync"},{49,"hold + Sync"},{65,"hold + Sync"}, -- page MANUAL + CONTROL
{39,"shift + Rate"},{366,"shift + OSC1 Waveform"},{126,"shift+ OSC1 Waveform"},{40,"hold + LFO Waveform"},
{30,"shift + OSC1 Freq"},{158,"hold + OSC1 Freq"},{31,"shift + OSC2 Freq"},{36,"hold + OSC2 Freq"},
{37,"shift + Filter Freq"},{84,"hold + Filter Freq"},{49,"shift + OSC1 PWM"},{159,"hold + OSC1 PWM"},
{46,"shift + OSC2 PWM"},{165,"hold + OSC2 PWM"},{38,"shift + Volume Mod"},{319,"hold + Volume Mod"}, -- page Modulation
{ 1,"hold + OSC1 Saw"},{ 6,"hold + OSC2 Saw"},{154,"shift + Sync"},{388,"shift + OSC2 F.Env"}, --
{80,"hold + OSC1"},{184,"hold + OSC1"},{81,"hold + OSC2 FV CC"},{188,"hold + Track"}, --
}
for _, pair in ipairs(helpTexts) do
if pair[1] == controlId then
showHelp(pair[2])
return
end
end
end