-
Notifications
You must be signed in to change notification settings - Fork 3
Variables
Hans Lindetorp edited this page Apr 26, 2021
·
2 revisions
The Javascript API can be used to control the playback of Tracks by selecting them using groups and values:
e.g.
<?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/