-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed server closing, added config file + doc
- Loading branch information
Showing
14 changed files
with
542 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
=================== | ||
Boîtes électriques | ||
=================== | ||
|
||
Table of content | ||
================ | ||
|
||
*HOME* | ||
Presentation of the application | ||
|
||
*SETUP* | ||
How to install and setup the server | ||
|
||
*INTERACTION* | ||
How client and server interact with each other. | ||
(Description of the protocol) | ||
|
||
General informations | ||
==================== | ||
|
||
This documentation is formatted using the `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ syntax, and is distributed under the Creative Commons BY-SA 4.0 license. | ||
|
||
The `RudeConfig™ Open Source C++ Config File Library <http://rudeserver.com/config/>`_ is written and distributed under the `GNU GPL v2 <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>`_. | ||
|
||
The application itself is distributed under the `Zlib License <https://opensource.org/licenses/Zlib>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
Interaction | ||
=========== | ||
|
||
General informations | ||
-------------------- | ||
|
||
To communicate, client and server use the OSC protocol. | ||
|
||
By default, the server uses the IP address ``192.170.0.1``, with the port ``9988`` to send messages and ``9989`` to receive them. | ||
|
||
Protocol | ||
-------- | ||
|
||
**Note :** | ||
``<int>`` designate an integer value, ``<str>`` a string one, and ``<bool>`` a boolean one. | ||
|
||
Server | ||
~~~~~~ | ||
|
||
The server can receive the following messages from the client : | ||
|
||
``/box/update_threshold <int>`` | ||
Change the threshold value to ``<int>``. | ||
|
||
``/box/reset_threshold <bool>`` | ||
Reset the threshold to its default value. | ||
|
||
``/box/enable <int>`` | ||
Switch the track number ``<int>``'s state (activate or deactivate it). | ||
|
||
``/box/volume <int 1> <int 2>`` | ||
Change the track number ``<int 1>``'s volume value to ``<int 2>``. | ||
|
||
``/box/pan <int 1> <int 2>`` | ||
Change the track number ``<int 1>``'s pan value to ``<int 2>``. | ||
|
||
``/box/mute <int> <bool>`` | ||
Mute (``<bool>`` = ``true``) or unmute (``false``) the track number ``<int>``. | ||
|
||
``/box/solo <int> <bool>`` | ||
"Solo" (``<bool>`` = ``true``) or "unsolo" (``false``) the track number ``<int>``. | ||
|
||
``/box/master <int>`` | ||
Change the master volume value to ``<int>``. | ||
|
||
``/box/play <bool>`` | ||
Play the song | ||
|
||
``/box/stop <bool>`` | ||
Stop the song | ||
|
||
``/box/reset <bool>`` | ||
Stop the song and reset its options to their default values | ||
|
||
``/box/refresh_song <bool>`` | ||
Refresh the song's informations | ||
|
||
``/box/select_song <str>`` | ||
Select another song | ||
|
||
``/box/sync <bool>`` | ||
Send the informations of the actual song and the current state of the player to the client | ||
|
||
Client | ||
~~~~~~ | ||
|
||
The client can receive the following messages from the server to access its informations : | ||
|
||
``/box/beat <int>`` | ||
The actual server's beat count value = ``<int>``. | ||
|
||
``/box/enable_out <int>`` | ||
The box number ``<int>`` has been activated. | ||
|
||
``/box/enable_sync <int>`` | ||
The numbers of the activated tracks, where ``<int>`` is a binary number indicating them. | ||
For example, for an 8-tracks song with its 2nd, 4th, 5th and 8th tracks activated, ``<int>`` = 10011010. | ||
|
||
``/box/play <int>`` | ||
The selected song started playing (and that its tempo's value is ``<int>``). | ||
|
||
``/box/ready <bool>`` | ||
The selected song is (``<bool>`` = ``true``) or not (``false``) loaded and ready to be played. | ||
|
||
``/box/sensor <int>`` | ||
The actual server's threshold value = ``<int>``. | ||
|
||
``/box/songs_list <str>`` | ||
The available songs list = ``<str>``. | ||
``<str>`` is the concatenation of the songs' filenames, separated by the character ``|``. | ||
|
||
``/box/title <str>`` | ||
The actual server song's name is ``<str>``. | ||
|
||
``/box/tracks_count <int>`` | ||
The selected song's tracks count is ``<int>``. | ||
|
||
``/box/tracks_list <str>`` | ||
Send the informations of the selected song's tracks, as ``<str>``. | ||
``<str>` is the concatenation of the songs' tracks' names, separated by the character ``|``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Setup | ||
===== | ||
|
||
Installation | ||
------------ | ||
|
||
Configuration | ||
------------- | ||
|
||
General informations | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The server's configuration is saved in the ``config.txt`` file in the same folder as the executable. | ||
This file is formatted with the (almost) standard `INI file format <https://en.wikipedia.org/wiki/INI_file>`_. | ||
|
||
The following options are available : | ||
|
||
``[default]`` section | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
``threshold`` | ||
Default threshold's value (integer) | ||
Default : 200 | ||
|
||
``master`` | ||
Default master volume's value (integer) | ||
Default : 50 | ||
|
||
``volume`` | ||
Default track's volume (integer) | ||
Default : 50 | ||
|
||
``pan`` | ||
Default track's pan (integer) | ||
Default : 0 | ||
|
||
``activation`` | ||
Default track's activation status (boolean : true or false) | ||
Default : false | ||
|
||
``[files]`` section | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
``export_folder`` | ||
Files save/load folder (string : path, ending with '/') | ||
Default : /home/pi/songs/ | ||
|
||
``extension`` | ||
Songs files' extension (string : '*.<extension>') | ||
Default : *.song | ||
``[osc]`` section | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
``ip`` | ||
Client's OSC IP address (integer) | ||
Default : 192.170.0.17 | ||
|
||
``receiver`` | ||
Server's OSC receiver port (integer) | ||
Default : 9988 | ||
|
||
``sender`` | ||
Server's OSC sender port (integer) | ||
Default : 9989 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.