• Stars
    star
    346
  • Rank 122,430 (Top 3 %)
  • Language
    Clojure
  • License
    BSD 2-Clause "Sim...
  • Created almost 14 years ago
  • Updated about 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Live Programming language for music

A language for live programming music in Clojure

Music as Data (MAD) is a live programming language/environment based on Processing.org written in Clojure.

MAD lets you treat music as data and apply data transformation on the fly so you can experiment with notes and samples.

You can see (and hear) examples at http://mad.emotionull.com

The documentation still lacks a lot of stuff, so this is NOT for the faint-hearted.

Example

It's best to go at http://mad.emotionull.com where more examples are (with audio).

Play a sample or note like this: (play! [kick])

Play two samples (or notes): (play! [kick kick])

Each sample is being played at one time.

If you want to play a sample at the same time: (play! [kick (chord snare hihat)])

This will play kick at one time and snare+hihat at another.

You can also play triplets: (play! [kick [snare snare snare]])

Now kick will be at one time and for the same duration, you'll have three snare hits.

Of course you can play notes: (play! [A4 B4 D#5])

Mix, notes and samples: (play! [hihat A4 kick G6])

The fun begins when you understand that you can manipulate music as data by apply tranformations. For example:

(p (reverse (pattern [kick kick])))

Now, instead of using play! (which plays samples in a loop - perfect for building stuff on the fly) you can create a pattern and then run it only for once using the p function. The advantage is that you can manipulate data and their properties thus mess around with note frequences, tempo, scaling whatever.

How to use

First, build the project (see Building). Some examples are included and I would be happy to include any of yours. If you don't use emacs, you can try this one:

  lein compile
  lein repl
  clj=> (require 'music-as-data.core)
  clj=> (in-ns 'music-as-data.core)

and keep reading after the emacs block.

If you use emacs, start your repl (lein swank) and go to core.clj . Go inside emacs, run slime-connect, go to the core namespace, select everything and press CTRL+C, CTRL+R to compile the selection.

After you have access to a REPL you are ready to go! Just run:

	(start main)

Don't close the window that will pop-up. This is the processing window (so you can have graphics too!). After that, run

  (create-notes)

and you are ready to start playing!

(p (pattern [A4 A2]))

(p (pattern [kick snare (chord hihat snare)]))

You can have it playing on a loop by executing: (keep-looping)

and then:

(play! [A4])
(play! [C5])

In order to play a pause, you can play the _ note:

  (play! [A4 _ A4])

Building

lein deps

Authors

Designed and developed by Jon Vlachoyiannis (http://jon.is.emotionull.com).

Thanks

@mar_nas (for the incredible site mad.emotionull.com)

https://github.com/rosado (for clj-processing)

http://processing.org ('cause it rocks)

http://code.compartmental.net/tools/minim/ (for the AWESOME sound system)

zero (for how to use it without emacs)

More Repositories

1

forex_algotrading

My Forex algotrading platform in Python - based on my posts at http://jon.io
Python
477
star
2

DAOETH_Arb

Algotrading and arbitrage for DAO and Ethereum
Python
13
star
3

commitment_of_traders

Parsing COT (Commitment of Traders)
HTML
12
star
4

fbconnect-web2py

A "facebook connect" proof of concept for web2py
Python
11
star
5

async_drv

async erlang driver example
C
7
star
6

pyamazon

A python library for accessing Amazon Product API
Python
7
star
7

pyHEC

Sending data using Python to Splunk using HTTP Event Collector (HEC)
Python
4
star
8

ethereum_contracts

My ethereum contracts / coins
4
star
9

jonio_website

JonIO Website
CSS
3
star
10

processingjs-examples

Examples for processingjs presentation
JavaScript
3
star
11

metrofinder

Finds how many and which metros and trains you must change to reach your destination (in Greece). Also displays a time approximation
Java
3
star
12

eternity-demoscene

Eternity - demoscene
C++
3
star
13

ldb

LDB
JavaScript
2
star
14

Cuby

A looks-like C in Ruby DSL
Ruby
2
star
15

images-and-code

A comic distributed in javascript!
JavaScript
2
star
16

tradershell

Interactive shell to calculate positions in the stock market
Python
2
star
17

mad-js

music-as-data in the browser
2
star
18

SuprematismML

Python
1
star
19

parity_raspberrypi

Parity binary for Raspberrypi
1
star
20

trail

Jot down your thoughts during development
Shell
1
star
21

quantbase-r

A docker file for an image that has all the libraries for quantitative finance in R
Dockerfile
1
star
22

TrelloAnalytics

Exporting to csv the len of a list and then I Splunk this data
Jupyter Notebook
1
star
23

zerofund

ZeroFund files, documents and templates
JavaScript
1
star
24

jimemail

A personal bookmark service run on Appengine
Python
1
star
25

yasnippet-web2py

Snippets for web2py
1
star
26

bl-lang

BL Language | A story-telling programming language
Python
1
star
27

BugSenseExampleWithProguard

BugSense example with Proguard enabled
Java
1
star
28

ReplicationEngine

A very simple (yet effective) replication system
Erlang
1
star
29

jon.io

Jon.IO website
JavaScript
1
star