-
Notifications
You must be signed in to change notification settings - Fork 3
Tracks
In each Arrangement there can be any number of Tracks playing back simultaneously in sync.
i.e.
<?xml version="1.0" encoding="UTF-8"?>
<imusic version="1.0" tempo="60" timeSign="4/4" audioPath="audio" suffix="mp3" loopLength="4">
<arrangement>
<track src="bass"></track>
<track src="drums"></track>
<track src="keyboard"></track>
</arrangement>
</imusic>
Note: This creates one long region on each track. If you rather want to use several regions on a track, please check out Regions
To specify different loop lengths for different tracks; use the "loopLength"-property (It is with the number of bars to be repeated:
i.e.
<?xml version="1.0" encoding="UTF-8"?>
<imusic version="1.0" tempo="60" timeSign="4/4" audioPath="audio" suffix="mp3">
<arrangement>
<track loopLength="2" src="bass"></track>
<track loopLength="1" src="drums"></track>
<track loopLength="4" src="keyboard"></track>
</arrangement>
</imusic>
If you want to have different variations of a track (similar to the concept of Scenes in Ableton Live or Levels in Elias Studio you can create a "Select Group": A Select Group makes only one of the tracks play at a time. If one track in the group is selected in XML, it will be the active track by default.
<?xml version="1.0" encoding="UTF-8"?>
<imusic version="1.0" tempo="60" timeSign="4/4">
<arrangement>
<track select-group="intensity" select-value="1" src="audio/loop1.mp3" selected="true"></track>
<track select-group="intensity" select-value="2" src="audio/loop2.mp3"></track>
<track select-group="intensity" select-value="3" src="audio/loop3.mp3"></track>
<track select-group="intensity" select-value="4" src="audio/loop4.mp3"></track>
</arrangement>
</imusic>
To solo a track in the group (= muting the others), just call iMusic.select(groupName, value) with the select-group name and value. Note: The change happens at the next barline if nothing else is specified.
iMusic.select("intensity", 2);
Please follow my research journey at http://hans.arapoviclindetorp.se and https://www.facebook.com/hanslindetorpresearch/