[PD] [announce] pianoroll

Krzysztof Czaja czaja at chopin.edu.pl
Sat Feb 16 18:18:59 CET 2002

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"


> Yves Degoyon wrote:
> you might say i want to imitate other
> [ commercials] sequencers, but i needed
> a pianoroll object to control a sequencer.
-------------- next part --------------
#! /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:]
            print 'sys_gui("' + escaped(line[:-1]) + '\\n");'

More information about the Pd-list mailing list