Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce number of active hardware redraw calls #4

Closed
ypxk opened this issue Aug 17, 2020 · 3 comments
Closed

reduce number of active hardware redraw calls #4

ypxk opened this issue Aug 17, 2020 · 3 comments
Assignees

Comments

@ypxk
Copy link

@ypxk ypxk commented Aug 17, 2020

hey!

amazing work on this. i've been a couple updates behind but had a chance to catch up on the streams today and was so inspired i had to try it out. so so fun!

i was able to get it to crash (sorry!😉). i had arps going on banks b and c and 2-3 randomizers going on them as well. i also had a randomzier going on bank a, set to toggle looping, while i was just tapping it live. it stopped accepting inputs from the grid and then a couple of seconds later the grid went dark. audio was still coming out at that point and then it seemed to drop out one bank at a time until total silence.

while this was happening, i opened maiden at this point and saw it was spamming something like "resource temporarily unavailable". i lost the exact phrasing when i went to monome.org to try to remember what the new on-norns soft reset is, when i tried to get back to maiden it wouldn't let me in (probably due to the velocity of messages, it was dozens every second).

i was not able to find the command that is supposed to reset norns but was able to ssh in and restart that way. let me know if there is some log file that i can attach that would make this more valuable!

(sorry i do not know how to tag issues on github.)

@dndrks
Copy link
Owner

@dndrks dndrks commented Aug 17, 2020

hey hey! thanks so much for the help testing and the report!

the error you mentioned is: libmonome: error in write: Resource temporarily unavailable. it happens when the USB bus gets overwhelmed by calls to redraw grid and arc. more info here.

this is on me -- the hardware redraw is happening at a stupid-high rate (50fps) because of inefficiencies made canonical early in the design process (just cuz I didn't know any better). i'll take a look at reducing the redraw rate immediately and ideally will migrate to a 'redraw on demand' approach for the official release.

a few things:

  • was arc also plugged in when this happened?
  • were your banks set to clips or the live buffer?
  • what rate were your arps + rnd set to?
  • if this happens again during testing, you should be ok to pull the hardware's USB and it should return to normal
  • executing ;restart in maiden should clean-slate things

<3333

@dndrks dndrks changed the title system lock up under medium-to-heavy utilization of random and arp reduce number of active hardware redraw calls Aug 17, 2020
@dndrks dndrks added arc grid labels Aug 17, 2020
@dndrks dndrks self-assigned this Aug 17, 2020
dndrks added a commit that referenced this issue Aug 17, 2020
addresses #4

in the previous version, grid + arc redraws were clocked at 50fps (0.02s). under extreme performance conditions, this would cause the USB bus to become flooded and ultimately, freeze.

this commit attempts to rectify the situation by:
- placing arc redraw on its own metro, redrawing at 30fps
- replacing all unnecessary grid redraws (defined by redrawing when no real change to the interface has been made) with `grid_dirty` booleans
@ypxk
Copy link
Author

@ypxk ypxk commented Aug 17, 2020

hey! that does sound like what happened to me, and yes the arc was plugged in as well. i was using one bank of live buffer that i had recorded something into at the start of the session and then immediately turned off recording.

again, amazing job, it's been so inspiring to watch this thing evolve! even setting the cool new features aside the usability and workflow improvements (local alt! pad focus (i guess this is actually not new but i don't think i got to use it earlier)! independent arc pattern recorder) are great. i will let you know if i spot anything else

edit: i want to say the rates were "fast". i don't totally have my head around how the speed control on random works. i'm sure it was covered in one of the streams but i missed it. the arps were maybe 16ths at 90 bpm? somewhere in there.

@dndrks dndrks mentioned this issue Aug 19, 2020
dndrks added a commit that referenced this issue Aug 19, 2020
full fixes for #4 , #5 , #6 , #9 
partial fix for #10
@dndrks dndrks closed this Aug 19, 2020
@dndrks
Copy link
Owner

@dndrks dndrks commented Aug 19, 2020

fixed with #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants