for Cubase macros. Button Label is on top of button but blocks it working.

Home Forums General Panels, Components, Macros for Cubase macros. Button Label is on top of button but blocks it working.

Tagged: , , ,

This topic contains 19 replies, has 3 voices, and was last updated by dnaldoog dnaldoog 1 week, 5 days ago.

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #86818

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    Hi, great to discover this software! I want to use it for Cubase shortcuts and macros.

    But I can’t seem to get the button label/text actually ON the button – unless its a button value, which does not allow for font size change. How can I get the label on the button, so that it can be two lines and I can choose the font size?

    Actually creating a grid of Cubase key commands and macros and sometimes the label need the text to wrap on several lines for on each button.

    Similar to this one:

    Cheers

    Ben

    • This topic was modified 2 weeks, 1 day ago by  bendy303.
    • This topic was modified 2 weeks, 1 day ago by  bendy303.
    • This topic was modified 2 weeks, 1 day ago by  bendy303.
    • This topic was modified 2 weeks, 1 day ago by  bendy303.
    Attachments:
    You must be logged in to view attached files.
    #86823

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    update – ok I managed to get the label multiline and on top of the button – but now the label prevents the button from sending data. If I uncheck “Name Label Always on Top” then it works again, but then the label text is behind the button and hard to read. See attached screenshots

    • This reply was modified 2 weeks, 1 day ago by  bendy303.
    • This reply was modified 2 weeks, 1 day ago by  bendy303.
    Attachments:
    You must be logged in to view attached files.
    #86855
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 489
    • Total: 502
    • ★★★

    You could make the Button transparent and put the Label behind it. But putting a Button on top of a Label isn’t the best way of doing it. I would be interested in your panel. If you are willing to share I can show you some other ways to do what you want.

    • This reply was modified 2 weeks, 1 day ago by Possemo Possemo.
    #86857

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    Hi Possemo,

    Yes I would love to share.

    I managed to make the button transparent with label behind it – but it seems like a cumbersome workaround –
    it makes the text lighter. If you have a better suggestion I would love to know!!

    some colour tests in attached panel.

    Now though – I can only seem to send control values of an 0 and 1 as an on/ off switch. I have How can I just send one control value? I have “MIDI controller value” set to 127 but it doesnt work.

    I think using Ctrlr has more uses than hardware.

    I was previously actually using a tablet with a Lemur template called Metagrid but my tablet broke 🙁

    So then I thought about it – the amount of time it takes for my finger to go to the touchscreen is actually slower than using my gaming mouse – and the main reason for using my Cubase macro grid is that I can arrange the key commands occording to my chosen workflow (instead of Cubases’s annoying menu system, there are just too many key commands to memorise for the computer keyboard). So if I can replicate the Lemur grid on Ctrlr I just use my gaming mouse and its actually faster than my tablet. But also this could be used with a windows tablet too. IF Ctrlr is also able to do the Mackie control format than there is a whole new world for Ctrlr!!

    so would love to know

    a) how to send a CC value that is not just 0/1 switch, but a single value (can this be done without sending a multi message sysex?)

    b) a better way of making the label on top of the button

    cheers!!

    Ben

    Attachments:
    You must be logged in to view attached files.
    #86861

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    ok – I figured out how to send a CC using Hex – but this is no good – I have to enter over 1000 Cubase commands and their corresponding CC numbers – if I have to convert every single one to Hex it will take too long.

    In the Modulator menu under “MIDI message type” there is CC as an option..so then there must be a way to use it and not Hex…

    tips appreciated!!

    🙂

    Ben

    #86862

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    update – I figured out by accident, that if I put the CC value under “Expression to evaluate when calculating the midi message value from modulator value” (in the xml its modulatorValueExpression= ) then it works.

    cool!!!

    is it possible to batch edit a panel seeing its xml with regular expressions? I know a bit about regex

    cheers

    Ben

    #86863
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 489
    • Total: 502
    • ★★★

    Hi bendy303

    When I looked into the panel I saw that I misunderstood your problem with the color of the Buttons. I thought that the buttons were laid over label components. But you are using just the button component and it does seem to look nice this way, what exactly was the problem?

    I attached a modified panel to send whatever CC’s. Look at the first button “show tracks with data at cursor position”. You set the button values for “true” and “false” (see screeenshot). When you set different values it will alternate between them each time you click it.

    I didn’t know that you can control Cubase with CC’s that easy, nice.

    • This reply was modified 2 weeks ago by Possemo Possemo.
    Attachments:
    You must be logged in to view attached files.
    #86867

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    HI Possemo, thanks for your help.

    you did not misunderstand the problem – you were correct. They were laid over the top originally and it was blocking the mouse clicking the button (perhaps a new release of Ctrlr could fix this – a label should not block a buttons functionality!!) .
    I figured out I could put the buttons above the labels and use transparency to see the labels behind it.
    However this is not an ideal solution because it means the text is not bold and sharp and the buttons colour is not vivid.

    Is there another way?
    Cheers

    Ben

    #86868

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    regarding Cubase and MIDI controlling the software menu and key commands… yes very cool. Its used by some big Hollywood composers and they set up a touchscreen to incease workflow – some examples are Hans Zimmer, Junkie XL (he is in top 10 now) and Lorne Balfe (who just recently did a kickass score for the latest Mission Impossible).

    I had a smaller version of touch commands on an Android tablet then it died. So I figured out – the increased workflow is not because I use my fingers – (flicking a mouse is quicker) – it is the fact that you design the grid and workflow to how you think and create. So I dont need a touchscreen. I just need the custom grid. Ctrlr to the rescue!!

    I am suprised nobody else has really thought of using Ctrlr for this before.

    I intend on sharing the panel I make with this to other Cubase users online. Can also be used for other DAWS that accept function via MIDI (almost all of them).

    check out the pics of Junkie Xls setup and Hans Zimmer also.
    It is custom made software and not for sale, on a windows tablet…

    Attachments:
    You must be logged in to view attached files.
    #86873
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 153
    • Total: 153
    • ★★

    Hi bendy303,

    You can do it with just labels if you use Lua. It could get complex!
    You need to add a function on the interface to the label. (See Image)

    See attached panel (which also changes the CC message to Ctrlr’s midi out channel)

    lua function:

    
    myFunction = function(--[[ CtrlrComponent --]] comp, --[[ MouseEvent --]] event)
    
    sName= L(comp:getOwner():getName())
    myChannel=panel:getProperty("panelMidiOutputChannelDevice")
    
    add=0xb0+(myChannel-1)
    
    if sName == "STWDACP" then
    
    cn=0x04
    cv =0x7f
    
    elseif sName == "ANOTHERLABEL" then
    
    cn=0x07
    cv =0x7f
    
    end
    
        m = CtrlrMidiMessage({add, cn, cv}) -- 
        panel:sendMidiMessageNow(m)
    panel:getLabel("OUTPUT"):setText(string.format("%s\nSending midi [%02x %02x %02x]",sName,add,cn,cv))
    
    end --function
    

    Getting the label to act as a switch between 0 and 127 is more difficult, but possible too maybe using a global variable that is checked against when clicked:
    ie (pseudocode)
    if k0==127 then cv ==0 k0=0 end
    if k0==0 then cv ==127 k0=127 end

    if k1==127 then cv ==0 k1=0 end
    if k1==0 then cv ==127 k1=127 end

    Something like that!

    … or maybe a table of the labels that records the on/off state for each one. I can explain that further if you want.

    Regards,

    Attachments:
    You must be logged in to view attached files.
    #86877
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 153
    • Total: 153
    • ★★

    … or this to add switching of values:

    
    _tableOfLabels={
    STWDACP={0},
    ANOTHERLABEL={0},
    }
    
    myFunction = function(--[[ CtrlrComponent --]] comp, --[[ MouseEvent --]] event)
    
    sName= L(comp:getOwner():getName())
    myChannel=panel:getProperty("panelMidiOutputChannelDevice")
    
    add=0xb0+(myChannel-1)
    
    if sName == "STWDACP" then
    
    cn=0x04
    if _tableOfLabels.STWDACP[1]==127 then 
    cv=0x00
    else
    cv =0x7f
    end 
    _tableOfLabels.STWDACP[1]=cv -- assign new value
    
    elseif sName == "ANOTHERLABEL" then
    
    cn=0x07
    if _tableOfLabels.ANOTHERLABEL[1]==127 then 
    cv=0x00
    else
    cv =0x7f
    end 
    _tableOfLabels.ANOTHERLABEL[1]=cv
    
    end
    
        m = CtrlrMidiMessage({add, cn, cv}) -- 
        panel:sendMidiMessageNow(m)
    panel:getLabel("OUTPUT"):setText(string.format("%s\nSending midi [%02x %02x %02x]",sName,add,cn,cv))
    console(String(sName.."\nSending midi value "..cn.." > "..cv.."\n***************"))
    
    end --function
    
    Attachments:
    You must be logged in to view attached files.
    #86881
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 489
    • Total: 502
    • ★★★

    @bendy303: Wow these are cool panels. I didn’t knew about Hans Zimmers special gear, nice.

    About the panel I modified: Does the upper-left button now work as expected?

    About button vs label: Which design feature do you miss from the button component? I mean, what else can you do with a label?

    @dnaldoog: Yea I had that idea too. You can use a simple label component as a fully featured button but you have to code it yourself with Lua scripts. A bit of a drawback: a label component won’t change color when you click it. It won’t look like the button-component where you “see” that you have clicked it even when set to fully transparent. But ok, even this behaviour could be coded with Lua scrips. Anyway, I am asking myself what design-features a button is missing compared to a label..?

    • This reply was modified 1 week, 6 days ago by Possemo Possemo.
    • This reply was modified 1 week, 6 days ago by Possemo Possemo.
    #86884
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 153
    • Total: 153
    • ★★

    Anyway, I am asking myself what design-features a button is missing compared to a label..?

    Hi Possemo, yes that dawned on me too. I was thinking, why have labels in the first place? Kind of like reinventing the wheel, then you’d have to call a script to change the colour, so it’s all getting a bit complex, but doable. You’d end up with all the exact functionality of a … button!

    #86928

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    Hi dnaldoog and possemo thanks for that. 🙂 The design feature missing from the button component is that it if using the label, it has to be next to the button, thus bad use of space…, and if using the button value for text on the button, it is not possible to change the font size or have multi-line text

    #86934
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 153
    • Total: 153
    • ★★

    Hi Bendy,

    Then my suggestion for using the uiLabel to act as a button should work. Are you okay with Lua?

    #86935

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    yes I do a bit of coding (or rather I am a script kiddy) but never touched Lua before….as a composer I should really look into it

    does your code work on the actual button label or does it create new grid? as Possemo said its nice to have a slight animation indicating that the button was pressed.

    #86936

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    hi @dnaldoog only just noticed you had an attachment, yes thats nice, very clean and sharp. Thank you for that 🙂 now my girlfreind is threatening to leave me because I spend too much time staring at a screen….I should have a break :/ then I will be back!!

    #86937

    bendy303
    Participant
    • Topics: 1
    • Replies: 10
    • Total: 11

    I just found someone has already thought of using Ctrlr for a DAW or VST directly but they could not get membership on this forum, a bug?..thread is here

    https://vi-control.net/community/threads/ctrlr.65074/

    if you have not come across vi-control.net its a composer forum and has about a million monthy hits 🙂

    #86970
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 153
    • Total: 153
    • ★★

    Hi Bendy,

    This version now changes the font colour and background colour on the top left label when clicked and transparency is reduced when clicked on the other label, giving user feedback, both emulating that button behaviour. So I think it would do all that you need.

    I have put those hex colour values into a lua (lookup) table (array); you could also include CC values in that table too. It could all work pretty well I think.

    Also I have an ‘initialise’ script that runs when the panel loads, that assigns the label objects to variable names, so that each time you change a property Ctrlr doesn’t have to loop through every Modulator object looking for that object.

    Regards,

    
    --value|bg colour on|bg colour off|fontcolour on|fontcolour off
    _tableOfLabels={
    _STWDACP={0,"FF99CCFF","FF16D6A2","FF000000","FFffffff"},
    _ANOTHERLABEL={0,"FF30D616","3330D616","FF000000","FFffffff"},
    }
    
    myFunction = function(--[[ CtrlrComponent --]] comp, --[[ MouseEvent --]] event)
    
    sName= L(comp:getOwner():getName())
    myChannel=panel:getProperty("panelMidiOutputChannelDevice")
    console(String("sName= "..sName))
    
    add=0xb0+(myChannel-1)
    
    if sName == "STWDACP" then
    
    cn=0x04
    if _tableOfLabels._STWDACP[1]==127 then 
    cv=0x00
    STWDACP:getComponent():setPropertyString("uiLabelBgColour",_tableOfLabels._STWDACP[2])
    STWDACP:getComponent():setPropertyString("uiLabelTextColour",_tableOfLabels._STWDACP[4])
    else
    cv =0x7f
    STWDACP:getComponent():setPropertyString("uiLabelBgColour",_tableOfLabels._STWDACP[3])
    STWDACP:getComponent():setPropertyString("uiLabelTextColour",_tableOfLabels._STWDACP[5])
    end 
    _tableOfLabels._STWDACP[1]=cv -- assign new value
    
    elseif sName == "ANOTHERLABEL" then
    
    cn=0x07
    if _tableOfLabels._ANOTHERLABEL[1]==127 then 
    ANOTHERLABEL:getComponent():setPropertyString("uiLabelBgColour",_tableOfLabels._ANOTHERLABEL[2])
    cv=0x00
    else
    ANOTHERLABEL:getComponent():setPropertyString("uiLabelBgColour",_tableOfLabels._ANOTHERLABEL[3])
    cv =0x7f
    end 
    _tableOfLabels._ANOTHERLABEL[1]=cv
    
    end
    
        m = CtrlrMidiMessage({add, cn, cv}) -- 
        panel:sendMidiMessageNow(m)
    panel:getLabel("OUTPUT"):setText(string.format("%s\nSending midi [%02x %02x %02x]",sName,add,cn,cv))
    console(String(sName.."\nSending midi value "..cn.." > "..cv.."\n***************"))
    
    end --function
    

    now my girlfreind is threatening to leave me

    Know the feeling!! (Well ‘wife’ in my case I hasten to add!)

    Attachments:
    You must be logged in to view attached files.
    #86972
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 153
    • Total: 153
    • ★★

    does your code work on the actual button label or does it create new grid? as Possemo said its nice to have a slight animation indicating that the button was pressed.

    In this panel there are no buttons! 🙂 It’s buttonless – sans boutons

    Attachments:
    You must be logged in to view attached files.
Viewing 20 posts - 1 through 20 (of 20 total)

You must be logged in to reply to this topic.

There is currently 0 users and 23 guests online
No users are currently active
Forum Statistics
Threads: 2,166, Posts: 15,278, Members: 22,303
Most users ever online was 10 on October 29, 2018 2:54 pm
Do NOT follow this link or you will be banned from the site!