Skip to content

Instantly share code, notes, and snippets.

View olilarkin's full-sized avatar
💭
10x thanks to ChatGPT

Oli Larkin olilarkin

💭
10x thanks to ChatGPT
View GitHub Profile
class IPlugGenTwoInputs : public IPlug
{
public:
IPlugGenTwoInputs(IPlugInstanceInfo instanceInfo);
~IPlugGenTwoInputs();
void Reset();
void OnParamChange(int paramIdx);
void ProcessDoubleReplacing(double** inputs, double** outputs, int nFrames);
#move_uad_plugins.py - python script to remove unlicensed UAD plugin binaries from VST, AU and AAX folders
import os, shutil
#http://stackoverflow.com/a/800201/674745
def get_immediate_subdirectories(a_dir):
return [name for name in os.listdir(a_dir)
if (os.path.isdir(os.path.join(a_dir, name)) and name != 'Mono')]
@olilarkin
olilarkin / process-palette.json
Last active February 14, 2017 13:29
atom.io process pallet configuration for faust on OSX
{
"patterns": {
"P1": {
"expression": "(path):(line)"
},
"P2": {
"expression": "(path)\\s+(line)",
"path": "(?:\\/[\\w\\.\\-]+)+"
}
},
@olilarkin
olilarkin / IPlugXY.cpp
Last active April 7, 2022 21:50
IPlug 2 XY Pad - control with 2 params
#include "IPlugXY.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
#if IPLUG_EDITOR
class IXYPad : public IControl
{
private:
IPlugXY& mPlug;
ILayerPtr mLayer;
@olilarkin
olilarkin / IPlugBeatSyncColors.cpp
Created January 24, 2019 19:03
Demo drawing something based on BPM
#include "IPlugBeatSyncColors.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
IPlugBeatSyncColors::IPlugBeatSyncColors(IPlugInstanceInfo instanceInfo)
: IPLUG_CTOR(kNumParams, kNumPrograms, instanceInfo)
{
GetParam(kGain)->InitDouble("Gain", 100., 0., 100.0, 0.01, "%");
mMakeGraphicsFunc = [&]() {
static constexpr int kNumModSources = 10;
class MySynth
{
public:
MySynth()
{
SetScratchBuffers(DEFAULT_BLOCK_SIZE);
}
@olilarkin
olilarkin / SIMDSmoother.h
Created March 4, 2019 14:48
Parameter smoother using xsimd library
#pragma once
#include <vector>
#include "xsimd/xsimd.hpp"
#include "ptrlist.h"
#include "heapbuf.h"
namespace xs = xsimd;
using tVec = std::vector<float, XSIMD_DEFAULT_ALLOCATOR(float)>;
using bType = xs::simd_type<float>;
@olilarkin
olilarkin / xc_setup.h
Created March 9, 2019 20:11
header to setup xeus-cling with matplotlib-cpp in jupyter-notebook
#pragma cling add_include_path("/usr/include/python2.7")
#pragma cling add_include_path("/Users/oli/Dev/matplotlib-cpp") // change to point to matplotlib-cpp.h
#pragma cling add_library_path("/usr/lib/python2.7")
#pragma cling load("python2.7")
#define WITHOUT_NUMPY 1
#include "matplotlibcpp.h"
namespace plt = matplotlibcpp;
#include <string>
#include <fstream>
@olilarkin
olilarkin / notes.md
Last active March 13, 2024 08:33
Plugin Dev Notes
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPrograms))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");