Arc Support #638
Arc Support #638
Conversation
copied @scanner_darkly PR for arc support into current norns codebase
|
rad, thanks! i'll take a look. |
|
FWIW - There are still some issues it seems.
|
arc.all() is now 2 parameters - first for encoder number, second for value
|
With last commit, the function for setting all leds is now 2 parameters - Not sure how led/map commands are working yet. Seems like not treating each encoder as a |
|
@okyeron is this code working for you? I'm getting a |
|
It was working for me, but I made more changes that I've not committed yet. I was going to try my new changes as a branch. I'll try to sort that out this afternoon. Is that error you're seeing just on starting up norns/matron? |
|
yeah, but then the process crashes. something wrong with my local build, doesn't seem to happen with a clean checkout from you branch. is that okay to commit changes to your branch directly? |
|
Yes - i think so? |
|
Okay, then go ahead with testing your changes, I can work with your currently pushed code in the meantime. |
|
I created an arc-dev branch that has additional changes:
Here are a couple lua files I started on for testing |
|
good job! a couple of comments regarding the later branch: push encoder support, while good for the owners of the pushable arcs, doesn't provide the api that will be compatible with the rest of devices. scripts for push encoders won't run with the rest of arcs.
|
|
FWIW - my want for push encoder support is because I'm making an encoder box which impersonates an Arc. I'm not sure I understand what you mean by "doesn't provide the api that will be compatible with the rest of devices". Which rest of devices? Norns would just end up sending a serial Seems like this would be more of an easter egg for those button arc folks (and useful to me for future diy things). On |
|
it's a good idea to support encoder key input. i like the idea of DIY emulated devices. it shouldn't break the pattern, it just needs a separate callback. (usually this callback won't be used.) so there needs to be another arc event. for refresh, we should have dirty flags for each ring the same way grids have a dirty flag per quadrant. see here: https://github.com/monome/norns/blob/master/matron/src/device/device_monome.c the user should absolutely only have one refresh function without args, follow the grid pattern. |
I think I did this (there's both norns.arc.enc and norns.arc.key input handlers), but I don't think i did it correctly (and not sure what correct would be here). Initially I ended up with both enc and key events triggering at the same time, but I added a variable to tell them apart. Maybe that needs to be a table like the midi events use, but I'm not sure how to do that? FWIW - I'm kinda flying by the seat of my pants here - mostly copying what was there for grid and coding by trial and error. :) |
|
i haven't checked your code yet, so i was commenting a little blind based on the discussion. should have time tomorrow to look though! thank you for diving in! |
|
OK - new commit to master that
I can't seem to find one issue in my lua code where I have to set arc.all(1) instead of arc.all(0) to get the leds to clear entirely. I double checked this in weaver.c and i don't see anywhere else where this is handled. EDIT - oops - this may be an error in my DIY arc code. Maybe someone can test this for me? test scripts: |
|
understood. Not sure why you could not push to this PR, although 'edits from maintainers' is enabled. Sorry... I'm still a bit of a git newb. |
|
that's fine, please send me your github email address (via lines), so I can include you in the later PR co-authors. |
|
closing this, arc support is merged via PR #641 |
Revisiting @scanner-darkly PR for arc support.
This adapts the PR scanner-darkly did back in June to the most recent norns/grid codebase.
https://github.com/monome/norns/pull/424/files
Some comments by @artfwo on the original PR still apply and need to be addressed.