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

Norns converged update #1706

Merged
merged 114 commits into from
Sep 27, 2023
Merged

Conversation

catfact
Copy link
Collaborator

@catfact catfact commented Sep 27, 2023

this is just a merge from main into norns-converged to bring it up to speed with past ~1yr of changes.

i haven't tested this at all yet! (will download to the rpi presently...) but i didn't see any serious conflicts as most changes are in lua.

(... though, now that i write this i am not sure if the merge was really smart enough to migrate all .c changes to their .cc counterparts (it does seem to have managed a few of those at least.))

also just pinging interest on restarting the effort to fix and land converged.

dndrks and others added 30 commits April 1, 2022 19:39
* add PSET number to callbacks + add delete callback

* fix passing pset_number in delete action

* Revert "fix passing pset_number in delete action"

This reverts commit 7f98bb2.

* fix pset_number in read action

* clean up formatting

* remove unnecessary nil checks

* update paramset docs

* fix parameter name passing to params:delete

* add pset_number to docs
…command

remove nonexistent post_filter_fc_mod command from softcut param factory
Update pmap.lua w/ clearer report
use abl_link C API for link clock
* add param separators to lookup table for hide/show

* add unnamed failsafe

* add visibility lookup for strings

* fix name forcing
* add clock.temo_changed callback

* clean up naming

* reset handler when clocks are cleaned up

* fold in artem's feedback

* remove 'source' pass, remove redundant nils
…pes (monome#1584)

* protect against casual param naming

* protect groups, too

* add error message

* change separator and group addition

* specify overwrite conditions

* overwrite flag allows for continuity for param count

* allow hidden param to be registered
* initial upload + unload lfo's after use

* default = 'param action' and track fn mapping

* add function type lookup table

* add ldoc notes

* bars -> clocked

* no spaces in param IDs

* remove 'frm', not used

* rename library to 'param_lfo'

* rename to 'param-lfo'

* p_lfo -> plfo

just cosmetic, but looks way better
* unify smb + hotspot password change

* Update link

* Revert "Update link"

This reverts commit 55fff78.

* Revert "Merge branch 'main' into password-helper"

This reverts commit 66fe798, reversing
changes made to 651d7c0.

* Revert "Revert "Merge branch 'main' into password-helper""

This reverts commit b797f04.

* maiden inaccessible

* robust message for hotspot password change
…me#1562)

* typo fix

* fix to add midi data when device is removed (issue monome#1557)

code fixed and doc info updated for issue monome#1557: monome#1557
Without this change, a swing of 66 will shift some events early and some events late from where they would otherwise be. With this change, a swing of 66 leaves some beats alone, and shifts other beats late from where they would otherwise be. 

Example to evaluate change, run as a norns script:

```
engine.name = "PolyPerc"
local lattice = require("lattice")

function init()
    l = lattice:new()
    p1 = l:new_pattern{
        enabled = true,
        division = 1/4,
        action = function(t)
            print("q", t)
            engine.hz(440) 
        end,
    }
    p2 = l:new_pattern{
        enabled = true,
        division = 1/8,
        swing = 66,
        action = function(t)
            print("e", t)
            engine.hz(660)
        end,
    }
    l:start()
end
```

In this example, the expected behavior is that two events (440 and 660) fall on the "down" beat, and then one (660) falls on the "up" beat, but with a "triplet feel". Without the change we get the "eighth notes" falling before and after the quarter note, but not on it.
* add lib/lfospec

a general-purpose scripting library for establishing LFOs, with optional parameter UI control

* add lfospec attributions

* protect against nil IDs

* add note about clocks + start/stop with parameter menu

* update params per entry

* Use lattice for LFOs, so they share clocks, and allow setting ppqn

* attribution and unused var cleanup

* change name and fold in feedback

* register 'norns.lfo' table, manage from script.lua

* Update script.lua

* check for nil norns.lfo

* remove note about clocks

since using lattice, there's no worry about counting clocks

* add API text to LFO:add

okay, this is the last touch! sorry for all the final countdown updates 😬

Co-authored-by: Naomi Seyfer <[email protected]>
this runs the global, customizable midi device removal callback when a device is unplugged (if the device is registered by the norns midi system), in addition to and without affecting the per-device removal callback (if defined.)

alternative to PR monome#1562, addressing issue monome#1557
* hotfix: lfo `:add`

gah! the `:add` method wasn't properly invoking the `.new` function

* Update lfo.lua
* hotfix: lfo `:add`

gah! the `:add` method wasn't properly invoking the `.new` function

* Update lfo.lua

* Update lfo.lua
tehn and others added 15 commits June 14, 2023 09:25
…onome#1688)

* Support half-diminished chords and correct scale degrees

* Add remaining missing 7th chords to roman notation: dominant, minor major, augmented major

* Use M decorator for Augmented Major 7, expand docs

* More docstring tweaks

* Update scale chord tables for Augmented Major 7 (27)

* Add new glyphs with FontForge instead of PixelForge

* Add alt_names Min7b5 and Maj7#5 for consistency w/teletype
* 'saw' -> 'tri', add 'up' and 'down', fix init

* build params from lfo spec

* add phase
* fix: user-defined gamepad profile lookup

* new gamepad model: Retrolink B00GWKL3Y4

* more info
@catfact catfact requested review from ngwese and tehn September 27, 2023 00:21
@tehn
Copy link
Member

tehn commented Sep 27, 2023

i'll try to get this compiling tomorrow

Copy link
Member

@tehn tehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code review looks good, the merge seems to have worked.

haven't tried compiling yet

@catfact
Copy link
Collaborator Author

catfact commented Sep 27, 2023

for what it's worth, i am able to build and run, presenrtly on rpi4+shield.

my steps on the norns-converged branch

    1. install nng requirement
      sudo apt install llibnng-dev
    1. clean and build
./waf configure --release
./waf clean
./waf build --release
  • stop and start process/services
./stop.sh
systemctl start norns-jack.target
./build/norns/norns

and i usually run sclang in a separate sesssion / screen.

i'll move on to checking out actual functionality on my next sit-down.

@tehn
Copy link
Member

tehn commented Sep 27, 2023

good to hear. just dug up the notes on the systemd services and updated the branch:

https://github.com/monome/norns-image/tree/norns-converged

(this is not necessary for development, though it's helpful to make sure things boot up right)

i'll get a dev system together now

@catfact
Copy link
Collaborator Author

catfact commented Sep 27, 2023

ok then i guess let's merge this so they stay in sync.

(i wonder if we should rebase the big pending screen change on top of converged...)

@tehn tehn merged commit 186fa72 into monome:norns-converged Sep 27, 2023
@tehn
Copy link
Member

tehn commented Sep 27, 2023

yes i think i'd highly prefer to have converged and the screen update coincide and require a full disk update. it's a pain for everyone but offers a good opportunity for cleaning up everything.

@tehn
Copy link
Member

tehn commented Sep 27, 2023

@catfact attempting to decipher the v3 branches--- were these WIP prior to converged?

@catfact
Copy link
Collaborator Author

catfact commented Sep 27, 2023

yes. v3 is same changes but with a longer series of commits going in different directions and sometimes with huge diffs that are hard to merge/rebase. the other one was a temp staging branch and can definitely be deleted. it's conceivable that the v3 history could be helpful to look at but i think not likely.

@catfact
Copy link
Collaborator Author

catfact commented Sep 28, 2023

@tehn @ngwese maybe worth knowing that after the merge things seem to basically work.

i can browse and select scripts, even with hundreds installed.

sclang and softcut still getting controlled by OSC and making sound correctly.

the only oddities i'm seeing are:

  • right at launch, this single report from sidecar. i guess it succeeds after this.
sidecar: establishing connection failed: Connection refused
attempts left: 4
  • at one point, i got a number of these, but then they went away. (probably user error or a debug build or something.)
liblo error: 26b6; Invalid message received; 

@ngwese
Copy link
Member

ngwese commented Oct 4, 2023

the initial sidecar connection failure is likely related to the main process trying to connect to the sidecar before the sidecar is fully running. adding in a small delay or a log message that says something less alarming followed by a positive confirmation when a connection is established might avoid confusion.

iirc the two warts i remember off the top of my head with the converged branch are:

  • nng starts a ton of communication threads and this was not configurable at the time, ideally we would get rid of that overhead
  • the logic to connect/restore the jack wiring (in lua instead of system calls) results in the jack connections being reset at a time when the sc/crone boot tone is playing which causes it to have a momentary dropout

@ngwese
Copy link
Member

ngwese commented Oct 4, 2023

maybe some good news. it looks like the nng thread count is configurable but only at compile time. i think we should reduce the thread count so this means building our own copy of nng as part of the image build (or norns stack itself).

nanomsg/nng#1572 (comment)

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

Successfully merging this pull request may close these issues.