Re: midish development question(s)

From: Alexandre Ratchov <alex_at_caoua.org>
Date: Mon Jul 09 2007 - 11:58:38 CEST
On Sun, Jul 08, 2007 at 09:38:34PM +0200, Julien Claassen wrote:
> Hi!
>   I'm currently trying to extend rmidish. It's mostly about tab-completion. 
> But for this I need one or two things, I'm not clear about. Here they are:
> 1. Is there a function which would return a list of all defined procs? 
> Preferably in a "char**" ?

hi,

there is an undocumented 'info' function that displays the list of
procedures and variables; but it's mainly for debug purposes.

exec_dumpprocs() in exec.c gives an example of how to get the list
of procedures. However that's not what you need for tab-completion
(see below).

> 2. Is there some such function for listing tracks, channelnames etc. I mean a 
> function or better functions, that return "char**"s? Of course I can work with 
> tracklist etc if nothing else comes my way.

rmidish is a separate process; it uses pipes to communicate with
midish (see rmidish.c) so it has no access to midish internal
structures. It must parse output of midish commands to get
information.

For instance, to get the list of tracks you can parse the output of
'print [tracklist]', the format is a space-separated list of
identifiers between braces on a single line. There are other
similar functions for other objects: chanlist, sysexlist, filtlist,
devlist

If that can be useful to you, I'll add 'proclist' and 'varlist'
functions to return the list of procedures and variable in the same
format as above. Let me know what think you'll need

cheers,

-- Alexandre
Received on Mon, 9 Jul 2007 11:58:38 +0200

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:19 CET