mathr / blog / #

SLab

There has been a recurring discussion on the Pd mailing list and IRC channel about Pd's ugly patch file syntax, which is almost impossible to edit by hand because connections between objects are defined by the sequence of object definitions in the file, so inserting an object invalidates all the connections between subsequent objects. This reminded me of the syntax I designed for SLab, which was my AS-Level Computing project back in 1998-1999. An example (which notch-filters a square wave):

new pulse r
set r frequency 1000
set r amplitude 0.5
new write8svx w
set w file Test/Notch.8svx
new notch f
set f depth 0.95
set f frequency 1000
link r main f main
link f main w main
run
quit

Compared to Pd's syntax, there are a few of things to note:

  • The parameters of objects are set ("set") separately from the object creation ("new") -- in Pd the parameters follow the object creation on the same line, which makes things very hard to read once you get past more than a couple of them.
  • Objects, parameters, and connection points all have names, in Pd they are solely defined by their position in the list.
  • "link" commands don't have to follow the creation of all objects, whereas in Pd all connections must come at the end.

The problem with SLab is that it was written in Amiga E, a somewhat dead language. I could rewrite it in C, but it doesn't seem to be worth the effort when software like Pd exists and works well. SLab's architecture is a bit clunky internally too, it could do with a complete rewrite - which I started but didn't get very far into.

EDIT: Jimmy White won in the end, superb comeback!

Snooker on TV (Jimmy White losing again)

motherboard 1 audio