liquidsfz-0.1.0

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

liquidsfz-0.1.0

Stefan Westerfeld
liquidsfz-0.1.0 has been released

The main goal of liquidsfz is to provide an SFZ sampler implementation
library that is easy to integrate into other projects. A standalone jack
client is also available.

liquidsfz is implemented in C++ and licensed under the GNU LGPL version
2.1 or later. The release tarball can be downloaded here:

https://github.com/swesterfeld/liquidsfz#releases
--
Stefan Westerfeld, http://space.twc.de/~stefan
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: liquidsfz-0.1.0

bernard
Hi Stefan, I have compiled the project from the release. Compilation worked, sfz seem to load but the plugin doesn't react to midi input. I tried in Carla, I can plug my midi input but nothing is sent. Any idea ?
Cheers
Bernard
Le 12 novembre 2019 à 11:02, Stefan Westerfeld < [hidden email]> a écrit :


liquidsfz-0.1.0 has been released

The main goal of liquidsfz is to provide an SFZ sampler implementation
library that is easy to integrate into other projects. A standalone jack
client is also available.

liquidsfz is implemented in C++ and licensed under the GNU LGPL version
2.1 or later. The release tarball can be downloaded here:

--
Stefan Westerfeld, http://space.twc.de/~stefan
_______________________________________________
Linux-audio-dev mailing list

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: liquidsfz-0.1.0

Stefan Westerfeld
   Hi!

Did you connect the audio outputs (you need to do this explicitely)?
Another possible cause is that the .sfz file is not yet properly
supported. Is it publicly available so I can test it? You can also try
Salamander Grand https://musical-artifacts.com/artifacts/3 which is
definitely supported. Finally you can run liquidsfz with --debug. You
should see the filenames of the files that will be played if you send
midi input.

   Cu... Stefan

Am 13.11.19 um 23:28 schrieb - -:

> Hi Stefan, I have compiled the project from the release. Compilation
> worked, sfz seem to load but the plugin doesn't react to midi input. I
> tried in Carla, I can plug my midi input but nothing is sent. Any idea ?
> Cheers
> Bernard
>> Le 12 novembre 2019 à 11:02, Stefan Westerfeld < [hidden email]
>> <mailto:[hidden email]>> a écrit :
>>
>>
>> liquidsfz-0.1.0 has been released
>>
>> The main goal of liquidsfz is to provide an SFZ sampler implementation
>> library that is easy to integrate into other projects. A standalone jack
>> client is also available.
>>
>> liquidsfz is implemented in C++ and licensed under the GNU LGPL version
>> 2.1 or later. The release tarball can be downloaded here:
>>
>> https://github.com/swesterfeld/liquidsfz#releases
>> --
>> Stefan Westerfeld, http://space.twc.de/~stefan
>> _______________________________________________
>> Linux-audio-dev mailing list
>> [hidden email]
>> <mailto:[hidden email]>
>> https://lists.linuxaudio.org/listinfo/linux-audio-dev


--
Stefan Westerfeld, http://space.twc.de/~stefan
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: liquidsfz-0.1.0

bernard
Hi now it works sorry for the false negative :) The trick is that when I use Carla patchbay, when I plug a midi input to a program, the virtual keyboard of Carla is ungreyed and shows what keys I play, which doesn't happen with liquidsfz. And the sfz I loaded at first time wasn't certainly supported. Now time for further testing. Are there any tests you'll like me to do ?
Cheers
Bernard
Le 14 novembre 2019 à 13:49, Stefan Westerfeld < [hidden email]> a écrit :


Hi!

Did you connect the audio outputs (you need to do this explicitely)?
Another possible cause is that the .sfz file is not yet properly
supported. Is it publicly available so I can test it? You can also try
Salamander Grand https://musical-artifacts.com/artifacts/3 which is
definitely supported. Finally you can run liquidsfz with --debug. You
should see the filenames of the files that will be played if you send
midi input.

Cu... Stefan

Am 13.11.19 um 23:28 schrieb - -:
Hi Stefan, I have compiled the project from the release. Compilation
worked, sfz seem to load but the plugin doesn't react to midi input. I
tried in Carla, I can plug my midi input but nothing is sent. Any idea ?
Cheers
Bernard
Le 12 novembre 2019 à 11:02, Stefan Westerfeld < [hidden email]
<mailto: [hidden email]>> a écrit :
>>
>> liquidsfz-0.1.0 has been released
>>
>> The main goal of liquidsfz is to provide an SFZ sampler implementation
>> library that is easy to integrate into other projects. A standalone jack
>> client is also available.
>>
>> liquidsfz is implemented in C++ and licensed under the GNU LGPL version
>> 2.1 or later. The release tarball can be downloaded here:
>>
>> --
>> Stefan Westerfeld, http://space.twc.de/~stefan
>> _______________________________________________
>> Linux-audio-dev mailing list
>> <mailto: [hidden email]>


--
Stefan Westerfeld, http://space.twc.de/~stefan

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: liquidsfz-0.1.0

Stefan Westerfeld
   Hi!

At the moment, the most interesting thing for me are freely available
.sfz files which completely fail to load or produce no sound at all. So
if you find such a case during testing, please file a github issue or
drop me a mail, with a link where I can download the .sfz.

   Cu... Stefan

Am 14.11.19 um 17:53 schrieb - -:

> Hi now it works sorry for the false negative :) The trick is that when I
> use Carla patchbay, when I plug a midi input to a program, the virtual
> keyboard of Carla is ungreyed and shows what keys I play, which doesn't
> happen with liquidsfz. And the sfz I loaded at first time wasn't
> certainly supported. Now time for further testing. Are there any tests
> you'll like me to do ?
> Cheers
> Bernard
>> Le 14 novembre 2019 à 13:49, Stefan Westerfeld < [hidden email]
>> <mailto:[hidden email]>> a écrit :
>>
>>
>> Hi!
>>
>> Did you connect the audio outputs (you need to do this explicitely)?
>> Another possible cause is that the .sfz file is not yet properly
>> supported. Is it publicly available so I can test it? You can also try
>> Salamander Grand https://musical-artifacts.com/artifacts/3 which is
>> definitely supported. Finally you can run liquidsfz with --debug. You
>> should see the filenames of the files that will be played if you send
>> midi input.
>>
>> Cu... Stefan
>>
>> Am 13.11.19 um 23:28 schrieb - -:
>>> Hi Stefan, I have compiled the project from the release. Compilation
>>> worked, sfz seem to load but the plugin doesn't react to midi input. I
>>> tried in Carla, I can plug my midi input but nothing is sent. Any idea ?
>>> Cheers
>>> Bernard
>>>> Le 12 novembre 2019 à 11:02, Stefan Westerfeld < [hidden email]
>>>> <mailto:[hidden email]>
>>>> <mailto: [hidden email] <mailto:[hidden email]>>> a écrit :
>> >>
>> >> liquidsfz-0.1.0 has been released
>> >>
>> >> The main goal of liquidsfz is to provide an SFZ sampler implementation
>> >> library that is easy to integrate into other projects. A standalone
>> jack
>> >> client is also available.
>> >>
>> >> liquidsfz is implemented in C++ and licensed under the GNU LGPL
>> version
>> >> 2.1 or later. The release tarball can be downloaded here:
>> >>
>> >> https://github.com/swesterfeld/liquidsfz#releases
>> >> --
>> >> Stefan Westerfeld, http://space.twc.de/~stefan
>> >> _______________________________________________
>> >> Linux-audio-dev mailing list
>> >> [hidden email]
>> <mailto:[hidden email]>
>> >> <mailto: [hidden email]
>> <mailto:[hidden email]>>
>> >> https://lists.linuxaudio.org/listinfo/linux-audio-dev
>>
>>
>> --
>> Stefan Westerfeld, http://space.twc.de/~stefan


--
Stefan Westerfeld, http://space.twc.de/~stefan
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: liquidsfz-0.1.0

Benoît Rouits
In reply to this post by Stefan Westerfeld
Hello,

As promised to Stefan privately, i just finished to write a tiny (and
ugly) GUI to libqliquidsfz that allow to load an SFZ file and play it
with a jack-ed midi keyboard. It is written in Qt/C++. It is called
QLiquidSFZ.

Any better GUI suggestion (with a mockup) is welcomed.

qliquidsfz is licensed under the GNU GPL version 3.

The clonable git project can be found at:

https://github.com/be1/qliquidsfz

Le 12/11/2019 à 11:02, Stefan Westerfeld a écrit :

> liquidsfz-0.1.0 has been released
>
> The main goal of liquidsfz is to provide an SFZ sampler implementation
> library that is easy to integrate into other projects. A standalone jack
> client is also available.
>
> liquidsfz is implemented in C++ and licensed under the GNU LGPL version
> 2.1 or later. The release tarball can be downloaded here:
>
> https://github.com/swesterfeld/liquidsfz#releases
>
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Jack audio questions to aid in my development of audiorack

Ethan Funk
I am in the process of porting a radio automation system that I originally started writing for OSX/CoreAudio some 10 years ago. The OS X version is currently in use at a radio station I am co-owner of, and 2 area LPFM radio station. But I have become progressively frustrated with Apple as each new OS release is made, and find that that's with the continued evolution of jack-audio and gstreamer, I can now ditch my dependency on Apple's audio API. This a huge project, with GUI elements, audio play-out/mixing elements, library management elements, etc, to be ported. I decided to start with the CLI audio/automation engine first, making use of jack to break the original CLI program up into pieces that interconnect with jack: the mixer/automation/control application, media players and media recorders/encoders. I haven't decided what to code the GUI elements with... but I'm not at that point yet. Without the GUI, the CLI pieces are a monster for a human to operate. But again, I needed to start someplace.

My "alpha" release of the CLI pieces, so far tested on Ubuntu 19.10, can be found here:

NOTE: there is a database bug in the libdbi mysql driver that I have fixed locally. Without the libdbi fix, there are some multi-threading stability problems. I'm working to get my fix into the libdbi code base.

With the demise of the jack-audio email list, I have no place to go with questions regarding jack. So is this list a reasonable place for me to ask questions related to jack? By way of full disclosure, I am developing on Ubuntu, with an eye on making the project build-able on OS X and FreeBSD as well.

For example, I have some audio problem with low-latency jack audio on Ubuntu right now that I could use some insight on:

1. With the low-latency kernel, jack dropouts/underruns are a problem when jack is configured to bridge to pulseaudio. Without a pulseaudio bridge, the dropout are nonexistent. Is there a way to increase the "buffer/latency" on the bridge between pulseaudio and jack? Latency on pulseaudio is already poor, so audio coming from/to pulseaudio wouldn't be hurt by extra buffering to keep jack's low latency paths and realtime thread happy.

2. I have a similar issue with zita-a2j and zita-j2a with lost of dropouts on the ALAS side, even though the jack side shows no overruns. Can extra buffering be applied to the zita programs? Maybe that is what the -n option is for?

3. I'm using Ubuntu Studio Control to make jack integration with Ubuntu easy. Does anyone know where I can find the source code for Ubuntu Studio Control?

4. Can anyone recommend an audio effects host that doesn't also try to manage jack connections? I can't have a "studio manager" host my audio processing (compression, de-essing, etc) and decides to make connections between my audio engine application and the media handler's it spawns. I need my audio engine to make it's own connection decisions.

Thanks,
Ethan...

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jack audio questions to aid in my development of audiorack

Fons Adriaensen-3
On Sat, Nov 16, 2019 at 02:47:26PM -0700, Ethan Funk wrote:

> 1. With the low-latency kernel, jack dropouts/underruns are a problem
> when jack is configured to bridge to pulseaudio.  Without a pulseaudio
> bridge, the dropout are nonexistent.

I'd suggest to get rid of pulseaudio. It doesn't do anything useful
for an application like yours.

> 2. I have a similar issue with zita-a2j and zita-j2a with lost of
> dropouts on the ALAS side, even though the jack side shows no overruns.

How does this show up (i.e. how do you know it is the ALSA side) ?
What do you get with the -v option ?

> Can extra buffering be applied to the zita programs?  Maybe that is
> what the -n option is for?

Using more periods could hide the problem, but it's never a real
solution.

Are you sure things are running with real-time scheduling ?
This requires some configuration in /etc/security/limits.conf,
as well as for Jack itself.

Why do you need zita-a2j/j2a anyway ? Using a single multichannel
card is usually the better solution.


Ciao,

--
FA

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: Jack audio questions to aid in my development of audiorack

Ethan Funk
On Sat, Nov 16, 2019 at 02:47:26PM -0700, Ethan Funk wrote:

1. With the low-latency kernel, jack dropouts/underruns are a problem
when jack is configured to bridge to pulseaudio.  Without a pulseaudio
bridge, the dropout are nonexistent.

I'd suggest to get rid of pulseaudio. It doesn't do anything useful
for an application like yours.

Getting rid of pulseaudio is probably the right thing to do. Thanks for pushing me in that direction.

2. I have a similar issue with zita-a2j and zita-j2a with lost of
dropouts on the ALAS side, even though the jack side shows no overruns.

How does this show up (i.e. how do you know it is the ALSA side) ?

It shows up as broken audio to/from the device, with no under-runs logged by jack. All the rest of the jack audio flow is unaffected.

What do you get with the -v option ?

I don't know because I am using Ubuntu Studio Control to manage the create of zita-j2a/a2j instances on my test system. I wanted an "easy" way for potential users to set up jack and Ubuntu Studio Control is nice and easy. zita bridges are working fine on my development machine, where I manually set them up, so there must be something in how Ubuntu Studio Control is spawning the zita bridges. That's why I am also looking for the source code for Ubuntu Studio Control. Ubuntu Studio Control make jack setup supper simple, and almost a pleasure for the average user.

Can extra buffering be applied to the zita programs?  Maybe that is
what the -n option is for?

Using more periods could hide the problem, but it's never a real
solution.

Are you sure things are running with real-time scheduling ? 

Yes.
ps -eLfc shows FF for for the scheduling policy of at least one of the threads in the processes of interest.

This requires some configuration in /etc/security/limits.conf,
as well as for Jack itself.

I had gone down that road originally on the machine I am using for development. On my test system, I used the Ubuntu Studio Installer, which does a very nice, friendly job of setting up a stock Ubuntu machine for use with jack.

Why do you need zita-a2j/j2a anyway ? Using a single multichannel
card is usually the better solution.

I have one multichannel audio interface for everything important: program out, studio monitors, headphones, guest mic, host mic, etc. But it sure is nice to be able to use the built-in audio for a cue channel and talkback mic, where latency is not important. Also handy for USB turntables, and other random devices that are occasionally used in a radio show without latency being important.

Thanks,
Ethan...


_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jack audio questions to aid in my development of audiorack

Fons Adriaensen-3
On Sun, Nov 17, 2019 at 12:21:47AM +0100, Ralf Mardorf wrote:

> You are mistaken. Try to avoid anything that affects "everything
> important". To sync different devices by software affects "everything
> important".

It doesn't affect anything on the sound card that is directly
controlled by Jack. From Jack's POV, a2j and j2a are nothing
special, just regular clients.

--
FA
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: Jack audio questions to aid in my development of audiorack

Ethan Funk
In reply to this post by Ethan Funk
Since I originally wrote audiorack using Apple's CoreAudio, I made design decisions based on the functioning of that API. Many of those choices needed to be reconsidered as I adapted the design to the jack API.

A very big structural difference between the APIs is how "rendering" sample buffers is accomplished. CoreAudio provides a separate callback to get or deliver a block of samples for EVERY audio interface your program attachs to.  For my program using that API, my design is based on an audio interface being choosen as a "master." This is the low latency interface that my code's core mixer is driven by. Other interfaces, both ins and outs, get an extra buffer between them and the core mixer. For the call-back code of these "slave" interfaces, my code compared the time stamps between the core mixer buffer, and the slave buffer to make a "phase" adjustment using Apple's varispeed resampling audiounit plugin with a PID error loop controlling the resampling ratio. This keeps the buffers, on average, in sync, but with extra delay to handle kernel callback scheduling jitter. i.e. no guarantee what order the OS will schedule the call-backs, even if they are on the same sample clock. So with this scheme, I could use any number of interfaces I wanted, each with it's own slightly different clock rates and drift, with one interface selected as the low latency master. After years of tweaking the PID filter, I had it working very well, with no cost (other than processor overhead of the re-sampling) to the master interface.

Jack on, the other hand, has a single callback from which samples are received from jack source ports, and new sample data is delivered to jack destination ports. A very nice and clean approach, driven with a single clock source. And appropriate for interconnecting audio streams between programs. I like it a lot.

I have lost the ability to allow for my software to handle re-sampling on multiple clock domains. I was thinking that zita-a2j, etc, was my path to get the functionality back. If I didn't have it working so well on OSX, I wouldn't lament the loss with jack. But it's hard to give up on it!

Thanks for the Ubuntu Studio Control links.

Ethan...

On Sun, 2019-11-17 at 00:21 +0100, Ralf Mardorf wrote:
On Sat, 16 Nov 2019 15:49:34 -0700, Ethan Funk wrote:
Why do you need zita-a2j/j2a anyway ? Using a single multichannelcard
is usually the better solution.  

I have one multichannel audio interface for everything important:
program out, studio monitors, headphones, guest mic, host mic,
etc.  But it sure is nice to be able to use the built-in audio for a
cue channel and talkback mic, where latency is not important.  Also
handy for USB turntables, and other random devices that are
occasionally used in a radio show without latency being important.

You are mistaken. Try to avoid anything that affects "everything
important". To sync different devices by software affects "everything
important".

On Sat, 16 Nov 2019 14:47:26 -0700, Ethan Funk wrote:
Does anyone know where I can find the source code for Ubuntu
Studio Control?

https://packages.ubuntu.com/source/eoan/ubuntustudio-controls

https://launchpad.net/ubuntustudio-controls



_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Jack audio questions to aid in my development of audiorack

Fons Adriaensen-3
On Sat, Nov 16, 2019 at 05:50:16PM -0700, Ethan Funk wrote:

> A very big structural difference between the APIs is how "rendering"
> sample buffers is accomplished.
> ...
> After years of tweaking the PID filter, I had it working very well,
> with no cost (other than processor overhead of the re-sampling)

If I understand what you write correctly, it seems to me that
zita-j2a and a2j are doing exactly the same thing. They contain
the separate callback, the resampler, buffering, and the control
loop.

E.g. for an output you'd have

  buffer -> resampler -> hardware

Your separate callback would read the buffer, run the control
loop and the resampler, and write to the hardware.

The input to the buffer is where you connect to the world
controlled by the master card. If your master period size
is N, you would write to that buffer N samples during each
master card callback.

In other words, the input to the buffer is used in exactly
the same way as you would use zita-j2a's Jack ports. So I'd
be surprised if you really need any fundamental restructuring.

...

But what really surprises me is that you had to do the
resampling and buffering explicitly as part of your
application. Doesn't OSX provide this at the system
level (IIRC, by creating an 'aggregated' sound card) ?

Ciao,

--
FA

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: Jack audio questions to aid in my development of audiorack

Ethan Funk
Yes, same idea rolled into my application. That's why I was hoping the zita bridges would work well. I'm still troubleshooting the glitching with zita. Maybe it just on my test machine. I may end up having to look at the source code to understand what the various command flags actually do, and what the extra third number is on the verbose stats. printout.

Audiorack was write way back in the OS X 10.4 days. Back then, the OS did not have aggregate devices, so I coded it into my application. Even now, with OS support, I suspect the OS adds latency across all the devices in the a aggregate. With Apple of course, I can't look at their source code to see what it does. I need the master to have the lowest latency, so I kept my code in the application.

Ethan...

On Sun, 2019-11-17 at 11:03 +0100, Fons Adriaensen wrote:
On Sat, Nov 16, 2019 at 05:50:16PM -0700, Ethan Funk wrote:

A very big structural difference between the APIs is how "rendering"
sample buffers is accomplished. 
...
After years of tweaking the PID filter, I had it working very well,
with no cost (other than processor overhead of the re-sampling)

If I understand what you write correctly, it seems to me that
zita-j2a and a2j are doing exactly the same thing. They contain
the separate callback, the resampler, buffering, and the control
loop.

E.g. for an output you'd have 

  buffer -> resampler -> hardware

Your separate callback would read the buffer, run the control
loop and the resampler, and write to the hardware.

The input to the buffer is where you connect to the world
controlled by the master card. If your master period size 
is N, you would write to that buffer N samples during each
master card callback.

In other words, the input to the buffer is used in exactly
the same way as you would use zita-j2a's Jack ports. So I'd
be surprised if you really need any fundamental restructuring.

...

But what really surprises me is that you had to do the
resampling and buffering explicitly as part of your 
application. Doesn't OSX provide this at the system
level (IIRC, by creating an 'aggregated' sound card) ?

Ciao,


_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

jackdbus log controls?

Ethan Funk
In reply to this post by Ethan Funk
I am almost a week into testing my jack-audio application with no crashes of jackd or my application. Bug abound (in my code), but that is the point of testing. Fixing as I go. I am using Ubuntu Studio control to run jackd... actually jackdbus, which brings me to my question:

How do I get control over jackdbus logging? I currently have an gigantic log file it is creating at ~/.log/jack/jackdbus.log from my testing.
It's huge because my application make extensive use of jacks inter-process audio routing as a radio station automation system. My application is endlessly forking new audio player processes that connect back to a core mixer via jack, play when needed, then disconnect when finished. So the above log file is crammed full of jack port connect and disconnect notices. How do I make it stop? There is no man page available for jackdbus, and "ps" indicates that it was simply run as "/usr/bin/jackdbus auto." With some further poking around I found that ubuntu-syudio-control is running something called autojack, which seems to run jackdbus, and autojack does have a man page, but not much help.

As a side note, the Patchage interconnection GUI does seem to cause jackd to crash after about two days of running. I have not troubleshot that any further, but I do know that without Patchage running, jackd has been running with my program for 5 days. There may be something worth investigating, but I haven't had time.

Thanks,
Ethan...

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jackdbus log controls?

Len Ovens
On Sun, 24 Nov 2019, Ethan Funk wrote:

> I am almost a week into testing my jack-audio application with no crashes of
> jackd or my application. Bug abound (in my code), but that is the point of
> testing. Fixing as I go. I am using Ubuntu Studio control to run jackd...
> actually jackdbus, which brings me to my question:
>
> How do I get control over jackdbus logging? I currently have an gigantic log file
> it is creating at ~/.log/jack/jackdbus.log from my testing.

Yes I have this concern too. jackdbus is controled by using jack_control
or dbus directly for which there is no documentation besides the source I
would guess. US_controls uses jack_control right now (which also has no
documentation) and by running jack_control with no parameters one gets a
list of commands some of which will tell you what some other commands
might be. None of them that I could find will set logging levels. The next
version of US_controls will use logrotate to help keep the log files from
getting too big. You may want to set up a cron job to do this for you
until that release. It would be possible to use jackd instead of jackdbus
but that would just mean the the US_controls log would start to grow
quicker instead because jackd logs to stdout and stderr.

So the answer is that while jackdbus seems to provide no way of doing
this, logroatate is already installed and gets run by cron once a day (I
think) by the system. However, because your log file is in userland you
would be better off running it from the user crontab with it's own config
file.


--
Len Ovens
www.ovenwerks.net
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: jackdbus log controls?

David Runge
In reply to this post by Ethan Funk
On 2019-11-24 15:51:04 (-0700), Ethan Funk wrote:
> How do I get control over jackdbus logging?  I currently have an
> gigantic log file it is creating at ~/.log/jack/jackdbus.log from my
> testing.

You can look into logrotate [1] to auto-cleanup and rotate the log
(check `man 5 logrotate.conf` and `man 8 logrotate`). You can run this
on a systemd timer or cron job.

> It's huge because my application make extensive use of jacks inter-
> process audio routing as a radio station automation system.  My
> application is endlessly forking new audio player processes that
> connect back to a core mixer via jack, play when needed, then
> disconnect when finished.  So the above log file is crammed full of
> jack port connect and disconnect notices.  How do I make it stop?

I'm uncertain (because I run jackd in a systemd user unit [2] and
haven't used jackdbus in a long time), but there is a ticket around the
logging facilities [3].

Best,
David

[1] https://github.com/logrotate/logrotate
[2] https://github.com/jackaudio/jack2/tree/develop/systemd
[3] https://github.com/jackaudio/jack2/issues/402

--
https://sleepmap.de

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jackdbus log controls?

Ethan Funk
In reply to this post by Len Ovens
Log rotation is not what I could consider the "correct" solution. But I guess it's what I have to do for now until a log-level control is implemented. All the little things my application needs to take care of on a users system is getting really complicated. I am of the opinion that default log levels should be low, with the option to get more verbose when the user is interested in the extra information only.

Good to know others folks are see this as a bug as well.

Thanks everyone.

Ethan...

On Sun, 2019-11-24 at 16:36 -0800, Len Ovens wrote:
On Sun, 24 Nov 2019, Ethan Funk wrote:

I am almost a week into testing my jack-audio application with no crashes of
jackd or my application. Bug abound (in my code), but that is the point of
testing. Fixing as I go. I am using Ubuntu Studio control to run jackd...
actually jackdbus, which brings me to my question:

How do I get control over jackdbus logging? I currently have an gigantic log file
it is creating at ~/.log/jack/jackdbus.log from my testing.

Yes I have this concern too. jackdbus is controled by using jack_control 
or dbus directly for which there is no documentation besides the source I 
would guess. US_controls uses jack_control right now (which also has no 
documentation) and by running jack_control with no parameters one gets a 
list of commands some of which will tell you what some other commands 
might be. None of them that I could find will set logging levels. The next 
version of US_controls will use logrotate to help keep the log files from 
getting too big. You may want to set up a cron job to do this for you 
until that release. It would be possible to use jackd instead of jackdbus 
but that would just mean the the US_controls log would start to grow 
quicker instead because jackd logs to stdout and stderr.

So the answer is that while jackdbus seems to provide no way of doing 
this, logroatate is already installed and gets run by cron once a day (I 
think) by the system. However, because your log file is in userland you 
would be better off running it from the user crontab with it's own config 
file.


--
Len Ovens
www.ovenwerks.net

_______________________________________________
Linux-audio-dev mailing list
[hidden email]

https://lists.linuxaudio.org/listinfo/linux-audio-dev


_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Possible jack_port_disconnect() problem.

Ethan Funk
After days of testing, I got a crash (of sorts) out of my program. More of a hang than a crash. So I attached gdb to the process and looked around. My main thread appears to be hung deep inside a jack call, via jack_port_disconnect(). This is a point in my code where it cleans up after an jack-attached media player that is done playing. The player process terminates when it's jack connections are disconnected. I re-started the code execution and then stopped it again to find that the main thread was still waiting at the same libc_read() spot. After taking a look at the jack source code, I didn't find that jack_port_disconnect() would result in a read any place down the jack call chain. To be fair to jack, I am still mostly unfamiliar with the library structure, so I could be missing something. Any insight as to what I might be doing wrong? The port I am passing to jack_port_disconnect() appears to be valid, unless my code is overwriting memory. Backtrace of the main thread is below.

Thanks all.
Ethan...

(gdb) bt full
#0 __libc_read (nbytes=4, buf=0x7fffad4ed248, fd=5) at ../sysdeps/unix/sysv/linux/read.c:26
  resultvar = 18446744073709551104
  sc_cancel_oldtype = 0
  __arg3 = <optimized out>
  _a2 = <optimized out>
  sc_ret = <optimized out>
  __value = <optimized out>
  __arg1 = <optimized out>
  _a3 = <optimized out>
  resultvar = <optimized out>
  resultvar = <optimized out>
  __arg2 = <optimized out>
  _a1 = <optimized out>
#1 __libc_read (fd=5, buf=0x7fffad4ed248, nbytes=4) at ../sysdeps/unix/sysv/linux/read.c:24
No locals.
#2 0x00007fab6fe13ead in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#3 0x00007fab6fe02e2a in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#4 0x00007fab6fe03768 in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#5 0x00007fab6fdf8598 in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#6 0x0000564ac911610a in releaseQueueRecord (root=0x564ac9134260 <queueList>, rec=0x7fab3004c910, force=0 '\000') at data.c:473
[NOTE: this line is: jack_port_disconnect(mixEngine->client, *port); ]
  c = 1
  cmax = 2
  port = 0x564acaf81278
  prev = 0x564ac9134260 <queueList>
  current = 0x7fab3004c910
  instance = 0x564acaf80be0
  logID = 9126049
  tmp = <optimized out>
#7 0x0000564ac91057c5 in NextListItem (lastStat=2, curQueRec=0x564ac9134260 <queueList>, firstp=0x7fffad4ed418, sbtime=0x7fffad4ed41c, remtime=0, isPlaying=0x7fffad4ed416 "") at automate.c:811

.... Blah, blah, blah....

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Possible jack_port_disconnect() problem.

Paul Davis
jack clients and the server on linux communicate via reading and writing through a FIFO. there's nothing unusual about read(2) showing up here - the client has asked the server for a port disconnect and is waiting for a response.

On Tue, Nov 26, 2019 at 9:45 AM Ethan Funk <[hidden email]> wrote:
After days of testing, I got a crash (of sorts) out of my program. More of a hang than a crash. So I attached gdb to the process and looked around. My main thread appears to be hung deep inside a jack call, via jack_port_disconnect(). This is a point in my code where it cleans up after an jack-attached media player that is done playing. The player process terminates when it's jack connections are disconnected. I re-started the code execution and then stopped it again to find that the main thread was still waiting at the same libc_read() spot. After taking a look at the jack source code, I didn't find that jack_port_disconnect() would result in a read any place down the jack call chain. To be fair to jack, I am still mostly unfamiliar with the library structure, so I could be missing something. Any insight as to what I might be doing wrong? The port I am passing to jack_port_disconnect() appears to be valid, unless my code is overwriting memory. Backtrace of the main thread is below.

Thanks all.
Ethan...

(gdb) bt full
#0 __libc_read (nbytes=4, buf=0x7fffad4ed248, fd=5) at ../sysdeps/unix/sysv/linux/read.c:26
  resultvar = 18446744073709551104
  sc_cancel_oldtype = 0
  __arg3 = <optimized out>
  _a2 = <optimized out>
  sc_ret = <optimized out>
  __value = <optimized out>
  __arg1 = <optimized out>
  _a3 = <optimized out>
  resultvar = <optimized out>
  resultvar = <optimized out>
  __arg2 = <optimized out>
  _a1 = <optimized out>
#1 __libc_read (fd=5, buf=0x7fffad4ed248, nbytes=4) at ../sysdeps/unix/sysv/linux/read.c:24
No locals.
#2 0x00007fab6fe13ead in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#3 0x00007fab6fe02e2a in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#4 0x00007fab6fe03768 in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#5 0x00007fab6fdf8598 in ?? () from /lib/x86_64-linux-gnu/libjack.so.0
No symbol table info available.
#6 0x0000564ac911610a in releaseQueueRecord (root=0x564ac9134260 <queueList>, rec=0x7fab3004c910, force=0 '\000') at data.c:473
[NOTE: this line is: jack_port_disconnect(mixEngine->client, *port); ]
  c = 1
  cmax = 2
  port = 0x564acaf81278
  prev = 0x564ac9134260 <queueList>
  current = 0x7fab3004c910
  instance = 0x564acaf80be0
  logID = 9126049
  tmp = <optimized out>
#7 0x0000564ac91057c5 in NextListItem (lastStat=2, curQueRec=0x564ac9134260 <queueList>, firstp=0x7fffad4ed418, sbtime=0x7fffad4ed41c, remtime=0, isPlaying=0x7fffad4ed416 "") at automate.c:811

.... Blah, blah, blah....
_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev
Reply | Threaded
Open this post in threaded view
|

Re: Possible jack_port_disconnect() problem.

Ethan Funk
Related question then: Any idea what my application could be doing wrong to cause jack to not get back with a response? It had been waiting for about an hour, while I was off doing paying work, and my applications process function was still being called by jack when I finally noticed it. My best plan for now is to test again, and wait for it to happen, then see if I can get another jack program to connect/disconnect after my program hangs, and check the jack logs right away. The jack log file from this test is full of underruns from my debugging, so that is mostly useless. Any other debuging approach I should be taking?

Thanks,
Ethan...

On Tue, 2019-11-26 at 10:10 -0700, Paul Davis wrote:
jack clients and the server on linux communicate via reading and writing
through a FIFO. there's nothing unusual about read(2) showing up here - the
client has asked the server for a port disconnect and is waiting for a
response.

On Tue, Nov 26, 2019 at 9:45 AM Ethan Funk <
[hidden email]
>
wrote:

After days of testing, I got a crash (of sorts) out of my program. More of
a hang than a crash. So I attached gdb to the process and looked around. My
main thread appears to be hung deep inside a jack call, via
jack_port_disconnect(). This is a point in my code where it cleans up after
an jack-attached media player that is done playing. The player process
terminates when it's jack connections are disconnected. I re-started the
code execution and then stopped it again to find that the main thread was
still waiting at the same libc_read() spot. After taking a look at the jack
source code, I didn't find that jack_port_disconnect() would result in a
read any place down the jack call chain. To be fair to jack, I am still
mostly unfamiliar with the library structure, so I could be missing
something. Any insight as to what I might be doing wrong? The port I am
passing to jack_port_disconnect() appears to be valid, unless my code is
overwriting memory. Backtrace of the main thread is below.

Thanks all.
Ethan...


_______________________________________________
Linux-audio-dev mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-dev

signature.asc (849 bytes) Download Attachment
12