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 / filterdemo-realtimesafety-test.txt
Created January 19, 2024 11:10
filterdemo-realtimesafety-test
AU Validation Tool
Version: 1.10.0
Copyright 2003-2019, Apple Inc. All Rights Reserved.
Specify -h (-help) for command options
--------------------------------------------------
VALIDATING AUDIO UNIT: 'aufx' - 'fltg' - 'Demo'
--------------------------------------------------
Manufacturer String: Apple Sample Code
@olilarkin
olilarkin / IPlugEffect.cpp
Created January 4, 2024 19:00
IPlug2 skins
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");
mMakeGraphicsFunc = [&]() {
@olilarkin
olilarkin / IPlugEffect.cpp
Created May 7, 2023 16:44
iPlug2 repeated params
...
const char[32] group;
const char[32] buf;
for (int i = 0; i< kNumLFOs; i++)
{
sprintf(group, "LFO %i", i+1);
int offs = kFilterParamsEnd + (i*kNumLFOParams);
@olilarkin
olilarkin / IPlugEffect.cpp
Created September 26, 2022 20:43
IBMeterControl example
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
int kCtrlTagMeter = 0;
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");
@olilarkin
olilarkin / IPlugEffect.cpp
Created August 7, 2022 22:15
Rotate a rect around about its centre
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: iplug::Plugin(info, MakeConfig(kNumParams, kNumPresets))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");
#if IPLUG_EDITOR // http://bit.ly/2S64BDd
@olilarkin
olilarkin / IPlugEffect.cpp
Last active July 8, 2022 11:39
Demonstrates a popup menu to resize the UI
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
class ResizeMenuControl : public IControl
{
public:
ResizeMenuControl(const IRECT& bounds)
: IControl(bounds)
{}
@olilarkin
olilarkin / IPlugEffect.cpp
Last active July 14, 2021 21:25
Storing and Restoring the plugin editor scaling
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");
#if IPLUG_EDITOR // http://bit.ly/2S64BDd
@olilarkin
olilarkin / IPlugEffect.cpp
Created July 14, 2021 17:54
Redraw a control periodically using a timer
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
class MyControl : public IControl {
public:
MyControl(const IRECT& r)
: IControl(r)
{
mTimer = std::unique_ptr<Timer>(Timer::Create([&](Timer& t) {
@olilarkin
olilarkin / IPlugEffect.cpp
Last active May 17, 2021 17:35
Switch IGraphics DrawScale using a radio button
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");
@olilarkin
olilarkin / IPlugEffect.cpp
Created May 10, 2021 17:43
Randomise parameters from a button click
#include "IPlugEffect.h"
#include "IPlug_include_in_plug_src.h"
#include "IControls.h"
int kMsgTagRandomise = 0;
IPlugEffect::IPlugEffect(const InstanceInfo& info)
: Plugin(info, MakeConfig(kNumParams, kNumPresets))
{
GetParam(kGain)->InitDouble("Gain", 0., 0., 100.0, 0.01, "%");