You can use this Rust program to make any interaction with your MIDI controller (like an Akai LPD8) trigger various actions on your system, like controlling the audio volume or start a mail sync. You will need midir (https://crates.io/crates/midir) for this to work. This approach is tested on a Linux based OS only.
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
#!/usr/bin/env python | |
import math | |
def dewpoint(r,T): | |
if(T<=0): | |
raise ValueError('Algorithm not suitable for the given temperature') | |
return (b * (math.log( (r/100)*6.1078*(10**((a*T)/(b+T))) /6.1078,10) ) / | |
(a - (math.log( (r/100)*6.1078*(10**((a*T)/(b+T))) /6.1078,10) ))) |
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
#!/usr/bin/env bash | |
BASEPATH="$1" | |
BASEPATH_ABS=${BASEPATH:0:1} | |
# config | |
TITLE="My Library" | |
[ ! "$BASEPATH_ABS" = "/" ] && echo "Not an absolute path: $BASEPATH" && exit 1 | |
[ ! -d "$BASEPATH" ] && echo "Not a folder: $BASEPATH" && exit 1 |
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
#!/usr/bin/env bash | |
function DEPENDENCY_CHECKS { | |
for dep in $@; do | |
if ! hash "$dep" 2>/dev/null 1>&2; then echo "$dep not found in \$PATH. Abort." && exit 1; fi | |
done | |
} | |
DEPENDENCY_CHECKS mpc | |
MPC_OPTS="--port 6601" |
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
from keybow_hardware.pim56x import PIM56X as Hardware | |
from keybow2040 import Keybow2040 | |
import supervisor | |
import time | |
import usb_cdc | |
keybow = Keybow2040(Hardware()) | |
keys = keybow.keys | |
uart = usb_cdc.serials[1] |