Crowify: easily map Crow inputs to Norns params

Crowify

A Monome Norns library for easily adding Crow input support to existing scripts.

Usage

  1. Download lib/crowify
  2. Place the file inside your script’s folder, typically in the lib directory
  3. Import it from the path you’ve chosen (lib/crowify in the code below), then use it as follows:
-- create Crowify class and crowify object
local Crowify = include("lib/crowify")
local crowify = Crowify.new()

function init()
    -- register parameters with crowify
    crowify:register("cutoff")
    crowify:register("resonance")

    -- after registering all your params run add_params()
    -- to make them visible in norns params menu
    crowify:add_params()
end

--- OPTIONAL
-- by default, Crowify updates every 1/25th of a second
-- if you want a different update speed, pass it in
local slowUpdatesCrowify = Crowify.new(1/2)

--- OPTIONAL
function key(n, z)
    -- if you want to use a shift key with Crowify
    -- pass key params in
    crowify:handle_shift(n, z)
    redraw()
end

Requirements

  • An up-to-date Norns (exact OS support unknown)
  • A Monome Crow (or the desire to support one in your Norns script)

Acknowledgements

@mimetaur for the original Arcify

Roadmap

  1. Beta release & bugfixing
  2. Remove the need to register() params, and introspect them from the global params.params_ table directly
34 Likes

This is rad.

I’ve just added it to the wiki (norns.community):

5 Likes

this is brilliant, thanks!

BLESS YOU. OH HEAVENS BLESS.

Seriously, this will be so helpful for folks like me who would like to tack crow support on to a script but May lack the complete chops.

2 Likes

This seems really awesome and I want to make sure I understand it correctly—this script will allow me to connect Crow to Norns via USB and then use inputs from Crow to control assignable attributes of a script? So for example I could feed an LFO into Crow and then, with this lib added to the script, control, say, Volume in Galciers with said LFO?

Apologies if this is an obvious question.

1 Like

Yes, this is exactly right! The setup work is that it would require adding Crowify to Glaciers. You can either pester the script author to do that, or you can do it yourself if you don’t mind getting your hands a bit dirty :grinning_face_with_smiling_eyes: It’s very very simple to integrate (it really is as simple as it shows in the first post, typically around 3 lines of code, plus one line per parameter ID you want to register), but I know coding can seem a bit daunting :sweat_smile:

2 Likes

Awesome. It’s super kind of you to take the time to answer. I have norns studies on my long list of things to do, so my hands will be getting dirty with code soon enough. Hahaha! I need to get over my fear of coding—certainly anything that breaks can be fixed or reinstalled. :slightly_smiling_face:

Whether I try adding this before or after I do some of the studies, we’ll see. Thanks again!

Posted too soon! One last question: Will only the two Crow inputs work or does this lib read every input/output jack on Crow as an input? I checked the github and didn’t see. Again, apologies if the answer to this is obvious. :grimacing:

just the two :slight_smile: code is awesome, but it can’t change the hardware :cowboy_hat_face:

3 Likes

Hahaha thanks for confirming.

Peeping at the messages reported by @Deru at

It looks like to me the issue is in Crowify mod rather than wrms or from within norns core.

Eyeballing :mag: I cannot see where i gets a value on that line…

Short term solution for @Deru to make the symptom, although not the cause go away would to disable the mod. Please report back if that stops the flood, that would help triage the issue.

1 Like

The creepy thing is that I don’t think I have Crowify installed (I don’t recall ever explicitly installing it) and it doesn’t show up in my Mods section. The Crow assignments show up in the Wrms params list, so does that mean that it is installed on the script side? Sorry for my ignorance there… I can make the messages go away by un-assigning the crow inputs from within Wrms for what it’s worth.

Before I realized that the log messages were responsible for my lack of free hard drive space I tried to uninstall some things I wasn’t using. Is it possible I uninstalled a dependency? I reinstalled Wrms to no difference.

Thanks for your help!

Wups sorry I didn’t check, but yes indeed wrms installs crowify as a library on the script side :worm:

Something for @21echoes to debug (please don’t hesitate to let me know if I can help, I have a crow), maybe it’s about that i on line 126… maybe it wants to be position instead, to access the two parameters created, one for each input?

Maybe @Deru if you want to give it a shot, try replacing the i on line 126 of dust/code/wrms/lib/crowify.lua with position and reload wrms :crossed_fingers:t2:

4 Likes

Yup, that’s definitely it! Should be position, not i :sweat:

I’ve pushed up a fix to main: a317f15. Let me know if this fixes the issue, or if you have any other problems :pray:

2 Likes

Amazing, thanks!

Will that fix ‘trickle down’ into Wrms automatically, or will it need to be updated as well?

Looks like it will not – I believe @andrew will need to run git submodule update --remote to update crowify to latest.

You should(?) be able to do this yourself inside your own wrms folder on norns, but this will only update it for you.

1 Like

I made that change locally and the error messages went away. Thanks again.

2 Likes

That git submodule update --remote in dust/code/wrms gives

⠃▋⡇ ~/dust/code/wrms$ git submodule update --remote
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 13 (delta 4), reused 12 (delta 4), pack-reused 0
Unpacking objects: 100% (13/13), 2.07 KiB | 88.00 KiB/s, done.
From https://github.com/andr-ew/cartographer
   41094ef..4d52813  main       -> origin/main
fatal: Needed a single revision
Unable to find current origin/HEAD revision in submodule path 'lib/cartographer'

I am a little rusty with this whole submodule madness, but uninstall+reinstall always works for individual updates. I don’t know if the norns update routine should default to pulling submodules too, now that some norns scripts have them…

:worm:

Yeah I don’t know how @andrew is managing lib/cartographer :cry:

To lock down this command to only update crowify and leave cartographer alone, I think opening the top-level wrms directory and running git submodule update --remote lib/crowify should work

1 Like