LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Ardour and the clicking noise (https://www.linuxquestions.org/questions/linux-software-2/ardour-and-the-clicking-noise-552074/)

mykrob 05-07-2007 06:21 PM

Ardour and the clicking noise
 
Hey-

I am running Kubuntu 7.04 on my Compaq Presario V5204NR laptop. I have installed the low latency kernel from the universe repositories and have also installed Ardour 2 from getdeb.

I am able to record my guitar, but there is a terrible clicking noise, which makes the sound "stutter". I had this problem with the generic kernel and thoughtthe low latency kernel would fix it... My question is, is this just crappy hardware, or is there something I can do to remvoe the "click" in my recorder sound? I know this laptop is not a studio workhorse, I just want to record some of my guitar tracks from the comfort of my bedroom, so I i get an idea for a song, I can semi-document it.

Thanks for any help whatsoever..

-myk

studioj 05-08-2007 11:22 AM

if you are using qjackctl try setting the jack buffer larger.
otherwise adjust command line jack settings.
try setting rate to 44100 instead of 48000.
i am going to give you a copy of my ~/.asoundrc and there are some settings in there for you to play with as well. You wil see where i have commented out various alternative settings.
Code:

pcm.jackplug {
                type plug
                slave { pcm "jack" }
        }

        pcm.jack {
                type jack
                playback_ports {
                        0 alsa_pcm:playback_1
                        1 alsa_pcm:playback_2
                }
                        capture_ports {
                        0 alsa_pcm:capture_1
                        1 alsa_pcm:capture_2
                }

        }

pcm.dsp {
    type plug
  # slave.pcm "dmixer"
    slave.pcm "duplex"
}

pcm.dsp0 {
    type plug
  # slave.pcm "dmixer"
    slave.pcm "duplex"
}



# this makes native ALSA apps default to using dmix
pcm.!default {
    type plug
  # slave.pcm "dmixer"
    slave.pcm "duplex"
 
}

ctl.!default {
        type hw         
        card 0
        }

pcm.dmixer  {
        type dmix
        ipc_key 1024
        slave {
            pcm "hw:0,0"
        #  period_time 0 # set to 0 lets period size and buffer size do everything
            period_time 2 # this is the general standard even though often is set to 0
        #  period_time 84000
        #  period_size 512
            period_size 1024 # oss period frames this is the one shown as hardware
        #    period_size 128
        #  period_size 2048
        #  period_size 4096 # not great to go over this
        #  buffer_time 340000
        #  buffer_size 16384 # this is the one shown as hardware but causes huge mess
        #  buffer_size 8192
        #  buffer_size 4096
            buffer_size 2052 # this is the one i use
            rate 44100 # can let card decide this on it's own this one is what hardware says
        #  rate 48000

        }
        bindings {
            0 0
            1 1
        }
    }
 
    ctl.dmixer {
        type hw
        card 0
    }

    ctl.mixin {
        type hw
        card 0
    }

    pcm.duplex{
        type asym
        playback.pcm "dmixer"
        capture.pcm "mixin"
      }

pcm.mixin {
        type dsnoop
        ipc_key 5978293        # must be unique for all dmix plugins!!!!
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
                channels 2
                period_size 1024
        #      period_size 1026
        #        buffer_size 4096
                buffer_size 2052
                rate 44100
      #                periods 0
                period_time 2
        }
        bindings {
                0 0
                0 1
        }
    }

pcm.ladspadelay {
type ladspa
slave.pcm "plughw:0,0";
path "/usr/lib/ladspa";
plugins [
{
label delay_5s
input {
controls [ 0.8 0.3 ]
}
}
]
}

pcm.delay {

type plug

slave.pcm "ladspadelay";
}


pcm.ladspacompress {
type ladspa
slave.pcm "plughw:0,0";

path "/usr/lib/ladspa";

plugins [
{
label dysonCompress
input {
#peak limit, release time, fast ratio, ratio
controls [1.0 0.1 0.1 0.9]
}
}
]
}

pcm.compress {

type plug

slave.pcm "ladspacompress";
}


mykrob 05-08-2007 03:15 PM

Thank you, I will try.

I have located how to adjust the sample rate, but what about the buffer? I see an option for "Periods/Buffer",which is set at 2 by default. Is this the one I should change? If so, what value would you recommend? I see in your asound file, you have 2052 set.. I just want to make sure that this is the right thing to change, because going from 2 to 2000 is drastic.

Thanks,.
-myk

mykrob 05-08-2007 03:20 PM

me again.. Also, i do not have the file .asoundrc..

should i make one, or is everything for this configurable through the qjackctl interface?

studioj 05-08-2007 05:54 PM

yea just make above a new file named ~/.asoundrc
the jack settings are something different.
how it all interacts is the great mystery
in qjackctl buffer is called Frames/Period
mine is set to 512
thats a good place to start and moving up from there
Periods/buffer 2 is good
that makes the buffer 1024
read the slash as per

generally slower hardware requires more buffering

mykrob 05-09-2007 05:33 PM

better than before, but still a clicking noise. I think it may be the sound card. My laptop has Intel HDA, and I am using alsa 1.0.14rc2 ( i think)

Since this driver is a release candidate, and I know this particular sound chipset has been a bit fruity, perhaps this is the problem.. I know I have successfully used Ardour on lesser hardware in the past, and it worked fine...


I guess all I can do is wait for a better driver, but if anyone can confirm or deny my driver theory, that would help.

thanks,
-myk

studioj 05-09-2007 06:23 PM

i don't know about the driver but there a few other tricks to try.
first try to make xorg a bit nicer
renice +2 -p `ps -C Xorg -o pid=`
if that makes the video or mouse real choppy try +1 or if all is ok try +5 and see what happens etc. just play with it so x eats up less bandwidth.

also try to increase the hardware latency settings for larger bursts (seems counter intuitive)
look up the soundcard with
lspci -v
mine is 04:08.0
so i insrease latency with the command
setpci -v -s '04:08.0' latency_timer=48
use value ff for maximum
setpci -v -s '04:08.0' latency_timer=ff
just play with the values and check lspci -v to see results
the command sees the values as sugestions only !
some drivers you can't change etc.
just play with it and see if it helps
you can also try to increase latence across the pci bus controllers and see if that helps
you can also try to decrease latency on the video controller and see if it helps

and one last tweek to try
look at
cat /proc/interrupts
set realtime priorities for the soundcard -- mine is on IRQ 11 so i set
chrt -f -p 82 `pidof "IRQ 11"`
next set rt prioritier for yur real time clock (rtc)
mine is on IRQ 8 so i set
chrt -f -p 98 `pidof "IRQ 8"`

if you don't have chrt just get it from your distribution package thingy


All times are GMT -5. The time now is 10:04 PM.