Magazine Archive

Home -> Magazines -> Issues -> Articles in this issue -> View

Soft Music

Article from Electronic Soundmaker & Computer Music, March 1984

Arpeggiate the BBC


More music software from Gary Herman — an arpeggiator for the BBC micro


This program reproduces on a BBC computer (model A or B) the arpeggiator function familiar on many synthesizers. It is especially intended for those who don't already have arpeggiator synths or as a complement to such synths. Although tunable (by altering the variable BASE in line 10), it has neither the tonal depth nor the quality of a professional arpeggiator synth. However, the results of using it are good enough for effects, fills and rhythmic accompaniment. In some respects, the programme, called, impudently, 'Arp' — is an improvement on many dedicated devices, since it can produce a range of flanging-type effects and also responds — unlike many synthesizers — to the order in which keys are pressed. With suitable modifications, it can, of course, be used as a subroutine or procedure in a longer synthesizer program.

Beginner's Guide



Arpeggiators, for those who don't already know, take a keyboard input (usually up to three or four notes) and create output in the form of an arpeggio or sequence of separated notes. The opposite to an arpeggio is a chord (sometimes a dischord). Arpeggiators usually have a variable rate (represented by the time gap between notes), direction (ascending or descending notes) and range (playing the same notes over one or more octaves). Arp has all these features: rate is adjustable to give clearly separated notes, harp- or mandolin-like effects or anything in-between. Direction is determined by the order in which the notes are originally played and range is from one to four octaves.

The programme uses READ...DATA and keyboard input routines (lines 30 and 310 and lines 160 to 210 respectively), which should be familiar from programs in previous issues. These allocate key-codes of the top two rows of the BBC's Qwerty keyboard to an array, A(X), and then check to see whether any of those keys are being pressed. If they are, the appropriate pitch is determined and is placed in an array FREQ(T). T is defined as a number, base three, plus one (see line 180), which means that its values can only be 1,2 or 3. It's value represents the order in which keys have been pressed and it counts up to three and then starts again. If two or three keys are pressed almost simultaneously, they are renumbered as a group before the program moves on to its play section (lines 220 to 290). If the player pauses between notes, the INKEY (0) in line 200 ensures that the programme moves directly to the play section.

The play section plays the notes in order — the first, FREQ(1), on channel one, the second and third (if there are any) on channels two and three respectively (see lines 240, 250 and 270). Line 260 sets a delay between each note — adjustable for different arpeggio rates. The parenthetic FOR...NEXT loop (lines 220 and 290) sets the range, ensuring that the notes are played in their original octave and in up to three octaves above that (the variable which sets the number of octaves is G). Line 280 checks to see if a key has been pressed during the time in which the notes are playing. If not, the arpeggio is repeated (a feature which is often called 'hold' on synths and which gives a rhythmic effect beloved by contemporary synth bands and composers like Philip Glass). If a key has been pressed, the whole process effectively starts again.

Function Keys



The main body of the program begins at line 40 and repeats from there. This line calls a screen display procedure (lines 320 to 430). The procedure call is followed by lines 50 to 140 which set up the BBC's red function keys to change the characteristics of the arpeggiator: f0 halves the rate and f1 doubles it; f2 turns the hold feature off, allowing you to end a repeating arpeggio without playing another note ('HOLD' is automatically turned back on when any musical key is hit); f3 sets the range, from one to four and back to one with each press; f4 to f9 set the ADSR envelope characteristics of the notes played using the BBC's conventions. Thus f4 and f5 set attack and decay target levels (ALA and ALD in the BBC manual), while f6 to f9 set attack, decay, sustain and release steps (AA, AD, AS and AR in the BBC manual).

On running Arp, the rate and range are both set at one. Everything else is initialised at 0 and you will hear no sound on pressing a key until at least 'attack target' or 'attack step' have been given non-zero values. Typical screen displays for arpeggio effects are:

RATE: 4 8
HOLD: 1 1
RANGE: 3 2
NOTES: 2 3
ATTACK TARGET: 112 112
DECAY TARGET: 0 24
A STEP: 8 24
D STEP: -8 -112
S STEP: 0 0
R STEP: -1 -1

There are a wealth of possible effects, and experimenters might consider utilising the BBC's noise channel (channel 0) to produce repeating percussion patterns as well as musical notes — although the right settings on Arp as it stands can create some intriguing percussive effects.

BASIC SOURCE CODE

1 REM ARP ARPEGGIATOR BBC COPYRIGHT G. HERMAN 1983
10 MODE4: BASE = I: G = 0: RATE = 16: V = 0: T = 3: DIMA (23), EREQ (3)
20 AS = 0: OS = 0: SS = 0: RS = 0: AY =0: DY =0
30 FOR X = 1 TO 23: READ IN: A(X) = N:NEXT
40 PROCSCREEN
50 IF IINKEY (- 33) THEN RATE = RATE/2
60 IF INKEY (-114) THEN RATE = RATE *2
70 IF INKEY (-115) THEN \ = 0
80 IF INKEY (-116) THEN G = (G + I) MOD 4
90 IF INKEY (-21) THEN AY = (AV + 8) MOD 128
100 IF INKEY (-117) THEN DY = (DY + 8) MOD 128
110 IF INKEY (-118) THEN AS = (AS + 8) MOD 128
120 IE INKEY (- 23) THEN DS = (DS - 8) MOD 128
130 IF INKEY (-119) THEN SS = (SS + 8) MOD 128
140 IF INKEY (- 120) THEN RS = (RS - I) MOD 16
150 ENVELOPE 1,1,0,0,0.0,0.0,4S,DS.SS,RS,AY ,I)Y
160 REPEAT
170 FOR X = 1 TO 23
180 IF INKEY (- A(X)) THEN T = (T MOD 3) + 1: FREQ(T) = BASE + 4* X:Y = 1
190 NEXT
200 ENTIL INKEY (0)
210 IF Y = 0 THEN 160
220 FOR F = 0 TO G
230 REPEAT
240 FOR RPT = 1 TO T
250 SOUND 16 + RPT, Y, 48*F + I REQ (RPT), 10
260 FOR P= 1 TO 8192 STEP RATE: NEXT P
270 NEXT RPT
280 UNTIL INKEY (0)
290 NEXT F
300 GOTO 40
310 DATA 97,17,50,34,18,35,52,20,36,53,69,37,54,38,39,55,40,56,72,25,57,121,41
320 DEF PROCSCREEN
330 PRINT TAB (5,5); "RATE: INT(RATE/16); "" '
340 PRINT TAB (5.6); "HOLD: ";Y
350 PRINT TAB (5,7): "RANGE: ";G + 1;" OCTAVES"
360 PRINT TAB (5,8); "NOTES: "; T
370 PRINT TAB (5,9); "ATTACK TARGET: ";AY; " '
380 PRINT TAB (5,10); "DECAY TARGET: ":DV: " '
390 PRINT TAB (5,11); "A STEP: "; AS; " "
400 PRINT TAB (5,12): "D STEP: ";DS; " "
410 PRINT TAB (5,13); "S STEP. "; SS; " "
420 PRINT TAB (5,14); "R STEP: ";RS;" "
430 ENDPROC


More with this topic


Browse by Topic:

Computing


Also featuring gear in this article


Featuring related gear



Previous Article in this issue

Microcosm

Next article in this issue

Connecting Lynx


Publisher: Electronic Soundmaker & Computer Music - Cover Publications Ltd, Northern & Shell Ltd.

The current copyright owner/s of this content may differ from the originally published copyright notice.
More details on copyright ownership...

 

Electronic Soundmaker - Mar 1984

Donated & scanned by: Mike Gorman

Topic:

Computing


Gear in this article:

Computer > Acorn > BBC Model B

Feature by Gary Herman

Previous article in this issue:

> Microcosm

Next article in this issue:

> Connecting Lynx


Help Support The Things You Love

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!

Donations for October 2024
Issues donated this month: 0

New issues that have been donated or scanned for us this month.

Funds donated this month: £0.00

All donations and support are gratefully appreciated - thank you.


Magazines Needed - Can You Help?

Do you have any of these magazine issues?

> See all issues we need

If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!

If you're enjoying the site, please consider supporting me to help build this archive...

...with a one time Donation, or a recurring Donation of just £2 a month. It really helps - thank you!
muzines_logo_02

Small Print

Terms of usePrivacy