Magazine Archive

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

When Is A Computer?

Article from One Two Testing, January 1985

jankov keyboard program


Can a computer really be 'played'? With a few typewriter-type rearrangements the answer be yes. Andy Honeybone explains how.

Paul von Janko invented a keyboard. It was not the familiar piano layout but an ingenious alternative designed to make piano playing an easier and far more rational process. And where is our MIDI equipped Janko Keyboard today? OK, the invention was not exactly a resounding success but let's first look at what it had to offer.

The keyboard covered the standard seven and a bit octaves by using six rows of almost square keys. The keys were vertically aligned with the second, fourth and sixth rows offset by the width of half a key. Each row produced a whole tone scale — the 1st, 3rd and 5th gave C, D, E, F sharp, G sharp, A sharp, etc and the 2nd, 4th and 6th rows C sharp, D sharp, F, G, A, B, etc. A chromatic scale was played by alternating between adjacent rows. There was a marked similarity with a typewriter keyboard — hence the link with this month's software project, to convert the BBC micro into a Janko keyboard 'synth'.

The logic behind the Janko key pattern is that all scales, intervals and chords have the same 'shape' regardless of starting position. It is to the piano what the barre chord is to the guitar. Major scales are always three notes on one row, four notes on the row above (or below) and the final note on the row on which you began. Fingering is therefore standardised and all chords of the same type (ie major, minor, etc) are the same shape. Other benefits are that vast note spans can be managed with small hands and, because each note appears in triplicate, alternative fingerings are possible to suit the player.

Reasons for the failure of this philanthropic scheme are many but primarily boil down to the fact that the establishment is a rather large body to take on single-handed. Conservatism aside there were mechanical problems — each key was connected to two others and the leverage was not very favourable. A further proposal was that a difficult piece of music would be robbed of its power to excite if made easier to play. Sounds like a case of vested interest to me.

Whatever the reasons for its disappearance, Janko's 1882 invention should not be forgotten and so here is your chance to try a four row, three voice polyphonic simulation.

First of all the program should have been written in machine code but as this would be gibberish to all but a few spotty boys with glasses BASIC has been used to give the rest of you (and me) a fighting chance of understanding what the hell is going on. This choice also demonstrates that BASIC is rather slow and has the effect of reducing the key response to that of a reed organ. On the topic of coming clean, it should be noted that the BBC was never designed to have some nerd pressing six or more keys simultaneously and, as a result, some glitches will occur. The program amply demonstrates the Janko layout and the polyphonic note priority scheme, but don't expect blood.

To start, the array KEYVAL% is filled with the INKEY values which correspond to the Janko pattern. The procedure PROCscan takes each of the values (two at a time) and tests to see if a particular key is held down. Now things begin to get involved.

At this point we need to know what the state of the keys was on the last scan. If the key is down on the present scan but was not detected on the previous scan then a note must be started. If the key is not down on the present scan but was detected previously, the key must have been released and so action must be taken to chop the note. Finally, if a keydown is detected and that fact has been previously recorded, no further action is required. Hence a memory is required for each note and this is provided by the array IVORIES%. A simple code is used such that the two least significant bits carry the channel info (1, 2 or 3) and the most significant bit of the byte is set high (+128) if a note is sounding. Zero indicates that the key has been released.

The rest of the program has to deal with assigning the 3 available sound channels to the key presses. If a fourth note is held down, the first note to have been pressed must be turned off and the channel re-allocated to the note last pressed. When a key is released, the priority of the remaining channels has to be adjusted so that the channel used for the sound just terminated is allocated to the lowest priority and will be the first used to sound a new note.

Three integer variables, high %, mid% and low%, hold the three channel numbers in the priority order. The BBC's SOUND statement has four parameters: first is the channel number; second, the volume; third, the pitch; and last, the duration. When a note is started it is given a negative duration value which keeps the note going continuously. The note is stopped by writing a command which includes 16 added to the channel number and a zero duration value. This hocus pocus flushes the jammed generator.

The procedure PROCupdate handles the initiation of a new note. First it has to check through the key memory to find which currently sounding note is on the lowest priority channel. If the note was playing, its code is changed to "held but not sounding" by erasing the most significant bit. The memory slot for the new note is then marked as sounding and the priority order is shuffled around. The procedure ends by starting the new note, the pitch being given by an offset (53 = middle C) + the note number (KEY%) which has to be multiplied by four as the BBC sound generator increments in quarter tones.

The complement of PROCupdate is PROCkeyoff. The channel number used by the released key is extracted from the key memory by masking all but the lowest two bits. The priority order is then stirred around according to the position of the released note's channel. The remaining task is to turn the sound off with the sound flush bit set and then mark the key memory with a zero to indicate keyup.

The listing comes in two sizes this month — one to type in and one to read. The compacted version occupies fewer line numbers and runs faster but is almost unintelligible. Should you so wish, it's fun to display the key memory IVORIES% as you play along but this slows the thing down to a yawn inducing pace. Such is the price of knowledge.

If, like me, you are intimidated by "standard" keyboard layouts crammed onto QWERTY keys, you will really get on well with the Janko. It would be really something if all the micro music packages gave the Janko as an option, but perhaps they don't know of it. Remember where you read about it first.

(Click image for higher resolution version)


(Click image for higher resolution version)


More with this topic


Browse by Topic:

Computing



Previous Article in this issue

Playback

Next article in this issue

Heroes


Publisher: One Two Testing - IPC Magazines 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...

 

One Two Testing - Jan 1985

Topic:

Computing


Feature by Andy Honeybone

Previous article in this issue:

> Playback

Next article in this issue:

> Heroes


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 January 2025
Issues donated this month: 0

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

Funds donated this month: £22.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!

Please Contribute to mu:zines by supplying magazines, scanning or donating funds. Thanks!

Monetary donations go towards site running costs, and the occasional coffee for me if there's anything left over!
muzines_logo_02

Small Print

Terms of usePrivacy