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
#!/bin/bash | |
installdir="" | |
UPDATED=false | |
UPGRADE=false | |
PYTHON_PKG="" | |
ASK_TO_REBOOT=false | |
promptorno() { | |
read -r -p "$1 (y/[n]) " response < /dev/tty |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.stats import chi2 | |
# load the data | |
data = np.loadtxt('chisqprob_demo.py', delimiter=',', skiprows=30, max_rows=3200) | |
vmeas = data[:,0] | |
vmodel = data[:,1] | |
sd_volts = 0.06 # voltage measurement uncertainty (estimated) |
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
# basic bank file | |
patches: | |
Electric Piano: | |
1: FM Piano.sf2:000:000 | |
Synth: | |
1: VintageDreamsWaves-v2.sf2:000:042 | |
Jazz Combo: | |
1: FluidR3_GM.sf2:000:004 | |
10: FluidR3_GM.sf2:128:000 | |
2: FluidR3_GM.sf2:000:033 |
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
# fluidsettings and bank vs. patch level | |
patches: | |
Piano: | |
1: FluidR3_GM.sf2:000:000 | |
Rhodes EP: | |
1: FluidR3_GM.sf2:000:004 | |
fluidsettings: | |
synth.reverb.room-size: 0.1 | |
Legend EP: | |
1: FluidR3_GM.sf2:000:005 |
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
# router rules | |
patches: | |
Layered Piano/Strings: | |
1: FluidR3_GM.sf2:000:000 | |
2: FluidR3_GM.sf2:000:042 | |
router_rules: | |
- {type: note, chan: 1=2} | |
Split EP and Bass: | |
3: FluidR3_GM.sf2:000:004 | |
2: FluidR3_GM.sf2:000:033 |
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
# messages keyword and init block | |
init: | |
fluidsettings: | |
synth.reverb.level: 1.0 | |
synth.reverb.room-size: 0.8 | |
synth.reverb.damp: 0.8 | |
synth.reverb.width: 5.0 | |
messages: [cc:1:74:0, cc:1:91:60] | |
messages: |
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
import sys | |
import numpy as np | |
class LinFit: | |
def __init__(self, x, y): | |
d = x.size * np.sum(x ** 2) - np.sum(x) ** 2 | |
self.intercept = (np.sum(x ** 2) * np.sum(y) - np.sum(x) * np.sum(x * y)) / d | |
self.slope = (x.size * np.sum(x * y) - np.sum(x) * np.sum(y)) / d | |
self.s_y = np.sqrt(np.sum((y - self.intercept - self.slope * x) ** 2) / (x.size - 2)) | |
self.s_intercept = self.s_y * np.sqrt(np.sum(x ** 2) / d) |
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
# a demo bank that shows how CCs can be used to select patches | |
router_rules: | |
- {type: cc, par1: 45, par2: 1-127=1, patch: select} # CC45 selects patch 1 (Piano) | |
- {type: cc, par1: 46, par2: 1-127=2, patch: select} # CC46 selects patch 2 (Rhodes) | |
- {type: cc, par1: 47, par2: 1-127=3, patch: select} # CC47 selects patch 3 (FM Piano) | |
- {type: cc, par1: 48, par2: 1-127=4, patch: select} # CC48 selects patch 4 (Vibes) | |
- {type: cc, par1: 49, par2: 1-127, patch: -1} # CC49 decrements patch | |
- {type: cc, par1: 50, par2: 1-127, patch: 1} # CC50 increments patch |
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
patches: | |
Glissandos: | |
2: FluidR3_GM.sf2:000:000 | |
sequencers: | |
CMaj: | |
tdiv: 32 | |
notes: [note:2:C4:100, note:2:D4:100, note:2:E4:100, note:2:F4:100, | |
note:2:G4:100, note:2:A4:100, note:2:B4:100, note:2:C5:100] | |
Dm7: | |
tdiv: 32 |
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
patches: | |
Flute: | |
1: FluidR3_GM.sf2:000:073 | |
router_rules: | |
- {type: cc, par1: 2=11} # route breath to expression | |
messages: | |
- cc:1:68:127 # enable legato playing |
OlderNewer