Copyright (C) 2000, 2001 by Chris Willing and Pierre Saramito. All rights reserved.
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
The TK-707 installation requires:
and, at least one of these MIDI renders:
timidity
software
MIDI sequencer installed.
Clearly, if you have neither a MIDI card nor an external MIDI module, you can successfully manage MIDI files by a MIDI software sequencer. See below.
So far tested on
tk707
configure make
The program consists of Tcl/Tk for the gui and C code for outputting
the midi data.
The Tcl/Tk code is compiled with the C code.
The compiled target tk707
is a self contained binary.
During the configuration step, you could also provide
to the configure
script some
non-standard locations of the Alsa or Tcl/Tk libraries:
configure --with-alsa-prefix=/usr/sound/lib \ --with-alsa-inc-prefix=/usr/sound/include \ --with-tcl-includes=/new/include --with-tcl-libs=/usr/new/lib \ --with-tk-includes=/usr/new/include --with-tk-libs=/usr/new/lib make
Enter configure --help
for a complete list of available options.
It could also be useful to send compiler options to the
configure
script.
CFLAGS="-O0" configure make
Indeed, by default, gcc
compiler
optimization flags are set to the maximum, i.e -O9
. This
is not supported for old gcc
versions, where this feature
failed on some combinations of Linux kernel versions and gcc
version (e.g. Mandrake with kernel Linux-2.2.13-7mdk
and
pgcc-2.91.66
). Either update our environment or use lower
optimization flags.
make install
The default installation directory is `/usr/local/bin' but this can be changed by using an extra configuration option:
configure --prefix=/users/angela/music make install
will build and install tk707
into the installation directory
`/users/angela/music/bin' as tk707
.
If installation was done as in previous step, and assuming the installation directory is in your execution path, then the program is started with
tk707
A sample song is in `demo.dat' which can be
loaded from the File->Load Demo
menu. After loading, click the START
button and you should hear something if your
hardware is set up correctly.
When tk707
is first started, a suitable output port needs to be selected.
A selection gui comes up before the main TK-707 window to make this choice.
The list on the right hand side should contain one or more entries from
which to choose (don't worry about the input port list on the left).
Double click on the available output port you want to use, and it should
be entered into the Selected Output box near the bottom. Now you can
click on the OK button to use the selected output port for this invocation
of TK-707. You can also click the SAVE button first to save this information
(in `~/.tk707rc') so that you don't need to make the selection next time you
run TK-707. Note that `~/.tk707rc' is a plain text file which can be edited
by hand if you want to.
Alternatively, if you know what port you want to use, run tk707
with
the -p
option, e.g.
tk707 -p 65:0
Use of the -p
option overrides any setting in the `~/.tk707rc' file.
A list of suitable ports can also be obtained with the -l
option, e.g.
tk707 -l
The documentation in `.info' format, suitable for emacs, is contained in the distribution. You can browse it:
info -f tk707.info
If you have the texi2html
tool, the html
version has been generated during the installation:
netscape tk707_toc.html
If you have TeX installed, a pretty version of the documentation is available:
make dvi xdvi tk707.dvi
dvips tk707.dvi -o tk707.ps lpr tk707.ps
Now, read the documentation and enjoy tk707
.
We are keen for people to try it and send comments and suggestions.
Please, send comments, corrections, additions, bugs etc.. to chris@vislab.usyd.edu.au and pierre.saramito@imag.fr
Future versions from the TK-707 home page:
Don't worry, you are able to hear midi file with
a basic audio sound card:
the timidity
code is able to
provides an Alsa sequencer interface which receives
events and plays it in real-time.
timidity
is a public domain code available
at http://www.goice.co.jp/member/mo/timidity.
On this mode, timidity
works
purely as software (real-time) midi render.
There is no scheduling routine in this interface,
since all scheduling is done by Alsa sequencer core.
So, download timidity
(at least version 2.10.0)
and install as follow:
configure --enable-server --enable-alsaseq --enable-alsatest \ --enable-audio=alsa,wav,au,aiff,list,oss make install
timidity
software emulates the best sound cards.
It requires some Gravis Ultra Sound (GUS) patches describing musical
instruments.
The public domain EAW sound patch suite can be downloaded at
http://www.stardate.bc.ca/eawpatches/html/default.htm
This his a complete and high quality library,
updated frequently.
Especially, download the gsdrums
percussion instrument library.
Install these files in the timidity
directory,
usually /usr/share/timidity
.
For invoking Alsa sequencer interface, run timidity
as follows:
timidity -iA -B2,8 &
The fragment size can be adjustable. The smaller number gives
better real-time response. Then timidity
shows new port numbers
which were newly created (128:0 and 128:1 below).
Finally, run tk707
:
tk707 -p 128:0
The timidity
render is very flexible and rich, since you
can add any instrument in your library by using GUS patch files.
This modular approach is not always supported by all hardware
renders.
Thus, the software MIDI render solution is fruitful,
and could be installed, even if you have a hardware or
external MIDI solution.
Four song tracks are available. You can think of a track as a song. Tracks are labeled by roman numbers: I, II, III and IV.
Each track is made of patterns, each with 16 steps.s You could think of a pattern as a bar of music. At each step in a pattern, any of the available instruments can be set to play. Once you've made the patterns you want to use, you can combine them in any order into any of the four available tracks. Any particular pattern can be used in any of the tracks as many times as desired.
There are 64 patterns available in 4 groups of 16 each. Pattern groups are labeled by letters: A, B, C and D. The 4 groups are not at all related to the 4 tracks. Patterns from any group are available to any track.
Some sample patterns and tracks are in `demo.dat' which can be
loaded from the File->Demo
menu. Something exists in each track of this
file so click the START button and you should hear something if your
hardware is set up correctly. Part of this set up is the midi channel;
the default midi channel is 10 (the default for D-110 drum sounds). You can
change the output midi channel via the Midi menu or Shift-click on the
MIDI CH button; a new window will appear for midi channel selection.
A second demonstration file shows the alternate 727 latin sound
map. With this sound map, the software emulates a Roland 727
latin percussion rhythm composer.
Loaded from the File->Demo
menu the file `son-montuno.dat',
and then load the latin percussion sound map `727.map' from
the Map->Load Standard Sound Map
menu.
Set also the tempo to 200 bpm.
Then, click the START button.
An alternate sound map for latin percussion is `7c7.map'.
The c
in 7c7
stands for cuba(1).
can be loaded in the Map->Load Standard Sound Map
.
This file has no Roland latin percussion rhythm composer equivalent,
and has been designed for our pleasure. Click the START button
and you will hear the file `son-montuno.dat' with another feeling.
Finally, a brazilian sound map `7b7.map' is presented.
The b
in 7b7
stands for brazil(2) and
can be loaded together with the `carioca.dat' demonstration.
A good tempo is 220 bpm for the samba carioca.
There is no more demonstration file for these sound maps, since it is time for you to compose your music !
Shift-click the PATTERN button to enter Pattern Write mode. While START is not pressed, the 16 instrument/step keys at the bottom of the interface are dual purposed.
Clicking on a key changes which pattern, 1-16, (within the current group) is selected for writing. A small lamp above one of the group pattern buttons indicates the current group. The current group may be changed by clicking group pattern button A, B, C or D.
Shift-clicking on the instrument/step keys selects which instrument is selected to be written into the current pattern. Click the START button; now as you click of the instrument/step keys, the selected instrument, e.g. Cowbell, will be added at that step. If the selected instrument has already been set at that step, then clicking there will remove it. To select another instrument, press the STOP/CONT button then select another instrument using Shift-click on the appropriate instrument/step key.
Continue adding instruments at the required steps to complete the pattern. Make all the patterns you will need for a new song.
A pattern may be cleared of all notes while in Pattern Write mode; clicking on the CLEAR button will raise a dialog window to confirm clearing of the current pattern.
Another method of creating new patterns is to copy an existing pattern and pasting it to a new location, then modifying the new version. This is an efficient method of creating a number of patterns which are small variations of each other. Select the pattern to be copied and press CRTL-C (CONTROL key and C key together).
Now select a new (empty?) pattern location and press Ctrl-V or Ctrl-B to paste in the copied notes.
Using Ctrl-V will clear the destination location of any notes it already contains whereas Ctrl-B will merge its current contents with the new note information.
The third method uses the pattern display grid. Double-click near an instrument/step intersection to add the instrument at that step. If the instrument already exists at that step then it is deleted. This is probably the easiest way of creating patterns.
Click the PATTERN button to enter Pattern Play mode. While the START button is depressed, the currently selected pattern will play. Clicking on different pattern keys at the bottom of the interface will select a new pattern (1,..,16) in the current group. If not currently playing, the new pattern is displayed immediately. If a pattern is already playing, the new pattern will play when the current pattern is finished.
Selecting a different group also changes the current pattern, i.e. if pattern 7 in group I is selected, then when group 2 is selected the new pattern will be pattern 7 in group II. Sixteen patterns are available in each of the four groups for a total of sixty-four patterns.
Shift-click the TRACK button to enter Track Write mode.
To start from an empty track, delete anything already there (Shift-click on the CLEAR button) if necessary. Now select a pattern to add to the track and click on the enter key as many times as that pattern is required. Then select the next pattern to add and click on the enter key as many times as that pattern is required.
E.g., selecting pattern 3 and clicking on the ENTER button 4 times, then selecting pattern 9 and clicking on the ENTER button 2 times will result in a track of six measures - 4 of pattern 3 followed by 2 measures of pattern 9.
Changes to a track being created can be made. See section Editing tracks.
The currently selected pattern can be heard playing if the START button is clicked. This enables an audible preview of selected patterns prior to adding them to the track.
Shift-click the TRACK button to enter Track Write mode.
Track editing is only possible in Track Write mode.
Deletions of tracks (or parts of them) require confirmation (via a dialog window).
Shift-click on the CLEAR button deletes all of the current track.
Ctrl-click on the CLEAR button deletes the current measure from the track.
Shift-Ctrl-click on the CLEAR button deletes the rest of the current track, including the current measure. On some systems (including mine!) this actually requires the Ctrl key as well i.e. Shift + Ctrl keys + mouse click. Consider this a minor bug to be fixed sometime.
Adding patterns to a track involves selecting a pattern then a click or Shift-click on the ENTER button. Think of Shift-click on ENTER as an insert operation into the track before the current measure. An ordinary click on ENTER is actually a replacement operation i.e. it will replace the current measure with the currently selected pattern. However if you're at the end of the current track this behaves like an append operation - it adds new measures to the end of the track.
The currently selected pattern can be heard playing if the START button is clicked. This enables an audible preview of selected patterns prior to adding them to the track.
Different parts of the track can be accessed by clicking on the BACK and FWD buttons. Shift-click on the LAST MEAS button to go to the end of the track. Note that this goes to the measure just past the end of the track (ready to write the next measure). An ordinary click on the LAST MEAS button will momentarily show the last (+1) measure while the button is held down.
Click on the TRACK button to enter the Track Play
mode.
Then click on the START button and the current track will be
played.
Select another track, e.g. track IV, by Shift-clicking a the corresponding track button: Shift-IV. Then enter START for playing the song.
The tempo may be changed in either Track or Pattern mode. The tempo is lowered by Clicking in the tempo dial and then Click-Dragging around. It its increased by Click-Dragging to the left from the tempo dial; its increased by Click-Dragging to the right.
Tempo changes can't be written into a track. If saving a track as an midi file, the whole track will have whatever tempo is selected at the time of saving.
Currently only single track Midi files can be exported. When the
Midi File->Save
is selected a file browser appears into which the name
of the file is entered. Its not crucial but it is a convention to
have a `.mid' ending on the filename. When a name has been nominated,
the current track will be exported, including midi channel and tempo
information i.e. make sure these have the values you want first.
Tempo changes can't be written into a track. If saving a track as an midi file, the whole track will have whatever tempo is selected at the time of saving.
Volume controls are used when saving a midi file: master, accent and volume controls associated to instruments.
TK-707 sound maps are mappings of the 16 instrument keys to descriptions of their long names, short names, abbreviate name and midi note values. The first (longer) names are used in the pattern grid display, while the second (shorter) names are used under the 16 instrument keys and abbreviations are used under the volume controls. The midi note values need to correspond to values recognized by the sound module being used with TK-707 (either external or built into a sound card). Appropriate values will need to be gleaned from your hardware documentation, however the built in values should work on any module conforming to the General Midi standard.
The built-in sound map is supplied as an example in the `707.map' file. A second file, `727.map', is supplied and can be loaded to play with the sounds of Roland's TR-727, the latin percussion counterpart of the TR-707. Note that the 727 mapping won't work on a 707 because it doesn't recognize the necessary range of midi note values. It will work on modules (such as Roland D-110) which do recognize the necessary range.
Files with similar layout to the supplied `.map' can be constructed using a
text editor and loaded into TK-707 from the Map->Load Local Sound Map
menu.
Alternatively, the currently loaded sound map can be edited via an editing
interface which is accessed from the Map->Edit Sound Map
menu. Just change
the name, short name and midi note values as required and press the APPLY
button to apply the new settings to TK-707. The Cancel button will revert
sound setting to whatever they were before the editing window was started.
The OK button will apply the currently edited settings and close the
editing window.
As new midi note values are entered for an instrument, the sound that they access in the midi sound module can be previewed using the TEST buttons. To speed the process of finding suitable sounds, three keyboard/mouse shortcuts are provided:
Any editing of sound maps are lost if TK-707 is closed down without saving
the sound map. A sound map can be saved using the Map->Save Sound Map
menu
item. A file suffix of `.map' is recommended (but not absolutely required).
This feature is related to fast figures and 6/8 figures.
Four scales are available on each pattern. Click on the SCALE in Pattern Write mode for changing the scale of the current pattern. A small lamp on the left of the musical score score indicates the current scale. For each scale, a vertical bar indicates the duration of a whole note.
On the first scale, the whole note duration is decomposed into sixteenth. Each sixteenth is associated to the a step of the pattern. There is 16 sixteenth in the pattern if the last step is set to 16, and then the total duration of the pattern is those of a whole note.
This is the default scale when creating pattern associated to a 4/4 measure.
For the second scale, the whole duration is decomposed into eighthes. Each eighthes is associated to a step of the pattern. When the last step is set to 16, there is 16 eighthes in the pattern, and the total duration of the pattern is those of a half whole. When playing such pattern, lamps associated to steps are turning twice faster ! The pattern is then a 2/4 measure. The whole duration should be recovered in a song by inserting two of such patterns.
This scale is designated for fast schemes on binary songs.
On the third scale, the whole duration is decomposed into four third of a quarter. Each third of a quarter is associated to a step of the pattern.
When the last step is set to 12, the total duration of the pattern is those of a whole note see section Last step changes. The pattern is then a 12/4 measure.
Alternatively, the last could be set to 9 or 15 and then the pattern is a 9/4 or a 15/4 measure, respectively.
This pattern is designated for ternary-based measures or for inserting ternary feelings (triplets) into a binary song.
Finally, the fourth scale decomposes the whole duration into two sextuplets (12 times 1/6 of a quarter sextuplets). Each 1/6 of a quarter is associated to a step of the pattern. When the last step is set to 12. See section Last step changes, the total duration of the pattern is those of a half whole note. The whole duration should be recovered in a song by inserting two of such patterns. The pattern is then a 12/8 measure.
Since each quarter is represented by 6 steps on the pattern, we are able to superpose binary and ternary schemes, i.e. poly-rhythmic effects.
The `son-montuno.dat' demonstrates such effects.
This pattern is designated for fast schemes on ternary based measures or for inserting ternary feelings (triplets) into a binary song.
Remarks that the last step is not automatically changed from 16 to 12 when changing the scale of a pattern. It could be chosen to 15 for the scale 3, for instance.
Click on the LAST STEP in Pattern Write mode for changing the scale. A new window will appear for last scale selection of the last step associated to the current pattern.
There is two available accents: a weak and a strong one. Use the weak accent by clicking on the ACCENT button in Pattern Step Write or Pattern Tap Write modes. The "accent" text at the bottom of the button becomes orange. Enter then notes as usual: notes are weakly accentuated and the circle marker is orange, instead of the usual grey.
Use the strong accent by clicking a second times on the ACCENT button. Now, the "accent" text becomes red. Then, enter notes: they are strongly accentuated and the circle marker is red too.
Then, click a third times on the ACCENT button. The "accent" text at the bottom of the button comes back to the initial foreground color. When you insert notes, they will be no more accentuated.
In Pattern Step Write mode, you could also insert notes by using the 1,..,16 step touchs. Conversely, in Pattern Tap Write, you could also use the instrument keys, e.g. Cowbell.
The weak and strong accent intensities could be modulated by using the volume control labeled "AC". Moves the label control up and down. When up, accent effects are maximum while when down, there is no more perceptible accent effects. The volume control of accents is global.
Flam is a kick note written ahead of the main beat, and takes on the effect of a grace note. Control-double-click (Control-Button-1 two times) near an instrument/step intersection to insert a flam note for this instrument at that step. Instead of the circle marker, a star marker represents the flam note at the selected intersection see section Creating patterns.
There is another way for inserting flams: In Pattern Step Write mode, click the START button; Select an instrument by shift-clicking on an instrument/step key, e.g. Shift-Snare. Now, as usual, as you click on the instrument/step keys, the selected snare will be added at that step 4. Instead of this, if you control-click on the instrument/step keys, e.g. Ctrl-4, then a snare note with a flam is inserted at step 4.
Conversely, in Pattern Tap Write mode, enter a flam by using the Ctrl-Cowbell.
Flam could be combined with accents, and the associated star marker becomes orange or red, depending on the weak or strong accent.
The time between the grace note and its following main note can be varied in the range 0:4. The default value is 2. A zero value means that flam is off. Each pattern has an associated flam interval value.
Click on the FLAM/SHUFFLE button in Pattern Write mode for changing the flam interval of the current pattern. A new window will appear for the flam interval selection.
tk707 options...
-l
-p port
-small
-medium
-normalsize
-display screen id
-use window id.
xwininfo
.
-geometry
-colormap
-name
-sync
-visual
-h
-help
This small annex explain how to convert your output
midi file to formatted audio file (ex. RIFF WAVE)
and compressed MP3 audio files. We assume your have
converted your file `salsa.dat' into MIDI format `salsa.mid'
in the tk707
environment see section Midi files.
Then enter the commands:
timidity bolero.mid -Ow bolero.wav lame -b128 bolero.wav bolero.mp3
and compare the file sizes:
ls -al -rw-r--r-- 1 maria martinez 1051 Mar 9 09:20 son-montuno.mid -rw-r--r-- 1 maria martinez 3937324 Mar 9 09:22 son-montuno.wav -rw-r--r-- 1 maria martinez 493056 Mar 9 09:22 son-montuno.mp3
The MIDI file does not contains the sounds. It contains only the score of your music and a MIDI render is required to heat it. The audio WAV and MP3 contains the complete sound and are suitable exports, such as CD-ROM writers. Moreover, the MP3 file is compressed by rougthly a factor ten. The MP3 audio files can be played back by popular mp3 players such as mpg123.
The timidity
tool is a midi-to-wav converter available
at http://www.goice.co.jp/member/mo/timidity.
The lame
tool is a wav-to-mp3 convarter available
at http://www.sulaco.org/mp3.
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
NO WARRANTY
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does. Copyright (C) 19yy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
Jump to: . - a - b - d - f - g - i - l - m - p - s - t - v - w - x
File->Load Demo
menu
File->Load
menu
lame
wav-to-mp3 converter
Map->Edit Sound Map
menu
Map->Load Local Sound Map
menu
Map->Load Standard Sound Map
Map->Save Sound Map
menu
Midi File->Save
menu
timidity
software
mpg123
mp3 player
timidity
midi-to-wav converter
xwininfo
An excellent introduction to afro-cuban rhythms can be founded in 'Les tumbaos de la salsa', by Daniel Genton, Editions Musicales Francaise, 2000. email: Topdjembe@hotmail.com.
This sound map is indented for batucada music for carnaval.
This document was generated on 19 March 2001 using texi2html 1.56k.