iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iiwusynth-devel] Code freeze?


From: M. Nentwig
Subject: Re: [iiwusynth-devel] Code freeze?
Date: Thu, 19 Dec 2002 10:11:35 +0200

> How, for example, are we to know when the last line
> of output occurs
> when sending an "inst" command?   We could implement
> something as simple as
> terminating command output with a single semicolon on its own
> line or (to the
> other extreme) use something like HTTP.  Thoughts?
>

In my own GUI I wrap a command into two comments (which are echoed
back). This scheme works with the current iiwusynth via stdin/stdout.

Like
#start_transaction 42
inst 0
#end_transaction 42

The output then looks like
#start_transaction 42
inst 0
0: Anyoldsoundfont.sf2
1: Someothersoundfont.sf2
2: Thisisnotasoundfont.sf2
#end_transaction 42


On the GUI side, there is a function 'command_to_synth', that has two
arguments: Command and callback.
It invents a transaction number, sends the command to the synth like
shown, stores all the output between #start_transaction and
#end_transaction in a list and calls the callback function with the
list. It works fine.
Real-time messages like 'noteon' or 'cc' have to be filtered, though.

One improvement on this scheme might be to have the TCP/IP module add
the transaction number to each line of output. As in
#start_transaction 43
inst 0
43: 0: Mightbeasoundfont.sf2
#end_transaction 43

Also, there could be a dedicated 'echo' command instead of the comment.
But this is just the solution I came up with when working on my GUI,
there may be better or more established ways of tackling the problem.

Cheers

Markus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]