-
Notifications
You must be signed in to change notification settings - Fork 3
Home
iMusic lets you arrange, loop, randomize and playback any number of sections, stems and Motifs in perfect sync. iMusic is built upon Web Audio API and is developed by Hans Lindetorp in an iterative process with students at the Royal College of Music in Stockholm. All rights belongs to Hans Lindetorp. Feel free to use it. The code will change a lot during the coming years and will serve as a platform for studies related to music production in interactive media.
iMusic is implemented into a web project by adding the iMusic parser pointing to an XML-file where the musical configuration is stored:
e.g.
<script src="imusic_xx.js" data-music-structure="imusic.xml"></script>
(replace "xxx" with the current version number)
An XML-configuration file contains general information about tempo, time signature and the musical content. A simple version containing two loops can look like this:
<?xml version="1.0" encoding="UTF-8"?>
<imusic version="1.0" tempo="60" timeSign="4/4" loopLength="4" showGUI="false">
<arrangement id="A" src="audio/A.mp3"></arrangement>
<arrangement id="B" src="audio/B.mp3"></arrangement>
</imusic>
There are a few fundamental concepts to iMusic that is important to be able to structure the music in a useful way:
iMusic consists of one or many arrangements. One Arrangement is like a "Live set" in Ableton Live or a "Theme" in Elias Studio. The simplest form of a an arrangement is one single loop but it can also have complex structure with multiple tracks.
Tracks are layers within an Arrangement that can be played back simultaneously in sync. They can have independent loop settings and can be played or muted in groups with crossfades. A simple track is built with one audio file but it can also have a more complex structure with multiple Regions. The selection of different sets of tracks can ideally be connected to a variable in an interactive environment.
Each track can contain one or multiple regions positioned at a specific point within the loop. This makes it possible to create tracks with patterns of audio files. One region can contain a single audio file or a more complex structure with Variations made by options of different audio files.
One Option is the lowest level of container for an audio file. It can be a part of a Region or a Motif. The default behaviour for Regions and Motifs is to randomly select an option each time it's triggered but it can also be set to pick different options in a sequential order or slaving to the randomness of another object.
In addition to looped (or non-looped) files in Arrangements iMusic can also trigger separate audio files in sync with the arrangement. The feature is called Motif and is ideally triggered by events in an interactive environment snapping to the nearest specified quantize-value. A Motif can (similar to Regions) have one or several audio files (using option-elements to create variation).
iMusic is built to easily plug into WebAudioXML making it possible to create custom dynamic mixer settings using XML. Different Tracks and Motifs can be routed to different channels in the mixer where any audio parameter can be connected to events and variables in an interactive environment.
iMusic can be connected to user Events using HTML-data-attributes. This makes it possible to control iMusic playback without writing a single line of javascript. By using the Javascript API it's possible any aspect of iMusic including advanced selection of Tracks in groups and even adding objects on the fly.
Please follow my research journey at http://hans.arapoviclindetorp.se and https://www.facebook.com/hanslindetorpresearch/