Electronic Drum Sequencer
Software for BBC Micro
New software for the BBC B and E&MM's analogue and digital percussion modules: it can be used with or without the OMDAC project. Designer Dave Burden describes the system.
Some new software that allows E&MM's electronic percussion modules to be sequenced using either the OMDAC or the user port of the BBC B.
Last month's issue gave details as to how our OMDAC music control peripheral - already compatible with Acorn Atom and Sinclair Spectrum home computers - can be modified for use with the BBC Micro. Elsewhere in the same issue, there was a description of how a complete electronic drum kit could be built using E&MM's analogue electronic percussion modules - the Syntom, Synbal, and Synclap. This drum sequencer software was written to control a custom electronic percussion unit built along similar lines (though without a set of kit pads), so it's not inconceivable that some readers could combine these two developments to provide a complete performance and sequencing system, all at a fraction of the cost of commercially-available units.
Alternatively, the sequencer can be used to control any other drum unit that will accept the OMDAC's +5V trigger (E&MM's digital Syndrom, for example), while 'OMDAC-less' readers can connect modules direct to the BBC's User Port.
The software for the system is disk-based, and although the ideal state of affairs would be to employ two drives (one for the Systems disk, the other for the File disk), the system is almost as easily used with just the one, and frankly, that's all this designer's finances are ever likely to see. Cassette operation is sadly impractical, as extensive use of random access files and program overlays is made and using a cassette would be unbearably slow.
The software was written using BASIC II (gives (c) 1982 when you type "REPORT"), and makes use of several commands available only on this version, notably OPENIN and OSCLI.
The sequencer provides for triggering of up to 12 percussion channels, though if you don't have that many modules at your disposal, some of these channels may be used instead to control accent or hi-hat open/close functions, for example.
The software is arranged as a succession of Pages which guide the user through the composition process. First, patterns are written using a cursor on a 32 x 12 grid, the pattern being played continuously with changes programmed taking immediate effect. Once you're happy with your pattern, it can be assigned a six-character name and stored in a Pattern File for later use.
The next Page enables percussion tracks to be composed using previously written patterns chained together in sequence. A simple composition language provides Repeat, Segment Loop, and Tempo Change commands: songs are limited to a maximum of 200 bars, using as many as 20 different patterns. However, the Performance Page enables up to 15 songs to be strung together automatically, providing about an hour's worth of programmed percussion, which should be enough for anybody. Since File disks can be created at will, there's no limit to the number of patterns that can be written and stored using the Composer and Performance Pages.
An outline of the system software is shown in Figure 1. Seven main pages are selected from the menu, and some of these consist of a couple of interlinked programs - usually a machine code loader and screen set-up, accompanied by the main number-cruncher. All these programs are supplied with the Systems disk and add up to about 40K of software in all.
This page is provided so that sequencer displays and output format can be tailored to the user's particular needs. Names can be assigned to each channel (eg. Snare, HiHat, Accent) and are stored for later use by Page 2. The user can also specify which of the three possible output formats is to be used as the default format. The choices available are:
a) OMDAC using eight triggers and fourswitch outputs
b) OMDAC using only the eight trigger outputs
c) eight-bit output to BBC User Port
The default format can be over-ridden for a particular session if desired.
A pattern is written by moving a cursor across the screen (using the BBC cursor keys) and pressing
For this Page, the screen is split into three vertical sections (see photo). The left-hand side contains a text window where commands are typed in and the composed song displayed. The centre consists of a status display showing song name and length, which mode the Page is in and, in Play mode, an indication of how far the song has progressed. The right-hand side shows a list of the patterns stored in memory ready for use in composing the song.
The Page works in four Modes: Command, Compose, Edit, and Play. Command mode allows songs to be loaded and stored, patterns loaded into memory and the other modes entered. Compose mode enables songs to be written, and this is done by using a BASIC-like composition language. The patterns displayed are the 'palette' from which the composer works, each being identified by a number between 0 and 20. The commands available are as follows:
a) pn Play pattern pn once
b) pnRx Pattern pn repeated x times
c) L y Begin a loop, repeating loop y times
d) E End loop
e) T t Set tempo tot (ignore stored tempos)
f) T+/-i Increase/Decrease tempo by i
g) T 0 Restore stored tempo
h) Q End song
Loops can be nested up to three-deep. Song length is limited to a total of 200 bars, and a maximum of 50 commands and 21 different patterns. However, these limitations may be overcome by chaining songs together for actual performance to form one track consisting of several normal-length song parts. Once a song has been composed to the user's satisfaction it can be stored on disk, and the stored data file contains song particulars (name, tempo and so on), the names of the patterns used, the composition language command lines and the 'compiled' version of the song generated by the program.
Should you want to edit a pattern, then, logically enough, you go into Edit mode. This enables a command list to be edited using Insert, Delete and the composition language commands already mentioned. The new song can then be stored under a new name.
Final mode for Page 3 is Play. When a song is played, the status screen shows the details of the pattern being played and the next to be played, together with the number of bars performed and the number of bars remaining.
This page produces a list of all the songs stored in a file. The name, length in bars, length in command lines and number of patterns used are shown for each song. Again, listing may be to screen or printer, while an indication of bytes free is also given.
For performance, a total of 15 songs or song-parts may be loaded into memory, the titles being listed on-screen. Song-parts can then be designated by setting follow-on flags: if a follow-on flag is set for a song, then when the song has finished playing, the play routine will continue with the next song without pausing. When a song is playing, a 'beats left' count is given at the bottom of the screen, and the next song to be played can be altered at any time.
These two pages are provided to automate the creation and initialisation of blank disk files for use by the sequencer. All the user need do is insert a disk and enter the size of file required.
The sequencer software is now available from EmmSoft, E&MM's music software division, at a price of £8.95 for a 40- or 80-track Systems disk (please state requirement) inclusive of VAT. Orders should be sent to the Mail Order Department at the address at the front of the magazine, and cheques/POs made payable to Music Maker Publications. Please allow up to 28 days for delivery. Next month's E&MM will contain a further article that details how the sequencer software was written and some possible developments for the future.
Feature by Dave Burden
Previous article in this issue:
Next article in this issue:
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!