Theme with solo and mute button for control machines

Post Reply
User avatar
Klangkulisse
Posts: 304
Joined: Tue Nov 22, 2011 12:20 am
Location: ••• Düsseldorf ••• Made of Light

Theme with solo and mute button for control machines

Post by Klangkulisse »

I would like to add the mute and solo button to control machines, such as Peerchord (from BTDSys). I figured out, that in my theme (which is based on oskaris dark style and strobotones xd - simplon theme) there is this part in the Machine control xaml-document:

<!--hide led and additional buttons on ControlMachine-->
<DataTrigger Binding="{Binding Path=Machine.IsControlMachine}" Value="True">
<Setter TargetName="ledButton" Property="Visibility" Value="Collapsed"/>
<Setter TargetName="soloButton" Property="Visibility" Value="Collapsed"/>
<Setter TargetName="bypassButton" Property="Visibility" Value="Collapsed"/>
</DataTrigger>

Do I have to change the values "Collapsed"? And what would that value be?
I messed around with "True" and other values that would possibly (or better said randomly) do the trick, but no – that's far beyond my knowledge.

I added to my col.file the additional color definition for control machines like this:

MV Control LED Border 000000
MV Control LED Off 000000
MV Control LED On 72ED1F
MV Control Mute 42667b

But I do not know how to link it to the xaml-file.


So does anybody know what to do to get the desired additional features in machine view ?
mute
Posts: 417
Joined: Mon Nov 21, 2011 8:30 pm

Re: Theme with solo and mute button for control machines

Post by mute »

Visible is the opposite of Collapsed
oskari
Site Admin
Posts: 320
Joined: Mon Nov 21, 2011 2:04 pm

Re: Theme with solo and mute button for control machines

Post by oskari »

Why not just remove the code that hides the buttons if it's a control machine?

Colors can be accessed like here: <SolidColorBrush Color="{Binding Path=Machine.Graph.Buzz.ThemeColors[MV Machine Border]}"/>
User avatar
Klangkulisse
Posts: 304
Joined: Tue Nov 22, 2011 12:20 am
Location: ••• Düsseldorf ••• Made of Light

Re: Theme with solo and mute button for control machines

Post by Klangkulisse »

Thanks a lot Mute and Oskari for the quick reply. Both versions are doing the trick, I used Mute's suggestion (value "visible") to keep quick access to that feature. So that works fine and keeps up my workflow especially when using a lot of (control) machines – thanks again.

Oskari, I tried to implement your suggested phrase – my aim is to define a second color for control machines when they are muted – by changing it to

<SolidColorBrush Color="{Binding Path=Machine.Graph.Buzz.ThemeColors[MV Control Mute]}"/>

and adding "MV Control Mute" with that 6-digit number to the col-file

But I don't know where to place your phrase it in MachineControl.xaml. I pasted it above the mentioned part like this ( :lol: please don't laugh :oops:):

<!--color of control machine when muted-->
<SolidColorBrush Color="{Binding Path=Machine.Graph.Buzz.ThemeColors[MV Control Mute]}"/>

<!--hide led and additional buttons on ControlMachine-->
<DataTrigger Binding="{Binding Path=Machine.IsControlMachine}" Value="True">
<Setter TargetName="ledButton" Property="Visibility" Value="visible"/>
<Setter TargetName="soloButton" Property="Visibility" Value="visible"/>
<Setter TargetName="bypassButton" Property="Visibility" Value="visible"/>
</DataTrigger>

or like this ( :mrgreen: please don't laugh even louder :roll: )

<!--color of control machine when muted-->
<DataTrigger Binding="{Binding Path=Machine.IsControlMachine}" Value="True">
<SolidColorBrush Color="{Binding Path=Machine.Graph.Buzz.ThemeColors[MV Control Mute]}"/>
</DataTrigger>

<!--hide led and additional buttons on ControlMachine-->
<DataTrigger Binding="{Binding Path=Machine.IsControlMachine}" Value="True">
<Setter TargetName="ledButton" Property="Visibility" Value="visible"/>
<Setter TargetName="soloButton" Property="Visibility" Value="visible"/>
<Setter TargetName="bypassButton" Property="Visibility" Value="visible"/>
</DataTrigger>

but it did not work.

–––

Then I have been searching where all the other color definitions of the machines are placed (for example, my effects are light grey and dark grey when muted), to get a clue how it could work, but I can't remember (the last time I modified my theme was in february 2012). Is it not somewhere in MachineControl.xaml?

A little bit exhausted after trying 3 hours.
oskari
Site Admin
Posts: 320
Joined: Mon Nov 21, 2011 2:04 pm

Re: Theme with solo and mute button for control machines

Post by oskari »

This should change the background color if both IsControlMachine and IsMuted are true:

Code: Select all

            <MultiDataTrigger>
              <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=Machine.IsControlMachine}" Value="True"/>
                <Condition Binding="{Binding Path=Machine.IsMuted}" Value="True"/>
              </MultiDataTrigger.Conditions>
              <Setter TargetName="Border" Property="Background">
                <Setter.Value>
                  <SolidColorBrush Color="{Binding Path=Machine.Graph.Buzz.ThemeColors[MV Control Mute]}"/>
                </Setter.Value>
              </Setter>
            </MultiDataTrigger>
User avatar
Klangkulisse
Posts: 304
Joined: Tue Nov 22, 2011 12:20 am
Location: ••• Düsseldorf ••• Made of Light

Re: Theme with solo and mute button for control machines

Post by Klangkulisse »

Thanks again for your time and effort.
I implemented it as posted and it works – almost :)

Buzz starts without complaining and when I mute a control machine it changes its color – to black, not to the 6-digit color i defined in my col-file.
But don't let that bother you, as my theme is a mixed up trial-and-error-thing from your dark theme and strobotones xd simplon theme and I guess there could be a few code artefacts which are now colliding with your suggestion.

I can live without that changing color feature when a control machine is muted, because the theme I bended for my purpose shows that text message "MUTE". Thanks again for having a look to it.
May be I could learn a little bit more about handling those xaml-files going back to your buzz default theme if I knew the part where machine colors (when muted) are defined?
A big friendly virtual hug to you and thank you for your overall work.
Post Reply