-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add Sigma script #369
Add Sigma script #369
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an awesome script, well done!
software/contrib/sigma.py
Outdated
if lo < 0: | ||
raise ValueError('lo must be non-negative') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[discussion] I know this is copied from another source, but perhaps we can modify this to avoid throwing a runtime exception on the EuroPi?
if lo < 0: | |
raise ValueError('lo must be non-negative') | |
if lo < 0: | |
lo = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also bisect_left
may be a better fit for the new random_extras.py
since I can see other scripts using it too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved bisect_left
into a new experimental.bisect
module. The exception has been edited out as well.
self.last_interaction_at = time.ticks_ms() | ||
|
||
@b1.handler_falling | ||
def on_b1_fall(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[required] This looks like it will change the knob bank handler on both rise and fall? Shouldn't the button only change knob bank on one button direction? B2 changes AIN destination on rise, so I assume you intend to attach B1 behavior on rise alone too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it will change the knob bank handler on both rise and fall?
That's correct; the intent is that the button acts as a momentary shift button. It should be held down to allow changing the binning mode or the jitter. I've changed the code slightly to make it clearer what's going on, but the intent is that the knob bank handler should be set on both the rising & falling edge in order that b1
act as a momentary button instead of a latched one.
…to write the darned thing now
… output voltage control (v1), add a simple debugging GUI. Script is finally being tested on live hardware
…output voltages at a desired time in the future
…with CV changes. Fewer overall outputs, but this feels like a good trade-off for functionality
…date the UI while scrolling through the bin modes
… clamps lo to zero if needed
… might as well include all of it for convenience
This adds a new random CV/Gate generator based on gaussian distributions rather than the even distributions used by most other scripts.
Outputs are paired in Gate (CV1-3) + Random Voltage (CV4-6) pairs. Voltage outputs can optionally be continuous, binned, or quantized to tone/semitone/quartertone (at 1V/octave) resolution.
This script is inspired by Magnetic Freak's Gaussian module (see https://magnetic-freak.com/ for details on that module).
Firmware changes include adding a new
experimental.random_extras
module to store useful random-related functions that are part of standard Python3, but are omitted from MicroPython.