hands-free Music Display and Auto-Accompaniment

PageTurn is a utility program that facilitates the 'hands-free' management of music scores, displayed on screen in PDF format (Portable Document File) with optionally, an accompaniment played by MIDI file. PageTurn is designed to run on the Raspberry Pi educational computer under the RISC Operating System with sound and vision output to a High Definition television or monitor.

PageTurn in use on the Raspberry Pi

PageTurn running on Raspberry Pi

PageTurn was originally written for the Raspberry Pi by Philip Perry in 2012; PageTurn is a freeware open source program available (under the terms of the GNU General Public Licence) for musicians to use for themselves and distribute to others. PageTurn is provided without warranty of any kind and is subject to continued development.

To reap the full benefit of the PageTurn program a foot-pedal device and wireless mouse are required. The foot-pedal can easily be made from readily available parts -- instructions at the end of this document. While using a wired mouse alone is perfectly possible it does limit the distance at which the performer can stand, and even more limiting, without a foot-pedal adapter dexterous toes would be needed to operate the mouse! The optimum configuration is to have a wired keyboard and mouse on a convenient surface nearby and a wireless mouse in the foot-pedal adapter at the playing position. (The RISC OS Raspberry Pi responds to both wired and wireless mice concurrently.)

For an up to date copy of this document describing all PageTurn's features, or to download the program click here.

PageTurn's Main Features:


PageTurn operates by managing centrally the resources of two other RISCOS programs: the PDF viewer !PDF and the MIDI file player !ReMIDI. It is these two programs that actually display scores and play music, while PageTurn itself simply facilitates the user's interaction with them. PageTurn is designed for the Raspberry Pi with HD TV/monitor and may not function on other setups.

Since the internet abounds with archives and websites containing music in PDF and MIDI formats (e.g. almost any composition may be easily obtained for display on the RISCOS Raspberry Pi. And, over time, a library of scores can be built up, stored and transported via SD card or USB storage device. All your music available and to hand in a moment, for practice or performance.

All communication with !PDF and !ReMIDI, through PageTurn, is conducted via mouse clicks. Thus, with the aid of a wireless mouse and a simple foot-pedal adapter music scores in PDF format may be displayed on large TV screens, pages turned and MIDI accompaniments synchronised, hands-free, without interuption to the player or the musical flow.

Indeed, by default, PageTurn prompts !PDF to display two pages of a score at the same time, so that once the first page has been read it may be updated to the third page while the second page is in use. Thus, when the second page is exhausted, the third page is already on screen, and similarly, while the third page is being read, the second is updated to the fourth page. This 'left-right march' through the score can be continued to the end of the document. In a sense PageTurn is a misnomer, as the point at which a page needs suddenly to be turned over never arrives, the next page is already available on screen for the musician to seamlessly read from -- having been brought into view by a pedal click at some convenient earlier moment before the end of the page that preceeds it. The implication of this approach is that windows display whole pages of music -- though some clipping of blank right and bottom margins is possible. (The single page mode can accommodate enlarged A4 landscape scores.)

In addition to handling the passage through the written score, both forward and backward, PageTurn can also pass a MIDI file to !ReMIDI for synchronised playback. An introductory number of count-in beats may be configured in PageTurn's control window -- to be triggered by the first pedal click -- after which the MIDI accompaniment played by ReMIDI will begin.

PageTurn only responds to mouse clicks (with one exception). So when the Raspberry Pi is used for score display with PageTurn the keyboard is generally superfluous, and probably out of reach as well. With the use of a wireless mouse a score and MIDI file may be setup at a distance, that is, from where the player is seated or standing (in front of the TV or monitor) by normal hand-guided mouse movements. Once the score, and optionally a MIDI file, have been configured, the mouse pointer may be locked into PageTurn's 'Trap' and the physical mouse placed in a foot-pedal adapter. The adapter has two pedals: forward and back/goto. The first foot-pedal click sets the display to the configured start page; and if selected, plays the configured upbeats at the configured tempo, followed by the MIDI accompaniment.


Like all standard RISCOS applications, PageTurn's resources are contained in an application directory (folder) marked by an initial 'pling' (exclamation mark) -- !PageTurn. To install PageTurn simply copy/drag this application directory into a convenient directory on the Raspberry Pi's file system. The 'Apps' directory is an excellent choice or perhaps a folder designated for 'Music'. Once in place, PageTurn's icon -- a page with treble clef and note A being turned over -- should appear in the folder.

Running PageTurn

The three RISCOS mouse buttons are conventionally labelled Select (left click), Menu (middle button/scroll wheel) and Adjust (right click). See the RISCOS Raspberry Pi Welcome Guide for more information. Double left click (Select button) upon PageTurn's application icon to launch the program. PageTurn's icon will appear on the right hand side of the icon bar strip at the bottom of the screen. Pressing the menu (middle) button with the mouse pointer over PageTurn's icon bar icon will produce a small menu: Info, Help, Tempo, Control and Quit. Allowing the mouse pointer to move over the arrow to the right of 'Info' brings up the program information box; click somewhere outside the box to close it. Click on 'Help' to load PageTurn's HTML manual -i.e. this file. The tempo analysis window opens automatically when a MIDI file is dragged to the iconbar icon but can be accessed here too. PageTurn's configuration window is opened by selecting 'Control' from the icon bar menu. This is where the user sets up the score and MIDI file before playing commences. The control/configuration window can also be opened by a left click on PageTurn's icon bar icon. Clicking any button with the mouse pointer on Quit will close PageTurn.

PageTurn's icon bar icon and menu

PageTurn has three windows. The first port of call is the main control window which can be opened by select (left) mouse clicks on PageTurn's icon bar menu or icon. The second window -- the Trap window -- opens automatically after user choices have been set in the main window and playing is to commence. The Trap window can also be opened by an adjust (right) click on the iconbar icon. (Left and right iconbar icon clicks will also uncover the windows if they become obscured.) The third 'Tempo' window opens automatically when a MIDI file is dragged on to PageTurn's icon bar icon.

It is recommended that copies of !PDF and/or !ReMIDI loaded on the icon bar are quit before running PageTurn. This will stop any confusion as to which document/files or copy of !PDF or !ReMIDI should respond to messages generated by PageTurn.

Getting !ReMIDI

PageTurn will function perfectly well as a silent page turning utility with the aid of !PDF alone, which is included in the software bundle that comes with RISCOS on the Raspberry Pi. However, if you would like sound too it is necessary to download and install ReMIDI 0.70 from where two zip files are needed containing !ReMIDI 0.70 and which contains the sound samples needed by the program to operate. Alternatively, Michael-Dennis Biemans the author of !ReMIDI has generously allowed his program to be downloaded from my own site as a single pre-configured application: ReMIDI with sound samples already installed. Further information is provided below under Installing !ReMIDI and Configuring !ReMIDI

Main Window

All communication between the user and PageTurn is carried out via mouse clicks (with one exception). Clicking Select (left button) over PageTurn's icon bar icon will open the main configuration window where choices can be made and a score, with or without MIDI file, may be loaded. The main window opens in the top left corner of the HD screen, with the choices set to their default states. (When first using PageTurn these defaults can provide for the satisfactory operation of the program... before the minutiae of all the options and settings have been absorbed.) The width of this 'Control' window is such that two A4 size pages (at 100%) will fit side-by-side to its right or one landscape page.

PageTurn control panel window

It is crucial that PageTurn itself is allowed to open the score (and MIDI file) and to this end the program will load files into !PDF and !ReMIDI immediately upon the user dragging their chosen files into the two fields provided in PageTurn's Main window. The reason for this behaviour is that by loading the files PageTurn becomes 'aware' of them and is able to communicate with !PDF and !ReMIDI about them.

Once the score windows are open they should remain open until you are finished with the score. If a score window is closed accidentally in mid session by clicking on the 'X' close window icon, you will need to press 'Clear Score' and start again. !PDF windows are dedicated to individual pdf files and these files remain open on disc while their corresponding windows are on screen. Closing a !PDF window also closes the pdf file. However, in contrast, !ReMIDI's main window is a general control window, not specific to one MIDI file, so it can remain on screen throughout the session.

Once a PDF score and optionally a MIDI file are loaded, and other options set, the user may move about the score at will by using the foot pedal -- described below. Also the MIDI accompaniment may be navigated via the foot pedal's back step feature, as well as explicitly through ReMIDI's Stop, Forward, Rewind and Play buttons. However, PageTurn's design is optimised for seemless playing, repeating and internal looping of a score with dual mice and the pointer remaining in the Trap window throughout.

Forward: Display Options

Before dragging any files to the main window it is necessary to decide if a single page display is wanted rather than the default double page display. A single page display forfeits the principle benefit of never running out of pages but might be useful in some circumstances and so is provided for completeness. Click on the 'Single Page' radio button to select this feature. (If both radio buttons are 'unclicked' the minimum single page is displayed.)

Almost always the default double page display will be required, and so generally the user can make their choices by moving through the control panel window from top to bottom: As described below.

Display Score Entered Below

Drag a PDF format score (i.e. file icon) into the top field. After a moment !PDF will be loaded on to the icon bar, if not already running, and the score window(s) will open set to page one (and page two if in double page mode). When loading the PDF file has finished the mouse pointer is automatically moved to the title bar of page one, ready for the first of the two windows to be dragged, resized and set in the desired location on screen. (If page one is dragged up against the edge of the control window and extended to its full (A4) width, a small portion of page two's title bar will be left visible allowing page two to be manoeuvred into the remaining space on the right of the screen.) See the RISCOS Welcome Guide for more information about manipulating windows. Naturally, only PDF format files can be used, with an upper limit of 255 pages.

If, on seeing the score, you decide its not the one you want after all click on the 'Clear Score' button in the PageTurn control panel, which will automatically close the PDF windows and tell the program to forget about them. Should !PDF fail to render the file satisfactorily see below in Notes and Questions about how to reprocess PDF files so as to make them usable.


The scale icon displays the magnification at which the score was previously displayed. When a score opens, !PDF initially shows it at 100% but sometimes (particularly in single page mode) it may be beneficial to enlarge or reduce this size. If a magnification other than 100% is in use at the moment the 'Clear Score' button is pressed, PageTurn records that percentage in an Annotation file. The next time the score is loaded the magnification is displayed immediately so that the player may adjust the size of the score to its former setting before commencing. Adjusting the magnification is done from !PDF's menu: Display -> Scale (and needs to be set in both windows if in double page mode). This feature is provided for the users convenience, in that once the most appropriate magnification has been found, the player is reminded of this setting in subsequent sessions.

Back Step/GoTo Page

Below the score entry field, on the left of the main window, are the up/down 'bump' buttons of the 'Back Step or GoTo Page' field. By default this field is set to -2 which reflects an assumed double page display. If two pages are being displayed on screen it is natural that a back step will take you to the two previous pages. Should you wish to go back one page change the number to -1 by clicking Adjust on the up arrow. Any negative number entered, up to -254, will take the display back that number of pages, or to the beginning of the score if the negative number exceeds the number of preceeding pages in the score. Each time the back/goto pedal is clicked the score will be 'rewound' by the configured negative number of pages. Thus two pedal clicks in succession with -2 configured would 'rewind' the score by four pages. However, proceed with caution, more than two rapid back/goto pedal clicks in succession are likely to be lost as the comupter struggles to redraw the windows one after another. It is far better to use the goto facility for large jumps.

In contrast to the negatively numbered back step facility, if a positive number is entered into this field PageTurn will treat it as a GoTo Page command and a back/goto pedal click will take the score backward or forward to the configured positive page number. Repeated back/goto pedal clicks will keep returning to this same one positive page number. This can be useful with Rondo and Da Capo al Fine musical forms.

Linked with the back/goto pedal is a MIDI rewind/loop feature discussed below. Configuring zero back/goto will not change the pages (though does move them into ascending order left to right) but can be used to loop the accompaniment within a two page section of the score -- useful for repetitive practice.

Trap Mouse

When all the options are configured, pressing the 'Set Values and Close Window' button automatically opens a small window in the top left-hand corner of the screen -- the 'Trap' window. By default the mouse pointer is confined within this window so that pedal clicks will be relayed to PageTurn by the computer. The trap ensures that the pointer is not dislodged when being transferred to the pedal adapter and during its operation. At any time the mouse pointer can be released from the Trap window by pressing the menu/scroll middle button and selecting 'Release' from the pop up menu.

PageTurn Trap window menu

Equally, the pointer may be re-trapped by selecting 'Trap'. This flexibility allows for some adjustment to the display or playback to be made part way through a piece and the addition of annotations to the score. Also the use of a wired and wireless mice together is an added convenience. Clicking on 'Release' does not stop the use of the Trap window menu to trap and release the mouse pointer at some later time. When using the Trap window menu with the mouse confined within the window, move the pointer to the top left corner before bringing up the menu so that pointer can travel over the menu items unrestricted. Generally though, it is envisaged that PageTurn will be used mostly without interruption within each score reading.

The fourth menu item 'Control' can be used to re-open Pageturn's main configuration window at anytime after the 'Set Values and Close Window' button has caused the window to automatically close. When the control panel is opened from the Trap menu it covers up the Trap window and so the Trap window will need to be uncovered (by clicking the Control Panel's title bar 'back' button, top left, or adjacent 'X' close button) before pageturning by pedal clicks can continue. In normal use the Control Panel is re-opened when the player has finished with the current score and wishes to click on 'Clear Score' (and !PDF's close window 'X' icons).

The 'Annotate' menu item has a complete explanatory section below. The last item relates to ReMIDI. Clicking on 'Repeat' after the MIDI accompaniment has finished will restart MIDI playback from the beginning -- useful when practising a piece through repeatedly. This menu item is greyed-out if no MIDI file is loaded.

The red bar and number in the Trap window are explained below in the sections 'Beats after First Pedal Click' and 'Annotations'. And finally, I would like to assure users that no mice were harmed during the development of this program.

Display, Save, Annotations

Annotation files are created automatically by PageTurn if there are annotations to be saved. When a score is loaded, PageTurn looks for an existing annotations file in the same directory/folder, with the same file name, plus '_an' suffix. If found, the file is loaded but the annotations are only displayed if the 'Display Annotations' box is ticked. Thus by un-ticking the 'Display Annotations' box the player can get back to a 'clean' score, or perhaps, try out a different interpretation from that previously saved. However, with the 'Display Annotations' box un-ticked these new annotations are transient and are not preserved through page turns or recorded. The player can move between displaying and preserving annotations and not displaying and not preserving annotations within a single score session.

Annotations written in the current session (with 'Display Annotations' ticked) may be added to the existing stock by selecting 'Save Annotations' or discarded by deselecting this option. The default setting displays all annotations and records all annotations, new and old. (Writing annotations on the score is explained in a separate section below.)

Reverse Pedals

In line with RISCOS conventions Select button clicks produce normal/expected/natural behaviour and Adjust the opposite or special effects. Thus in PageTurn the Select (left) button commands forward motion through the pages of a score while the Adjust (right) button controls backward steps and GoTo pages. However, the design of the pedal adapter allows it to work equally well under rotation of 180 degrees -- either with the mouse pointing away from the user or toward the user -- as the two pedals are set to the left and right of the mouse itself. Thus the Select and Adjust operating pedals may be either on the left or the right depending on constraints of floor space, for example, when the pedal adapter is used with an upright piano. Ticking or un-ticking this option allows a consistent function to be attached to the left and right pedals whatever the position of the pedal adapter.

In most cases placing the pedal adapter with the mouse pointing towards the player is most convenient, as the pedals are close and a right foot click guides the forward motion through the score.

Beginning at Page

Again the up/down bump arrows are used via the mouse to configure a starting page. Although the score will be opened by PageTurn set to page 1 and 2, when the first pedal click is made (this is after setting all options and pressing the 'Set Values and Close Window' button) the score will jump to whatever starting page has been chosen, and when in double page mode, the page after. The user may move around the display, to the start page or any other page(s) if they so wish by using !PDF's own controls before clicking 'Set Values...', because at the first pedal click (after setting the values) PageTurn will reset the display to what has been configured.

Play MIDI file Entered Below

As with opening a score, it is best that PageTurn loads any MIDI file accompaniment into !ReMIDI so it 'knows' about it. Thus again, when a MIDI file is dragged into the 'Play MIDI file Entered Below' field, PageTurn will hand the file on immediately to !ReMIDI, opening !ReMIDI's Playback window. When finished, or in mid playback, or to cancel a MIDI file entered for playback but not started, Select (left click) the 'Clear MIDI file' button to inform PageTurn (and ReMIDI) to forget the file and start again from scratch. The MIDI field changes to 'Drag MIDI file into this Field', however ReMIDI's Playback window will still display the old file name until a new MIDI file is loaded by PageTurn. (Alternatively, if there are files in ReMIDI's playlist, the next file will be displayed in ReMIDI's Playback window.) If a MIDI file is dragged into the 'Play MIDI file Entered Below' field but not played, it will require two clicks on the 'Clear MIDI file' button. The first click will start MIDI playback and the second stop it.

Dragging a sequence of MIDI files to PageTurn's MIDI file field will result in the second and subsequent files being entered into ReMIDI's playlist ready for queued replay. ReMIDI's playlist feature and playlist files can be used to 'preload' a sequence of MIDI files for auto-accompaniment.

MIDI file playback by ReMIDI is at Concert Pitch: A=440Hz.

PageTurn's Tempo Window

If a MIDI accompaniment is going to be used, before setting up any count-in beats it would be helpful to know the opening tempo of the MIDI file.

PageTurn Tempo window

Dragging the MIDI file from the filer window on to PageTurn's icon bar icon will open a window containing information about the file: Time signature, Tempo (MM), Pulse note value and Key signature. In addition a list of five tempo variants are given, expressed in Metronome values and ReMIDI's scaling (speed) factors. This information is useful both for setting the count-in tempo and changing the overall tempo at which the MIDI file accompaniment is played (see !ReMIDI's Playback Options window). The Tempo window can also be opened/re-opened from the iconbar menu.

Unfortunately not all MIDI files contain full key signature data, in particular the designation of major or minor is often omitted. If the MIDI data is complete PageTurn will correctly report the key, if only the number of sharps or flats is recorded then PageTurn reports the major mode for that key signature and if there is no key signature data at all, then 'Not Defined' is reported.

Rewind Sec.

!ReMIDI's rewind feature can be triggered by a back/goto foot pedal click, this enables flexible looping of both score and accompaniment -- most useful when practicing a passage many times. Use the up/down arrows to configure the rewind time, in ten second bundles of MIDI accompaniment. Generally, configure a bit more than the actual passage to allow for some overlap at both ends. If the passage fits within a two page display, set the score back/goto number to zero so the accompaniment is rewound but the pages are left unchanged. Once set up, as many loops as required may be executed in succession by applying a back/goto foot pedal click at the end of each cycle. To loop the whole piece, set the score back/goto page to 1 in the Control window before starting and choose 'Repeat' from the Trap window menu after the MIDI accompaniment has finished playing. Because rewind only has effect while the MIDI file is actually playing but the back/goto feature operates all the time the score is open there are many combinations of 'Rewind' and 'Back/GoTo' at can suit a host of situations. Experiment.

Beats after First Pedal Click

With information from the score and Tempo window it is possible to set the right number of count-in beats at a tempo corresponding to the opening speed of the MIDI accompaniment. In addition to which, when practising it is often extremely helpful to be able to play pieces through at a reduced tempo and then to gradually increase the tempo as confidence builds. The combination of PageTurn's Tempo information and ReMIDI's Playback tempo scaling make this possible. See 'Setting !ReMIDI Options' below for more information.

Even if no MIDI playback has been configured -i.e. no MIDI file dragged into the MIDI field, count-in beats may still be set for playing in.

PageTurn treats the first pedal click -- that is, the first Select or Adjust click that occurs over the Trap window after the 'Set Values and Close Window' button has been pressed -- as special. The first pedal click does not turn the page forward or back but sets the score to its configured beginning page(s) if it is not already at them and triggers the configured count-in beats, after which MIDI playback commences, if loaded. The configured upbeats are counted out in the trap window with accompanying 'beeps' and graphically portrayed by the red bar.

Subsequent pedal clicks move the score forward or backward or to the GoTo page in accordance with the configuration that has been set in the main window..

Set Values and Close Window

All the PageTurn options are now set. However, before pressing this last button it might be useful to check the positioning of the score windows and setup any !ReMIDI score specific options. For example, !ReMIDI tempo scaling, master volume and channel muting. Once all these user choices have been made the system is ready to go. Press the 'Set Values and Close Window' button to close PageTurn's configuration window and simultaneously open the Trap window. If the default setting 'Trap Pointer' is ticked the mouse pointer will be locked within it.

Place the mouse in the pedal adapter and when ready to start playing, trigger PageTurn (with or with out MIDI accompaniment) by making the first pedal click. Subsequent Select pedal clicks will move the score display forward to the next new page. Attacca!


Annotations may be added to the score by selecting the desired annotation from the 'Annotate' submenu and then again left clicking at the position for the annotation to appear in the score window. Annotatations are composed of a mixture of text and line drawings. A maximum of 128 annotations can be applied to a score. There are two identical Annotation submenus: a long vertical submenu produced by siding the pointer off the Trap menu's Annotate-> entry (illustrated in the opening screen shot) and a series of short horizontal submenus attached to the TopMenu-> entry. To access either of the annotation menus the mouse will need free movement -- if trapped select the 'Release' menu item first.

Top Annotation Menu

The horizontal annotation submenu, illustrated above, is for use with landscape orientation scores; it stretches across the top of the screen from the Trap window situated in the screen's top left corner. The vertical annotation submenu, which stretches down the left-hand side of the screen is for use with portrait orientation windows. The use of the appropriate annotation submenu should allow the score to remain wholly visible, and prevent the submenus 'rubbing out' annotations already drawn on the screen. The vertical submenu has two additional entries: 1)Tempo, giving access to a submenu containing useful tempo markings, which would otherwise require the use of a keyboard. Lento, Adagio, Andante,..., piu, meno,..., rallentando,pause. 2)Notes, containing note values from dotted whole-note to sixteenth-note.

Annotations are drawn (in red) 'over the top' of the PDF scores. Any annotations added to a score are displayed immediately and remembered by the program for re-display during the session. When the score is closed (by pressing the 'Clear Score' button in the Control window) the annotations are automatically written into a file with the same path-name as the PDF score file, plus the suffix '_an'; provided the 'Save Annotations' is ticked in the Control window. Equally, on loading a PDF score, PageTurn will automatically search for an annotation file with the same path-name plus suffix, and if found, will load and display the annotations (provided the 'Display Annotations' is ticked). PageTurn looks after the Annotation files automatically, creating them when needed and deleting them when empty.

Additional annotations may be applied at any time, or by choosing the delete submenu entry, annotations can be removed by selecting (left clicking) their left bottom corner. There is a nack to both applying and removing annotations. The select button press needs to be staccato rather than tenuto or staccatisimo. Up to a fifth of a second may be needed for PageTurn to pick up the click but hold the click too long and PageTurn finds a second click at the same position, prompting an error box. No harm done. Just start again.

Annotations are chosen from the submenu with a select click and applied with a further select (left button) click over the score. The annotation mode allows a continuous application; having made the first application further select clicks will produce more instances of the chosen annotation. This repetition feature also applies to the delete and text entry functions. When finished, an Adjust (right) click over the score window will inform PageTurn to stop 'listening' for the chosen annotation and re-enable page turning by clicks in the Trap window, or to begin a new annotation selected again by opening the appropriate submenu from the Trap window menu.

Note: Because annotations are applied by using select and adjust clicks in 'third party' windows, the normal RISCOS practice of an Adjust button (right click) menu choice maintaining the menu(s) on screen is not followed by PageTurn. Once an annotation has been selected from the submenu the menus disappear and neither page turning or further menu selection is possible until an adjust click in the score window finishes the application process of the chosen annotation, or the annotation routine itself times out.

After selecting the annotation submenu entry desired, there is a one minute period in which to apply the annotation before the routine times-out (pop-up window with OK button). Most items require just one select click at the bottom left corner of the desired application position in the score. However, the four items in sub(Menu 1) plus the Ped__* mark in the vertical Annotation submenu, need two select clicks. The first click at the left application point and a second at the right ending point. Thus slurs, ties, hairpins and Pedal marks are drawn to fit the clicked positions (after the second click is made). After the first click there is half a minute to make the second click before the routine times-out.

Annotation time display

As a visual aid for timing the application of annotations the Trap window's red bar and beat icon count-off the remaining time available from 10 to 0. When an annotation is chosen from the menu the beat counter changes from '0' to 'A' -- which could stand for 'Annotation' or the hexadecimal digit ten. The red bar then gradually recedes, 9,8,7,...,0. If the beat counter is showing '0' PageTurn is not in annotation mode.

After selecting an annotation entry, if you change your mind the 'annotation mode' can be exited by clicking adjust (right button) over the score -- the trap window counter will return to zero. An annotation sequence consists of: Select-click annotation, Select-click to apply, Select-click to apply again or draw a variable length annotation,..., Adjust-click to finish. Nothing further can happen until an Adjust click finishes annotating (or the annotation mode times-out). It will be useful to acquire the habit of clicking Adjust (right button) over the PDF window before the pointer leaves it -- an occasional extra Adjust click(s) will do no harm -- or just check the Trap window's counter is showing zero.

The positions of annotations will scale with the score display and slurs/ties and hairpins will stretch or contract as required. Also annotations may be applied or deleted at any magnification. However, when displaying annotations, if any part of an existing annotation falls outside of the current visible window it will not be drawn at all, but will remain in the record and will be drawn when the page appears in a window that has space for it. But in contrast, if an annotation is applied in such a position that part of it will fall outside the current visible window it will neither be drawn or recorded. This is most likely to occur if text is applied close to a window's right hand edge. Click 'OK' in the error box and start again.

Finally at the bottom of the annotation submenu, the one exception to mouse only control in PageTurn is the twelve character 'Text' entry item. Text such as tempo or expression marks may be added from a keyboard. After entering the text, select click upon it and apply as with other annotations. A modern sans serif typeface is employed throughout. The size of lettering used in the annotation is determined from the entry:

Installing !ReMIDI

To install !ReMIDI downloaded from my own site as a single pre-configured application: ReMIDI with sound samples already installed, unzip the downloaded folder, and as with PageTurn, simply copy/drag the application directory (named '!ReMIDI') into a convenient directory on the Raspberry Pi's file system. The 'Apps' directory is again an excellent choice. Once in place !ReMIDI's icon -- a keyboard -- should appear in the folder.

Holding down the shift key, Select (right) double click on the !ReMIDI icon in the Apps folder/directory (or wherever) to open the application directory, where the text file '!help' can be seen. Double right click on !help to open the !ReMIDI manual.

If you have downloaded files from Michael-Dennis Biemans site. To install the patches (sound samples) in !ReMIDI simply drag all the patches directories/folders from into !ReMIDI's application directory. The necessary paths are already setup in the obey file '!Path'.

Configuring !ReMIDI

There are four !ReMIDI settings which MUST be configured for PageTurn to be able to work effectively with !ReMIDI. Open !ReMIDI's icon bar menu: click the middle Menu button with the pointer over the icon bar icon. Select (left) click 'Start-up Options' and set the options as below.

ReMIDI's icon bar menu

In the 'Start-up Options' window make sure 'Use smaller main window' and 'Buffer flushing' are ticked; and reduce the 'Banner display-time' to zero (0.0). Then press (left click) 'Save Options'.

ReMIDI's Start up options window

It is not essential to use ReMIDI's small main window rather than the large one, PageTurn can work with either; however, it makes sense to maximise score display space. Then returning to ReMIDI's iconbar icon select 'Playback Options'. In this window un-tick 'Auto-play'. Then press 'Save as default'.

ReMIDI's Playback options window

Though not absolutely essential, configuring a large sound buffer will stop the redrawing of windows by !PDF interrupting playback. A figure of 256kb is recommended. With a large soundbuffer !ReMIDI will have enough information processed and stored to keep playback going while !PDF is busy drawing a new page. If playback falters, increase the soundbuffer and if necessary, as a last resort reduce the sample rate. A side effect of have a large buffer is that changes made during replay -i.e. to volume, will be delayed somewhat -- but in normal use such changes are not made. Press 'Save as default' again.

Two other options which might require attention, depending on the nature of the MIDI file are the 'Sustain pedal' and 'Note decay' entries. Generally, I use 0.30 for note decay. Experiment by all means, but it is recommended to begin with the choices as shown above.

Transient !ReMIDI Options

On a score by score basis there are some options which might need to be adjusted. In the 'Playback Options' window the 'Speed factor' may need changing in the light of PageTurn's 'Tempo' information. For example, when learning a piece it is often useful to begin at a slow tempo and built up speed gradually. Perhaps, depending on the character of the accompaniment, the note decay could be shortened to give a crisper effect or lengthened for a warmer more supportive sound. Don't forget after making any choices to press 'Use values now' before closing the window.

ReMIDI's control window

ReMIDI's control window presents information about the tracks/channels in the MIDI file and the samples being use to generate their sounds. Unfortuately this information is only filled in after playback commences and so it is necessary to play the file for a moment to obtain it! Press 'Play', then 'Stop', then 'Rewind' in ReMIDI's main window. Once the information is available choices can be made regarding perhaps muting the melody line so that only the accompaniment is heard or changing the dynamic balance between parts, etc. (I hope this feature will be changed in a future release.)

Finally, in !ReMIDI's small main window the volume slider can be manipulated by clicking the Select (left) button at the sound level required or dragging to that point. These transient settings may conveniently be done before pressing PageTurn's 'Set Values and Close Window' button.

!ReMIDI small main window Buttons

These are mostly self-explanatory and are out of reach during normal PageTurn operation where a piece is accompanied from start to finish.

ReMIDI's small main window

However, the Play, Stop, Fwd and Rewind buttons can be used to repeat a short section of a piece over and over again when practising. Set the pages to cover the section, release the pointer for hand control and, noting the left-hand time position of the beginning of the section: Play, Stop, Rewind and Play again to your hearts content -- though perhaps not the audiences'.

Foot-Pedal Adapter

The foot-pedal device is designed to be used with a wireless mouse but does not preclude the use of a wired mouse -- a wireless mouse is not an expensive item. (A wired mouse would require a slot or hole to accommodate the connecting cable, while the limitations of wire length and ease of movement render it much less convenient.)

The design brief for the pedal adapter was that it should be effective in operation, easy to construct and require only cheap, readily available parts. The Heath-Robinson design consultancy came up with the following:

Foot-Pedal Adapter

Parts needed:

Construction is fairly self-explanatory -- from studying the illustration. Translucent sheet is ideal as the see-through surface freezes an optical mouse -- though with the 'trap' functionality PageTurn can easily manage without it. Plastic sheet usually comes with a peel-away covering which allows a 'horseshoe' shape on the baseboard to be cut with a knife and peeled off -- making gluing the foam rubber mouse-retainer much easier. Using this method you can cut the foam rubber strip longer than needed and trim it back afterward.

Draw a centre line on the short axis of the board. Place your mouse along this centre axis and draw around the mouse -- taking in its full extent, not its base. Place the wing hinges to left and right with their tips resting in the best position for making mouse clicks and mark their securing holes for the small bolts. Drill out the bolt holes and attach the hinges. Fold the hinges outward. Cut the foam rubber to an appropriate size using a sharp knife and straight-edge. Mark and cut the horseshoe shape for the mouse-retainer, peel and glue. Be patient when gluing, the foam rubber requires a generous helping of glue and contact cement needs to 'dry' before the two surfaces are brought together.

Place the mouse in the retaining foam rubber horseshoe and fold the hinges back upon it. The hinges should now be supported by the foam rubber so that their tips are hovering over the mouse with a slight gap. Attach rubber buttons or other suitable contact material to the tips of the hinges. Mark and drill a hole for a 'back-stop' bolt (plastic plug or whatever) at the back of the mouse -- not too tightly positioned, so that the mouse can be easily inserted and removed. Fit bolt, the head of this bolt will also provide a third foot to the base. This bolt stops the mouse sliding backwards out of the horseshoe. The rough thread could perhaps be covered with elephant tape or rubber/plastic tubing.

Once you are satisfied with the arrangement, disassemble and peel off the remaining covering material. Reassemble. To secure the tee hinge arms from flapping about, glue them to the top of the foam rubber horseshoe so as to secure them and/or glue a flexible strip across them. One last job is to provide some means of support under the mouse so that the baseboard doesn't flex downward under the pressure of the foot-clicks. I used a small strip of the rubberized felt dining table covering. And that is about it.

Any suggestions for PageTurn or ideas for design improvements for the pedal adapter, are most welcome.

Philip Perry

Notes and Questions

Configuring the RISC OS Raspberry Pi for use with a HD TV

Left/select click on the SD drive icon (:0) on the left hand side of the iconbar to open the root directory/folder. The title bar is 'SDFS::RISCOSpi.$'. While holding down the Shift key, double left click upon the file '!Boot' to open the Boot directory. Then without the shift key down, double left click on the file 'Loader' (the file icon has a colourful PC motif). In the directory that opens (titled 'SDFS::RISCOSpi.$.!Boot.Loader') is the CONFIG/TXT file. Double left click on this file or drag the file to a text editor on the iconbar to open it. The entries which may need to be added to this file to enable full HD television use are: disable_overscan=1 and hdmi_drive=2 -- the former enables full screen output and the latter sends audio to the TV.


After carefully adding these entries, save the file by clicking the middle (menu) button and using the 'Save >' menu item to bring up the Save box. Left click on the 'Save' button and close the directories/folders. Shutdown the computer from the Task Manager menu (middle click on the raspberry icon on the extreme right of the iconbar and choose 'Shutdown'). The next time the computer is started up you should have a full screen display with sound.

Efficiently Positioning Two A4 Score Windows

Once PageTurn has opened the score windows they can be most efficiently manoeuvred into position by first dragging the title bar with the mouse pointer to the extreme top of the screen and then along to the left so that the left edge of the score rest up against the Control window. Then drop the pointer down to the resize icon (bottom right-hand corner of window) and pull it out to the right and down to the bottom of the screen. This will automatically position the title bar to screen top and page width to full. Repeat for the second right-hand page.

Practical Use Tip

If you run into problems with a score, in particular ReMIDI's playlist feature, press the 'Clear Score' and 'Clear MIDI file' buttons and then quit both applications from their iconbar menu. This will close all !PDF and !ReMIDI windows. PageTurn will re-load 'clean' copies when you drag the next score/MIDIfile into PageTurn's control window. (ReMIDI will give you the option to delete the playlist, if it exists.)

Future Developments

There are no doubt many small improvements which could be made to PageTurn; however, the one major step forward that I would like to see would be a facility to change the pitch of music output by ReMIDI -- both fine tuning and key transposition. This would require, I believe, internal changes to ReMIDI, as its internal structure does not presently appear to respond to operating system tuning commands.

Why do some PDF scores display better than others?

Typeset pdf Scores: !PDF does not display embedded fonts (unfortunately) rather it will either display a bitmap representation of the glyphs or substitute a RISCOS standard font. When the display fails, most often choosing 'Menu->Save->Page as Sprite' -- to view a bitmap of the score -- will make sense of the page. To make the most of these difficult pdf-scores see next entry.

Scanned pdf Scores: To be displayed on screen a pdf-score is transformed into a grid of pixels. If there is a mismatch between the positioning of staff lines, ledger lines and note stems with regard to the grid of screen pixels a poor quality image may result. If a score has been scanned at a higher resolution than that which it is displayed at (i.e. more than 1920x1080) there is a potential for loss of detail in the image.

Generally choose typeset scores over scanned scores, where possible, as they usually produce a better display.

What can I do to improve the display of a poorly imaged score?

Poor quality display, or indeed the complete failure of a file to display correctly, may often be resolved by reprocessing the file using !GView and !Ghostscript and !PrintPDF in conjunction with RISC OS utilities.

If !PDF is unable to handle a typeset score it is generally because the pdf file is using embedded fonts which !PDF does not display. To 'cure' these files it is usually a simple matter of reprocessing them with !Ghostscript/!Gview and !PrintPDF software. !Ghostscript can convert a problematic pdf file back into a standard Postscript file which PrintPDF can then turn back into a pdf file comprehensible to !PDF. This reprocessing option works best for me.

!Ghostscript and !PrintPDF are bundled with the standard RISCOS Raspberry Pi distribution. !PrintPDF can be found in the Printing folder and !Ghostscript in !BOOT.Resources. !Ghostscript version 8.71 is best. Older versions (8.54) sometimes misread colour information.

To begin reprocessing, set the directory containing the problematic pdf file to be the Current Working Directory - chose 'Set directory ^W' from the filer's menu.

Run !PrintPDF by double clicking on it - in the Printing directory.

Open a TaskWindow (terminal window). Task windows are opened from the Task Manager's iconbar menu (the raspberry icon on the extreme right of the iconbar) or by holding down Ctrl and pressing F12.

Type the following in the TaskWindow at the star prompt * (followed by pressing 'Return') to check location (CWD), memory and !Ghostscript, then the pdf2ps command itself:

WimpSlot 3500k 3500k‹Return›
gs -h‹Return›

pdf2ps ‹PDF-input-filename› ‹postscript-output-filename›‹Return›

When the * prompt reappears a newly minted postscript file will have been created in the CWD -- it may take some time depending on file size. This file can be dragged on to the !PrintPDF iconbar icon. Shortly a PDF icon will appear in PrintPDF's 'Create PDF' dialogue box. Drag the icon to a convenient folder/directory, where a pdf file will be created.

For users new to RISCOS there are a few OS specific conventions that you need to know. The RISCOS path separator is the dot '.' and the extension separator is the forward slash '/'. Thus \dir\file.ext or /dir/file.ext is expressed as .dir.file/ext in RISCOS. And to add further to the confusion, Ghostscript with its Unix roots will stumble over a RISCOS slash-extension in the file name. Therefore as RISCOS file types are not determined from their extension, but held internally, it is best to use a simple file name e.g. 'filename' rather than 'filename.pdf' or ''.

Once you have tested the new file and hopefully found it satisfactory, why not share it with other PageTurn users by submitting it to

If you need to reprocess files quite often, probably only the last line, the pdf2ps command is necessary. The first three commands are provided for completeness. Usually the default memory allocation will be sufficient, though it could be made even larger if !Ghostscript bails out with an error. Other reprocessing routes include postscript export directly from !PDF's menu Save->Postscript->Save As; and, Sprite-Bitmap export from !Gview for printing from !Paint or !Draw via !PrintPDF. These alternative routes generally yield less satisfactory results but occasionally succeed when pdf2ps is lacking.

For the record !Ghostscript is available from:

Or for older versions of !Ghostscript

!GView - for viewing PostScript (and PDF) files:

!PrintPDF can be downloaded from:

ReMIDI's Playlist

PageTurn works best with one MIDI loaded into ReMIDI at a time. Load the accompaniment, use it, and when finished, press 'Clear MIDI file' in the Control Panel window. Load the next piece.

Occasionally extra MIDI files can get loaded by !ReMIDI, e.g. if Trap menu 'Repeat' is chosen (clicked) while a MIDI file is still playing or more than one MIDI file is dragged to the Control Panel window before playing commences. !ReMIDI stores these extra files in its Playlist which can be opened from !ReMIDI's iconbar menu. Clicking on the Playlist 'X' icon beside the loaded files will remove them.

Make Backups

Always backup you scores and MIDI files. SD cards, USB sticks are convenient but frail. Make backups to hard drives or better still write your library of music to Data Compact Disc(s) ....make two CD's just to be sure and store them in separate locations.

Philip Perry, PageTurn v0.5, 27Nov2016.