Skip to content

Instantly share code, notes, and snippets.

Avatar

JP Cimalando jpcima

View GitHub Profile
View lookups.dsp
import("stdfaust.lib");
//--- for tabulating intervals ---//
// calculate a tabulated function of normalized range [0;1] with interpolation
lookup(fn, start, end, size) = lut(0, fn, start, end, size).lookup_itp;
// calculate a tabulated function of normalized range [0;1] without interpolation
fastlookup(fn, start, end, size) = lut(0, fn, start, end, size).lookup_direct;
// calculate a tabulated function of range [start;end] with interpolation
eval(fn, start, end, size) = lut(0, fn, start, end, size).eval_itp;
View resonator.dsp
import("stdfaust.lib");
numkeys = 88;
depth = hslider("[1] Depth", 1, 0, 1, 0.01);
pitches(i) = hslider("[%n] Resonance frequency %j [unit:Hz]", 1, 0, 22000, 1) with { n = i*10+100; j = i+1; };
feedbacks(i) = hslider("[%n] Resonance feedback %j", 0, 0, 1, 0.001) with { n = i*10+101; j = i+1; };
bandwidths(i) = hslider("[%n] Bandwidth %j [unit:Hz]", 1, 0, 10, 0.01) with { n = i*10+102; j = i+1; };
gains(i) = hslider("[%n] Gain %j", 0, 0, 1, 0.01) with { n = i*10+103; j = i+1; };
View gist:fbe7898d59b3e663845a86b10623d142
diff --git a/src/sfizz/Messaging.h b/src/sfizz/Messaging.h
index 737fa1d4..7e5fc082 100644
--- a/src/sfizz/Messaging.h
+++ b/src/sfizz/Messaging.h
@@ -28,4 +28,29 @@ inline void Client::receive(int delay, const char* path, const char* sig, const
receive_(data_, delay, path, sig, args);
}
+///
+template <unsigned MaxArguments = 16> class BasicMessageBuffer;
@jpcima
jpcima / xfade.gp
Last active Oct 1, 2020
Parametric crossfade curves
View xfade.gp
set mxtics 2
set mytics 2
set grid mxtics mytics
set key top center
set xrange [0:1]
set yrange [0:1]
fadePowS(k, x) = (x<0.5) ? ((1-(2*x)**k)/2+.5) : (((1-2*(x-.5))**k)/2)
k=3
View drops.diff
diff --git a/Makefile b/Makefile
index 4de8329..ebd06bb 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,10 @@
include dpf/Makefile.base.mk
all: dgl plugins gen
+clean: sfizz-clean
+plugins: sfizz-lib
View midiomatic.diff
diff --git a/plugins/MIDICCMapX4/PluginMIDICCMapX4.cpp b/plugins/MIDICCMapX4/PluginMIDICCMapX4.cpp
index 6dbe08f..545e8bb 100644
--- a/plugins/MIDICCMapX4/PluginMIDICCMapX4.cpp
+++ b/plugins/MIDICCMapX4/PluginMIDICCMapX4.cpp
@@ -25,6 +25,7 @@
*/
#include "PluginMIDICCMapX4.hpp"
+#include <algorithm>
View filter.dsp
// Figure 3.18: 1-pole TPT lowpass filter with resolved zero-delay feedback
g = hslider("Parameter g", 0., 0., 1., 0.01);
process(x) = out with {
G = g/(1+g); // gain term
/* the signal that enters the recursive structure (after multiplier)
as a function of z1 the output of the delay box */
xIn(memZ1) = (x-memZ1)*G;
View disto.dsp
import("stdfaust.lib");
disto(depth, tone, x) = x : toneLpf(toneCutoff) : dist : fi.dcblockerat(5.0) with {
// low pass filter
toneCutoff = 21+tone*1.08;
toneLpf(f) = fi.iir((1.-p), (0.-p)) with { p = exp(-2.*ma.PI*f/ma.SR) : si.smoo; };
// distortion
dist(x) = shs*hh(x)+(1.0-shs)*lh(x);
View ir.lv2-offset.diff
diff --git a/ir.cc b/ir.cc
index b279af7..7ef8b19 100644
--- a/ir.cc
+++ b/ir.cc
@@ -231,6 +231,7 @@ static int load_sndfile(IR * ir) {
int length = 0;
int offset = 0;
+ int start = 0;
float * buff;
View range_element.hpp
// SPDX-License-Identifier: BSD-2-Clause
// This code is part of the sfizz library and is licensed under a BSD 2-clause
// license. You should have receive a LICENSE.md file along with the code.
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#pragma once
#include <elements.hpp>
#include <infra/support.hpp>
namespace el = cycfi::elements;