AMC - the A'dam Music Composer    

Version 1.14
Wouter Boeke
Last updated: dec 10, 2004

Introduction

AMC is a program for composing music and playing it. It is a native application running on BeOS version 5. If the program is to be started from a terminal, then e.g. the following command can be given, where the parameter is the name of a score file:
   amc dance.sco 
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. After the script file dance.scr has been read the screen may look as follows.

If one of the play buttons is clicked then the loudspeakers connected to your computer 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. The script file can be created or modified by the built-in editor, or by your favorite extern editor.

AMC is quite different from other music software. It is especially focused on composing music, which is a very difficult endeavor. The tool tries to place 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) in one of the 2 panels at the left. 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 7 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 is selected.

The characteristics of a real-time instrument are 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.

AMC can also be scripted, using the language Scheme. A short introduction is in chapter Scripting with Scheme.


The GUI panels

The 2 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 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 score size.

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 status of the active button 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 status by pressing the shift key before clicking some button or slider.

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.

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 2nd time, or by clicking the middle mouse button.

With checkbox labeled zoom a small window with a zoomed-out view of the tune can be popped up. In this window small note delays can be introduced. See the zoom window chapter.

When the repeat checkbox is enabled, the tune until the 'end-of-tune' line will be repeated. This also works for red triangle start/stop signs. The repeating can be stopped with the stop button.

With the small blue rotary control the appearance of the score display can be modified. Normally the text instr is shown. If the text ampl is made visible, 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 active button is on).

The action performed by clicking or dragging the left mouse button can be modified by the 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 when using the buttons you can work single-handed. The five buttons with dark-blue text 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.

sel color
All notes of one color (as selected in the color panel) in the clicked score will be selected.

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.

The sign of a note (flat or sharp) is not retained, it will be equal to the key signature of the new score line. 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 will be clear 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 -31 and +31.

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.

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.

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.
Brown Also an FM instrument, like the black one. The modulation frequency can be detuned in order to create interesting sounds.
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. With slider start-amp the amplitude at startup is controlled.

This instrument a.o. can imitate a guitar or a bass-guitar.

Orange Like the red instrument: the waveform is a repeating pattern consisting of 2, 3 or 5 cycles (with varying frequency) of a sinus wave. The number of cycles as well as the frequency variation within one cycle are controlled with a two-dimensional slider labeled diff/nrsin.

This instrument a.o. can imitate a soft-sounding guitar or 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.

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 blue widgets 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 msec, not by decreasing its amplitude. The intention is mainly to craete richer sounds.

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 the AMC executable is located. A file name must start with a number between 1 and 7, end end with the extension ".wav". Of course you can use other files if you don't like the ones provided.

The checkboxes

Their functions are described elsewere. A short summary:
chords
Opens the chords window
note distances
Opens a window showing selected notes from the big score at the bottom
solo voice
Only one instrument selected in the big score
draw with color
Notes entered in a score panel will have the selected color
sampled notes
Notes entered in a score panel will be sampled instruments
create wav file
After playing the tune from the big score a .wav file will be created
create midi file
When playing the tune from the big score a midi file will be created
ignore set cmd's
Script is run ignoring set commands
connect USB midi-keyboard
See chapter MIDI keyboard

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 2nd time.

Files are conventionally saved with extension .sco. A saved file is more or less human readable. Modifications like renaming or copying of the tunes could be 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 2nd 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.

rename...
To rename the tune that is selected in the tunes panel.

up
down
The tune that is selected in the tunes panel can be moved up or down in the list.

clear
This button affects the tune of the active score panel. It will be reset. If no score is active, then hitting the clear button will reset the big score at the bottom, which is useful when commands are being used to fill it.

remove
To remove the tune that is selected in the tunes panel.

script...
After clicking this button and supplying a file name in the dialog panel a script file will be read and shown in the built-in editor. The script is executed, after this 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.

save script...
The script can be saved to a file by clicking this button. In the dialog panel a file name must be specified. If the default file name is still valid, then the button can be clicked a 2nd time.

mod timing
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. The script in the built-in editor will be modified, whereas the original script file is unaffected.

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

run script
This button should be clicked after modifications in the scores or in the script. The score at the bottom will be redrawn.

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 also for the small score panels.

Starting and stopping times can be controlled by clicking in the score panel, using the left or the right mouse button.

After the playing has stopped, sliders and checkboxes will be redrawn such that they show their final 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 script editor

The script editor is located at the right bottom of the window. It will get usable dimensions after increasing the window size. Then also becomes visible a grey area containing numbers, which indicate the measure numbers where add commands have inserted a tune.

The script editor is a simple text editor with standard key shortcuts:

alt X: cut text and copies it to the clipboard
alt C: copy text to the clipboard without cutting it
alt V: paste text taken from the clipboard
alt A: select all of the text
alt Z: undo the previous action
Also, text selection and -replacement using the mouse works. As stated, the script is executed with the run button, or saved with the save script button. When the capabilities if the built-in editor are too limited, you better use your favorite editor instead, and click the script... button afterwards.

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 syntax will be treated in chapter Scipt syntax.

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 final 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 2nd time, or by clicking the middle mouse button.

Notice that always before playing all script set commands are executed, also when the 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.

Zoomed-out score view

If a checkbox labeled zoom is enabled, then a new (sizable) window is opened depicting the score part between start and stop signs, enlarged 3 times in the horizontal direction. The timing of the individual notes can be modified such that at the beginning of a note an extra delay can be introduced, as well as at the end of a note. This way e.g. it is possible to create 3 notes in a 4-unit interval, or 3 notes in a 8-unit interval. This is demonstrated in the following screenshot.

Notice that the original unzoomed notes are not modified. Modifications in the original score become visible in the zoom window after 2 times clicking the zoom checkbox.

Editing the notes in the zoom window is simple: clicking on the start of a note with the left mouse button will introduce a delay of 1, 2, 3, 0, ... times 1/3 note unit. Clicking with the right button has the same effect at the end of the note. Clicking somewhere in the middle of a long note has a visible but not an audible effect.

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 other facilities. 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. When clicking the force key button all notes in the active score panel will get the key signature of their line.

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 a terminal, the file will be in the current directory; if you invoked AMC by double-clicking its icon, then the file will appear in the /boot/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 file is meant to be processed by other programs or instruments, or by score-printing 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
orange: midi instrument 26, guitar
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
orange: midi (channel 10) instrument 39, hand clap

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, take and take-nc
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.
If no time:n command is given, then the current time is supposed, which is defined as the latest stopping time of all tunes added until now.
rt:number Relative time: add with respect to the current time.
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. The sign of the notes is not copied, like when moving selected notes with the mouse.
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 at the beginning of a tone.

Parameters for set
Valid values
for n, m etc.
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 the current time (as defined for the add command) is supposed.
number >= 0
rt:number Relative time: set with respect to the current time.  
tempo:n Set the tempo. n > 10
black-attack:n
green-attack:n
blue-attack:n
brown-attack:n
orange-attack:n
Set instrument attack. 0 ≥ n ≥ 5
black-decay:n
red-decay:n
green-decay:n
blue-decay:n
brown-decay:n
orange-decay:n
Set instrument decay. 0 ≥ n ≥ 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: small difference, tone with a strong formant; 5: big difference, bright sounding tone). 1 ≥ n ≥ 5
2 ≥ m ≥ 4
red-startup:n Set duration of startup wave of red instrument. 0 ≥ n ≥ 5
red-start-amp:n Set amplitude at startup of red instrument.
n=0 : soft startup
n=3 : loud startup
0 ≥ n ≥ 3
green-tone:n Set tone of green instrument (0: soft, 3: sharp). 0 ≥ n ≥ 3
blue-piano:b Set a piano-like attack of the blue instrument. b = on, off
blue-rich:b Set extra harmonics of blue instrument. b = on, off
blue-chorus:b Set chorus effect of blue instrument. b = 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 ≥ n ≥ 7
0 ≥ m ≥ 7
brown-detune:n Set detuning of modulating frequency of brown instrument. 0 ≥ n ≥ 5
black-subband:b
brown-subband:b
Set FM modulation range of brown or black instrument. b = on, off
purple-start-harm:n1,n2,n3,n4,n5 Set startup harmonics of purple instrument. 0 ≥ n1 ≥ 3, etc.
purple-sustain-harm:n1,n2,n3,n4,n5 Set sustain harmonics of purple instrument. 0 ≥ n1 ≥ 3, etc.
purple-startup:n Set startup duration of purple instrument. 0 ≥ n ≥ 5
orange-wave:n,m Set waveform of orange instrument. The waveform will consist of m sinuses, which vary in frequency dependant on the value of n (value 1: small difference, tone with a strong formant; 5: big difference, bright sounding tone). 1 ≥ n ≥ 5
2 ≥ m ≥ 4
black-loc:s
red-loc:s
green-loc:s
blue-loc:s
brown-loc:s
purple-loc:s
Set stereo location. s = left, mid, right

Notice the different semantics of the time:n parameter. If it follows an add, take or take-nc command, it is valid for the whole line; if it follows a set command, it is valid for the statements behind 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

Instead of set also uppercase SET is valid.


Scripting with Scheme

The Scheme language is a powerful and much used dialect of Lisp. Most Scheme implementations are very extensive, which is not needed in our case. A small implementation called MiniScheme has been ported to BeOS, and is included in the distribution. It has been extended with 3 procedures for calling extern C++ functions.

The interface between AMC and MiniScheme is simple. If MiniScheme sends a message to AMC, then AMC will respond by sending the notes that have been selected in a score panel. Then MiniScheme makes a list of these notes, which can be processed by a user-created Scheme program. Then a new list of notes can be sent back to AMC, that will create a new tune from it, called 'from-scheme'. This tune can be renamed, modified or removed as the user whishes.

We will only show here one example Scheme program, that will create a simple bass line (arpeggiated chords) for a tune in which the important notes have been selected. The chords will always start at the beginning of a measure.

(define amc-data (list>list `(get-selected-notes)))
(define meter (cadr (assq 'meter (car amc-data))))
(define notes (cdr amc-data))
(define (sh n) (- n (remainder n meter)))
(define (n1 n) (list (+(car n) 5)   (sh(cadr n))    (caddr n) 2))
(define (n2 n) (list (+(car n) 3) (+(sh(cadr n)) 2) (caddr n) 2))
(define (n3 n) (list (+(car n) 5) (+(sh(cadr n)) 4) (caddr n) 2))
(define (n4 n) (list (+(car n) 7) (+(sh(cadr n)) 6) (caddr n) 2))
(define new-notes (append (map n1 notes) (map n2 notes) (map n3 notes) (map n4 notes)))
(list>undef `(send-notes ,new-notes))
As this is rather geeky stuff, a complete description will not be given here. If you are interested, please email. It is the author's intention to create facilities for transforming existing tunes and for automatic music composition.


Connecting a USB midi-keyboard

If a compatible USB midi-keyboard (see the README file) is available, then this can be used to generate a tune. Notice that enabling the connect keyboard checkbox for the first time will create the actual connection. If AMC was started from a terminal, then useful info will be written to this terminal. If your keyboard is not supported it still might work. When unexpected midi codes are received, then their contents will be written to the terminal.

The current BeOS implementation of USB drivers apparently is not quite perfect. The keyboard must have been switched on before AMC is started. Even then, the connection might fail, in this case simply restart AMC. While playing, irritating noises sometimes are audible, at least on my (old, slow) computer.

In order to create a tune with the keyboard it is best to first create a small, rhythmic tune, and play this with repeat enabled. Then play what you want on the keyboard, and if you're done, click stop. At that moment a new tune called "keyboard" will appear at the end of the list in the tunes panel. The new tune can be renamed, assigned to a score panel, edited, re-colored, whatever.


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 sounded 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". 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, but deploying it takes a lot of time, taste and planning. Listening for example to a human 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
Author: Bruce Cole
Publisher: Scott & Co
A more elaborate book about harmony and composing:
Harmonic Practice in Tonal Music
Author: Robert Gauldin
Publisher: 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