Skip to content

Instantly share code, notes, and snippets.

View antoinevg's full-sized avatar
🦋

antoinevg

🦋
View GitHub Profile
@antoinevg
antoinevg / sineModelMulti.py
Created December 4, 2016 07:19
A multi-resolution sinusoidal model
import sys
import math
import numpy as np
eps = np.finfo(float).eps # epsilon, minimum float value in python
from scipy.fftpack import fft, ifft
from scipy.signal import triang, get_window, blackmanharris
sys.path.append("../../software/models/")
@antoinevg
antoinevg / ableton.xtm
Created February 20, 2016 16:14
Simple MIDI Sync for Extempore and Ableton
;; useful
(define *beats-per-bar* (lambda () 4))
(define *next-bar* (lambda () (*metro* 'get-beat (*beats-per-bar*))))
;; init MIDI & create a stream for my Ableton IAC device
(sys:load "libs/external/portmidi.xtm")
(pm_initialize)
(pm_print_devices)
(define *ableton* (pm_create_output_stream 7))
@antoinevg
antoinevg / index.html
Last active August 29, 2015 14:23
Mozilla PDF.js viewer for Trigger.io
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- PDF.js -->
<link rel="stylesheet" href="bower_components/pdfjs-dist/web/pdf_viewer.css">
<script src="bower_components/pdfjs-dist/web/compatibility.js"></script>
<script src="bower_components/pdfjs-dist/build/pdf.js"></script>
@antoinevg
antoinevg / import_aar.py
Last active August 15, 2016 12:07
Import AAR libraries to a Trigger.io Native Module project
#!/usr/bin/env python
import contextlib
import errno
import json
import os
import shutil
import sys
import tempfile
import zipfile
@antoinevg
antoinevg / fasta.hs
Created March 21, 2011 10:04
Minimal Parsec parser for FASTA sequence data
import Text.ParserCombinators.Parsec
fasta :: Parser [[String]]
fasta = do a <- many record
eof
return a
record :: Parser [String]
record = do a <- header
b <- dna