No internet connection
  1. Home
  2. How to

Only one shortcut for track color or clip color

By Benjamin Lecuyer @benjaminlecuyer
    2020-03-27 17:02:58.769Z

    In PT, when you click on a clip, the color window automatically select 'Clip in Tracks', when you click on a track, the color window automatically switch to 'Tracks', with KM I was using 1 picture of the color to shortcut both fonctions on the same key.
    With SoundFlow I have to define either Clips or Tracks and 2 different shortcuts.
    Is it a way to have only one shortcut for both ??

    Solved in post #6, click to view
    • 9 replies
    1. When you have just one shortcut for both, how does your script then know what you want to change?
      Did your KM macro depend on the Color palette being already open?

      1. Benjamin Lecuyer @benjaminlecuyer
          2020-03-27 17:36:14.576Z

          Because PT switch automatically depending on if you select clip or track.
          Yes the color palette had to be opened.

          1. Benjamin Lecuyer @benjaminlecuyer
              2020-03-27 17:37:10.873Z

              The goal of the script is to bypass the need to specify track or clip. Only select color.

              1. Benjamin Lecuyer @benjaminlecuyer
                  2020-03-27 17:41:22.430Z

                  I tried to remove that
                  colorTarget: "ClipsInTracks",

                  I select a clip, so PT switch to Clips in Tracks, I run the script.

                  It automatically select switch to tracks anyway....

                  1. In reply tobenjaminlecuyer:

                    Gotcha, and if you keep the color palette always open, I can see how that might help you.

                    The easiest workaround is to use a function like this to get the current color palette target:

                    function getCurrentColorPaletteTarget() {
                        switch (sf.ui.proTools.colorPaletteWindow.selectorView.value.invalidate().value) {
                            case 'Tracks':
                                return 'Tracks';
                            case 'Clips in Tracks':
                                return 'ClipsInTracks';
                            case 'Clips in Clip List':
                                return 'ClipsInClipList';
                            default:
                                throw 'Unsupported Color Palette Target';
                        }
                    }
                    
                    sf.ui.proTools.colorsClick({
                        colorTarget: getCurrentColorPaletteTarget(),
                        colorBrightness: 'Medium',
                        colorNumber: 3
                    });
                    
                    Reply1 LikeSolution
                    1. Benjamin Lecuyer @benjaminlecuyer
                        2020-03-27 17:56:43.334Z

                        With this script, it is working on only Clips when I select a clip, but when I select a track, it works on track AND clips (I don't want both).

                        1. In reply tobenjaminlecuyer:
                          Benjamin Lecuyer @benjaminlecuyer
                            2020-03-27 18:28:16.234Z

                            In fact it works randomly (but works most of the time), I will try to undestand why.

                            1. Benjamin Lecuyer @benjaminlecuyer
                                2020-03-27 18:49:45.069Z

                                I understand the problem, it is from ProTools.
                                It depends on if the clips have always a color attached, or not.

                                So your script is ok Thank you !!

                    2. In reply tobenjaminlecuyer:
                      Khonnor Wallace @Khonnor_Wallace
                        2020-05-01 19:23:22.312Z

                        I would like to add something to this script! It would be great if we can set the color depending on the type of track (let say for aux, audio tracks, master...) just with one script and all done!