Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 309

Thread: Howto: Install and use projectM music visualizer with pulseaudio support on Hardy

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Bristol, UK
    Beans
    275
    Distro
    Ubuntu 9.10 Karmic Koala

    Howto: Install and use projectM music visualizer from svn on Hardy

    NEWS UPDATE 23/08/08: It seems the recent svn releases are becoming more and more broken recently and are becoming harder to compile/run without issues. I recommend installing the 1.2 release version instead of attempting to get svn to work for now, unless you are very brave.

    Introduction:

    Recently I finally got completely sick of Goom and went on a hunt for other visualizations for linux. I found libvisual which gave me about eight more effects, but I still wasn't really satisfied. Some of you out there may have heard of or used milkdrop, a visualization framework for winamp on windows. Milkdrop has been around for years, thousands of so called "presets" have been written for it, and it uses hardware acceleration and iterative processing to produce some seriously stunning and very trippy music visualizations.

    Here is a youtube video showing a (very small) selection of presets available in milkdrop and what they look like.

    There is a port of this framework to linux and opengl called projectM. ProjectM contains plugins for xmms, alsa (experimental), libvisual, jack, and most importantly, pulseaudio. With pulseaudio support comes projectM's real strength - it can produce visualizations for ANY program or sound stream that pulseaudio handles. Here's a screenshot of the sort of thing projectM is capable of:



    This guide will demonstrate how to install the latest svn projectM on Hardy Heron. This method will probably work fine on gutsy too but I haven't tested it myself. At the time of writing there IS a version in the repos for hardy, but I couldn't make it work and it is very old anyway, plus it has no pulseaudio support.

    NOTE: ProjectM uses opengl and heavy iterative processing. You will need a good video card with decent opengl drivers and a fast cpu to get pleasing performance. Based on my (albeit limited) experience I would recommend at least a 2ghz pentium 4 and a gpu at least as powerful as a nvidia 6400. You absolutely CANNOT make this work without hardware opengl support.

    Install:

    We will compile projectM with libvisual and pulseaudio support. First thing we will need to do is install the dependencies:

    Code:
    sudo aptitude install libglew1.5 libglew1.5-dev ftgl-dev libpulse-dev subversion cmake libvisual-0.4-dev libsdl-dev libqt4-dev build-essential
    IMPORTANT NOTE: I may have missed something here, if ANYONE gets compilation errors, pm me immediately and I'll add the missing dependencies to this list.

    With the dependencies in place, it's time to download the source:

    Code:
    cd ~
    mkdir projectm
    cd projectm
    svn co https://projectm.svn.sf.net/svnroot/projectm/trunk projectM-Trunk

    NOTE: Svn can take a long time to fetch all the code, so be patient while it downloads.


    When it has finished, change to the source directory:

    Code:
    cd projectM-Trunk/src
    ProjectM does NOT use autoconf, so there is no ./configure to do, we will use cmake instead:

    Code:
    ccmake .

    NOTE: See the '.' above? That's important! You must include it in your command or it won't work.


    Now cmake will load. Press "c" to configure projectM. Highlight the CMAKE_BUILD_TYPE field, press enter and type "Release" there. Press enter again. Then highlight the CMAKE_INSTALL_PREFIX field and change /usr/local to /usr/. Then press "c" again to configure it with those parameters. If you want to use projectM with jack or xmms, you will need to hunt down the dependencies for these on your own, they aren't covered here (yet?).

    NOTE: If you run into dependency problems when trying to configure cmake, it can usually be solved by doing "rm CMakeCache.txt" in the src directory.

    Now that cmake has got it's configuration right, press "g" to generate a makefile and exit.

    Then it's a simple:

    Code:
    make && sudo make install
    NOTE: If you get build errors, please see the build errors section at the bottom of the guide.

    Great! ProjectM should be installed.

    NOTE: I used to suggest testing projectm with projectm-test or projectm-test-texture here, but it really isn't necessary unless you are a developer or debugging and in which case already know what you are doing. There used to be an issue with projectm-test where it locked up the mouse cursor, but I think this is fixed in the latest svn. Either way there isn't really any need for a normal user to run either of these commands anyway.

    Now that it's working, you can finally use projectM with some music! Put a good tune on (I recommend some pink floyd) go to applications/sound and video and click on projectm-pulseaudio.

    NOTE: You can also run it from a terminal using:

    Code:
    projectM-pulseaudio
    NOTE 2: The first time I tried it, my fonts looked disgusting. This is due to a bug in qt4, so you may want to check out the workaround here.

    Woo! We have funky visuals! Now on to...

    Usage:

    You can launch projectM-pulseaudio from the terminal or from the gnome menu under sound and video.

    Controls (these are listed in the menu under "hotkeys":

    m - brings up a menu
    f - toggles fullscreen on/off
    l - "locks" to a particular preset
    y - toggles shuffle mode
    n - next preset
    p - previous preset
    r - selects random preset

    F1 - Help menu
    F2 - Toggles song title on/off (doesn't work in libvisual or pulseaudio as far as I can tell)
    F3 - Toggle preset name on/off
    F4 - Toggel rendering info on/off
    F5 - Shows fps

    Presets:

    This is the fun part! ProjectM comes with loads of good presets already, but I recommend searching the web for some more that you like, there are literally thousands out there. My favourite package is the Better Life Through Chemicals compilation, available as a torrent here.

    When you download a preset package, you will need to extract all the files to a directory where projectM can find it. I put mine in ~/projectM/presets and then did:

    Code:
    cd /usr/share/projectM/presets && sudo ln -s ~/projectm/presets/ others
    I think this is probably the cleanest way of doing it, because having to become root to add new presets to a /usr/ directory every time is a pain.

    NOTE: For those that don't understand the command, it creates a symbolic link in the projectM presets directory that links to a directory in your home folder. Any preset you put in this directory will be seen and can be used by projectM.

    Configuring projectM to look AWESOME:

    Go to settings/configure projectM in the menu to change performance options. You will want to tweak the projectM settings to get the most awesome looking visuals on your pc. Here is a quick guide to getting the most out of projectM, the options are numbered from most important to least important:

    1) Far and away the best thing you can do to IMMEDIATELY get much better looking graphics is to make sure the texture size is at least 1024. If you have a fairly decent graphics card (nvidia 6600gt or better) you can probably get away with making this higher. I use a nvidia geforce go 7400 and I couldn't get texture sizes about 1024 with compiz turned on without severe stuttering. 1024 is easily enough to make it look good however.

    2) The second most important thing to do is enable sync to Vblank in your graphics options! Otherwise you will get tearing and it looks horrible. For nvidia cards with binary drivers you can do this in the nvidia-settings utility (if you don't have this installed, you can install it by doing "sudo aptitude install nvidia-settings".). For other cards you will need to use whatever control utility you usually use. Cards with open source drivers use driconf I believe.

    3) Third most important thing to do is set the maximum fps to the refresh of your monitor. The standard for LCDs is 60 hz. If you have a monitor with a very high refresh (eg 120hz) it is probably a good idea to set maximum fps to a fraction of this. Anything over 40hz and below 60hz is probably ok. If you have a low end system and you are getting stuttering, if all else fails you may need to set the max frame rate to about 20-30fps. Be warned, it takes away a lot of the aesthetics of the effects to be run at a lower fps (in my opinion, anyway).

    4) Mesh size should be set as large as possible. Whilst the three previous settings should have been configured mainly with graphics card power in mind, the mesh size setting is pretty much solely cpu limited. The first mesh size parameter is the x axis, the second is the y axis. You should set these with the aspect ratio of your monitor in mind for best performance. I have a resolution of 1280x800 and a 1.8GHZ core duo cpu. The largest mesh size I can comfortably use is 48 x 30. If you have a 4:3 monitor you will need to change mesh size ratios accordingly.

    5) The easter egg parameter... It's a mystery parameter! Set it to whatever you like. (HINT: If you really want to find out what it does, google is your friend).

    That's pretty much it for performance, the other options should be fairly obvious.

    NOTE: An important point to remember - at the moment, projectM does NOT apply the settings to the currently running application. When you have finished configuring it, you will need to save the config, exit then relaunch projectM.

    Other/misc stuff

    Milkdrop 2.0 support AKA cool shader effects

    If you have a newer nvidia card, you're in luck! You can enable shader effects and get some awesome effects with milkdrop 2.0 presets. First you need to:

    Code:
    sudo aptitude install nvidia-cg-toolkit
    then enable cg in cmake and compile. This will not change behavious with the standard presets, but try the presets in the projectM-Trunk/presets_milkdrop_200/ directory and see some awesome effects. This is still very experimental and probably won't work with anything other than nvidia 6xxx, 7xxx 8xxx or 9xxx cards.

    Jack support:

    You will need the jackd and libjack-dev libraries, then turn on jack support in cmake before configuring. I have installed this, but I have NOT tested it (actually I don't know how to use jack!) so you are pretty much on your own here. If you succeed in making it work, let me know and I'll integrate it into the howto.

    Updating:

    ProjectM seems to get updated fairly often, so it's always nice to have the latest version. You can do this by changing into the projectM-Trunk directory and typing "svn update", then reconfiguring, making and installing again.

    Further help/documentation:

    Some of this guide is referenced from the wiki pages on projectM. This guide covers most of what is there, but you might want to check it out anyway. I've also found the developer on IRC to be most helpful, the channel is #projectm on irc.freenode.net.

    Pulseaudio support:

    Don't forget that because projectM uses pulseaudio, it can do everything that pulseaudio can do. In the menu, you can select which pulseaudio source to use as the music input to the visualizations. This includes network sound resources. Yes, you CAN use projectM as a visualizer for the music ANOTHER PC is playing!

    It's easy to do this. In the projectm-pulseaudio menu, go to Settings/Pulse audio settings. Uncheck the tick box that says "try first available playback monitor, and choose which source to use! It's automatic, zero configuration and perfectly synchronized even over high latency networks (don't ask me how, I don't understand it either, it's like magic ). You can also use this to select different sound cards on the same machine if you want to.

    Build errors:


    UPDATE: It seems as though some or all of the following issues are solved now. If you get these or any other build errors with the latest version of projectm, please post in this thread saying what the problem was and how you encountered it.

    1) Due to some bizarre bug in cmake, or the way the code is packaged, in my version of projectm I got an error from make install saying something about /projectM-engine/config.inp not found. If this happens to you, execute the following command:

    Code:
    cp config.inp projectM-engine/config.inp && sudo make install
    2) Some users have reported build errors looking something like this:

    CMake Error: Error in cmake code at
    /home/$user/projectm/projectM-Trunk/src/projectM-engine/cmake_install.cmake:341:
    FILE INSTALL cannot find file "/home/$user/projectm/projectM-Trunk/src/libprojectM.pc" to install.
    Current CMake stack:
    [2] /home/$user/projectm/projectM-Trunk/src/projectM-engine/cmake_install.cmake
    [1] /home/$user/projectm/projectM-Trunk/src/cmake_install.cmake
    make: *** [install] Error 255
    If you get these errors, johnl has kindly offered the following solution:

    Code:
    sudo make install # this should fail
    cp projectM-qt/libprojectM-qt.pc ./
    cp projectM-engine/libprojectM.pc ./
    sudo make install # now we should be ok
    3) Some users have reported build problems related to this bug in libqt4-opengl-dev. Solution is documented here.

    4) If you have any other problems building/installing, from now on I will not add these to this howto, as it is starting to get unmanageably long. It's probably better to read through the entire thread to see if somebody else has encountered the same problem. If nobody has, post in the thread and see if somebody can help.


    That concludes the projectM install and usage tutorial. If you have any problems/suggestions, please post in this thread, and someone will help you out. Enjoy your awesomely trippy eye candy!
    Last edited by sammydee; August 23rd, 2008 at 04:00 PM. Reason: General updates

  2. #2
    Join Date
    Apr 2008
    Location
    Park Slope, NY
    Beans
    29
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    One note on the very well written tutorial above:

    The cmake issue of "config.inp.in" not being copied correctly has been resolved (hopefully), so don't fret over that concern.

  3. #3
    Join Date
    Dec 2004
    Beans
    282

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    I can compile okay when I turn FTGL support off, but when I try to copmile with FTGL I get this error:
    Code:
    [ 43%] Building CXX object projectM-engine/CMakeFiles/projectM.dir/TimeKeeper.o
    Linking CXX shared library libprojectM.so
    /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libftgl.a(FTFont.o): relocation R_X86_64_32S against `vtable for FTFont' can not be used when making a shared object; recompile with -fPIC
    /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libftgl.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[2]: *** [projectM-engine/libprojectM.so.2.00] Error 1
    make[1]: *** [projectM-engine/CMakeFiles/projectM.dir/all] Error 2
    make: *** [all] Error 2
    lukas@lukas-desktop:~/Desktop/projectm/projectM-Trunk/src$
    Also, projectm runs very sketchy when compiz is running.

    One feature that I miss from milkdrop that would be simple to implement would be desktop mode.

    I eventually got it to compile after turning font support off and changing the SDL prefix to /usr. I also had to copy some *.pc files into the src directory for the make install to work.


    AWESOME program, but I just hope to see the build process cleaned up in the future. It's getting better, but it's still not working completely.



    Oh, and by the way I do have the ftgl-dev lib installed at version 2.1.2-3

    Thanks for your time, and thanks for your work on this awesome app.

  4. #4
    Join Date
    Jan 2008
    Beans
    65

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    Same problem as earlier with 64 bit font support here as todays release.

  5. #5
    Join Date
    Aug 2007
    Beans
    130

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    Quote Originally Posted by punkrockguy318 View Post
    I can compile okay when I turn FTGL support off, but when I try to copmile with FTGL I get this error:
    Code:
    [ 43%] Building CXX object projectM-engine/CMakeFiles/projectM.dir/TimeKeeper.o
    Linking CXX shared library libprojectM.so
    /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libftgl.a(FTFont.o): relocation R_X86_64_32S against `vtable for FTFont' can not be used when making a shared object; recompile with -fPIC
    /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libftgl.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[2]: *** [projectM-engine/libprojectM.so.2.00] Error 1
    make[1]: *** [projectM-engine/CMakeFiles/projectM.dir/all] Error 2
    make: *** [all] Error 2
    lukas@lukas-desktop:~/Desktop/projectm/projectM-Trunk/src$

    can anyone please tell me how to recompile it correctly (perhaps with different flags)?

    I get this error when Making:

    Code:
    Linking CXX shared library libprojectM.so
    /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libftgl.a(FTFont.o): relocation R_X86_64_32S against `vtable for FTFont' can not be used when making a shared object; recompile with -fPIC
    /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib/libftgl.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[2]: *** [projectM-engine/libprojectM.so.2.00] Error 1
    make[1]: *** [projectM-engine/CMakeFiles/projectM.dir/all] Error 2
    make: *** [all] Error 2
    Thanks

  6. #6
    Join Date
    Mar 2006
    Beans
    34

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    Have you tried "-DCMAKE_BUILD_TYPE=RELEASE" mentioned here?

  7. #7
    Join Date
    Jul 2007
    Beans
    101
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    i get an error while fetching dependencies...
    Code:
    Couldn't find any package whose name or description matched "lib-glew1.5"
    Couldn't find any package whose name or description matched "lib-glew1.5-dev"
    Couldn't find any package whose name or description matched "lib-glew1.5"
    Couldn't find any package whose name or description matched "lib-glew1.5-dev"
    and subsequently i get an error when i try to MAKE...
    Code:
    In file included from /home/kevin/projectm/projectM-Trunk/src/projectM-engine/Renderer.hpp:4,
                     from /home/kevin/projectm/projectM-Trunk/src/projectM-engine/projectM.cpp:58:
    /home/kevin/projectm/projectM-Trunk/src/projectM-engine/FBO.hpp:32:21: error: GL/glew.h: No such file or directory
    a little help?

  8. #8
    Join Date
    Dec 2004
    Beans
    282

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    Code:
    sudo apt-get install libglew1.5 libglew1.5-dev
    Last edited by punkrockguy318; April 13th, 2008 at 04:48 AM.

  9. #9
    Join Date
    Jan 2008
    Beans
    5

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    Code:
    CMake Error: Error in cmake code at
    /home/sputty01/projectm/projectM-Trunk/src/projectM-engine/cmake_install.cmake:341:
    FILE INSTALL cannot find file "/home/sputty01/projectm/projectM-Trunk/src/libprojectM.pc" to install.
    Current CMake stack: 
    [2]	/home/sputty01/projectm/projectM-Trunk/src/projectM-engine/cmake_install.cmake
    [1]	/home/sputty01/projectm/projectM-Trunk/src/cmake_install.cmake
    make: *** [install] Error 255

  10. #10
    Join Date
    Feb 2007
    Beans
    13

    Re: Howto: Install and use projectM music visualizer with pulseaudio support on Hard

    Quote Originally Posted by sputty01 View Post
    Code:
    CMake Error: Error in cmake code at
    /home/sputty01/projectm/projectM-Trunk/src/projectM-engine/cmake_install.cmake:341:
    FILE INSTALL cannot find file "/home/sputty01/projectm/projectM-Trunk/src/libprojectM.pc" to install.
    Current CMake stack: 
    [2]	/home/sputty01/projectm/projectM-Trunk/src/projectM-engine/cmake_install.cmake
    [1]	/home/sputty01/projectm/projectM-Trunk/src/cmake_install.cmake
    make: *** [install] Error 255
    I get the same thing every time i try.

Page 1 of 12 12311 ... LastLast

Tags for this Thread

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
  •