Skip to content

Instantly share code, notes, and snippets.

#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(){
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
@TheEyesightDim
TheEyesightDim / code.py
Created January 31, 2021 06:40 — forked from sandyjmacdonald/code.py
MIDI CC knob controller example for Raspberry Pi Pico
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