Skip to content

Instantly share code, notes, and snippets.

@samaaron
Created November 17, 2011 17:55
Show Gist options
  • Save samaaron/1373905 to your computer and use it in GitHub Desktop.
Save samaaron/1373905 to your computer and use it in GitHub Desktop.
Overtone: audiocat - concatting two audio files
(ns audiocat
(:use [overtone.live]
[overtone.helpers.audio-file]))
(def samp1 (load-sample "assets/GEM4_1.aif"))
(def samp2 (load-sample "assets/GEM4_10.aif"))
(def s1-data (buffer-data samp1))
(def s2-data (buffer-data samp2))
(def conc-data (concat s1-data s2-data))
(write-wav conc-data "~/Desktop/joined.wav" (:rate samp1) 2)
(def new (load-sample "~/Desktop/joined.wav"))
(demo 20 (play-buf 2 new :loop 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment