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
@olilarkin
olilarkin / IPlugOverSampler.cpp
Last active June 14, 2024 12:21
IPlugOverSampler
#include "IPlugOverSampler.h"
#include "IPlug_include_in_plug_src.h"
IPlugOverSampler::IPlugOverSampler(const InstanceInfo& instanceInfo)
: Plugin(instanceInfo, MakeConfig(kNumParams, kNumPrograms))
{
GetParam(kGain)->InitDouble("Gain", 1., 1., 100.0, 0.01, "*");
GetParam(kOverSampling)->InitEnum("OverSampling", 0, 5, "", 0, "", OVERSAMPLING_FACTORS_VA_LIST);
}
mMakeGraphicsFunc = [&]() {
return MakeGraphics(*this, 300, 300, PLUG_FPS, 1.);
};
mLayoutFunc = [&](IGraphics* pGraphics) {
const IRECT b = pGraphics->GetBounds();
if(pGraphics->NControls())
{
#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, "%");
@olilarkin
olilarkin / notes.md
Last active November 14, 2024 06:28
Plugin Dev Notes
@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 / 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>;
static constexpr int kNumModSources = 10;
class MySynth
{
public:
MySynth()
{
SetScratchBuffers(DEFAULT_BLOCK_SIZE);
}
@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 = [&]() {
@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 / 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\\.\\-]+)+"
}
},