Choralplayer user manual for choir website managers

Choralplayer user manual for choir website managers

This manual is intended for those who want to use Choralplayer to play their own mp3 files, and submit such files to Choralplayer so that they can be played. If you just want to use Choralplayer to play mp3 files made by somebody who has made them available already at Choralplayer (for example, mp3 files made by Choralia) you can read this post or Choralia’s mp3 manual.

To exploit all functions provided by Choralplayer, you have to prepare two files: a conventional mp3 file; and the so called “dual” mp3 file (or, in short, “mpd file”). The conventional mp3 file contains the music to be played when the two bottom sliders of the player (i.e., the one that increases or reduces the volume of the lead voice, and the one that moves the lead voice left or right) are not used (i.e., they are both set at 0%). It’s a mono mp3 file that is played “as is”. Instead, the mpd file is played when any of the two bottom sliders is set to a value that is not 0%. The mpd file is a stereo mp3 file where the lead voice is placed on the left stereo channel, while all the rest is placed on the right stereo channel. When the two bottom sliders are moved with respect to the 0% position, Choralplayer re-mixes the left and the right channel of the mpd file so as to produce the desired effect (i.e., increasing or reducing the volume of the lead voice, and/or moving the lead voice left or right).

In order to be played by Choralplayer, the mp3 and the mpd files have to be available on the internet, and their URL has to be submitted to Choralplayer so that Choralplayer may read and play them. You can provide to Choralplayer the URL of the mp3 and mpd files through a query string as follows:

https://www.choralplayer.net/mp3player.php?mp3file=xxxx.mp3&mpdfile=yyyy.mp3

where xxxx.mp3 is the URL of the mp3 file, and yyyy.mp3 is the URL of the mpd file. They have to be the complete URLs, including the http or https header.

If you only provide the mp3 file, the two bottom sliders of Choralplayer will not work. If you provide a mpd file that does not correspond to the mp3 file (except for the stereo positioning of the lead voice and of the rest), the behaviour of Choralplayer will be inconsistent, as it will reflect the inconsistency of the files.

Alternatively, you can specify the URL of the mp3 and mpd files using POST parameters in lieu of the query string. The POST parameters have to be named as the corresponding query string parameters, i.e., mp3file and mpdfile. The use of POST parameters is recommended as it is more URL-friendly.

Through the query string you can also apply some pre-sets to the various controls of Choralplayer:

section (enabled/disabled)
loop (enabled/disabled)
rate (50 to 150)
level (-100 to 100)
stereo (-100 to 100)
loop_start (0 to the duration of the file in seconds)
loop_end (0 to the duration of the file in seconds)
autoplay (enabled/disabled)

The above settings are also stored in cookies, so they remain persistent to the next browser sessions as if they were entered through the pushbuttons or through the sliders (assuming that cookies are enabled on the browser and that they are not deleted). An additional query string parameter, days, controls the persistency of the cookies. The default persistency is one day, however you can increase or decrease the persistency at will using the days parameter.

The correct operations of Choralplayer may be a little bit complicated depending on the server where the mp3 and mpd files are stored. Some servers may not accept that mp3 files are fetched by an external server that plays them, due to the Cross-Origin Resource Sharing (CORS) policy applied by the server. You may have to tweak the CORS settings of the server in order to allow that the mp3/mpd files available on that server can be made available to Choralplayer for being played.

This is an example of CORS settings that may work if the server makes use of Apache:

Header set Access-Control-Allow-Origin: "*"
Header set Access-Control-Allow-Methods "OPTIONS, HEAD, GET, POST, PUT, DELETE"
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Key, Content-Length, Authorization, Range"
Header set Access-Control-Expose-Headers: "Content-Length"

The above statements should be added to the .htaccess file. They require that the mod_headers module is enabled in Apache. This module is usually enabled by default on most servers, however this may depend on the specific provider.

Support to Choralplayer users is provided by Choralia. Please contact Choralia if you need support about the use of Choralplayer with your mp3/mpd files.