Issue with latency

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. http://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

saturnin51
Established Member
Posts: 49
Joined: Sat Mar 02, 2019 5:10 am

Issue with latency

Postby saturnin51 » Sat Nov 02, 2019 8:27 pm

Hi,

Clouds and rain are very are conducive to use Muse again. My setup:
- HP Prodesk, Intel Core i5-4570 CPU @ 3.20 GHz x 4 with 10 Go RAM and ssd 256 Go
- Edirol UA-25
- keyboard Korg 5000
- Debian V9 64 bits kernel linux 4.90.-9-amd64 x86_64 low latency + Mate
- Librazik studio audio
- Muse 2.1 opr2

I use a headphone directly on the UA-25. I have an echo with audio source (guitar) when I want to record it. The only way to cancel this echo is to mute the output track !

Where I am wrong ?

Thank you for your help.

spamatica
Established Member
Posts: 214
Joined: Mon Feb 08, 2010 10:38 am

Re: Issue with latency

Postby spamatica » Sun Nov 03, 2019 11:14 am

Hi saturnin51

It is a sad state for us that the MusE version in the repositories is so old. If you can please upgrade to 3.x.

The problem with hearing the echo of the guitar can be fixed in more ways in 3.x I believe as the monitoring options are more extensive.

The best way to do it in 2.1 I believe, is to use smaller buffers for Jack. If you haven't specifically set anything I think Jack has a buffersize of 1024 which gives very audible delays. I generally use buffersize 256, sometimes 128.

Can't test right but it should work to mute the audio track instead of the output track. Ofcourse if you rely on hearing the guitar through MusE while recording that won't work.

saturnin51
Established Member
Posts: 49
Joined: Sat Mar 02, 2019 5:10 am

Re: Issue with latency

Postby saturnin51 » Sun Nov 03, 2019 3:28 pm

Hi,

I'll try to update to Muse 3. At this time I work like this:

I mute the audio track 1 into the ouput audio track and I record. I hear the guitar with the headphone. Then I unmute this track into the ouptput audio and I record the track 2 hearing well the track 1 while recording. And so on. Finally I unmute all the track into the ouptut audio track to hear the total result.

I use buffersize 256 and less without result. When you think about 1993 Atari Falcon with 16 MHz and no latency at all with Falcon Audio !

Is my PC having too low processor frequency ?

spamatica
Established Member
Posts: 214
Joined: Mon Feb 08, 2010 10:38 am

Re: Issue with latency

Postby spamatica » Sun Nov 03, 2019 8:06 pm

saturnin51 wrote:Hi,

I'll try to update to Muse 3. At this time I work like this:

I mute the audio track 1 into the ouput audio track and I record. I hear the guitar with the headphone. Then I unmute this track into the ouptput audio and I record the track 2 hearing well the track 1 while recording. And so on. Finally I unmute all the track into the ouptut audio track to hear the total result.

I use buffersize 256 and less without result. When you think about 1993 Atari Falcon with 16 MHz and no latency at all with Falcon Audio !

Is my PC having too low processor frequency ?


Hehe I didn't know the Atari Falcon was used as a DAW, cool :D
I had to go on a wikipedia trip. I see the Falcon (among other things) had a built in DSP so it had some low level hardware support for doing audio. So it's quite possible it could do recording with very small buffers. Probably not that many realtime effects though.

As for your computer being too slow that is likely not the issue even though it is a slippery slope. A modern computer is a more generic platform compared to the Atari Falcon so it does require more CPU to push the data fast enough for reliable low latency, also USB 1.1 (as used by your soundcard) is not perfect for low latency audio. There are in other words limits to how low you can get the latency with your computer.

Although I can't be sure what you are experiencing I would assume it is only a very short delay you are hearing. But large enough to make it hard to play along with. The soundcard also adds latency besides the buffer size, older cards tend to be a bit slower at doing the AD/DA conversion so at buffersize 256 it can definitely be felt that there is a delay. If your sound card allows it you can try changing to 128 frames buffer for jack.

On a different note, rereading your first message. You describe that you are hearing an echo. This leads me to think that you have direct monitoring turned on in the soundcard. In other words: You hear your guitar through your headphones without even starting jack.
In general direct monitoring is good as it usually does not add latency at all. But you run in to this issue with MusE 2 that you have to mute the track to disable MusE's monitoring. In MusE 3 you can disable the monitoring independently of the tracks mute-status.
So to conclude this thought, another solution would be to turn off direct-monitoring in the sound card and listen through muse all the time (I have done this for many many years, mostly since I wanted to hear the sound WITH plugins etc. through muse). As I said above though it will induce latency in proportion to the buffer size.

Some math regarding latency:
If you are running with 44.1khz and use 256 frames for buffers and jacks default setting of 2 buffers (though your device might require 3, some usb devices do, but if that is the case you probably know about it already)
The latency for one buffer would then be 256/44100 = 5.8ms. Two buffers is then 11.6ms, plus any added latency of the soundcard.

Tim E. Real
Established Member
Posts: 277
Joined: Sat Sep 15, 2012 12:36 am

Re: Issue with latency

Postby Tim E. Real » Sun Nov 03, 2019 9:46 pm

In recent git master there is full latency correction. Grab it! Enable it in Settings.
It cannot correct for any direct monitoring latency of course (see below). but it corrects playback and recording midi and wave files.
It might be good to enable it when talking about latency issues, to eliminate that possibility of file latency problems.

The monitoring feature Robert mentions is found on the new green circle icon on the mixer strips, beside the red record arm icon.
Its latency is affected by Jack period (buffer) size and numbers.
Meanwhile, low-latency hardware monitoring would be provided by the card and (custom) mixer app.
Perhaps it is turned on? Causing a double path echo instead of just a normal software latency delay alone?

Jack is supposed to have some hardware monitoring feature but I think I read recently that it never really worked well. I've never tried it.

spamatica
Established Member
Posts: 214
Joined: Mon Feb 08, 2010 10:38 am

Re: Issue with latency

Postby spamatica » Mon Nov 04, 2019 6:11 pm

Tim E. Real wrote:Causing a double path echo instead of just a normal software latency delay alone?

Yes that was what I was going for in the paragraph I talked about echo. I tried to be as clear as possible but seems I neglected to mention that it was this I meant, that the sound comes from two sources, both from direct monitoring which does not add latency and through muse which adds some latency, causing a very short echo effect.

saturnin51
Established Member
Posts: 49
Joined: Sat Mar 02, 2019 5:10 am

Re: Issue with latency

Postby saturnin51 » Thu Nov 07, 2019 11:58 am

Hi,

I have installed Muse 3 opr1. But the issue is not resolved.

First, I describe the issue as an echo. It is not correct. It is a shift between the sound I hear through the headphone or monitors and the direct sound of the guitar strings.
I mute the monitoring (the icon just left of the record button). No shift. So I launch a record on track 2 over the track 1. I can play very well synchronised during the record But there is a shift when I hear the playback !! The track 2 is slightly delayed behind track 1.

I am very astonished because I recorded project well synchronized between January and March of this year. All the setup remained in the state in the meantime. And more the PC is dedicated for my home studio, nothing else.

To investigate, I'll do tries with Rosegarden and Ardour in the next days.

saturnin51
Established Member
Posts: 49
Joined: Sat Mar 02, 2019 5:10 am

Re: Issue with latency

Postby saturnin51 » Thu Nov 07, 2019 1:33 pm

I do recording tries with Rosegarden and Qtractor. No problem with the same conditions.

spamatica
Established Member
Posts: 214
Joined: Mon Feb 08, 2010 10:38 am

Re: Issue with latency

Postby spamatica » Thu Nov 07, 2019 8:03 pm

saturnin51 wrote:I do recording tries with Rosegarden and Qtractor. No problem with the same conditions.


This is very strange. Was thinking for a minute that it could be due to MusE using pulseaudio instead of jack, which would add a big delay, but that wasn't supported with 2.1.

Could you post the startup log from MusE? Maybe something sticks out.
Also, what are your jack settings?

saturnin51
Established Member
Posts: 49
Joined: Sat Mar 02, 2019 5:10 am

Re: Issue with latency

Postby saturnin51 » Thu Nov 07, 2019 10:26 pm

Is it this log ?
You do not have the required permissions to view the files attached to this post.

spamatica
Established Member
Posts: 214
Joined: Mon Feb 08, 2010 10:38 am

Re: Issue with latency

Postby spamatica » Thu Nov 07, 2019 10:46 pm

saturnin51 wrote:Is it this log ?


Yes that was what I meant. Seems it was missing the beginning though.

To capture it all you can pipe it to a file on the command line, like this:
muse3 -whatever_options &> logfile.txt

It would be good if you could redo it.
--
In this one I didn't see anything special apart from instantiations of jack with buffer 1024 but I think that might be output from certain plugins that trigger jack.
Are you starting muse with any options? There was a lot of MidiIn messages which I think are printed with the -m option.

User avatar
funkmuscle
Established Member
Posts: 2281
Joined: Mon Jun 02, 2008 2:30 pm

Re: Issue with latency

Postby funkmuscle » Sat Nov 09, 2019 5:18 pm

I don't know if this is my issue but lately, MusE has been lagging. When I try to match a beat with a guitar track in Ardour(using Jack link) MusE is off.
for instance, a kick drum and a cymbal to start a bar along with the synced guitar track(Ardour), the guitar is bang on with the metronome where as MusE will be behind it by a fraction of a second.
I tried syncing Ardour to Qtractor and that's bang on playing the same midi drum file.

Tim E. Real
Established Member
Posts: 277
Joined: Sat Sep 15, 2012 12:36 am

Re: Issue with latency

Postby Tim E. Real » Sat Nov 09, 2019 6:09 pm

1: What Jack period size are you using?
2: Do have the new MusE latency feature enabled?

Will try to investigate...
Thanks.

User avatar
funkmuscle
Established Member
Posts: 2281
Joined: Mon Jun 02, 2008 2:30 pm

Re: Issue with latency

Postby funkmuscle » Sat Nov 09, 2019 6:30 pm

Tim E. Real wrote:1: What Jack period size are you using?
2: Do have the new MusE latency feature enabled?

Will try to investigate...
Thanks.

Jack 128 but tried 256 and 1024
all the same.

Code: Select all

2: Do have the new MusE latency feature enabled?

what's that and where could I enable it? To be honest, I thought I saw something about that but couldn't find it in the forum.

Tim E. Real
Established Member
Posts: 277
Joined: Sat Sep 15, 2012 12:36 am

Re: Issue with latency

Postby Tim E. Real » Sat Nov 09, 2019 6:36 pm

It's new since a month or two, it is enabled in Settings > Global Settings > Latency.
There's a whole thread and announcement here, a few posts down.

But I've a feeling this may be more related to Jack Transport... Since you're at 128 buf size.


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest