Skip to content

Instantly share code, notes, and snippets.

View evilactually's full-sized avatar

Vlad Shcherbakov evilactually

View GitHub Profile
from sdf import *
def smoothstep(x, edge0=0, edge1=1):
# Scale x to the range between edge0 and edge1
x = np.clip((x - edge0) / (edge1 - edge0), 0.0, 1.0)
# Smooth interpolation function (Hermite interpolation)
return x * x * (3 - 2 * x)
def _vec(*arrs):
return np.stack(arrs, axis=-1)
@evilactually
evilactually / dspG1.c
Created September 26, 2020 17:28 — forked from piedoom/dspG1.c
The dsp-G1 Analog Modeling Synthesizer Source Code
/*
Copyright 2016 DSP Synthesizers Sweden.
Author: Jan Ostman
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
*/
 
#include "wiring.h"
#include "LPC8xx.h"
./create faust am_modulator
./create faust am_modulator.
LV2_PATH=~/mod-workdir/modduo/target/usr/local/lib/lv2/ python3 ./development_server.py
sudo apt-get install build-essential liblilv-dev phantomjs python3-pil python3-pystache python3-setuptools python3-pyinotify python3-pip
pip3 install tornado==4.2.0
pip3 install PyDispatcher
git clone https://github.com/moddevices/mod-sdk.git
cd ../../../../
./build modduo am_modulator
cat <<'EOF' > ./Makefile
CXX ?= g++
CLSNAME = am_modulator
URI_PREFIX = https://evilactually.github.com
build:manifest.ttl $(CLSNAME).ttl $(CLSNAME).so
$(CLSNAME).cpp:$(CLSNAME).dsp
faust -i -a /usr/share/faust/lv2.cpp -cn $(CLSNAME) $< -o $@
$(CLSNAME).so:$(CLSNAME).cpp
$(CXX) -shared -O3 -std=c++11 -ffast-math -ftree-vectorize '-DDLLEXT=".so"' -fPIC '-DPLUGIN_URI="$(URI_PREFIX)/$(CLSNAME)"' -DFAUST_META=1 -DFAUST_MIDICC=1 -DFAUST_MTS=1 -DFAUST_UI=0 -DVOICE_CTRLS=1 $< -o $@
manifest.ttl:manifest.ttl.in
cd source
cat <<'EOF' > "./manifest.ttl.in"
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<@uri@>
a lv2:Plugin ;
lv2:binary <@name@@dllext@> ;
rdfs:seeAlso <@name@.ttl> .
EOF