Go Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dsp
engine Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018
errors Some tests for errors Feb 4, 2018
examples
extra
graph Remove dead code. Dec 1, 2017
lisp Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018
midi Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018
runtime Make octave a proper interval. Jul 13, 2018
unit Don't truncate the rate. Jul 12, 2018
vendor
.gitignore Produce errors that don't look so stupid from the Lisp. Dec 7, 2017
.travis.yml
Gopkg.lock Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018
Gopkg.toml Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018
LICENSE Initial. Nov 13, 2017
README.md Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018
main.go Use non-vanity URL. Having too many hiccups maintaining it. May 29, 2018

README.md

Shaden

Build Status GoDoc Go Report Card Coverage Status

Shaden is a modular audio synthesizer. Patches for the synthesizer are written in a Lisp dialect. A REPL and HTTP interface are provided for interacting with the synthesizer in real-time. I started this project as a way of learning more about digital signal processing and music theory. Consider this an art project.

The name "shaden" comes from the Cycle of Galand book series by Edward W. Robertson.

Highlights

Dependencies

On macOS you can install these dependencies with: brew install go portaudio portmidi

Getting Started

Install

$ go get -u github.com/brettbuddin/shaden
$ shaden -h
Usage of shaden:
-addr string
    	http address to serve (default ":5000")
-device-frame int
    	frame size used when writing to audio device (default 1024)
-device-in int
    	input device
-device-latency string
    	latency setting for audio device (default "low")
-device-list
    	list all devices
-device-out int
    	output device (default 1)
-repl
    	REPL
-seed int
    	random seed
flag: help requested

CLI Usage

REPL

$ shaden -repl
> (define gen (unit/gen))
> (-> gen (table :freq (hz 300)))
> (emit (<- gen :sine))

Load File

$ shaden examples/frequency-modulation.lisp

HTTP

$ shaden
$ curl -X POST http://127.0.0.1:5000/eval -d "(define source (unit/gen)) ; ..."

This is my preferred way of interacting with the synthesizer. I've written a small Vim plugin that can send over snippets of Lisp code to the program for evaluation. You can find that plugin here.

The HTTP interface is limited to Lisp evaluation at the moment, but I have hopes of providing an API for direct graph manipulation via HTTP.

Lisp

For a more information about the Lisp dialect bundled with Shaden, check out the wiki.

Examples

The best way to get to know the way patching works in Shaden is to look at the examples directory. As far as sounds that can be created with it: