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?

New version 1.2.0 up with MPE support from @scazan :pray:


Hey mark,
I included Molly as an engine in my sequencer script for norns. Now I’d like to add some kind of ‘accent’ functionality. I noticed no difference in volume (or anything else), whatever I set the velocity to on the noteOn command. I tried several values between 0-1, 0-100, 0-127. What range should the velocity be in? Plz help! :slight_smile:

Velocity is 0-1 (you can see here it is defined as a float).


Thanks, it’s working now. :slight_smile:
It’s quite hard to recognize the difference in volume, if you’re having not enough difference in velocity. I had to increase the difference to about 0.5 to have an audible effect.

Picked up the Linnstrument today after a long break. Was desperate to find good sound sources as I’m not using computer for music anymore, and don’t really have too much gear around either. Then realized I do have a Fates.

Hmm. Let’s see if any scripts already have support for MPE.

Oh yes.

Molly is a super fun MPE synth as is. Thanks. :slight_smile:

(Anyone want to sell me a factory built Norns? I think I need two now.)