| enable sync | Turns on synchronization mode. A special panel appears in the top right corner. This panel also contains the save button |
| advanced | also shows menu items that allow changing more complicated parameters (see below) |
| full screen | Switches the browser to full screen display (if supported) |
| file buttons | Shows the buttons to load score and media. Also shows the "use dropbox" checkbox |
| save | Saves score, settings and synchronization data to a file, called the preload file. |
| line cursor | Displays a line cursor in the score as an alternative to the measure shading. |
| speed ctrl | Shows the speed input field, next to the media. |
| loop mode | Enables loop mode. A long click/tap (or shift click) in a measure sets/moves the edges of a looping range |
| annotate | Enables annotation mode. A long click (or shift click) in the score adds/deletes an annotation in the score. |
| hide player | Hides the media player and resizes the height of the button area to zero. |
| hide dashes | Hides the dashed horizontal line to which the top of the currently playing staff is aligned |
| count-in | Displays a count down timer before starting playback. Only works when starting playback with the space bar or a click in the margin (does not work when starting the html-player directly). The initial value of the count down timer is determined by (URL) option "cnt=n". The default is 4 beats. |
| line threshold | Lower the value of this threshold when not enough staves are recognized. Increase the value when too many areas are recognized as a staff (e.g. lyrics). The threshold determines when a horizontal line is considered as a real staff line and not a cross section of notes or text. |
| cluster threshold | Lower this value (to somewhere between 1.0 and 1.5) for complex director scores, where the systems on a page have different vertical sizes (== are composed of different number of staves). |
| skip | Some times there are title or text areas in the beginning of a score that are recognized as staves and get selected (green) in the beginning. Here you can set the number of such areas that have to be skipped. |
| select | In director scores, where multiple instruments are shown on a page, you can focus on one particular instrument by setting the select parameter to the position of that instrument on the page. For instance, setting select to 3 will only show (make green) the third instrument (system) on each page. A select value of zero (default) disables this feature. |
| first quarter | Normally only the rightmost quarter of the page is processed to find staves. With this checkbox the program only scans the leftmost quarter of the page. This is needed when some staves are shortened and left aligned with the other staves. |
| prefer systems | This checkbox increases the likelihood to group staves into a system. |
| single staves | Completely disable grouping of staves into systems. Only single staves are selectable (green shading). Use this if you have a single staff score and some staves are erroneously grouped into systems. |
| black theshold | Theshold value (0..1) between black (0) and white (1). Only applies when searching for bar lines. Rarely needs to be changed. (lower value -> less black pixels) |
| before/after theshold | Fraction (0-1) of the maximum whiteness before and after a bar line. (lower number → more bar lines) |
| barline threshold | Fraction (0-1) of maximum blackness that a bar line should have. (lower number → more potential bar lines) |
| dx | The distance in pixels where whiteness (before/after barline) is measured |
| page | The page that is displayed. In advanced mode only one page of the score is shown. This enables fast rending after changes are made with the controls. Also, the changes are only applied to the page shown. The other pages remain unchanged. When you change the page number the current values of all advanced controls are then applied to this new page. This means that if you want to apply the same (changed settings) to all pages, you have to go through al these pages using the page number input box. |
| fixed width | This checkbox (checked by default) takes care that the score is displayed with a fixed
resolution of 1000 pixels width. This is important because all advanced parameters are preset to
values that work best with this resolution. When you uncheck this checkbox, the score will be displayed with the actual window width. When you do this, you will probably have to change one or more advanced parameter values considerably. That is why it is better to start tuning the recognition parameters with the fixed width option checked. Then you have to change less and the optical recognition works better. |
| no menu | Save a preload file that hides the menu for the user. The preload file will set the internal option "no_menu" that hides the menu and disables the context menu. This is meant to protect score files from being easily copied. |
| 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. |
| pdf data | Embed the pdf (or jpeg) data in the preload file. This makes the preload file much bigger, but the advantage is that synpdf does not need to read a separately stored score file. Expecially when uploading to a server this is an advantage. When the preload file refers to a Youtube video, then also embedding the score data makes the preload file completely self contained. |
| The following two settings can only be changed by manually editing the preload file with a text editor | |
| 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}; |
https://your.domain/synpdf.html?preload_file.js
or when the preload is on dropbox (explanation below):
https://your.domain/synpdf.html?d:e4w11guylw3wb4of97o7k/preload_file.js&rlkey=m02ylgu3pisel6j8u1ug0cr2b
or when opening synpdf as a local file (this only works when you allow local file access in your browser):
file:///path/to/synpdf.html?preload_file.js
The first and third example assume that the preload file is in the same directory as synpdf.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/synpdf.html
/media/example.mp3
/preload/example.js
Then synpdf.html can be opened in the browser using the following (local file) URL:
file:///score/synpdf.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 synpdf 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, synpdf 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";
http://wim.vree.org/js2/synpdf.html?d:e4w11guylw3wb4of97o7k/bwv0539.js&rlkey=m02ylgu3pisel6j8u1ug0cr2b
In this example synpdf fetches the preload file bwv0539.js from the user's dropbox.
However, when you obtain a shared link from dropbox it has a different form, as follows:
https://www.dropbox.com/scl/fi/e4w11guylw3wb4of97o7k/bwv0539.js?rlkey=m02ylgu3pisel6j8u1ug0cr2b&st=p0vwfg4p&dl=0
Unfortunalely the link in this form cannot be used for synpdf.
You have to extract the 21 character file_identifier
("e4w11guylw3wb4of97o7k" in the example above) and the file_name. The URL parameter you have
to use for synpdf then becomes "d:file_identifier/file_name". For the example above it would be:
d:e4w11guylw3wb4of97o7k/bwv0539.js
However, this is still not sufficient, because Dropbox also requires a file_key, which has to be added as an extra
URL parameter: &rlkey=file_key (which is m02ylgu3pisel6j8u1ug0cr2b in the example), resulting
in the following two URL parameters for synpdf:
d:e4w11guylw3wb4of97o7k/bwv0539.js&rlkey=m02ylgu3pisel6j8u1ug0cr2b
The complete example then becomes:
http://wim.vree.org/js2/synpdf.html?d:e4w11guylw3wb4of97o7k/bwv0539.js&rlkey=m02ylgu3pisel6j8u1ug0cr2b
Be careful to use an & before the file_key part and not a ? as in the original shared link from Dropbox.
jquery-1.11.1.min.js
pdf.js
pdf.worker.js
synpdf.html
synpdf.js
All files are included in synpdf_194.zip.
You can open the local file synpdf.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 synpdf your self.
Note, however, that the Dropbox Chooser and Saver only work when synpdf is loaded from wim.vree.org.
In practice this means: you cannot use the Dropbox Chooser and Saver with your local copy.
Nowadays access to local files (in javascript) is not permitted by browsers. Thus, when you open the local file synpdf.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.
| ln= | Switch the line cursor on/off (ln=1 or ln=0) |
| mmin= | Hide all menu items given in this comma separated list (no spaces). The names given in this list should be the ID's of the menu items to be hidden. You can find those ID's in the file synpdf.html. For example: mmin=lp,l2,l3,l5,l6,lg,lo,ln |
| playbtn | Shows a small play button at the top left of the score window. This button starts/stops playback (same as hitting the space bar or clicking in the margin) |
| cnt= | Determines the initial count down value when the count-in menu option is checked. Should be the number of beats to count down before starting playback. For instance: cnt=3 for a 3/4 time signature. The default value of the count down timer is 4 (beats). |
| nosm | Disables smooth scrolling. |
| fullmenu | Shows all menu items, in case some were hidden by option mmin= (see above) |
| ip= | With the parameter ip=ip_number 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 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 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 parameter:
http://.../synpdf.html?preload&ip=192.168.xx.xx&mstr (master with slow video player)
http://.../dynpdf.html?preload&ip=192.168.xx.xx&nomed&d3 (fast slaves with delay of 0.3 sec)
|
http://wim.vree.org/js/synpdf.html?some_preload.js&ip=192.168.178.xx (for all slave devices) http://wim.vree.org/js/synpdf.html?some_preload.js&ip=192.168.178.xx&mstr (for the master device)where the device with ip number 192.168.178.xx has to run abcSrv.js
http://192.168.178.xx:8090/synpdf.html?some_preload.js&ip=host (for all slave devices) http://192.168.178.xx:8090/synpdf.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.
# 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 (more info).