Hello,
I would like to create a one octave keyboard on which the user can press every key.
I have taken the default images for each key of Renoise to build such a keyboard. The problem is, when adding them to a vb:row all separate keys are shown next to each other and the black keys produce a gap between the white keys.
Is there a way to position the black keys in a way that they are overlaying the white keys?
My code:
local keyboard_row = vb:row{
id='keyboard_row'
}
local key1 = vb:button {
width = 26,
height=160,
bitmap = "images/Keyboard_FullLeft_Depressed.bmp",
notifier = function()
print('Key pressed1')
end
}
local key2 = vb:button {
width = 10,
height=100,
bitmap = "images/Keyboard_Halfnote_Depressed.bmp",
notifier = function()
print('Key pressed2')
end
}
local key3 = vb:button {
width = 26,
height=160,
bitmap = "images/Keyboard_FullMiddle_Depressed.bmp",
notifier = function()
print('Key pressed3')
end
}
-- and so on
keyboard_row:add_child(key1)
keyboard_row:add_child(key2)
keyboard_row:add_child(key3)