Accord has been developed as a control system for microprocessor-enhanced MIDI Accordions.
The principle drive in the design is to produce a control system for both the Accordion and associated synthesizer, that is suitable for live performances, rather than studio work, though the latter, can of course be also done.
With the addition of MIDI control and a suitable synthesizer, the Accordion player can take his instrument into a new dimension.
In a live performance, the Musician plays a number of tunes, either to accompany voice, or simply the music itself. Usually, this music may contain parts in which the musician may wish to accompany his Accordion by selecting different Synthesizer voices. He may also wish to vary which Synthesizer voices are used during the various parts of the performance.
Accord provides for the pre-preparation of each performed tune, in the form of a Song, which can contain parts, easily selected as the musician plays.
There are essentially two modes of use:
Manual – in which the musician selects the synthesizer machine and voices, together with selection of channels, velocity settings etc.
The performance takes place, and control of synthesizer volume, reverb, chorus etc. can be made manually.
Dynamic – in which the musician makes use of pre-prepared settings, patches and parts for the performance, bundled into a Song file. Control of the volume, reverb and chorus can also be carried out manually.
In the following I have used various terms, I denote these here rather than providing them in an appendix.
Accord caters for Accordions that have up to three sections: The Accordion may be equipped with a piano-type keyboard or set of buttons, for main melody, and a set of buttons for both Bass and Chord playing.
These three sections I have denoted as: Treble, Bass and Chords.
For each of the sections a MIDI channel can be allocated, together with an additional expander channel in each section, making up a total of six channels.
Each section, as noted above, has an extra channel associated with it, so that the effect of having a note played in a section can, if required, be accompanied with the note being played on the expander channel simultaneously. Since the expander channel may be assigned a different voice, the overall affect is two instruments playing together, either in unison, (the default) or harmony, using a MIDI note offset mentioned below. Control of expanders can be carried out manually, using the appropriate section expander On/Off button, as well as inclusion of the expander channel in a part as a patch.
Channel expansion on the Treble section is also used to facilitate a keyboard split, whereby the expander channel is used to produce the notes below the split note, and the main section channel used to produce the notes of the split note and above. It is also possible, by employing a positive shift to the expander channel, to play a small section each side of the split at the same pitch.
A MIDI Base can be set for each section, on an octave basis, so that the start octave for each section can be set individually. Additionally, each section channel expander can have a MIDI note offset or shift +/- of up to 12 semitones.
Effects Control (FX)
Provision has been made for both the programmatic (use of patches) and dynamic (using the controls on index.html) control of Tremelo, Reverb and Chorus depths on all 3 sections, Treble, Bass and Chords, noting that currently only patch control of a channel expander FX can be achieved. This is to avoid severe clutter on the control surface.
It should be noted that currently, when parts are used, a new part selection may override any previous setting made by a dynamic control. Further work may include a facility to disable FX control in a given patch,
This is the term commonly employed to indicate the relative loudness of an individual note. On a piano, the loudness of a note is controlled by the velocity at which the hammer strikes the piano string(s). On a lot of MIDI instruments, no such measurement of the velocity of a key depression can take place, so other methods are employed. However, a default velocity should be defined, usually for each channel in use. On Accord, this is achieved both by the use of patches, and also dynamic control. Provided on the Home page (index.html) control over all 3 sections can be made, and there is also a master velocity control which can be used as a convenient Soft/Loud control. Provision is also made on this page to control the synthesizer Master Velocity.
The controller is a web-client application comprising:
settings.html – An editor for Accordion settings.
xg.html – An editor to create patches, parts and Songs.
index.html – The default web page, which is for control in a live performance.
There are further support pages which cover backup/recovery of files etc.
Each page has a navigation area to allow rapid and easy transition to a desired page.
Local storage (aka cookies) is used to maintain the settings of various controls across page transitions. For example each control on the settings page has it’s own unique identifier. Changing control values, then moving to another page then back to settings page will restore your previous settings.
[Local storage is located on your web client, whether this be ‘phone, tablet or PC]
Settings can be saved in an appropriately-named file, which can be viewed and loaded so as to change the current settings. These will be ‘persisted’ automatically. Settings files are stored within the Accord system server (inside the Accordion), and can be backed-up and re-loaded as necessary with a system utility.
A patch is a simple command sequence given to the synthesizer and accordion server, to set up parameters for the playing of a single channel. A simple patch would normally look like the following example:
patch=1a, 11, 45, 100, 18, 5, 27 # Chrom. Perc.: Hard Vibes on channel Treble
Dis-assembled, the above means:
1a – Channel 1 setting for song part a (Currently only parts a, b or c are available)
11, 45 – The program numbers selecting the group and voice for the channel
100 – The default (starting) velocity for Note ON
18 – Tremelo depth (can be from 0-127)
5 – Reverb depth (can be from 0-127)
27 – Chorus depth (can be from 0-127)
# – Beginning of a comment/additional information and instruction section – in this case Instrument Group Chrome Perc., Hard Vibes, and an indication of what section Channel 1 is currently used on, in this case Treble. (generally the piano-type keyboard)
The comment section is also used to give other settings instructions required by the patch, to the accordion server. These may include shift and split instructions followed by values. It should be noted, then that the comment section provides both visual information for the musician, but importantly also instructions to the server. These comments should never be edited using anything other than the editor provided in xg,html.
Patches are formed using the patch-editor section of xg.html. All information is entered into the patch summary by selecting the appropriate control and/or value. [Note – no typing is involved] A patch can be tested immediately, by sending it to the synthesizer, then pressing notes on the Accordion, or using the utility button Send Test Note. When satisfactory, the patch can be added to a patch list, which can be included in a Song file.
A patch need not belong to a song part, in which case it will be active despite which part of the Song is currently selected. Non-part patches have no a, b or c, after the channel number.
A Part is a notational aggregation of patches, such that selecting a specific part during play, will execute each patch designated as belonging to the part selected.
In the example patch above, the patch has been shown to belong to part a.
For part b of his song, the performer may require a different instrument sound, or effect, so another patch for channel 1 could be defined thus:
patch=1b, 16, 0, 100, 23, 0, 56 # Organ: Draw Organ on channel Treble
On selecting part b, this patch would then program channel 1 to be Draw Organ with ON velocity of 100, moderate tremelo, no reverb and medium heavy chorus.
[!!! Note to self – TBD: describe Fx settings in comment?]
A Song is a file containing everything necessary for the setup and control of the performance of a piece of music.
It typically contains the following:
Comment Line 1
Comment Line 2
Selection of the machine (synthesizer)
Selection of a basic settings file for the accordion.
A patch list.
An example follows:
# 3 parts + semitone shift
# 9 sep 2019
patch=1a, 72, 0, 100, 0, 0, 0 # Pipe: Piccolo on channel Treble
patch=1b, 40, 0, 100, 0, 0, 0 # Strings: Violin on channel Treble
patch=1c, 40, 0, 100, 0 0, 0 # Strings: Violin on channel Treble
patch=4c, 72, 0, 64, 0, 0, 0 # Pipe: Piccolo on channel Treble expander , semitone shift: 12
Line 1 is the commented title, this will also form the filename of the song i.e coolin.sng
The two comment lines are free form, I put in what I had done and the date.
Line 4 selects the XG firmware on a DB50XG.
Line 5 will effectively load of all accordion settings the file coolin.abv contains.
The lines 6-9 comprise the patches used in the three parts a, b and c.
It is important to remember that some accordion settings-change commands appear in the commented section, so that in this example in part c, the treble is played on both default and expander channels, with the latter played an octave higher than the default. [Note once again that no freehand typing of the patch is done]
To sum up then, for part a, the keyboard plays a Piccolo voice. For part b, keyboard plays a Violin voice, and for part c, the keyboard plays 2 voices, Violin and Piccolo (raised 1 octave above that of default channel). All the FX settings have been left at zero.
Completed song files are stored, ready for use on the Accord server. System utilities provide for backup and restore.
Song Editor – xg.html
The Song Editor provides a rich, easy to use interface for the production of performance control pieces I have named songs, as discussed above.
Although the output from the editor is text, it will all be produced with the very minimal of typing, and mostly by the quick and easy selections available on the page.
As can be see above, the page is divided into 3 parts. the upper section is mainly concerned with the production of patches. When a patch has bee composed, it is possible to test it live, then add it to a putative song. Such patches added, will show up in the list box Song Patches, at the top of the middle section.
The order of presentation top to bottom, is an easy guide to the selection of items for a given patch. The Summary text towards the bottom of the section will automatically reflect immediately any change made to any of the selection items. Certain selectors will be disabled, when it would be inappropriate to use them. To test any of your patches, you should ensure that the basic settings file, which will be included in the song is pre-loaded for your tests. Note that several settings can be overidden by patch execution.
A patch can be defined as stand-alone, or as the component of a part. A stand-alone patch will be in force for the duration of a performance, irrespective of part selection. For this to work, the channel used in a stand-alone patch cannot be used in a patch which is included in a part. Use of a channel in more than one patch mandates the use of parts. You will be warned if you attempt this, and your request will be ignored.
You will notice the following:
- The selected machine cannot be changed once a patch has been added to a new song.
For non-part patches the following additions to the patch are dis-allowed:
- No transposition
- No FX: Tremelo, Reverb and Chorus depth control cannot be added to the patch.
- Only for a Treble section patch in a part is a keyboard split allowed.
A facility for an End-To_End test note is provided, which will be sent on the chosen section main channel or expander.
Home is the informal name of the default page loaded from the Accord server. This default page has the URL: 192.168.4.1/index.html, or chosen more simply as simply the IP address of the server, nominally: 192.168.4.1
It is intended to be the page on which the musician controls performance of the songs, and includes the dynamic control of Channel velocities etc.
The snapshot above is taken from a ‘live’ server. Note that several of the controls are not in their original ‘default’ condition, because each time the page is loaded, the previous settings for the controls are brought from local storage.
Movement or change to any control on this page will result in an update of the change in the Accord server, which may be forwarded to the synthesizer.
The page is roughly divided into 3 parts. The upper is for the delivery, and dynamic change of basic accordion settings. The middle section is for the delivery, and execution of Songs, and the lower section mainly concerned with controlling the machine when problems arise.
Since this will probably be the most important section, I deal with it first.
All Notes Off
Hitting this button will result in all notes on the 6 active channels being turned OFF.
The currently-selected machine will be reset. All notes will be turned off, all controllers will be zeroised. [All patches previously sent are erased] Note that this reset has to be pre-enabled by checking the related checkbox. This is mainly to avoid accidental reset of the synthesizer by finger trouble on what might be a cramped control surface.
Currently only one control is provided here, to set the master velocity for the whole synthesizer.
The first part of the page is intended for dynamic control of basic settings, which include channel velocities, channel expanders, and effects for the Treble channel of Tremelo, Reverb and Chorus.
These 3 functions can be exposed or hidden with the Show Fx/Hide Fx buttons to the right of the Treble velocity control thus:
[TBD UPDATED SCREENSHOTS NEEDED]
Note again, that the additional Fx controls retain a previously selected value.
The first section also includes a Soft/Loud facility which acts as a master velocity control when ‘Soft’ is selected, so that only the selected percentage setting of each of the Treble, Chords and Bass sections is sent to the synthesizer. ‘Loud’ effectively disables this calculation, and the settings alongside the 3 channel velocity controls will be sent unchanged to the synthesizer.
The middle section comprises a Song file selector, loader and subsequent control of up to three parts if these are defined in the selected Song.
Viewing Settings and Song Files
Examining the current contents of either a selected settings or song file is easily done using the relevant ‘View’ button. The contents of the file will ‘pop-down’ enabling viewing, and a control on the ‘pop-down’ section will again hide the file contents.
This facility is on other relevant pages, but is included here for an easy quick check without changing pages.
Below I show the settings file ‘pop-down’ view in action.
When the Song ‘pop-down’ view is selected, both ‘Previous’ and ‘Next’ buttons are provided, so as to make quick comparisons between similarly-named song files.
Note that there are no editing functions on the page, but the selection of a song is persisted across a change to the Song Editor page, so that easy editing and re-test of a Song file can be done there.
======================= More goes here =============================
Be aware that the Accord server is sited in your Accordion. The following information may be helpful:
- Time. The server will have no power after you remove the power cable or otherwise remove the supply. As far as the server is concerned time is ‘frozen’. Most computer systems, especially phones and Pcs have a real-time-clock, and an in-situ battery. The Accord Server has neither batteries nor real-time-clock. This is deliberate. I do not trust, and would not guarantee any battery system against failure, which could be catastrophic to the Accordion mechanisms. To compensate for the lack of clock, the Home page (index.html) for it’s first act, supplies the current web client’s system time to the Accord Server. This means that the Accord Server time will be in step with the client (‘phone, tablet, PC etc.) until the Accord Server is again powered down. It is important to note that only the Home page fulfils this function, this is to avoid unnecessary updates of the Accord Server time if the facility was enacted on other pages. The Home page should be the 1st page you load after power up, and is guaranteed if you use the URL: 192.168.4.1 by itself, or with the Home page URL: 192.168.4.1/index.html.
Carrying on operations without loading the Home pages 1st, will result in file date-stamps being out-of-step.
- Power-up. When power is applied to the Accordion system cable, the Accord Server will boot up. Disturbance of the supply during this period may result in a corrupted file-system.
- Power-down. Powering the system down before correct shutdown of the Accord Server may result in a corrupted file-system similarly to above. The facility given on the System page enables proper shutdown of the Accord Server before powering it off.
- Reboot Server.
Normally, there should be no reason to reboot the server. However, if I was to state that there would never be a failure, you would be correct in calling me a fool, or worse.
The Accord Server is an amalgam of various software entities, only some of which have been engineered by me. So if the server stops responding, make a note of what the actual fault appears to be. Always look at the Fault Checklist, before deciding to reboot.
After a successful restart of the system, an application log download should be done using the facility on the system.html page under Maintenance, and emailed to me for advice and support. (see section below on Errors)
- Disk Space.
The storage system in Accord is an SD card, and so has limited space.
There should however, be sufficient space for Song definition and Settings files. You should regularly check that your file collection contains only files that you use, purging those which should be discarded.
The application itself only generates 1 file – this is the Application Log. Not only does the log attempt to record errors, but contextual information on application use is also recorded.
In the Maintenance section on the system.html page, The Application Log can be downloaded, viewed on the Browser, and if required, saved to the client machine’s file-system. The destination of the save will generally be in ‘Downloads’. This facility also shows the size in bytes of the file. When this size is over around 60,000 bytes, you should ideally save the file, then purge it from the Accordion system. This is done by checking the Enable log renew checkbox, and hitting the New Log button.
The Application has been designed to be fault-tolerant, so that most unforeseen circumstances will not bring program execution to a halt. If you notice that facilities provided are not operating as you expect, but the Application is still running, make a quick note of the problem, and the time it occurred, and when convenient browse the Application log for any clues. Should the problem be repeatable, you should email me.
Most programmatic errors that would normally halt the application are caught and logged, with the Application continuing after aborting the problem code section. It is important that any such errors are noted, and if possible, fixed. In the Application log such errors will contain the word ‘Exception’. A use of ‘Find’ on the log file, will show up such errors. If found, the file should be emailed to me.
There may be an occasion when the system fails to respond, even to a restart. The power should be removed, wait 15 seconds or more and restore the power. If the system reboots correctly, again, the Application log should be downloaded, saved and emailed to me.
- Fault Checklist and recovery
There are three distinct computer systems in Accord, the main controller, providing the Access Point, Web site and communications link to two other controllers, one for the treble (keyboard) and the other for the bass and chords buttons.
Faults and errors in the main system have been more-or-less covered above. Problems in the two sub-systems are discussed below.
- Bass/Chords not working
If the bass or chord buttons stop sending notes, the End-To-End Test Note should be sent from the web client (on xg.html), trying this on both bass and chord channels, and their respective expanders after setting up a test patch. Make a note of any channel that fails. The Bass/Chords system can be individually reset using the small TACT switch provided on Accordion.
- Treble (piano-keyboard) not working
As above, an End-To-End Test Note should be sent, and the result noted. This system can be reset using the facility on system.html by checking the Enable Treble Processor Restart checkbox and hitting the Restart button.
- For anything else, a server reboot should be done.
TO BE CONTINUED