Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Can't play the guitar and listen to a youtube video

  1. #1
    Join Date
    Dec 2009
    Beans
    334

    Can't play the guitar and listen to a youtube video

    Hi:

    While running Rakarrack or Guitarix in U 12.04 (and having tweaked /etc/pulse/default.pa file to allow for Alsa and Jack runnnig together), I can listen to a mp3 being played in VLC or Movie Player, provided I don't move the mouse and there is no read/write disk activity, otherwise the sound "breaks", as if the processor can't cope with both tasks (processing the guitar sound and running other processes); but if I want to play the guitar while watching a youtube video, it's impossible. I don't think the problem is related to youtube, but with processing a video while downloading the browser cache at the same time.

    Do I have any way to fix this issue? The (old) PC has 1GB of RAM, do you think that by having 4GB things will improve?

    Thanks
    Last edited by rva1945; June 24th, 2013 at 08:12 PM.

  2. #2
    Join Date
    Jun 2008
    Beans
    1,113
    Distro
    Ubuntu Studio

    Re: Can't play the guitar and listen to a youtube video

    RAM is not the issue, the CPU power is. Adobe flash eats CPU time - just like that, and JACK also...

    Download the video first, and watch it in VLC via JACK.

    To play guitar you need RT and lower latency. Both are not good for watching flash video, simply it is not made for that, adobr flash is not JACK compatible.

    Setting the PA config to "allow for Alsa and Jack runnnig together", (besides the fact that ALSA is already runing all the time), is not the way to go - too much layers --> bad performance. Skip the PA to strip off the layers. Configure directly ALSA in .asoundrc, something like
    Code:
    pcm.rawjack {
        type jack
        playback_ports {
            0 system:playback_1
            1 system:playback_2
        }
        capture_ports {
            0 system:capture_1
            1 system:capture_2
        }
    }
    
    pcm.jack {
        type plug
        slave { pcm "rawjack" }
        hint {
            description "JACK Audio Connection Kit"
        }
    }
    
    pcm.!default {
        type plug
        slave { pcm "rawjack" }
    }
    But again, adobe flash is not made for RT. And this configuration needs JACK to be running non-stop.

    And
    "Can't play the guitar and listen to a youtube video "
    of course you can't, that is normal.

  3. #3
    Join Date
    Dec 2009
    Beans
    334

    Re: Can't play the guitar and listen to a youtube video

    OK, lets forget about watching the video online, in fact I tried downloading it first to the cache and then opening it in VLC but the problem remains. Anyway I found the mp3 so no need for the video, but again, there are noises, like clicks, as if any load in the CPU puts noise in the line, which Rakarrack "does a good job" in amplifying it.

    Where is .asoundrc? Is it a folder? I didn't find it!

    Thanks

  4. #4
    Join Date
    Jun 2008
    Beans
    1,113
    Distro
    Ubuntu Studio

    Re: Can't play the guitar and listen to a youtube video

    What is your CPU?
    What is your JACK configuration?
    What is your kernel?
    give
    Code:
    cat /proc/cpuinfo | grep name
    Code:
    cat .jackdrc
    Code:
    uname -r
    About .*rc files

    In case of 99.90% dot files are in your $HOME directory.
    In case of 99.90% *rc files are in your $HOME directory.
    In case of 99.90% when absolute path is not given it is in your $HOME directory.
    "rc"(runcom) (in a doted) file name means that it is some kind of configuration file. Dot file is hidden file, the dot hides it. Sometimes they exists, sometimes the user needs to create it.

    Let's leave the .asoundrc file for now, and try to make JACK work better.

  5. #5
    Join Date
    Dec 2009
    Beans
    334

    Re: Can't play the guitar and listen to a youtube video

    I went to Home directory, ctrl+h to see hidden files but to no avail. In fact I tried
    cd ..
    (then once in Home directory)
    sudo gedit ..asoundrc
    and a new empty file was created in gedit (I closed without saving, anyway).

    Tonight at home I will pass you the data about the hardware. As for the noises, I'm using a plug adapter for connecting the guitar to the line-in, I think I should use the normally shielded cable from the guitar and and adapter just at the line-line-in.


  6. #6
    Join Date
    Jun 2008
    Beans
    1,113
    Distro
    Ubuntu Studio

    Re: Can't play the guitar and listen to a youtube video

    Never use "sudo" with GUI applications, for GUI always use "gksudo".
    No reason to use sudo for files in $HOME directory, it is USER directory NOT system directory. All files in it has to be USER's.
    It is not ..asoundrc, but .asoundrc.
    As I said, the file does not exists, it needs to be created.

  7. #7
    Join Date
    Dec 2009
    Beans
    334

    Re: Can't play the guitar and listen to a youtube video

    Here goes the requested information:

    robert@rvalinuxdesktop:~$ cat /proc/cpuinfo | grep name
    model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
    model name : Intel(R) Pentium(R) 4 CPU 3.00GHz

    robert@rvalinuxdesktop:~$ cat .jackdrc
    /usr/bin/jackd -P1 -dalsa -dhw:0 -r22050 -p16 -n2

    robert@rvalinuxdesktop:~$ uname -r
    3.2.0-48-generic-pae

    Now I don't know what is going on, but I can't listen to a mp3 decently, it slows down, "breaks" (sorry, English is not my mother's language so maybe I can't find the exact words or phrase to describe this problem), and when running Rakarrack there is a lot of background noise (no guitar connected) when turning the DistBand on.

  8. #8
    Join Date
    Jun 2008
    Beans
    1,113
    Distro
    Ubuntu Studio

    Re: Can't play the guitar and listen to a youtube video

    Well, not that bad CPU
    but
    JACK command is strange.
    why 22050 sample rate? To low period, just 16.
    Try something more conventional, like
    Code:
    /usr/bin/jackd -dalsa -dhw:0 -r48000 -p256 -n2
    Why generic kernel? You don't have Ubuntu Studio installed, just plain Ubuntu?

  9. #9
    Join Date
    Dec 2009
    Beans
    334

    Re: Can't play the guitar and listen to a youtube video

    I tried reducing the sample rate to improve the performance, but it didn't work.

    Tonight I will add another GB of RAM for a total memory of 2GB.

    As for the operating system, I'm using Ubuntu 12.04 32 bits.

  10. #10
    Join Date
    Jun 2008
    Beans
    1,113
    Distro
    Ubuntu Studio

    Re: Can't play the guitar and listen to a youtube video

    More RAM will not help you.
    You need lowlatency kernel, also check if you are in audio group
    give
    Code:
    groups

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •