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

ASL functions able to redirect to() for i2c transmission #322

Closed
trentgill opened this issue Jun 7, 2020 · 2 comments
Closed

ASL functions able to redirect to() for i2c transmission #322

trentgill opened this issue Jun 7, 2020 · 2 comments
Labels
feature new features yet to be added
Milestone

Comments

@trentgill
Copy link
Collaborator

From https://llllllll.co/t/crow-help-general-connectivity-device-qs-ecosystem/25866/475

NB: the discussion is focused on allowed redefinition of the to() to forward the values over the i2c bus. this is likely related to #67 in that it's based on ASLs that do things other than control the CV outputs.

I like the idea of using asllib-style helpers for ii commands. There could be 2 backends: 1) breakpoint style for modules that have ‘slew time’ built in, 2) streaming mode for just setting values continuously with some update interval param.

If anyone has proposals for syntax that’d be a good start. Maybe something like:

make an ASL
erlfo = Asl.new()

erlfo.to = ii.er301.cvredirecttoerlfo.throttle = 0.1update every 100ms

— works like a normal asl
erlfo.action = lfo()
erlfo()

Note how this could be done as:

  1. a streaming service where the values are calculated on crow and streamed to the follower at a user determined rate.
  2. a breakpoint approach where each to is implemented as a .slew and .volts pair
  3. a combination of the above, using small linear-slewed segments based on actual output voltages

The 2nd option is easiest to start with as it's a direct replacement for to and only requires some method for tracking time (ie an ASL which doesn't calculate slopes, instead just decrements a timer). Sacrifices the ability to do non-linear curves (unless the destination device supports those too).

First option is only real option for devices that don't support 'slew' commands for the destination parameter. User must have control over interval as we want as low as possible for less 'steppiness' , but this is a tradeoff against bus stability (especially if controlling multiple simultaneous channels).

Last option is likely an unnecessary complication. It's limited in scope (only works on devices with slew commands), is worse in terms of time accuracy, and benefit is small compared to option 2.

@trentgill trentgill added the feature new features yet to be added label Jun 7, 2020
@trentgill trentgill added this to the Major (2.0) milestone Jun 7, 2020
@trentgill trentgill modified the milestones: Major (2.0), Major Jun 22, 2020
@trentgill
Copy link
Collaborator Author

This can likely be written using the new norns clock module once it's ported to crow, and then turned into a small library that wraps the same contexts. it could then have ii versions of asl functions, and wouldn't require drastic changes to either ASL or ii handling.

@trentgill
Copy link
Collaborator Author

Closing as it should be implemented as a userlib once 'clocks' are included per #339

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

No branches or pull requests

1 participant