This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VST_EXPORT AEffect* VSTPluginMain (audioMasterCallback audioMaster) | |
{ | |
if (!audioMaster(0, audioMasterVersion, 0, 0, 0, 0)) return 0; | |
AudioEffect* effect = new MyVST(audioMaster); | |
effect->init(); // <--- implement your own init() method that configures the vst | |
return effect->getAeffect (); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In no particular order: | |
* Toro Y Moi - Anything In Return | |
Brilliant electronic pop/soul record with some very strong songwriting. | |
* Humble Bee - Henrietta | |
Sublime ambient hypnosis, for once not only availble in ultra-limited CD run. | |
* Autechre - Exai | |
Autechre finally makes the masterpiece they've been orbiting for the last half-decade. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Simple script that uses PIL to automatically generate both 1x and 2x resolution | |
# PNGs from a source directory of 2x files. Handy for iPhone/iPad retina assets. | |
# | |
import glob | |
i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- javascript -*- | |
// Install this in your FireWorks extensions directory. | |
// It exports all elements with a targetText attribute. It also expects that the elements to | |
// export are instances of a symbol type. | |
// | |
// For instance, create a symbol of type "knob", and place several instances of it on your | |
// UI with targetText attributes pointing to the string name of the parameter that knob controls. | |
// | |
var outURL = "/Users/miles/tmp/layout.txt"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Provides an "embed_youtube" tag for Jekyll's Liquid templates. | |
# Much cleaner than pasting in <object> tags. | |
require 'uri' | |
module Jekyll | |
class EmbedYouTubeTag < Liquid::Tag | |
def initialize(tag_name, text, tokens) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float imag[size_2]; | |
float real[size_2]; | |
DSPSplitComplex comp = (DSPSplitComplex) { .imagp = imag, .realp = real }; | |
vDSP_ctoz((DSPComplex *)windowedSamples, 2, &comp, 1, size_2); | |
vDSP_fft_zrip(self.fftSetup, &comp, 1, logSize, kFFTDirection_Forward); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AudioStreamBasicDescription fmt = (AudioStreamBasicDescription) { | |
.mChannelsPerFrame = 1, | |
.mBytesPerFrame = sizeof(int16_t), | |
.mBytesPerPacket = sizeof(int16_t), | |
.mFramesPerPacket = 1, | |
.mBitsPerChannel = sizeof(int16_t) * 8, | |
.mFormatID = kAudioFormatLinearPCM, | |
.mSampleRate = 44100.0, | |
.mFormatFlags = kAudioFormatFlagIsBigEndian | | |
kAudioFormatFlagIsPacked | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the old way: | |
int calculate_z(int a, int b) | |
{ | |
int *buffer = malloc(a * sizeof(int)); | |
// ... | |
free(buffer); | |
} | |
// the new way: | |
int calculate_z(int a, int b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// photoshop knob generation script | |
// This script assumes your source document contains a layer group | |
// called "indicator" that can be successively rotated around its | |
// center to generate a series of rotation state images. | |
// - Miles Egan January 2011 | |
// change this to the number of discrete rotations you want | |
var numRotations = 65; | |
var rotAngle = 270; | |
var step = rotAngle / (numRotations - 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os, re, sys | |
from xml.etree.ElementTree import ElementTree | |
def hash_style(s): | |
s = re.split(r";\s+", s) | |
s = [re.split(r":", x) for x in s] | |
s = [(x[0], re.sub(r"[^0-9]", "", x[1])) for x in s if re.match(r"^\d", x[1])] | |
return dict(s) |