AMC - the A'dam Music Composer    

Version 1.12
Wouter Boeke
email: w-dot-boeke-at-chello-dot-nl
Last updated: jan 10, 2004

Introduction

AMC is a program for composing music and playing it. It is a native application for BeOS, the Be Operating System. If the program is installed correctly (see the README file), it can be launched from a terminal. If the name of a score file is given as a parameter, then this will be read at startup. For example:
   amc dance.sco 
Then dance.sco will be read. A score file contains short tunes that are to be combined into a complete piece of music. This combining is controlled by a script file which is a normal text file, created with a text editor. After the script file dance.scr has been read the screen may look as follows.

If one of the play buttons is clicked then your computer loudspeakers will play this cheerful song.

It is also possible to double-click a score file, or a script file. If script file xxx.scr is double-clicked, then first xxx.sco will be loaded if it exists. Notice that a score file gets its icon when the file is saved, whereas a script file gets it icon when it is read. If a script file must be edited instead of read by AMC, then drop its icon onto an editor icon, or call the editor via the terminal.

AMC is quite different from other music software. It is especially focused on composing music, which is a very difficult endeavor, so it is aiming at placing as little hurdles as possible on the user's road. See also the last chapter.

The entering of new tunes is done on a normal 5-bar staff (treble or bass clef), whereas the modifying and collecting of the tunes is controlled by a text file. There are 2 kinds of instruments: sampled instruments for percussive sounds, and sounds that are generated real-time. Fore each kind there is choice between 6 instruments, indicated by a color. The sound of a real-time instrument can be modified via its own control panel, that will appear when the appropriate color has been selected.

The characteristics of a real-time instrument is controlled by algorithms. So if you know how to program, then the creation of different sounds belongs to the possibilities. How AMC is controlled will be explained in the next chapter via the panels and widgets of the graphical user interface.


The GUI panels

The 3 score panels

Here you see a 5-bar staff in treble clef (the black lines) and in bass clef (the green lines). Note units can be entered by clicking the left mouse button. If a note is already present, then it will be erased. Longer notes can be entered or erased by also pressing a numeric key (between 1 and 9), or by dragging the mouse.

If the middle mouse button is used, then the note will be staccato (indicated by a shortened display of the note). If the note is staccato already it will be turned back to normal.

Sampled instrument notes are created if the sampled notes checkbox is enabled. In this case the instrument control panel (middle right of the window) will list the available sampled instruments, provided that the wave files have been read. Notice that these files are read when they are needed for the first time, so if only tunes with real-time instruments are played then the samples will never be read. Sampled notes are indicated by colored crosses. Their vertical position is irrelevant, because their frequency is fixed.

Clicking the right mouse button will create a vertical 'end-of-tune' line. This will be useful when several tunes are combined later on, because then no timing information will have to be specified in the script file. Also, this way the length of a tune can be increased beyond its initial value. To accomplish this, first use the slider to shift the view to the right, or resize the AMC window in the horizontal direction. Then extra white space at the right of the scores will appear. Clicking here with the right mouse button will increase the size of the score.

Actually the scores are extending 1 octave at the top and 1 octave at the bottom. This area can be made visible by clicking one of the move triangles.

The color of the notes is choosen by the color control panel (middle of the window), but first one score must be the active score, which is controlled by the active button in a score panel. If this button is clicked once more, then none of the scores will be active.

The amplitude slider controls the loudness of the notes, which can be overruled when the tune is used as a building block for a complete piece of music.

Notice that the active button status is relevant for several different operations, thus it can be harmful if it is on inadvertantly. Therefore it is always reset after being used. If you don't want this, you can keep the active button status by pressing the shift key before clicking a button or slider.

The tune in the score is sounded by clicking the panel's play button. It is possible to indicate the starting and stopping times of the playback. This is done by clicking the left and right mouse buttons respectivily, above the highest score line, and is indicated by small red triangles. They can be undone by clicking at the same point a second time.

A checkbox labeled disp ampl controls the appearance of the score display. If the checkbox is enabled, then the amplitude of the notes in the score is shown in an ascending shade of grey.

Usually, musical scores are preceeded by 'flat' or 'sharp' key signatures, depending on the key in which the piece is written. The key signatures are drawn in front of the score lines, see chapter Chords. If a note is entered on such a line it will be raised or lowered one semitone.

The color of a new entered note is determined as follows:
- if it is next to an existing note, it will take that note's color;
- else if the checkbox draw with color is active, it will take the active color from the color panel;
- else it will take the default color (assigned by clicking in the color panel while the score active button is on).

The action performed by clicking or dragging the left mouse button can be modified by the row of buttons underneath the score panels, see the next chapter.

Score edit buttons

Only one of these buttons at a time can be enabled. If needed, a button can be reset by clicking it again. Most buttons have key equivalents, which you normally will be using, however with the buttons you can work single-handed. The last five buttons have immediate effect.
select
If this button is enabled, then clicking somewhere on a note will select the parts of the note extending to the right. Clicking on an already selected part will de-select it. Selected note parts will get a lighter color.

Clicking outside a note will select all note parts under and above the clicked location. By dragging the mouse an area of selected notes will be created.

Instead of the select button also the S key can be used.

Selected note parts can be moved, copied, deleted, re-colored or they can get a different amplitude. Notice that the select button stays active after the mouse button has been released, whereas the other buttens will be reset in this case.

sel all
All notes in the clicked score will be selected, except notes to the right of the end-of-score line if it exists. Instead of the button also the A key can be used.

move
If this button is enabled, then the selected note parts can be moved in a horizontal or vertical direction, by clicking and dragging the left mouse button. Instead of enabling the button, also the M key can be pressed. This key should be pressed before clicking the mouse, and may be released during dragging. Notice that if a selected note is moved to a position outside the valid score area, it will be lost.

If the K key is pressed before releasing the mouse button, then the moving of selected note parts will not occur (K means 'keep').

copy
If this button is enabled, then the selected note parts can be copied in a horizontal or vertical direction, by clicking and dragging the left mouse button. Instead of enabling the button, also the C key can be used. The copied note parts will be the new selection.

Again, if the K key is pressed before releasing the mouse button, then the copying of selected note parts will not occur.

portando
Portando means sliding from one note to the next. Portando is indicated by a slanting line between 2 notes, that must be of the same color. If this button is enabled, or if the P key is pressed before mouse down, then:
- If the cursor is on a note, the cursor shape becomes a square. Then the mouse can be dragged, the cursor becomes a dot. If the cursor reaches another note, the cursor again becomes a square. If the mouse is released at that moment, then a line is drawn from the first note to the second.
- If the cursor is on a note which is the start of a portando line, then the line is omitted.
- If the cursor is not on a note, then nothing happens.
Notice that the portando data are stored in the first note, which can be seen when one of them is moved or deleted. If 2 notes are in portando, then the decay part of the first and the attack part of the second are skipped. The horizontal distance between the first and second note can be between 0 and 15, the vertical distance between -15 and 15.

sharp
flat
Whereas the previous buttons affect the selected notes of a score panel, these buttons affect only notes that have been clicked. When one of these buttons is enabled then a clicked note will be sharp or flat respectivily, indicated by small upward or downward peaks on the note. The up- respectively down arrow key has the same effect.

Notice that normal notes that differ one semitone are treated specially. For instance a B note that is made sharp will turn into a C note.

normal
When this button is enabled, notes can be set back from sharp or flat to normal. Pressing both the up and down keys has the identical effect.

unselect
Selected notes will become un-selected. This can also be accomplished by pressing the U key and clicking in the score with selected notes.

re-color
If the re-color button is enabled, then clicking will have the effect that selected note parts will get the color as choosen in the color panel.

amp +
amp -
If one of these buttons is enabled, then clicking will have the effect that selected notes will get an increased or decreased amplitude. Notice that after a modification of an amplitude slider, all notes in the score will have the same amplitude again.

delete
After clicking all selected notes will be deleted.

Tunes panel

This panel shows a list of all tunes in memory. A tune can be displayed by making one of the scores active before selecting the tune. A new tune can be added by pressing the new... button and specifying a name via the dialog panel (middle right).

Meter panel

Controls the number of note units between the vertical bars in the scores.

Tempo panel

This controls the duration of the notes. The displayed value is about the number of 2 times one note unit per minute.

The instrument control panels

When a color is choosen, and the sampled notes checkbox is off, then the control panel of the appropriate instrument will appear. If one of the scores is active, then it will be re-colored. The characteristics of the different real-time instruments are as follows.

Instrument
Description
Black An FM instrument, like the Yamaha DX7. The basic sinus signal can be FM modulated with 0.5 till 8 times the basic frequency. The modulation index can be choosen between 0 and 5. Both frequency and index are controlled with a two-dimensional slider. The modulation frequency is either an integer or a rational multiple of the basic frequency, depending the checkbox sub band.
Red The waveform is a repeating pattern consisting of 2, 3 or 5 cycles (with varying frequency) of a sinus wave. This yields a frequency spectrum with a wide formant component. The number of cycles as well as the frequency variation within one cycle are controlled with 2 two-dimensional sliders labeled diff/nrsin, one for the startup, one for the sustain part of a note.

This instrument a.o. can imitate a guitar or a bass-guitar. If checkbox soft attack is enabled it sounds more like a cello.

Green A waveform with a random quality: each note sounds slightly different. The waveform is built up from straight lines. This instrument is well suited for a solo voice, and chords can sound beautiful.
Blue Basicly a pulse. If the chorus checkbox is enabled, then a second pulse with a slightly different frequency is added with the opposite amplitude. The 2 signals cannot fully cancel each other, because they are asymmetric. With the rich tone checkbox pulses with 2 and 3 times the basic frequency can be added. If the piano attack checkbox is enabled, then the amplitude envelope will be piano-like. In this case the value of the attack slider is irrelevant.

This instrument can have a pure, floating quality, or a full rich sound if chorus and rich tone are enabled.

Brown Also an FM instrument, like the black one. The modulation frequency can be detuned in order to create interesting sounds.
Purple An additive synthesis instrument, like a Hammond organ. The sound is the sum of sinus waves with a frequency of 1 upto 10 times the fundamental, with separate controls for these harmonics during startup and sustain. Duration of the startup is controllable. This instrument can sound very nice and mellow.

The small widgets beneath the label loc control the stereo location of the different instruments. Clicking the widgets modifies this location between left, middle an right. The stereo effect is created by delaying one channel with 2 mS, not by decreasing its amplitude.

Sampled instruments

As stated before, the wave files for the respective sampled instruments are read when they are needed for the first time. The files should be present in the the same directory where AMC is located. A file name must start with a number between 1 and 6, end end with the extension ".wav". Of course you can use other files if you don't like the ones provided.

The buttons at the right side

save...
The tunes in memory can be saved to a file by clicking this button. In the dialog panel (middle right) a file name must be specified. Clicking the small ok button or hitting the enter key will perform the save.

If the default file name in the dialog panel is still valid, then also the save button can be clicked a second time.

Files are conventionally saved with extension .sco. A saved file is more or less human readable. The idea is that simple modifications like reordering, renaming or copying of the tunes is done with a normal text editor. Also other modifications like e.g. re-coloring of all notes could be done, as each parameter has a unique letter code. Tip: in your text editor, set the line wrap setting to off.

load...
Enables loading of a new .sco file. If the default file name in the dialog panel is still valid, then the load button can be clicked a second time.

new...
Clicking this button will activate the dialog panel, which will ask for the name for a new tune. This name will be added to the list in the tunes panel. If one of the score panels is active, then it will be assigned to the new tune at the same moment.

copy...
The tune that is selected in the tunes panel will be copied. The dialog panel is activated, which will ask for the name for the new tune. If this is not an existing name, then the name will be added to the list in the tunes panel.

clear
The tune that is shown in the active score panel will be cleared. If no score is active, then the big score at the bottom will be cleared.

script
After clicking this button and supplying a file name in the dialog panel a script file will be read. The result will appear in the score at the bottom. If the default file name in the dialog panel is still valid, then clicking the script button again is sufficient. An alert window will pop up if errors in the script are detected.

Also the notes of one single instrument can be processed. This occurs if the solo voice checkbox is on, using the instrument as choosen in the color panel.

If the ignore set cmd's checkbox is on, then the set commands in the script will be skipped.

mod scr
With this button the current script file can be modified such that a gap in the complete score is created, or that a part of it is removed. A new script file will be created. The original script file is still available, with a file extension ending with -old.

The position of the starting and stopping marks in the complete score controls the operation. The time:n parameter of set and add etc. commands will be modified, as follows:

If the starting mark is before the stopping mark:
All times greater or equal than the starting mark will be increased with an amount equal to the distance between the starting and stopping mark.
If the starting mark is after the stopping mark (don't mind the warning that is issued):
In case of set command: All times greater or equal than the starting mark will be decreased with an amount equal to the distance between the stopping and starting mark. All times between the stopping and starting mark will get the value of the stopping mark.

In case of add and take commands: All times greater or equal than the starting mark will be decreased with an amount equal to the distance between the stopping and starting mark. All tunes starting between the stopping and starting mark will be removed.

cmd...
The commands as listed in a script file also can be given manually, by typing them in the dialog panel and clicking ok or by hitting the 'enter' key. The 'home' and 'end' keys are working, they move the cursor to the begin or the end of the line respectively. Multiple commands can be given by separating them with a semicolon. If the command in the dialog panel is still valid, then clicking the cmd... button again will re-execute the command.

Operations that are not provided by the available buttons sometimes can be performed by giving an appropriate command. After reading the script syntax chapter the following examples will be clear.

Take tune xyz, shift all notes 4 units to the right:
take xyz time:0.4; put xyz
Take tune xyz, lower it 5 semitones:
take xyz shift:-5; put xyz
Omit notes between 1.0 and 1.4 from tune xyz:
take xyz to:1; take-nc xyz from:1.4; put xyz
Join tunes xyz and abc:
take xyz; take-nc abc time:0; put xyz

play
stop
Will play and stop the score at the bottom. While playing, some controls have an instantaneous effect (e.g. the tempo control and several instrument settings), other controls have no effect at all. The stop button works for all scores.

Starting and stopping times can be controlled by clicking in the score panel. After the playing has stopped, sliders and checkboxes will be redrawn such that they show their current value.

Oscilloscope

This panel shows 10 times the successive contents of an internal audio buffer. The length of this buffer is dependant on the setting of "Audio Settings" in the "Media" preference panel of your BeOS system. If in this panel the checkbox "Enable Real-time Audio" is on, then BeOS will use small audio buffers, which can be seen in the oscilloscope display.

The scroll button can be used to see all parts. The audio clipping level is indicated by a dotted line. By means of the checkbox labeled all a choice can be made between a detailed view, where only the first part of the audio buffer is shown, or a complete view.

The complete score

The score at the bottom is assembled from the available tunes. As mentioned before, this is controlled by a script, created by the user with a text editor. The script syntax will be treated in a separate chapter.

At the bottom of the score the names of the tunes that were used as building blocks are shown. Clicking on the play button (right middle) will start the playing. After this the appearance of all controls is updated such that they show their current value.

This score cannot be modified with the mouse, only starting and stopping times of the playback can be indicated. This is done by clicking the left and right mouse buttons respectivily, and is indicated by small red triangles. They can be undone by clicking at the same point a second time.

Notice that always before playing all script set commands are executed, also when playing starts at a later time. However, when the ignore set cmd's checkbox is on, then the set commands will be skipped. This is handy if you want to experiment with different instrument settings and also read a script.

Chords

Several standard chords can be entered easily if the chords checkbox is enabled. Then a small window pops up:
As can be seen, all available scales are listed at the left side. The columns denote respectively: the major keys, the minor keys, the number and kind of signatures, and the sequence number of the notes relative to base tone (the tonic). This last column will be updated if a new base tone is choosen.

First the base tone at the left is selected, then the desired chord at the right. If one of the score panels is active, then the chord will appear there at the left side, or after the end-of-score line if it exists. The notes are in "selected" mode, and thus can be moved or copied to the place where you want them.

The chords window offers yet another facility. When the set key button is clicked, then key signatures will be drawn in the active score panel. So if e.g. the base tone F is selected, then a flat signature will appear in front of all score lines for note B.

Note distances

In this app, note entry is done on traditional scores. For the inexperienced composer it is sometimes difficult to see the actual amount of semitones between different notes. These can be visualized by enabling the note distances checkbox. The notes between starting and stopping marks in the complete score will be displayed in a small window:
This window is closed by dis-enabling the note distances checkbox. It is updated by re-enabling the checkbox.

Creating a WAVE file

While the score at the bottom is playing, a WAVE file can be generated. This will happen if the checkbox labeled create wave file is enabled. The file name is out.wav. If you invoked AMC from the command line, the file will be in the current directory; if you invoked AMC by double-clicking its icon, then the file will appear in the home directory.

WAVE files are rather big. They can be converted to MP3 format with a suitable converter. See the README file for details.

Creating a MIDI file

The MIDI output is meant to be processed by other programs or instruments, or by printed score creating software. Enable the create midi file checkbox and press the play button. The mapping from colors to MIDI instruments is fixed. For the real-time instruments this mapping is as follows:
black: MIDI instrument 6, electric piano 2
red: MIDI instrument 25, guitar
green: MIDI instrument 41, violin
blue: MIDI instrument 1, piano
brown: MIDI instrument 5, electric piano 1
purple: MIDI instrument 17, drawbar organ
For the sampled instruments the mapping is:
black: MIDI (channel 10) instrument 36, bass drum
red: MIDI (channel 10) instrument 47, low-mid tom
green: MIDI (channel 10) instrument 38, acoustic snare
blue: MIDI (channel 10) instrument 46, open hi-hat
brown: MIDI (channel 10) instrument 42, closed hi-hat
purple: MIDI (channel 10) instrument 62, mute high conga

Script syntax

A script file (conventionally with .scr extension) consists of separate commands, each ending in a newline or a semicolon. Parameters for the commands have the form keyword:number. The comment sign is #, after this character the rest of the line will be ignored. The basic commands are as follows.

Basic script commands
take name Clear the internal score buffer, copy tune name to it.
take-nc name Copy tune name to the internal buffer without first clearing it.
add Add the buffer contents to the big score.
add name Add tune name directly to the big score.
put name If name is found in the list of tunes, then copy the contents of the buffer to this tune. If name is not found, then first create a new tune.
exit Skip rest of script
set Set parameters.

Most basic commands can have parameters. The add, take and take-nc commands take the same set, as follows:

Parameters for add and take
time:number Add at a certain time.
number has one of 2 forms:
  n - indicates the measure number
  n.m - e.g. 3.2 indicates the 2nd note-unit in measure number 3.
Multiple times are also supported, e.g. time:2.4,9 means that the tune will be added at the start of measures 2.4 and 9.
shift:n Shift all notes n semitones up (if n is positive) or down (if n is negative). If the score is in a key containing flats, then accidentals (the black keys of a piano) will be flats. If the score is in a key containing sharps, then they will be sharps.
raise:n Shift all notes n lines up or down.
ampl:n Set the amplitude to n. Values between 1 and 6.
from:n to:m Take an interval. n and m are numbers like in the time: parameter.

The set command can take many parameters. Notice that for the start of tones two different values can be specified: "attack" specifies the amplitude at the beginning of a tone, "startup" specifies the waveform.

Parameters for set
Valid values
for n, m, b, s.
time:number Succeeding parameters are valid after this time.
number has one of 2 forms:
  n - indicates the measure number
  n.m - e.g. 3.2 indicates the 2nd note-unit in measure number 3.
Multiple times are supported. The time:n parameter can be given more then once on the same line, the last read value (or list of values) is valid.
If no time:n parameter is given, then time:0 is supposed.
 
tempo:n Set the tempo. > 10
black-attack:n
green-attack:n
blue-attack:n
brown-attack:n
Set instrument attack. 0 - 5
black-decay:n
red-decay:n
green-decay:n
blue-decay:n
brown-decay:n
Set instrument decay. 0 - 5
red-start-wave:n,m
red-sustain-wave:n,m
Set waveform of red instrument during startup or sustain. The waveform will consist of m sinuses, which vary in frequency dependant on the value of n (value 1 means: small difference, tone with a strong formant; 5: big difference, bright sounding tone). 1 - 5
2 - 4
red-soft:b Set soft attack of red instrument. on, off
red-startup:n Set duration of startup wave of red instrument. 0 - 5
green-tone:n Set tone of green instrument (0: soft, 3: sharp). 0 - 3
blue-piano:b Set a piano-like attack of the blue instrument. on, off
blue-rich:b Set extra harmonics of blue instrument. on, off
blue-chorus:b Set chorus effect of blue instrument. on, off
black-fm:n,m
brown-fm:n,m
Set FM parameters. The actual values for the modulation index and for the ratio modulation/carrier frequency, are as displayed near the fm freq/index slider; they also depend on sub band on or off. 0 - 7
0 - 7
brown-detune:n Set detuning of modulating frequency of brown instrument. 0 - 5
black-subband:b
brown-subband:b
Set FM modulation range of brown or black instrument. on, off
purple-start-harm:n1,n2,n3,n4,n5 Set startup harmonics of purple instrument. 0 - 3
purple-sustain-harm:n1,n2,n3,n4,n5 Set sustain harmonics of purple instrument. 0 - 3
purple-startup:n Set startup duration of purple instrument. 0 - 5
black-loc:s
red-loc:s
green-loc:s
blue-loc:s
brown-loc:s
purple-loc:s
Set stereo location. left, mid, right

Notice the different semantics of the time:n parameter. If it follows an add or take command, it is valid for the whole line; if it follows a set command, it is valid for the statements after it.

The colors in statements after a set command can also be stated differently. As an example: the line

  set red-soft:on red-startup:1 red-decay:2
can also be written as:
  set red soft:on startup:1 decay:2

Issues

Hardware requirements

Real-time sound generation as implemented in this app needs a lot of processing power. When too much voices are active at the same moment your computer might be unable to perform all calculations in time, resulting in ugly gaps in the generated sound. The given examples should be handled correctly on a 350 MHz machine.

The number of voices that can sound at the same moment is restricted to 10 (which can easily be modified in the source code). If this number is exceeded then a warning is issued. Notice that a note that is in its decaying phase still occupies a voice, so if short decay values are choosen then more notes can overlap.

The GUI

As you may have noticed, the graphical user interface is not very standard, which may be a hurdle for new users. However, the app is intended for "power users", to which I reckon myself. Composing music is not an easy endeavour, and getting used to an uncommon GUI should be the easy part of the job.

If you want to do something that's not possible, e.g. assign a note color while no score panel is active, then simply nothing happens. And if you try to quit the app after extensive modifications of the tunes without hitting the save butten, then no warning whatsoever will stop you.

Musical quality

To be honest, it is clear that a lot more control of musical content would be needed to create a really pleasant listening experience. In big commercial apps like Cubase or Logic this control is available and takes a lot of time, taste and planning to deploy. Listening for example to a real jazz ensemble will reveal that this musical beauty never will be reached artificially. However, AMC is probably fit for trying out musical ideas, and for experimenting with different sounds and combinations thereoff. After manual or automatic translation towards regular music scores, a composed piece could be played by real musicians.

If you cannot read scores or you do not know the fundamentals of harmony then AMC probably is of little use for you. However, composing is something that can be learned, and it's quite rewarding. A nice and practical book about composing:

The Composers Handbook
by: Bruce Cole
Scott educational publications
A more elaborate book about harmony and composing:
Harmonic Practice in Tonal Music
by: Robert Gauldin
W.W.Norton & Company
On-line several smaller or bigger tutorials can be found, e.g. about chords and chord-progressions:
www.rpsoft2000.com/rps_musicinfo.htm