Molly the Poly

so i just did this and it worked. i’m guessing that you may have placed your lights in the wrong spot of the code. typically scripts for grids will have two functions that determine 1) how norns should respond when it feels you push a button and 2) how the grid should look at any given time.

this specific script actually combines those two things into one function (grid_key at line 197). if you put the LED instructions in there (you were right to change it to grid_device btw, that also needs to happen), and eliminate the redundant grid_device:refresh(), it should work after that function is called (meaning after you press a grid button once to trigger this function for the first time).*

if you put this somewhere else or with a different name than grid_device, it seems like it might look for some other grid to refresh/light up or just not know what you’re talking about.

*you might notice that technically this is telling the grid to light up all those lights every time you press a button, which is not super efficient. doesn’t seem to make a difference in this context but this is why most scripts with big grid interfaces separate drawing and interacting functions.

hope that makes some sense!


Makes perfect sense!

keymap established! Thanks also for the ancillary instruction in how to talk about these things – I’ve been around a while, but haven’t engaged in much technical discourse, and this part is essential to growth.

The velocity bit, though, is still operating under the old behavior (even after integrating your suggested 0 elseif fix, assuming I’ve done it correctly below):

    -- CC
    elseif msg.type == "cc" then
      -- Mod wheel
      if == 1 then
        set_timbre_all(msg.val / 127)
      elseif == 7 then
        if msg.val ~= 0 then
           note_v = (msg.val / 127)
          note_v = 0

should mention I’ve replaced the 0.8 in the note_on line with note_v to make all this work (around line 300 in my version – probably earlier in yours due to my mods). (should credit @dan_derks for getting me this far)

1 Like

can’t actually test this one so i will be less helpful on it this. seems like it could be a lot of things. some guesses/things to try:

—is the expression pedal itself sending anything at all on 0? (try verifying note_v using print statements to see if it actually hits zero)
—should note ons with zero velocity actually be note offs? (does note on with vel 0 mean anything if the message is following the same note with a different velocity)
—should vel=0 actually be killing all notes, not just the most recently triggered note? (would need to keep track of active note_on messages in a list and send corresponding note offs or something, hopefully not how this would work)

the way this is currently set up, the expression pedal sets the velocity of the note, then grid press sends a value with that velocity, and there’s no way to update that value in real time—maybe this is obviously how midi is supposed to work, i don’t know much with midi. but if velocity is a stand in for volume it probably makes more sense to control the volume via cc and not confine it to note on messages?