GridPie - Akai Grid Color Feedback

hope you can figure it out!

I’ve posted this thread on the discord too, hoping someone might be able to chime in there as it relates to this!

E: And not sure if you’ve seen this before. It’s the sysex/communcations manual for the APC40 mk1: https://www.akaipro.de/sites/default/files/2018-01/APC40_Communications_Protocol_rev_1.pdf_1db97c1fdba23bacf47df0f9bf64e913.pdf

1 Like

Thanks, that could be handy! Although I hope I don’t have to use it, I’m affraid I brick my apc40 sending wrong sysex messages :slightly_smiling_face:

What I found out today: I tested all the different button states GridPie.default_palette to see which ones are relevant to using GridPie for live performing.

content_selected
These slots have content and are currently playing, these slots are yellow in the gui.

content_active
These slots have content, but are not currently playing, these slots are red in the gui

gridpie_alias
That is the lower row of slots, which holds the alias pattern, where the playing tracks/slots are combined. These slots are green.

In the GridPie.lua I now find gripie_alias set as the color for the gui, when the function GridPie:paint_cell(cell,x,y) is invoked. Now we need to find out how to set the led color for the control surface in this if statement.

> if is_alias then
>         cell:set(self.palette.gridpie_alias)

Have you seen this yet?

1 Like

I’ve read most of the 3.0 and 2.8 threads. But didn’t see this, interesting, thanks.

The post claims that the functionality is already there, but the colors only don’t show up on the apc and some other device, because of wrong configuration of the palette in GridPieEffectNavigatorTransportMixer.lua Cool, that could be much easier to fix.

Could be that is has somethig to do, with the apc only having three colors, I read that somewhere too.

Just read that the apc40 only has two colors, red and green, both lit make it yellow. The function in apc40.lua probably covers this.

So is the key to the issue somehow the relationship between the APC40.lua file and the GridPieEffectNavigatorTransportMixer.lua file? Noticed there was some sysex definitiions in the APC40lua file and then it defines the colors:

function APC40:output_boolean(pt,xarg,ui_obj)

  local value = nil

  local color = self:quantize_color(pt.color)
  -- use the local colorspace if it's available
  local colorspace = xarg.colorspace or self.colorspace
  if (colorspace[1]>1) then
    -- clip launch buttons can have multiple colors
    local red = (pt.color[1]==0xff)
    local green = (pt.color[2]==0xff)
    if red and green then
      value = 5 -- yellow
    elseif red then
      value = 3 -- red
    elseif green then
      value = 1 -- green
    else
      value = 0 -- turned off
    end
  else
    -- normal LED buttons are monochrome
    value = (pt.val == true) and xarg.maximum or xarg.minimum
  end

  return value

end
1 Like

I’ve got it working. I’ve got green buttons for active tracks and red for inactive with content and the rest is black/off :slight_smile:

If you go to application/gridpie.lua and search the default_palette and change the colors like this:

content _active = {0x00, 0xff, 0x00}
inatctive_content = {0xff, 0x00, 0x00}

content_active will be green, because only the second led, will be lit, inactive_content will have red, because the first led is lit, and if you make any combination of more 0x,ff in one set, it will be yellow.

You should already be good to go. I’ll figure out a tidier place to edit this in a more apc40 specific file.

ps I’m not sure if the if colors are correct with the code, I’ll update when I’m more confident about what to fill out :slight_smile:

1 Like

Oh hell yeah, going to test it when I get home!!

I believe @danoise was talking about rolling out an update to include some user fixes so this should definitely be included once you tidy it up :slight_smile:

If you replace the whole palette block from …/APC40/Configurations/GridPieEffectNavigatorTransportMixer.lua in the with the block below, it works for me.

      palette = {
        out_of_bounds            = { color={0x00,0x00,0x00}, text="·", val=false },
        content_selected         = { color={0x00,0xFF,0x00}, text="·", val=true  },
        content_active           = { color={0xFF,0x00,0x00}, text="·", val=false },
        content_active_current   = { color={0xFF,0x00,0x00}, text="·", val=false },
        inactive_content         = { color={0xFF,0x00,0x00}, text="·", val=false },
        gridpie_current          = { color={0xFF,0xFF,0xFF}, text="·", val=false }
        },
1 Like

I’ll test when I get home just so there’s double confirmation!

Thanks. We need to still configure more colors maybe. Because for example, when I push a button under the active patterns, double buttons are lit and I don’t know why it’s doing that, could be a wrong color assigned or some feature that I don’t know off

This was the problem after all, in combination with wrong color codes.

Hmmm can’t really seem to get this to work. Changed the lines mentioned here:

If you go to application/gridpie.lua and search the default_palette and change the colors like this:

content _active = {0x00, 0xff, 0x00}
inatctive_content = {0xff, 0x00, 0x00}

And also this edit:

If you replace the whole palette block from …/APC40/Configurations/GridPieEffectNavigatorTransportMixer.lua in the with the block below, it works for me.

palette = {
  out_of_bounds        = { color={0x00,0x00,0x00},  },
  content_selected     = { color={0x00,0xFF,0x00},  },
  content_active       = { color={0xFF,0x00,0x00},  },
  gridpie_alias        = { color={0xFF,0xFF,0x00},  },
},

Not sure if I’m missing something, did you want to send me your duplex bundle?

No, only replace the Palette in …/APC40/Configurations/GridPieEffectNavigatorTransportMixer.lua so that it overrides GridPie.lua

The changes I made to /Application/GridPie.lua was only for testing. We shouldn’t change GridPie.lua, because it’s the generic file.

Hmmm, I’m still not seeing inactive content on the akai apc40:
image
The blue pattern doesn’t display on the apc40 has having content and remains unlit. Maybe I’m not modifying the lua file correctly. Here’s what I have:

  applications = {
    GridPie = {
      mappings = {
        grid = {
          group_name = "Slot",
        },
        v_prev = {
          group_name = "Move",
          index = 3
        },
        v_next = {
          group_name = "Move",
          index = 4
        },
        h_prev = {
          group_name = "Move",
          index = 1
        },
        h_next = {
          group_name = "Move",
          index = 2
        },
      },
      palette = {
  out_of_bounds        = { color={0x00,0x00,0x00},  },
  content_selected     = { color={0x00,0xFF,0x00},  },
  content_active       = { color={0xFF,0x00,0x00},  },
  gridpie_alias        = { color={0xFF,0xFF,0x00},  },
},
      options = {
        v_step = 2,
        h_step = 2,
        follow_pos = 3,
      }
    },

Just replace the Palette block in …/APC40/Configurations/GridPieEffectNavigatorTransportMixer.lua with the Palette block below:

      palette = {
        out_of_bounds            = { color={0x00,0x00,0x00}, text="·", val=false },
        content_selected         = { color={0x00,0xFF,0x00}, text="·", val=true  },
        content_active           = { color={0xFF,0x00,0x00}, text="·", val=false },
        content_active_current   = { color={0xFF,0x00,0x00}, text="·", val=false },
        inactive_content         = { color={0xFF,0x00,0x00}, text="·", val=false },
        gridpie_current          = { color={0xFF,0xFF,0xFF}, text="·", val=false }
        },

This works for me!

Hi,
I personally don’t have an APC40, but I have an APC40 MkII.
In the official APC40 Communications protocol PDF there are no color values given.

However, there is a table of RGB LED colors in the APC40 MkII communications protocol PDF:
https://www.akaipro.com/amfile/file/download/file/495/product/15

Search for the “RGB LEDs” table. The third “Velocity” column is the color index, the second is the RGB in hex.

Perhaps it helps?

Cheers,
Maxim

1 Like

Thanks for your reply Maxim, but I already got it working for the APC40MK1. Please read the the post above your post, it holds the code that needs to be replaced. I’ve editted that post to make it more clear that it is the solution. Thanks.

1 Like