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
double maxiFilter::formant(double input, double centerFreq, double q, double gain) { | |
cutoff = centerFreq; | |
//offset gain | |
gain += 1; | |
//gain *= 4; | |
//calculate poles and coeffs | |
w0 = TWOPI * cutoff / 44100; | |
alpha = sin(w0)/(20*q); | |
b0 = alpha*gain; |
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
/* | |
WavManager | |
========== | |
simple class to open and stream a WAV file as a Float32Array | |
by jakub fiala | |
goldsmiths computing, 2015 |
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
" Some of these I've taken from spf13 | |
set nocompatible | |
filetype plugin indent on | |
set virtualedit=onemore | |
set history=1000 | |
set number | |
set cursorline | |
" set the runtime path to include Vundle and initialize |
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
const path = require('path'); | |
const fractal = module.exports = require('@frctl/fractal').create(); | |
const mandelbrot = require('@frctl/mandelbrot'); | |
const TPLAdapter = require('./pattern-library/tpl-php-adapter.js'); | |
// PROJECT VARS | |
fractal.set('project.title', 'Web Components'); | |
fractal.set('project.version', 'v1.0'); | |
fractal.set('project.author', 'Jakub Fiala'); |
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
After .iter(): | |
[ | |
0.02893070559670266, | |
0.02936703194102209, | |
0.030760184075799155, | |
0.033019285012034535, | |
0.03669432755302178, | |
0.041665175580908854, | |
0.048615361816985184, |
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
// creates a Sequence for the given AudioContext, which changes the `param` of the `node` according to a specified `seq` array with a given `smoothness` | |
// Example of a `seq` array: | |
// [ [0, 440], [1, 220], [1.5, 330], [2, 440] ] | |
// English: set the value to 440 immediately, then to 220 after 1 second, then to 330 after 1.5 seconds, then return to 440 after 2 seconds | |
// | |
// returns an object containing 3 methods: | |
// | |
// - `playOnce` will perform the sequence once | |
// - `loop` will loop the sequence indefinitely | |
// - `stop` will stop looping the sequence |
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
# this defines a new field type | |
scalar HTML | |
# this defines a new object type | |
type Institution { | |
# the ! denotes a required field | |
name: String! | |
location: String | |
} |
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
// creates a Sequence for the given AudioContext, which changes the `param` of the `node` according to a specified `seq` array with a given `smoothness` | |
// Example of a `seq` array: | |
// [ [0, 440], [1, 220], [1.5, 330], [2, 440] ] | |
// English: set the value to 440 immediately, then to 220 after 1 second, then to 330 after 1.5 seconds, then return to 440 after 2 seconds | |
// | |
// returns an object containing 3 methods: | |
// | |
// - `playOnce` will perform the sequence once | |
// - `loop` will loop the sequence indefinitely | |
// - `stop` will stop looping the sequence |
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
<snippet> | |
<content><![CDATA[ | |
¯\_(ツ)_/¯ | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>ohwell</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
OlderNewer