Dr T'S Tunesmith
Software for the Atari ST
When the conventional approaches to composing music wn't deliver the goods, this Atari ST program may help provide the inspiration. Ian Waugh investigates computer-generated music.
The search for inspiration goes on - and to help, Dr T have a program that will generate tunes for you. But can machines write music?
EVER HAD THE feeling computers are taking over? I mean, apart from swallowing your cash dispenser card and threatening to cut off your telephone if you don't immediately pay an outstanding bill, do you ever wonder about the effect they are having on you as a musician?
While most musicians agree that MIDI and computer-based sequencers are 'a good thing', where do computers get the audacity to believe they can actually compose music?
No, I don't know either, but yup, you guessed it, Tunesmith is another in a growing range of composition programs. It's subtitled The Interactive Algorithmic Phrase Generator, and comes from the prolific compiler of Dr T's. It was written - code and book - by Jim Johnson, the guy who wrote the Fingers manual (reviewed MT, October '88) so I braced myself for a deluge of interactive, series parameter control icons - invisible ones at that. But perhaps someone has had a word in Uncle Jim's shell-like (or maybe he took the review to heart) because much of the jargon in Fingers is thankfully missing here.
Tunesmith, however, it very numerically orientated and, although it does sport arithmetic icons (this just means you click to the left or night of a parameter to alter it), both the program and the manual are relatively easy to understand.
The review copy was version 1.05 and operates in high and medium resolution. It will run as a stand-alone program or as a module within Dr T's MPE (Multi Program Environment). It's not compatible with the blitter chip (anyone got a Mega ST?).
What does Tunesmith do? Well, it composes themes and variations. It contains three basic modules - the Theme and Variations Generator is used to create themes and variations; the Accompaniment Generator converts the theme data into MIDI music and derives accompaniment parts (harmonies, counter-melodies and so on) from the theme and the Arranger it used to string everything together to produce longer sections of music much as a sequencer lets you build up a song from individual tracks.
LETS GENERATE A few themes. Tunesmith can score five themes each with three variations. The themes are called TA (for Theme A), TB, TC, TD and TE and the variations are VA1, VA2, VB1, VB2 and so on. You can see them in the Themes & Variations panel centre right of the screen.
Musically, themes and variations are the same, the only difference is the way they're generated (coming up). You select a theme or variation for playing by clicking on it with the left mouse button. Clicking on it with the right button wipes the old theme and generates a new one.
So how is a theme generated? Simply, it's the result of random number generation, but the numbers are squeezed and tempered to conform to the settings in the Theme & Variation Parameters panel at the top of the screen. As these determine the nature of the music, your close attention to the following paragraphs is requested.
The first parameter, Microbeat, is the smallest rhythmic unit expressed in terms of clocks at 24 clocks per beat. Theme Length is the length of the theme expressed in microbeats, and Pulse determines where the accents will fall and which probability table will be used to select the pitch at any given point in the theme.
Together these determine the length and pulse of the theme. For example, a microbeat of six (which corresponds to a 16th note at 24 steps per beat) and a theme length of 32 will produce a theme two bars long.
The Rest Probability determines the percentage chance of a rest occurring within a sequence.
BELOW THESE ARE the Rhythm Algorithm and Variant parameters. Rhythms are assembled from rhythmic fragments called microrhythms. There are six types of rhythm algorithm, and to give you an idea of the intricacy of rhythm generation, I'll describe algorithms one and two.
These construct a rhythm using the same algorithm as that used to create the microrhythms (the exact details of which the author has decided to keep secret). The Variant sets the number of microrhythms used - a large number results in lots of microrhythms and less consistency, while smaller numbers lead to fewer microrhythms and less variety. Algorithm one has more respect for the beat than algorithm two.
The other rhythm algorithms juggle with the microrhythms and variant value in slightly different ways.
Moving on, we come to the parameters used to determine the pitches generated. First Note determines which step of the scale the theme starts on. Pitch Loop determines the number of notes which will be generated before the pitches repeat (large numbers will lead to non-repeating sequences) and High and Low Note set the upper and lower note limits. Don't forget, most good melodies fall within an octave span.
Maximum Step Size and Maximum Leap Size determine the interval between notes. The largest possible interval is the Maximum Leap Size. If the interval generated from one note to the next is more than a Step then the next interval is forcibly restricted to the Step Size.
This is a clever way of allowing the generation of reasonably large intervals (and unreasonably large intervals if you so wish), while maintaining a semblance of sanity by preventing one giant leap following another.
Maximum Repeats determines how many times a single note is allowed to repeat.
Onbeat Scale Weight and Offbeat Scale Weight are used to select two probability tables which determine the pitch of the notes on the on-beat and off-beat. These are crucial in determining the theme's character and you can define scale weight tables of your own.
What do you get when you put them all together? Anything from the ramblings of a mad random number generator to reasonably cohesive strings of melodic phrases. Theoretically, each group of parameters should produce themes with a similar flavour. To an extent they do, but some parameters have a greater effect on the theme than others, so the character of a set of parameters is not always obvious. Settings which permit wildly random themes are going to sound pretty similar anyway.
The program generates the rhythm and pitches separately and then imposes one on the other. Human composers, I believe, consciously or unconsciously, tend to develop the rhythm and pitch of a phrase together as one often has a direct bearing on the form of the other. I imagine this would be extremely difficult to implement in a computer program in a musical way, but Tunesmith does lett you alter one without altering the other. As we shall now see.
TIME FOR SOME tweaking - this is where the variations come in courtesy of the last three parameters in the Theme & Variation Parameters panel.
Whereas a theme is created from an empty palette (under the guiding brush of the parameters), the variations each use their respective theme as a starting point. The Rhythm and Pitch Variation Algorithms select algorithms which will be applied to the existing theme. These involve swapping, replacing and deleting microrhythms from the rhythm pattern and regenerating, inverting and reversing pitches. The resulting differences an be blatant, subtle or non-existent.
The variations are not variations in the classical sense; perhaps that's asking too much at this stage in the development of compositional programs. For example, a musician may produce a variation on a theme by embellishment, adding passing notes or removing nonessential notes - not to mention improvising around the notes of the chord which underpin the harmony of the phrase. The inversions, deletions and reversals applied by the program do not result in a thematic development but, rather, produce thematic differences. And they are not based on an harmonic (chord) progression.
Enough of the heavy stuff. As long as you realise you're not going to get an instant set of Enigma Variations you shouldn't be too disappointed.
Themes and variations can be copied so if you hit upon a theme you like you could copy it to the other four theme positions and create 15 variations of it.
Tunesmith thoughtfully provides you with 26 presets (centre left in a box labelled T&V Parameter Presets) in which to store the settings you make in the Theme & Variation Parameters panel.
ONCE YOUR THEME is up and running you can alter it in several ways. In fact, now's the time to come clean and tell you what Tunesmith has been doing so far. It hasn't really been selecting notes from a scale, it's been selecting "degrees" which an be applied to any scale. Hold on, it's not complicated. For example, the third degree of a major scale (say C) is a major third (E) and the third degree of minor scale (say C again) is a minor third (Eb). So the actual note produced by playing the "third degree" of scale depends upon the scale in use at the time.
Tunesmith contains 46 user-programmable scales which are selected by pressing one of the four rows of QWERTY keys. The first 38 are said to correspond to the scales in traditional music theory (my scale education stopped rather short of this number). However, each scale consists of only seven steps and is therefore simply a combination of the notes found in our Western octave. The more common scales are named, for example, Major, Ascending Melodic Minor, Hungarian, Oriental and so on.
You can change mode by pressing one of the function keys. This determines the starting note of the scale. For example, the second mode in the key of C major (Dorian mode) starts on D giving this scale: D E F G A B C D.
"Tunesmith is capable of producing anything from the ramblings of a mad random number generator to reasonably cohesive strings of melodic phrases."
Finally you can change key and octave using the numeric key pad.
The sheer number of possibilities appears overwhelming at first but the manual contains useful hints and tips for applying scale and mode changes. Basically, don't throw everything into the pot at once.
The central panel shows which scale, mode and theme and so on, is currently playing and the Left display counts each sequence down so you know how long it has to run.
SO FAR WE'VE covered the theme generation side of Tunesmith. Now let's dip down to the Accompaniment Generation panel which occupies the bottom third of the screen. This gives you control over Tunesmith's six voices.
The first eight parameters here are probably the only ones in Tunesmith which are self-explanatory. For each voice you can set the MIDI Channel, Program Number, Octave, Velocity, Accent, Articulation (staccato vs legato) and Delay. All parameters can be altered on the fly to take effect immediately or at the end of the current theme. Accompaniment settings can be saved to the 26 Accompaniment Presets in the centre panel.
The first voice always plays the theme. Voices two to six have a further four parameters (shown on the right of the panel) which determine how they will differ from the theme.
Rhythm selects one of 12 algorithms which plays accompanying notes where a pulse, accent or rest occurs in the main theme. This part of the manual is excellent and includes musical examples - in traditional notation - of the effect of each algorithm.
The Divide setting divides the number of notes by a constant (or, in some cases, a random) value. For example, a Divide value of 2 will halve the number of notes played.
The Harmony and Tran (transpose) settings are similar to Rhythm and Divide but are applied to the pitches. There are 11 harmony algorithms including parallel harmonies, random harmonies, contrary motion, inversion and arpeggios. Musical examples of these are given in the manual too.
There are also five Drum Algorithms which use tables to assign drum sounds to notes. They also ensure that drum patterns don't get transposed (ever done that in your sequencer?).
The harmonies add depth to the theme. It's possible to create counter-melodies but I got more mileage out of creating rhythmic chordal backings to themes. Careful selection of the rhythm algorithm can create a variety of basslines, too.
When you've generated some interesting themes, tonalities and presets, you can use the Arranger to link them together.
A click on the Arranger button substitutes the Arranger window for the Theme & Variation Parameters panel. An arrangement is simply a list of themes and variations. If you've constructed a song in a sequencer from a series of tracks, this will be easy.
THERE ARE SEVERAL Help screens which list the algorithms used by the program along with the functions of various control keys on the keyboard. The screens don't explain how to use the program and you won't get much out of Tunesmith until you read at least the tutorial part of the manual.
If you think the range of parameters described so far is impressively comprehensive there's more. The Set Options window lets you set operating options relating to MIDI, keyboard and mouse control and, yes, even more settings to determine various aspects of Tunesmith's performance.
From the menu option you can select various probability tables for editing, reassign MIDI channels, send MIDI messages and load and save presets, tunes and arrangements (there are six different sections of the program you can load and save).
Tunesmith's musical output can be saved as a Dr T's KCS-compatible file and a Convert program is supplied on the disk to convert this into a MIDI format file.
Several demo files are supplied and some are quite impressive. I almost forgot to mention the Notepad facility which you can use to store setup details - or anything else. Very useful.
Tunesmith locked me out twice. I admit I had a dongle in my ST but it has never caused problems before. I mention it because is happened, although I'd be reluctant so give Tunesmith all the blame.
Finally, Dr T's are intending to release a language package called T-Basic - what else -. which will let you create your own programs which will run in the MPE. It won't allow direct access to Tunesmith but you will be able to use it to crease compatible files.
I KNOW WHAT YOU'RE dying to ask - how do Tunesmith and M compare? The output of both programs often seems to be similar.
I must admit a personal preference for M's graphic design. I like being able to input my own raw material and I have used M to produce several pieces of music.
Unfortunately, you cannot enter your own material into Tunesmith and this is my major disappointment with the program. You can, however, import KCS sequences into it (this was a last-minute feature and you need to read the .DOC files to discover this) but not everyone has Dr T's KCS.
It's all very well working with computer-generated material, but how much more useful it would be if you could set the variations generator to work on your own themes. Perhaps an update, Jim?
The basic difference can be summed up like this: M's output is formed by manipulating your input while Tunesmith's output is formed by the parameters you select. You don't have quite so much control over the melodic or rhythmic source material in Tunesmith although there is enormous scope for applying note, scale, modal and rhythmic changes to it.
Jim Johnson says he wrote Tunesmith specifically for use within Dr T's MPE and adds that the music creased by the program should be treated as raw material for final shaping in another sequencer. And I wouldn't disagree.
The nice thing about Tunesmith is that you can create music just by pointing and clicking at a few parameters.
THERES NO DOUBT that Tunesmith is a well-crafted, well-designed and well thought-out piece of software. I found it absolutely fascinating. It won't churn out a pop or rock song - neither will any other composition program I've seen - but it is capable of producing riffs which could be used in either. It's up to you to create/discover/invent the best combination of parameters.
For anyone interested in the process of composition it offers an insight into the way rules can be applied by a computer in order to produce music. The experimental musician will love it - and you don't need a PhD in higher mathematics to use it. If you are of a non-traditional bent, look upon it as a compositional aid - as the designer intended - and it could well act as a spur when ideas are low.
Price £135.00 including VAT
Review by Ian Waugh
Previous 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!