Skip to content

Instantly share code, notes, and snippets.

View TronicLabs's full-sized avatar

TronicLabs TronicLabs

View GitHub Profile
#pragma once
#if defined(_WIN32)
# include <Windows.h>
#elif defined(__APPLE__) || defined(LINUX)
# include <sys/mman.h>
#endif
#include <optional>
#include "result.hpp"
#pragma once
#include <cstring>
#include "daisy_seed.h"
#include "daisy_pod.h"
#include "util/oled_fonts.h"
#include "hid/disp/graphics_common.h"
using namespace daisy;
@TronicLabs
TronicLabs / interpolators.c
Created February 18, 2023 17:26 — forked from mrbid/interpolators.c
Interpolation functions for time domain signals.
// ----------------------------------------------------------
// https://www.musicdsp.org/en/latest/Other/93-hermite-interpollation.html
// 2002-01-17 03:14:54: Dave from Muon Software, originally from Josh Scholar
float order3Spline(const float x, const float L1, const float L0, const float H0, const float H1)
{
return
L0 +
.5f*
x*(H0-L1 +
@TronicLabs
TronicLabs / interpolator_bench.c
Created February 18, 2023 17:26 — forked from mrbid/interpolator_bench.c
Benchmarking interpolation functions for time domain signals.
/*
James William Fletcher (github.com/mrbid)
September 2021
Benchmarking interpolation functions for time domain signals, such as audio.
https://james-william-fletcher.medium.com/benchmarking-interpolation-functions-9f84de397109
references of interest:
http://www.ee.ic.ac.uk/pcheung/teaching/ee3_Study_Project/Sinewave%20Generation(708).pdf
https://demonstrations.wolfram.com/SineWaveGenerationUsingAnUnstableIIRFilter/
@TronicLabs
TronicLabs / sine_bench.c
Created February 18, 2023 16:47 — forked from mrbid/sine_bench.c
A benchmark of different trigonometric sine functions.
/*
James William Fletcher (github.com/mrbid)
August 2021
Benchmarking sine wave functions.
https://james-william-fletcher.medium.com/benchmarking-sine-functions-16b067bf63ce
references:
http://www.ee.ic.ac.uk/pcheung/teaching/ee3_Study_Project/Sinewave%20Generation(708).pdf
https://demonstrations.wolfram.com/SineWaveGenerationUsingAnUnstableIIRFilter/
done.....
.........
.........
@TronicLabs
TronicLabs / sample-rate-conversion-with-polyphase-filtering-example.cpp
Created April 14, 2022 10:02 — forked from dv1/sample-rate-conversion-with-polyphase-filtering-example.cpp
Simple example for how to perform bandlimited sample rate conversion with a polyphase filter
#include <vector>
#include <string>
#include <cmath>
#include <iostream>
#include <sndfile.h>
#ifdef WITH_RLIMIT
#include <sys/resource.h>
#endif
@TronicLabs
TronicLabs / ecc83.sci
Created January 3, 2019 19:55 — forked from apohl79/ecc83.sci
Tube Model Scilab Files
clear;
// ECC83 Model and circuit based on
// http://www.hs-ulm.de/opus/frontdoor.php?source_opus=114
Fs = 44100;
T = 1/Fs;
// Tube parameters for the ECC83
g0 = 1.609683e-15;
@TronicLabs
TronicLabs / minimal_vst2x_host.cpp
Created November 15, 2018 16:06 — forked from t-mat/minimal_vst2x_host.cpp
WIN32 : Minimal VST 2.x host in C++11.
// Win32 : Minimal VST 2.x Synth host in C++11.
//
// This is a simplified version of the following project by hotwatermorning :
// A sample VST Host Application for C++ Advent Calendar 2013 5th day.
// https://github.com/hotwatermorning/VstHostDemo
//
// Usage :
// 1. Compile & Run this program.
// 2. Select your VST Synth DLL.
// 3. Press QWERTY, ZXCV, etc.
@TronicLabs
TronicLabs / halfband.c
Last active August 29, 2015 14:09 — forked from notwa/halfband.c
// C port of http://ldesoras.free.fr/prod.html#src_hiir
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <errno.h>
const double PI = 3.1415926535897932384626433832795;
void
compute_transition_param(double *kp, double *qp, double transition)