Semantic Music Player
A cross-platform mobile app built with Ionic that plays back dynamic music objects (dymos).
$ npm install -g bower $ npm install -g cordova $ npm install -g ionic
Then clone the semantic-player project to your computer:
$ git clone https://github.com/florianthalmann/semantic-player.git
Go to the cloned project folder and run:
$ npm install $ bower install
$ ionic serve
Now you can navigate to http://localhost:8100 in your browser to view the example dymo.
Running on a mobile device
$ ionic browser add crosswalk
Then add the platform you are interested in, for example for Android:
$ ionic platform add android
Then run build, install, and run it using:
$ ionic run android
Check out the Ionic docs to find out how to run the app on other devices or emulators.
Customizing the interface
The interface of the player can be customized by editing the
www/config.json file. The
title attributes allow you to edit and show or hide the title. With
showDymoSelector the dymo selector element can be hidden, so that the player simply contains a fixed dymo. Using
showSensorSection can be used to show the various parts of the interface, the playback buttons, any UI controls the dymo may define, and the section that can be used to show and debug sensor values. In case the playback buttons are hidden, the dymo can be set to play automatically upon startup by setting the
autoplay attribute to true.
You can also set a background picture by replacing the file
www/img/background.png with another file with the same name and extension. This works especially well if only few or none of the interface elements are shown.
Creating your own dymos
Add any of the example dymos to the folder
www/dymos/ in the semantic-player project or build your own dymo, either by using the Dymo Designer or by defining files manually as described in the dymo-core readme.
Declare the added dymos in the
www/config.json file by adding them to the
Controls currently supported
The following table lists the sensor controls currently available for dymos in the Semantic Music Player, along with the ranges of their output values:
|Accelerometer||AccelerometerX, AccelerometerY, AccelerometerZ||[-1,1]|
|Distance from Beacon||Beacon||[0,∞]||m|
For any controls, one can set an initial value using the
value attribute. Some of the controls can be further customized:
Beacon can be customized using the attributes
Ramp can be customized using