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
// Copyright Jean Pierre Cimalando 2022. | |
// Distributed under the Boost Software License, Version 1.0. | |
// (See accompanying file LICENSE or copy at | |
// http://www.boost.org/LICENSE_1_0.txt) | |
// | |
// SPDX-License-Identifier: BSL-1.0 | |
#include <stdio.h> | |
#include <stddef.h> |
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
(°) | |
(%) | |
(+/-) | |
(0..1) | |
(0=all buses) | |
(0=auto) | |
(0=omni) | |
(0=resonant, 1=dull) | |
(0=tempo sync) | |
(0=use played velocity) |
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("stdfaust.lib"); | |
// a linear smoother | |
lfsmooth(tau, flush, tgt) = | |
((+:(_,tgt):select2(flush))~_)~((tgt-_)<:(abs,(/(tau*ma.SR):(select2(sc)~_):abs),_):(min,_):copysign) | |
with { | |
sc = (tgt!=tgt')|(tau!=tau'); | |
copysign(x,s) = abs(x)*select2(s<0.0,1.0,-1.0); | |
//copysign = ffunction(float copysignf|copysign|copysignl(float,float),<math.h>,""); | |
}; |
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
/** | |
Calculate the analog filter and the bilinear transform | |
of the Bass and EQ section. | |
SPDX-License-Identifier: MIT | |
Compile | |
c++ -O2 -g -o bassFilter bassFilter.cpp | |
Run |
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
param1 = 0.5; % knob 0 to 1 | |
Fs = 44100.0; | |
R1 = 330e3; | |
C1 = 220e-12; | |
R2 = 3.3e3; | |
C2 = 10e-9; | |
Rp = 100e3 * param1; | |
Num = [(R1*C1*(Rp+R2)*C2) (C2*(Rp+R2)+R1*C1+R1*C2) 1.0]; |
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
#include <SDL2/SDL.h> | |
#include <stdio.h> | |
/* | |
--- Want | |
Rate : 44444 | |
Channels : 2 | |
Samples : 4096 | |
Size : 0 | |
Format : 0x008120 |
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
// SPDX-License-Identifier: ISC | |
import("stdfaust.lib"); | |
// | |
// shift: transposition in semitones | |
// wt: window time | |
// dt: delay time | |
// | |
mspShifter(shift, wt, dt, sig) = mix with { | |
// speed change |
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("stdfaust.lib"); | |
// Transposer with 3 delay lines | |
// w: Window length (samples) | |
// s: Detune amount (semitones) | |
// t: Tuning adjustment factor | |
GenericTransposer3(w, s, t, sig) = | |
sum(i, 3, mix(i)*del(w*(mod(i)*ov+(i/2.)*(1.-ov)))) : *(0.5) | |
with { | |
ov = 2./3.; |
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("stdfaust.lib"); | |
// slewRate: a slew rate limiter | |
// - rate: maximum variation allowed in the time frame of a second (positive) | |
slewRate(rate) = next with { | |
next(x) = y letrec { | |
'y = y+step(rate/ma.SR,x-y); | |
} | |
with { | |
step(r, dy) = abs(dy) : min(r) : *(ba.if(dy>0,1,-1)); |
NewerOlder