This file contains hidden or 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
| #include <cmath> | |
| #include <cstdio> | |
| double smoothstep(double low, double high, double factor){ | |
| auto k = std::fmin(1, std::fmax(0, (factor - low)/(high - low))); | |
| return k*k*(3-2*k); | |
| } | |
| int main(){ |
This file contains hidden or 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
| require "app/strings.rb" | |
| def undo_last_stroke(args) | |
| args.state.counts.pop | |
| stroke = args.state.counts.pop | |
| args.state.commands.slice!(0 - stroke, stroke) if stroke | |
| end | |
| def tick(args) | |
| args.state.help_layer ||= :shown |
This file contains hidden or 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
| import time | |
| import board | |
| import usb_midi | |
| import adafruit_midi | |
| from analogio import AnalogIn | |
| from adafruit_midi.control_change import ControlChange | |
| # MIDI CC knob controller example for Raspberry Pi Pico |
OlderNewer