hi Yves,
nice! Would you consider simplifying installation (and saving many of the future maintenance headaches), by using a dynamic loading scheme for your tcl code?
First you may run './tcl2c.py < pianoroll.tk > pianoroll.tk2c', where tcl2c.py is attached below (a very simple script), and then add a single line to your pianoroll.c file:
void pianoroll_setup(void) { post( pianoroll_version ); +#include "pianoroll.tk2c"
Krzysztof
Yves Degoyon wrote:
...
you might say i want to imitate other [ commercials] sequencers, but i needed a pianoroll object to control a sequencer.
#! /usr/bin/env python
import sys, string
def escaped(l): for c in '\"' + "'": words = string.split(l, c) l = words[0] for word in words[1:]: l = l + '\' + c + word return l
for line in sys.stdin.readlines(): l = string.strip(line) if l: if l[0] == '#': print '//' + l[1:] else: print 'sys_gui("' + escaped(line[:-1]) + '\n");' else: print