Skip to topic | Skip to bottom
Note: Included topic Gulli.WebTopBar? does not exist yet
Gulli.GConvertr1.1 - 02 Jun 2005 - 21:11 - TWikiGuesttopic end

Start of topic | Skip to actions

a utility written in python that is able to transform and process any OSC message transmitted to gsrv2 to the desired output format. This allows you to outsource eg. argument scaling to gconvert.


  • python OSC library (, subscriber class (

gconvert subscribes itself to 3 messages on a running gsrv:

  • /gconvert - used only to convert one messagename to another
  • /gconvertfunc - change messagename and parameters
  • /gconvert/reset - reset gconvert


./gconvert (-f initfile)

messages have to be sent to gsrv2

  • /gconvert - /gconvert, /message, /newmessage
  • /gconvertfunc - /gconvertfunc, /message, evalstring

ad /gconvertfunc)

to convert severall arguments of the original message you can send python code to gconvert which is evaled and executed (be careful with that, cause there are no security restrictions implemented yet!)

it is possible to save the conversions in an init file which is in fact a python array containing the conerversions as elements.

a simple init file has the form:

[ ["/gconvertfunc", "ss", "/message1", """ if args[y] == n: ret = ["/newmessage1", float(args[x]) ] elif args[x] == m: ret = ["/newmessage1", float(args[x] / 32.0) ] """ ], ["/gconvertfunc", "ss", "/message2", """ if args[y] == n: ret = ["/newmessage2", float(args[x]) / 63.0 - 1.0 ] elif args[y] == m: ret = ["/newmessage2", float(args[z]) / 63.0 - 1.0 ] """ ] ]

which are 2 conversions of /message1 and /message2 to /newmessage1 and /newmessage2 with simple argument conversions according to an if statement.
to top

You are here: Gulli > GConvert

to top

Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback