andr-ew / orgnwrms

orgn + wrms
2 stars 1 forks source link

Stuck notes on release of pattern clear button #5

Open m-r-m-s opened 1 year ago

m-r-m-s commented 1 year ago

Hi @andr-ew, I seem to be getting stuck notes when doing a pattern clear. Any notes that are on when a pattern clear pad is released prevents those notes from turning off. They have to be turned off manually by pressing the lit note/ key. I am using two Novation Launch Pad Mini MKiii with midigrid on a stock Norns, update 221214, rpi CM3+ 32gb.

Here's the output from matron on orgnwrms when the stuck notes occurs (same occurs on orgn but I haven't been able to get the attempt to index a nil value (local 'data') error to be thrown yet. Even when the attempt to index a nil value error doesn't get thrown, the notes still stick if they are on or active when the pattern clear pad is released.

pattern rec start
table: 0xa95b98 table: 0xa92a30 4   nil
table: 0xa95b98 table: 0xa92a30 4   nil
pat clear
lua: 
...de/orgnwrms/lib/nest/util/pattern-tools/multipattern.lua:13: attempt to index a nil value (local 'data')
stack traceback:
    ...de/orgnwrms/lib/nest/util/pattern-tools/multipattern.lua:13: in field 'process'
    /home/we/norns/lua/lib/pattern_time.lua:127: in function 'pattern_time.next_event'
    /home/we/norns/lua/lib/pattern_time.lua:21: in field 'event'
    /home/we/norns/lua/core/metro.lua:164: in function </home/we/norns/lua/core/metro.lua:160>

I am not sure if this issue is related or not but there is an ERROR message that gets thrown prior to the # script run

Launchpad Mini MK3 1     -- Not supported
launchpad_minimk3    -- Supported
Launchpad Mini MK3 1 2   -- Not supported
launchpad_minimk3    -- Supported
mounted_devices
7   launchpad_minimk3
5   launchpad_minimk3
Loading midi device type:launchpad_minimk3 on midi port 7
including /home/we/dust/code/midigrid/lib/devices/launchpad_minimk3.lua
including /home/we/dust/code/midigrid/lib/devices/launchpad_rgb.lua
including /home/we/dust/code/midigrid/lib/devices/generic_device.lua
Loading midi device type:launchpad_minimk3 on midi port 5
including /home/we/dust/code/midigrid/lib/devices/launchpad_minimk3.lua
including /home/we/dust/code/midigrid/lib/devices/launchpad_rgb.lua
including /home/we/dust/code/midigrid/lib/devices/generic_device.lua
Attaching devices:
including /home/we/dust/code/orgnwrms/lib/nest/core.lua
including /home/we/dust/code/orgnwrms/lib/nest/norns.lua
including /home/we/dust/code/orgnwrms/lib/nest/routines/norns.lua
including /home/we/dust/code/orgnwrms/lib/nest/text.lua
including /home/we/dust/code/orgnwrms/lib/nest/routines/txt.lua
including /home/we/dust/code/orgnwrms/lib/nest/grid.lua
including /home/we/dust/code/orgnwrms/lib/nest/routines/grid.lua
including /home/we/dust/code/orgnwrms/lib/nest/util/pattern-tools/multipattern.lua
including /home/we/dust/code/orgnwrms/lib/nest/util/of.lua
including /home/we/dust/code/orgnwrms/lib/nest/util/to.lua
including /home/we/dust/code/orgnwrms/lib/nest/util/pattern-tools/multipattern.lua
including /home/we/dust/code/orgnwrms/lib/nest/examples/grid/pattern_recorder.lua
including /home/we/dust/code/orgn/lib/tune/tune.lua
Tune    table: 0x1ee2500
including /home/we/dust/code/orgn/lib/tune/scales.lua
256.0   243.0
9.0 8.0
32.0    27.0
81.0    64.0
4.0 3.0
729.0   512.0
3.0 2.0
128.0   81.0
27.0    16.0
16.0    9.0
243.0   128.0
including /home/we/dust/code/orgnwrms/lib/cartographer/cartographer.lua
including /home/we/dust/code/orgnwrms/lib/crowify/lib/crowify.lua
including /home/we/dust/code/orgn/lib/orgn.lua
including /home/we/dust/code/orgn/lib/envgraph.lua
including /home/we/dust/code/orgn/lib/graph.lua
including /home/we/dust/code/orgn/lib/demo.lua
including /home/we/dust/code/orgn/lib/ui.lua
including /home/we/dust/code/orgn/lib/params.lua
1   1   page_1_E1   33  time
1   2   page_1_E2   40  amp b
1   3   page_1_E3   43  pm c -> b
2   1   page_2_E1   35  span
2   2   page_2_E2   30  detune
2   3   page_2_E3   42  pm c -> a
3   1   page_3_E1   51  dry/wet
3   2   page_3_E2   53  samples
3   3   page_3_E3   54  bits
including /home/we/dust/code/orgn/lib/midi.lua
including /home/we/dust/code/wrms/lib/globals.lua
including /home/we/dust/code/wrms/lib/softcut.lua
including /home/we/dust/code/wrms/lib/graphics.lua
including /home/we/dust/code/wrms/lib/params.lua
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! ERROR: parameter ID collision: reset
! please contact the script maintainer - this will cause a load failure in future updates
! BEWARE! clobbering a script or mod param
including /home/we/dust/code/wrms/lib/ui.lua

I hope this is helpful and if there is anything I can do on my end, please let me know, thanks!

andr-ew commented 1 year ago

hi @m-r-m-s

I'm aware that there are a a lot of issues in orgn around stuck notes. unfortunately, a lot of the code related to the grid keyboard + pattern recorders is wrapped up in an arcane UI library experiment of mine that really just needs to be replaced with something more robust and easy to understand / edit.

I have some much more well behaved grid keyboard code underway via a new library (it addresses this issue, among others) but bringing it into orgn would require a significant refactor of both orgn and wrms. on top of many other norns projects, I don't have plans to do this refactor in the near future, but I hope to do it someday.

I hope this makes sense!

-&

m-r-m-s commented 1 year ago

totally understand and the new grid keyboard code sounds exciting! thanks again for the quick reply and for making these incredible projects available and accessible to so many 🙌