-
Notifications
You must be signed in to change notification settings - Fork 35
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
New calibrate.lua & underlying engine #397
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…with multiline comment
tehn
approved these changes
Apr 23, 2021
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.
dang that new recalibrate script is nice.
this is going to un-zombie a huge heap of crows!!
trentgill
added a commit
that referenced
this pull request
Jun 30, 2021
* can now update output[n].scale(_) with .scale = {note list}, so it can be dynamically set like a regular table (#373) * fix bug where aliasing an ii address before use could stack overflow (#374) * querying output voltage now returns the shaped & scaled voltage (real voltage at jack) * add just intonation helpers: justvolts(), just12() * support input scales: input[n].mode( 'scale', {...}, 'ji') * support output scales: output[n].scale({...}, 'ji') * Python based bootloader support and dfureset (#377) * `make pydfu` to use python3 dfu bootloader * `make dfureset` jumps to bootloader from make * `make zip` now builds dfu file as well as binary * add instructions for using pydfu instead of dfu-util * Frequency detect mode for input[1] (#382) * `input[1].mode('freq', interval)` reports frequency of a signal connected to input 1 (no support for input 2) * `hztovolts(hz, <ref>)` helper fn converts an input hz equivalent voltage (uses default reference to match Just-Friends & W/Syn) * print an error to usb host if event queue overflows (#391) * clock.lua module added (#393) * New calibrate.lua & underlying engine (#397) Breaking: * `cal` lua module refactored with new API * calibration no longer auto-runs if no vals saved (ie new factory modules) * `util/recalibrate.lua` demonstrates usage, and can be used for factory calibration (or at home) * double userscript storage size to 16kB (#396) * add jacktest.lua * strip debug info from crow lua libs for dramatic ram reduction (#395) * Sequins.lua library (#387) * add sequins library * ASL2 (#399) ASL2 library. Runtime operates in C for greatly optimized performance & sample accuracy * introduce Caw_printf * Public.lua library for sharing parameters (#394) * after calling init() crow sends '^^ready()' * add 'public.view' for enabling live monitoring of in & out voltages * Oscillate asllib fn (#407) * add 'oscillate' asllib fn * add note about not using `note` in asllib. kept only to avoid the breaking change * add quote library & remove quotes global (#412) * support ii getters from teletype (#403) Co-authored-by: brian crabtree <tehn@monome.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #39 (finally!)
The C interface for the calibration engine is greatly simplified, and a very simple lua wrapper is provided in
calibrate.lua
. Exposed ascal
in the global env.There is a new script
util/recalibrate.lua
which uses this interface to iteratively solve for exact calibration. The script prints instructions on load, and utilities are provided for viewing valuespprint()
and a flagVERBOSE
can be set to true to watch the values converge (or fail to) when debugging. Calculated values are validated to be within normal ranges, and written to flash if successful.Currently I've only tested on a single hardware unit, but I will test a few more shortly. The
recalibrate
script could likely be refactored somewhat, but it's functional and working well for now. Curious to see how it performs on other hardware.