Skip to content

Instantly share code, notes, and snippets.

View iluvcapra's full-sized avatar
💭
Workin’

Jamie Hardt iluvcapra

💭
Workin’
View GitHub Profile
//
// SpotToProToolsOperation.swift
// Bag of Holding
//
// Created by Jamie Hardt on 12/8/14.
// Copyright (c) 2014 Jamie Hardt. All rights reserved.
//
import Cocoa
import Foundation
@iluvcapra
iluvcapra / Import Video Cuts from EDL.lua
Last active December 7, 2024 08:56
A REAPER script for post-production
--[[
I, Jamie Hardt, the author, hereby release this work to the public domain.
This script accepts an EDL from the file selection dialogue and then creates a marker region
for each target clip, named after the clip name in the source.
]]
currentEvent = {}
function parseEdlHeader()
@iluvcapra
iluvcapra / Loop Item to Fill Scene.lua
Last active February 7, 2018 01:38
A REAPER script for automatically editing backgrounds
--[[
I, Jamie Hardt, the author, hereby release this work to the public domain.
This script reads regions created by the "Import Video Cuts from EDL.lua" script and
attempts to intelligently loop regions to fill them.
]]
function eachMarker(proj)
local i = 0
local retval, markerCount, regionCount = reaper.CountProjectMarkers(proj)
@iluvcapra
iluvcapra / csv2.swift
Last active April 22, 2016 18:04
A Brief (< 150 LOC) Swift RFC4180 CSV Parser
#!/usr/bin/swift
import Foundation
/* Dans le mode de http://www.cocoawithlove.com/2009/11/writing-parser-using-nsscanner-csv.html */
/* https://tools.ietf.org/html/rfc4180 */
class CSVParser {
struct Error : ErrorType {var atRow: Int}
//
// AVAudioFile_Digest.swift
// Bag of Holding
//
// Created by Jamie Hardt on 7/30/15.
// Copyright © 2015 Jamie Hardt. All rights reserved.
//
import Foundation
import AVFoundation
@iluvcapra
iluvcapra / cycloid_gear.scad
Last active May 13, 2025 01:32
OpenSCAD cycloid gear
function epicycloid(t, rmaj, rmin) = [ (rmaj+rmin) * cos(t) - rmin * cos(((rmaj+rmin)/rmin)*t),
(rmaj+rmin) * sin(t) - rmin * sin(((rmaj+rmin)/rmin)*t) ];
function hypocycloid(t, rmaj, rmin) = [ (rmaj-rmin) * cos(t) + rmin * cos(((rmaj-rmin)/rmin)*t),
(rmaj-rmin) * sin(t) - rmin * sin(((rmaj-rmin)/rmin)*t) ];
module CycloidTooth(
rmaj = 30,
rmin = 20,
circ_pitch = 10.0,
//
// MUZID3Writer.m
// Metadata Machinegun
//
// Created by Jamie Hardt on 8/13/13.
// Copyright (c) 2013 Jamie Hardt. All rights reserved.
//
#import "MUZID3Writer_v2_3.h"
@iluvcapra
iluvcapra / CSVParser.c
Last active December 15, 2015 23:29
blah blah this isn't done
#include <stdio.h>
#include <string.h>
#define BUFSZ 0x1000
/* CSV Parser per RFC 4180 */
/* enumerate records in a CSV file */
typedef struct rowCell {
@iluvcapra
iluvcapra / AEPtulImport
Last active November 30, 2021 08:15
Pro Tools Import Apple Event via AEDebugSends=1
{ 1 } 'aevt': Sd2a/SRgn (i386){
return id: 315 (0x13b)
transaction id: 0 (0x0)
interaction level: 32 (0x20)
reply required: 1 (0x1)
remote: 0 (0x0)
for recording: 0 (0x0)
reply port: 0 (0x0)
target:
{ 1 } 'sign': 4 bytes {
@interface NSData (SimpleChecksum)
-(NSUInteger)simpleChecksum;
@end
@implementation NSData (SimpleChecksum)
-(NSUInteger)simpleChecksum {
NSUInteger i, accumuator = 0;