| enable sync | Turns on synchronization mode. A special panel appears in the top right corner. This panel also contains the save button |
| speed ctrl | Shows the speed buttons. |
| loop mode | Enables the loop mode when this item is checked. |
| file buttons | Shows the buttons to load score and media. Also shows the "use dropbox" checkbox |
| no cursor | Hides the cursor when playing and shows the cursor when paused. |
| note cursor | Displays note cursors in the score in stead of the blue measure shading. Every voice gets a separate note cursor with a different color. |
| center player | When set the player is centered on the page. When not set the player together with the speedbuttons are centered |
| center score | Centers the score on the page. When not set the score is left aligned. |
| hide player | Hides the media player and resizes the height of the button area to zero. (score aligns to top of page) |
| autoscale | Resizes the score to the width of the browser page |
| skip repeats | Skips playing repeated sections. Is only effective when enabled before loading a score or preload file. Has no effect after loading. |
| count in | Displays a count down before starting playback. The tempo of the count-in is the average of the tempo in the next three measures. Takes speed setting into account. The current meter determines the number of beats that is counted down. |
| metronome | Displays a beat number count-down while playing. The beat tempo is that of the current measure, taking speed control into account. |
| help | Shows a panel with help info. The panel is hidden when the mouse leaves the panel area |
| msc_credits | The contents of msc_credits will be displayed next to, and to the right of, the media player.
The setting is made by adding the following string assignment to the preload file:
msc_credits = "any html formatted credit text goes here" |
| opacity | Sets the opacity of the measure shading (0.0 is no shading, default: 0.2, solid color is 1.0).
This setting is in the line that looks like:
opt = {"jump":0, ..., "opacity":0.2, ...,"btns":0}; |
| duration measure | The time in seconds that the measure stays shaded (or the time that it takes for the note cursor to traverse the measure). |
| media offset | The time in seconds from the moment that the media starts playing until the cursor/shading starts moving. Some media files do not start at the point where the score starts. This time accounts for the difference. A positive offset means that the media starts earlier than the the score (which is the most common situation). A negative offset means that the score cursor starts before the media. |
| wait offset | With this option checked the media starts playing but the cursor (and score) are halted. A click in the first measure then unchecks this option and the cursor starts moving again (starting at the first measure) to allow further synchronization. |
| jump | When the jump box is checked, and you click in a measure, play back jumps back one measure to let you review the timing accuracy of your click (or rather the browser latency). Because this happens at each click, it is turned off by default. |
| import | Imports timing data from another preload file. When separate parts of the same score have to be synchronized, one only has to synchronize one part and import that data into the other parts. This not only saves work but is essential when these parts have to play synchronized in multiple devices. |
| save | Saves score, settings and synchronization data to a file, called the preload file. |
| scramble | The score data in the preload file will be scrambled. When such a scrambled preload file is loaded, abcweb disables the main menu, the context menu and drag/drop. This makes it more difficult for a user to retrieve the ABC score data. |
http://your.domain/abcweb.html?preload_file.js
or when the preload is on dropbox (explanation below):
http://wim.vree.org/js/abcweb.html?d:dropbox_id/preload_file.js&rlkey=dropbox_key
or when opening abcweb as a local file (see local file access):
file:///path/to/abcweb.html?preload_file.js
The latter example assumes that the preload file is in the same directory as abcweb.html. When it is in
another location, the relative path to the preload file should be given.
As an example, suppose the following directory layout:
/root
/score/abcweb.html
/media/example.mp3
/preload/example.js
Then abcweb.html can be opened in the browser using the following (local file) URL:
file:///score/abcweb.html?../preload/example.js
The preload file is a regular javascript file. It only contains a couple of assignments. The first assignment sets the
media file to load. When example.js is freshly saved using abcweb it will look as follows:
media_file = "example.mp3";
Note that only a file name is specified and no path. Due to security restrictions in the
browser, abcweb cannot save the correct path. This means that you have to add the path manually into
example.js. With the example directory tree from above, the first assignment should read:
media_file = "../media/example.mp3";
https://wim.vree.org/js/abcweb.html?d:y0fck40o5tjqcqxu9e1qh/gadma_2.js&rlkey=um558hobcurnrxwownjp02wyf
This example loads abcweb from its website and loads the preload file gadma_2.js from the user's dropbox.
However, when you obtain a shared link from dropbox it has a different form. For the example above it was:
https://www.dropbox.com/scl/fi/y0fck40o5tjqcqxu9e1qh/gadma_2.js?rlkey=um558hobcurnrxwownjp02wyf&st=3ff9r7tz&dl=0
Unfortunalely the link in this form cannot be used for abcweb.
It should have this format:
https://wim.vree.org/js/abcweb.html?d:y0fck40o5tjqcqxu9e1qh/gadma_2.js&rlkey=um558hobcurnrxwownjp02wyfNote the link is prefixed with d: and that the rlkey-part is prefixed with an & and not a ? as in the original link from Dropbox. Try it out by clicking the link.
play_list = ["preload_1.js", "preload_2.js", "preload_3.js"]
In this statement the variable name play_list is mandatory. The preload file names can be
freely choosen, of course. To execute a playlist it is added as a parameter to the URL,
just like a preload file:
https://wim.vree.org/js/abcweb.html?playlist.js
or, you may open a playlist with the score browse button.
play_list = ["../test/preload_1.js", "../test/preload_2.js", "../test/preload_3.js"]
and the playlist itself may also be anywhere:
https://wim.vree.org/js/abcweb.html?../somewhere/else/playlist.js
abcweb.html
jquery-1.11.0.min.js
abc2svg-1.js
abc2web.js
xml2abc.js
These files are included in abcweb_214.zip.
You can open the local file abcweb.html in your browser and everything should work normally if you
have permitted local file access for javascript in your browser (see local file access).
The same files can also be put on your own server when you want to serve abcweb your self.
Note, however, that the Dropbox Chooser and Saver only work when abcweb.html is loaded
from wim.vree.org or from localhost.
In practice this means: you cannot use the Dropbox Chooser and Saver from a copy of abcweb on your own webserver.
Nowadays access to local files (in javascript) is not permitted by browsers. Thus, when you open the local file abcweb.html in your browser it will not work. You have to explicitly allow local file access.
For FireFox you can achieve this by opening the page about:config and change the option security.fileuri.strict_origin_policy to false.
For Chrome and Chromium you can achieve this by opening the browser with a special command line flag:
$ chromium --allow-file-access-from-filesThe name (and path) of the Chrome (or Chromium) executable may be different on your platform.
| file name | When you use a file_name as parameter in the URL, the file extension determines its intended
use, i.e. media files should end with .ogg, .mp3, .webm or .mp4 and score files should end
with .xml or .abc, filnally preload files should end with .js.
For example, when using dropbox:
http://wim.vree.org/js/abcweb.html?d:dropbox_id1/scorefile.xml&rlkey=dropbox_key1&d:dropbox_id2/mediafile.webm&rlkey=dropbox_key2or with your own webserver:
http://your.domain/abcweb.html?relative_path/to/scorefile.xml&relative_path/to/mediafile.webm
The first example uses abcweb from the standard location and loads the other files from your dropbox.In the second example both score file and media file are located on your.domain, the same domain from where abcweb.html is opened. This causes abcweb to preload the score file and the media file from the server. |
| med= | To use a youtube identifier as URL parameter you need to specify
med=youtube_id. For instance:
http://wim.vree.org/js/abcweb.html?d:dropbox_id/scorefile.xml&rlkey=dropbox_key&med=youtube_idloads the youtube player with the identified video and gets the score from dropbox. |
| ip= | With the ip=ip_number parameter you specify the ip number of a WebSocket server on your local network. All instances of abcweb that are started with the same ip=ip_number parameter are playing synchronized with each other. This is useful to get a group of computers/tablets play the same score at precisely the same time. Each instance can start/stop playing and all others follow. Same for jumping to a different measure. See Web Sockets for more details on how the run the server. |
| mstr | The master parameter mstr makes one device the master of a group of synchronized devices. Only the master device can issue play/pause commands and position the playback. All other devices follow the master but cannot play/pause or jump to another measure. |
| nomed | Skips the loading of the media and aligns the score with the top of the page. On a synchronized device this option shows the score and the synchronized cursor, but does not load or play the media file. |
| dx.x | Inserts an initial latency of 0.xx seconds for all commands received on a synchronized device. This is useful if some
devices of a synchronized group are much slower than others. For example, the simulated default player is much faster than the
youtube player. A latency of 0.3 seconds is no exception, which can be compensated by adding d3 as paramter:
http://.../abcweb.html?preload&med=youtube_id&ip=192.168.xx.xx&mstr (master with slow youtube player)
http://.../abcweb.html?preload&ip=192.168.xx.xx&nomed&d3 (fast slaves with delay of 0.3 sec)
|
| nb | Hides the menu. The user cannot change anything. Of course it also prevents saving. To make this setting permanent
in a preload file, you have to edit the preload file manually with a text editor. The setting is called no_menu
and should be set to 1 to hide the menu:
opt = {"jump":0,"no_menu":1,"nospd":true, ...
Note: a scrambled preload file implies this option. |
| tmr=n | Sets the margin between the top of current music line and the bottom of the player to n pixels (default 0, which displays the current music line precisely adjacent to the player). This setting is saved in the preload file. |
| tb=s.s | Starts playback at time s.s seconds. This time point may be inside or outside the time range covered by the score. Time 0.0 is the start of the media file. The start time must be positive and smaller than the end time of the media file. The parameter is saved in the preload. |
| te=s.s | Stops playback at time s.s seconds. This time point may be inside or outside the time range covered by the score. The end time must fall after the start time (tb=s.s, when given) or the start of the score. The parameter is saved in the preload. |
http://wim.vree.org/js/abcweb.html?some_preload.js&ip=192.168.178.xx (for all slave devices) http://wim.vree.org/js/abcweb.html?some_preload.js&ip=192.168.178.xx&mstr (for the master device)while the device with ip number 192.168.178.xx has to run abcSrv.js
http://192.168.178.xx:8090/abcweb.html?some_preload.js&ip=host (for all slave devices) http://192.168.178.xx:8090/abcweb.html?some_preload.js&ip=host&mstr (for the master device)This works while abcSrv.js not only synchronizes the devices but also acts as a normal web server (on port 8090). In this case one needs all abcweb files to be present in the same directory where abcSrv.js is located. Also some_preload.js and its corresponding media file have to be there. This is because abcSrv.js uses its own directory as root directory for the http server it implements.
http://192.168.178.xx:8090/abcweb.html?some_preload.js&ip=host&nomed (for all slave devices) http://192.168.178.xx:8090/abcweb.html?some_preload.js&ip=host&mstr (for the master device)This example is for a class room where only the master is connected to loudspeakers and the slaves are mute and only follow the score.
# nodejs abcSrv.jsWhen started it prints the following output on the console:
websocket server listening on port: 8091, address: 192.168.178.xx http server listening in port: 8090, adress: 192.168.178.xx web server root directory: /path/to/where/abcSrv.js/is/located/On a normal (i.e. not jailbroken) iPad, abcSrv.js has been tested using the app Touch Code Pro from iTunes. This app can load and run abcSrv.js, which turns the iPad into a simple http server and websocket server, so you can not only synchonize a group of other tablets but also serve the score an media locally, without connecting to the internet (see running abcweb.html locally).