uiMidiKeyboard bigger button size – aspect ratio – without panel zoom

Home Forums Development Change requests uiMidiKeyboard bigger button size – aspect ratio – without panel zoom

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #70012
    t0f4st
    Participant
      • Topics: 5
      • Replies: 13
      • Total: 18

      Hey atom,

      is it possible to add the ability to get bigger pushbuttons on the virtual keyboard (uiMidiKeyboard). Maybe you can add a property that allows to adjust the aspectratio. the request is to be able to use the keyboard with the fingertip without zooming the hole panel.

      i tried following script, it gets bigger until all keyboard buttons are visible.
      and there is now option to resize buttons width/height.

      --
      -- Called when a modulator value changes
      -- @mod   http://ctrlr.org/api/class_ctrlr_modulator.html
      -- @value    new numeric value of the modulator
      --
      ResizeKeyboard = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
      
      	modName = mod:getProperty("name")
      	
      	keyboardMod = panel : getModulatorByName ("dev_Keyboard")
      	keyboardComp = keyboardMod : getComponent()
      	
      	--rectangleValue = keyboardComp:getProperty("componentRectangle")
      	--rectValueArray = mysplit(rectangleValue, " ") 
      	--x = rectValueArray[1]
      	--y = rectValueArray[2]
      	--width = rectValueArray[3]
      	--height = rectValueArray[4]
      	--currentRect = Rectangle (x,y,width,height)
      	
      	-- https://www.juce.com/doc/classRectangle
      	--currentRect = keyboardComp:getBounds()
      	--console (string.format("Keyboard size = %s",currentRect:toString()))
      	
      	currentLuaBounds = keyboardComp:getLuaBounds()
      	console (string.format("Keyboard size = %s",currentLuaBounds:toString():__add("")))
      
      	deltaX = 5
      	deltaY = 0
      	
      	if (modName == "dev_Keyboard_Bigger") then
      		currentLuaBounds : expand (deltaX, deltaY)
      	elseif (modName == "dev_Keyboard_Smaller") then
      		currentLuaBounds : reduce (deltaX, deltaY)	
      	end
      	
      	currentLuaBounds:setX(0)
      	
      	console (string.format("new Keyboard size = %s",currentLuaBounds:toString():__add("")))
      	
      	--keyboardComp:setProperty ("componentRectangle", currentLuaBounds, false)
      	keyboardComp:setLuaBounds (currentLuaBounds)
      end

      greetings
      t0f4st

      • This topic was modified 7 years, 7 months ago by t0f4st.
    Viewing 1 post (of 1 total)
    • The forum ‘Change requests’ is closed to new topics and replies.
    There is currently 0 users and 50 guests online
    No users are currently active
    Forum Statistics
    Threads: 2,495, Posts: 17,374, Members: 77,605
    Most users ever online was 12 on January 22, 2019 3:47 pm
    Ctrlr