back to list

New software project using tclabc

🔗hfmlacerda <hfmlacerda@...>

2/11/2009 7:47:57 AM

Hi all,

I have some ideas for new microtonal software, using ABC notation.

After tinkering a bit with Tcl/Tk (writing TKmicroabc and a game
(tk+-bis)), I revisited tclabc and printed its documentation.

tclabc (by Jean-François Moine) is a Tcl extension to manipulate ABC
files. The library is written in C, and it comes with a graphical
interface (tkabc) written in Tcl/Tk.

http://moinejf.free.fr/
http://moinejf.free.fr/tclabc.html
http://moinejf.free.fr/sample.gif

I noticed that tclabc (as Tcl extension) it is easy to use and very
powerful (its parser is abcm2ps-compatible). It handles ABC (r/w) and
MIDI (playing/recording).

Compared to abc2midi (maintained by Seymour Shlien), the MIDI player
is currently rather limited (key, meter, tempo, channel, program/bank,
note on/off, no more). Anyway, it is more flexible in other aspects:
abc2midi supports only 16 MIDI channels, and no tone banks, I
guess. In its turn, tclabc can handle up to 32 voices/channels as well
as tone banks. For recording/playing, tclabc can use OSS/ALSA
(GNU+Linux) and Windows MIDI devices.

The ABC parser supports microtonal accidentals using semitone
fractions (1-to-256)/(1-to-256), and the GUI (tkabc) already
implemented Tartini-Couper accidentals, which are not however played
in MIDI. Although microtonal MIDI is not available, I guess it would
not be difficult to develop a Tcl program to convert the ABC structure
(managed by tclabc) into raw MIDI messages (in pure Tcl, not using the
MIDI backend). Anyway, microtonal MIDI generation can always be
acomplished by abc2midi.

I just wrote a sample file which converts quartertone ABC to Sagittal
ABC (for microabc/sagittal.fmt). It only converts the first voice of
the first piece:

http://geocities.yahoo.com.br/hfmlacerda/misc/tkmicroabc/test-abc.tcl.txt

Remove the .txt extension and run it with:

tclsh test-abc.tcl

Here is my initial TODO list for this project:

- ABC (Tartini-Couper) to Sagittal ABC (to be tuned using microabc);

- Split ABC chords as temporary voices (so that the notes go to
different MIDI channels and thus its pitch bends can apply
correctly).

- ABC to microtonal ABC for MIDI (converting Tartini-Couper
representation to arbitrary tunings directly, not using microabc);

- Sagittal ABC to microtonal ABC for MIDI (not using microabc);

- Sagittal accidentals as an extension of tkabc (GUI);

- Eventually, implement all the funcionality of microabc and more.

People that already have worked with MIDI might have a look at
converting the ABC structure into raw MIDI instructions.

I think that exporting Csound and Scala score files would be easy to
implement.

Advantages:

- Complete ABC parser/ interpreter/ writer (abcm2ps-compatible);

- Import/ export/ record/ play MIDI;

- Can use a graphical interface (tkabc) already functional, to be
extended;

- Powerful text preprocessing using Tcl features, to support diverse
(user-defined) microtonal notation systems;

- Easy to program, adapt and extend (at least for the Tcl end).

- 'Wrapped' binaries can be built using Starkit or freewrap.

Disadvantages:

- Require a Tcl/Tk interpreter (some OSes come missing one
<8o). Anyway, Starkit could be used to build 'standalone'
executables with a built-in Tcl/Tk interpreter.

- Require to compile tclabc library for the operating system. Jef
Moine provides source code for any plataform and also binary objects
for Windows.