Anyone have amSynth working with jackdmp?

View: New views
8 Messages — Rating Filter:   Alert me  

Anyone have amSynth working with jackdmp?

by Daniel James-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

Recently we've been trying to run amSynth on jackdmp, but it won't even
start. It complains about jack_client_new being deprecated, although
replacing the call jack_client_new() with jack_client_open() in
src/JackOutput.cc (as upstream author Nick Dowell suggested) doesn't
seem to be enough to get it working.

Simply updating amSynth's path to the jackdmp shared library results in
the following output in qjackctl's messages window:

Cannot connect ports owned by inactive clients: "amSynth" is not active
Cannot connect ports owned by inactive clients: "amSynth" is not active

while at startup amSynth outputs:

amSynth 1.2.0
Copyright 2001-2006 Nick Dowell and others.
amSynth comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
loaded & initialised libjack.so  :)
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_set_sample_rate_callback: deprecated
JackFifo::TimedWait name = /dev/shm/jack_fifo.default_amSynth usec =
2147483647 revents 0
SuspendRefNum error
JackClient::Execute error name = amSynth
/usr/bin/vkeybd

Has anyone had amSynth working on jackdmp? If so, was a patch required?

Thanks!

Daniel
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Re: Anyone have amSynth working with jackdmp?

by Nedko Arnaudov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Daniel James <daniel@...> writes:

> Simply updating amSynth's path to the jackdmp shared library results
> in the following output in qjackctl's messages window:
>
> Cannot connect ports owned by inactive clients: "amSynth" is not active
> Cannot connect ports owned by inactive clients: "amSynth" is not active

Probably amSynth is abusing JACK API.

--
Nedko Arnaudov <GnuPG KeyID: DE1716B0>


_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

attachment0 (194 bytes) Download Attachment

Re: Anyone have amSynth working with jackdmp?

by Stéphane Letz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 11 juil. 08 à 19:47, Nedko Arnaudov a écrit :

> Daniel James <daniel@...> writes:
>
>> Simply updating amSynth's path to the jackdmp shared library results
>> in the following output in qjackctl's messages window:
>>
>> Cannot connect ports owned by inactive clients: "amSynth" is not  
>> active
>> Cannot connect ports owned by inactive clients: "amSynth" is not  
>> active
>
> Probably amSynth is abusing JACK API.
>
>

The code seems correct, although it does the non common thing of  
"dlopen"ing the libjack.so library, and getting needed entry  
points... I guess it allows amsynth to avoid a direct link to  
libjack.so....

It should not change the behaviour,  but I'll have to check.

Stephane
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Re: Anyone have amSynth working with jackdmp?

by Daniel James-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Stéphane,

> The code seems correct, although it does the non common thing of
> "dlopen"ing the libjack.so library, and getting needed entry points... I
> guess it allows amsynth to avoid a direct link to libjack.so....
>
> It should not change the behaviour,  but I'll have to check.

Thanks, any insights would be appreciated :-)

Cheers!

Daniel
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Re: Anyone have amSynth working with jackdmp?

by Stéphane Letz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 11 juil. 08 à 14:30, Daniel James a écrit :

> Hi all,
>
> Recently we've been trying to run amSynth on jackdmp, but it won't  
> even start. It complains about jack_client_new being deprecated,  
> although replacing the call jack_client_new() with  
> jack_client_open() in src/JackOutput.cc (as upstream author Nick  
> Dowell suggested) doesn't seem to be enough to get it working.
>
> Simply updating amSynth's path to the jackdmp shared library results  
> in the following output in qjackctl's messages window:
>
> Cannot connect ports owned by inactive clients: "amSynth" is not  
> active
> Cannot connect ports owned by inactive clients: "amSynth" is not  
> active
>
> while at startup amSynth outputs:
>
> amSynth 1.2.0
> Copyright 2001-2006 Nick Dowell and others.
> amSynth comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> loaded & initialised libjack.so  :)
> jack_client_new: deprecated
> jack_client_new: deprecated
> jack_client_new: deprecated
> jack_client_new: deprecated
> jack_set_sample_rate_callback: deprecated
> JackFifo::TimedWait name = /dev/shm/jack_fifo.default_amSynth usec =  
> 2147483647 revents 0
> SuspendRefNum error
> JackClient::Execute error name = amSynth
> /usr/bin/vkeybd
>
> Has anyone had amSynth working on jackdmp? If so, was a patch  
> required?
>
> Thanks!
>
> Daniel
>
Hi Daniel,

For some reason amSynth behaves a bit strangely : basically the fifo  
used to synchronize the real-time jack thread uses a "poll" that get  
interrupted on the very first cycles (EINTR error code). The current  
code consider that as a non recoverable error and was just stopping  
the RT thread. Then jack_connect error were occuring later on because  
the client was "not active".

The following patch (for current SVN 2690) fixes that by being less  
rigid in this error case.







I'm still not sure this is the right thing to do, it would be better  
to understand what happens at the first place.

Another problem of amSynth happens when a "virtual keyboard" (vkeyrd")  
is opened from amSynth *and* amSynth is killed (Ctr-c in the launch  
terminal for instance). In this case the whole amSynth is still seen  
alive by jackdmp server, and since jackdmp currently has no strategy  
to remove those bad clients.... ((-:  some bad things start to happen!  
Again i would be interested to better understand what happens in  
amSynth in this case, to possibly fix the problem at amSynth level.

  Can you possibly redirect this mail on amSynth dev list?

Thanks!

Stephane
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

fifo.patch (1016 bytes) Download Attachment

Re: Anyone have amSynth working with jackdmp?

by Daniel James-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Stéphane,

> For some reason amSynth behaves a bit strangely : basically the fifo
> used to synchronize the real-time jack thread uses a "poll" that get
> interrupted on the very first cycles (EINTR error code). The current
> code consider that as a non recoverable error and was just stopping the
> RT thread. Then jack_connect error were occuring later on because the
> client was "not active".

Thanks for the insight :-)

> The following patch (for current SVN 2690) fixes that by being less
> rigid in this error case.

We'll give that a try, and let you know.

> Another problem of amSynth happens when a "virtual keyboard" (vkeyrd")
> is opened from amSynth *and* amSynth is killed (Ctr-c in the launch
> terminal for instance). In this case the whole amSynth is still seen
> alive by jackdmp server

Long-term, perhaps the best option would be to drop the menu item for
vkeybd and port amSynth to work with Jack MIDI so it could be used with
Jack Keyboard from http://pin.if.uz.zgora.pl/~trasz/jack-keyboard/

>  Can you possibly redirect this mail on amSynth dev list?

I don't think amSynth has a mailing list, but I have forwarded it to
upstream author Nick Dowell, and also cc'd him on this mail.

Cheers!

Daniel
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Parent Message unknown Re: Anyone have amSynth working with jackdmp?

by Stéphane Letz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 16 juil. 08 à 12:56, Nick Dowell a écrit :

> Thanks for the update, Daniel!
>
> 2008/7/16 Daniel James <daniel@...>:
> Hi Stéphane,
>
> For some reason amSynth behaves a bit strangely : basically the fifo  
> used to synchronize the real-time jack thread uses a "poll" that get  
> interrupted on the very first cycles (EINTR error code). The current  
> code consider that as a non recoverable error and was just stopping  
> the RT thread. Then jack_connect error were occuring later on  
> because the client was "not active".
>
> I must admit I'm confused by this description of what's going on...
> What is amSynth doing that's strange?

The strange thing is that  the jack RT thread input fifo get a  
"signal" from somewhere, from man poll :

  [EINTR]            A signal is delivered before the time limit expires
                         and before any of the selected events occurs.

So the question is : who is delivering this signal and which signal is  
it?

(never seen this problem before...)

>
> Another problem of amSynth happens when a "virtual  
> keyboard" (vkeyrd") is opened from amSynth *and* amSynth is killed  
> (Ctr-c in the launch terminal for instance). In this case the whole  
> amSynth is still seen alive by jackdmp server
>
> Long-term, perhaps the best option would be to drop the menu item  
> for vkeybd and port amSynth to work with Jack MIDI so it could be  
> used with Jack Keyboard from http://pin.if.uz.zgora.pl/~trasz/jack-keyboard/
>
> I agree... amSynth was written quite a few years ago, before jack-
> keyboard was around!
> Its design philosophy was to try and work on as many configurations  
> as possible (OSS/ALSA/JACK).
> Maybe it's now time to go jack-only? I've been out of the linux  
> audio loop for a while so don't really know where it's at any more.

Possibly yes!

Stephane
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Parent Message unknown Re: Anyone have amSynth working with jackdmp?

by Daniel James-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Nick,

> Its design philosophy was to try and work on as many configurations as
> possible (OSS/ALSA/JACK).
> Maybe it's now time to go jack-only?

I think you could safely drop the OSS support in future; existing
versions are available for anyone who still needs that.

In my experience, amSynth always worked better as a Jack client than as
a general ALSA program, due to the realtime requirement. On a practical
level, I've found amSynth to be most useful in combination with other
apps, so you usually need JACK running anyway.

> The amsynth mailing list address is: amsynthe-main@...

Ah-ha, I see now that's on the contact page of the website.

Cheers!

Daniel
_______________________________________________
Jack-Devel mailing list
Jack-Devel@...
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
LightInTheBox - Buy quality products at wholesale price