Play music on command line

January 19, 2011 at 12:53 am (Audio / Video, console based, linux apps, Linux codecs) (, , , , , , )

There are many popular audio players for linux; to name a few they would be XMMS, audacious, amarock . But all of these players are GUI-based; and they does not feel like ‘home’ when you are so addicted to using the command line. So i did some searching on possible options, and i found many. I’m only listing two of the best here, mplayer and Music On Console (Player) or MOC. The command line players have the advantage of less crashes, less usage of resources, playability in CUI only OS’s, remote logging to play sound files on a remote machine. The MPD (music player daemon) server can stream audio using any sound output server to a remote machine.


Music on Console (MOC or MOCP) (homepage)

moc player

MOC 2.44 running on my fedora 14 (64 bit)

The MOC has a decent UI for a CLI program. Consists of two panes, one displaying the music files in the current directory and the other showing the current playlist. Play stats and tag info are displayed in the bottom, with the progress bar. Navigation within playlist and song can be done using keyboard. It’s updated support for pulse, OSS and alsa output.

Installation

for debian based sytems use, sudo apt-get install moc

for rpm based systems, it is unlikely that moc would be on the repository. Try yum install moc and see. If that’s the case, we need to compile from source which can be downloaded from this link. You would need following packages

for mp3 support: yum install libmad-devel libid3tag-devel

for wma,mp4,aac,ra support: yum install ffmpeg-devel (This caused a compile error due to ffmpeg-devel relocating its .h files .. so please don’t do this if you know how to use linking). To activate support for other codecs, see README.

then decompress the file, go to the folder and type usual

./configure && make && install as root to compile and install. See my article on compiling from source for more information.

After installation to run, type

mocp <filename>

press q and type mocp -x to end program. Otherwise the server will still be running 🙂

Mplayer

mplayer

Mplayer running on console

This doesn’t need much introduction; which is as my perception is the best multimedia player ever, which can play videos too. Apart from the gmplayer (or mplayer-gui), the mplayer command can be used to play music on command line, with showing in depth info. Mplayer can play any audio file, it’s heavily stable and takes less resources. You can see my previous post on mplayer.

to install,

sudo apt-get install gmplayer (for debian based systems)

yum install mplayer-gui (for rpm based systems)

Permalink Leave a Comment

Hydrogen – The GNU Drum Machine

April 10, 2009 at 9:10 pm (Audio / Video, linux apps) (, , , , , , )

We just composed some music in the previous article, and it’s time to beat some drums now. Hydrogen is a cool program —— you don’t need to know anything about music to enjoy it ! (like me). It gives you the ability to compose tracks of drum beats, like what you find in a usual song, the tracks may be repeated again and mixed with other tracks given in the timeline to produce the final track. It has a eye-catching GUI too. The version 0.9.3 which i’m using (which is also the last stable edition), uses best out of Qt 3.

Hydrogen 0.9.3 running on Qt 3.3.8 on FC9

Hydrogen 0.9.3 running on Qt 3.3.8 on FC9

According to their homepage, features of the Version 0.9.3 are;

General

  • Very user-friendly, modular, fast and intuitive graphical interface based on QT 3.

  • Sample-based stereo audio engine, with import of sound samples in .wav, .au and .aiff formats.

  • Support of samples in compressed FLAC file.

Sequencer and mixer

  • Pattern-based sequencer, with unlimited number of patterns and ability to chain patterns into a song.

  • Up to 64 ticks per pattern with individual level per event and variable pattern length.

  • 32 instrument tracks with volume, mute, solo, pan capabilities.

  • Multi layer support for instruments (up to 16 samples for each instrument).

  • Ability to import/export song files.

  • Unique human velocity, human time, pitch and swing functions.

  • Multiple patterns playing at once.

Other

  • JACK, ALSA, PortAudio and OSS audio drivers.

  • ALSA MIDI and PortMidi input with assignable midi-in channel (1..16, ALL).

  • Import/export of drumkits.

  • Export song to wav file.

  • Export song to midi file.

Installing

********You can download the source from here. Typing in the command line, inside the source directory (after extracting),

./configure && make && sudo make install

should install the program, you can always see my article on “compiling from source” if necessary.

*********Without using the source, you can use already available binaries. It’s so popular that your distro will have a pre-compiled binary. Type,

apt-get hydrogen (for debian-based systems (ex: ubuntu))

yum install hydrogen (for red hat, mandriva, suse linux)

should install version 0.9.3

Dependencies: Notable dependencies are:  alsa,qt3,raptor,flac,sndfile,lrdf

Importing drum kits

.h2drumkit files importing

.h2drumkit files importing

You can download drum kits from the sourceforege page. After downloading, you start hydrogen, click view on the menu bar tab, and click on the drumkit manager, so the following dialog box appears. Click on the import tab, and browse for the .h2drumkit file you have downloaded. Click on the load tab and select and load your new drumkit.

Development version (0.9.4 beta 3)

The beta version 0.9.4 uses Qt 4.4, but i’m unable to install it as my Qt is 4.3. (+ only source is available for the fedora, and it uses scons to compile the program, which cannot differentiate my Qt4.3.4 from Qt 3.3.8 and I know nothing about editing scons files), anyway I won’t be positive about a yet beta stage edition. You can download it here.

A help on how to install is given in this page.

Permalink 3 Comments

LMMS (Linux Multimedia Studio) – a FL Studio like FOSS program

April 9, 2009 at 9:05 pm (Audio / Video, linux apps) (, , , , , )

It’s been a long time since I have written a post. Past several weeks has been busy, writing course works, as I’m a chemical engineering undergraduate too. To break off the frost, we’ll start from some MUSIC! What I have here today is a fruity – loops ( the commercial music editor for song tracks) like song/melody editor for Linux, with the full swing! Can you believe it? This is the best use of Qt 4 (GUI library) I have yet seen, and the core is written in C++ makes it heavily powerful and versatile over the other Java opponents. Creation of melodies and beats, the synthesis and mixing of sounds are some of the best wanted features of this program.

LMMS 0.4.0 - RC3 running on Qt 4.3.4 on Fedora 9

LMMS 0.4.0 - RC3 running on Qt 4.3.4 on Fedora 9

I’m not that good at music, and I don’t understand the proper use of controls —– but I can still have some fun ! The current version is 0.4.3, but what I have installed in my Fedora 9 is 0.4.0 about an year ago. It’s obvious that the new one should be better!

According to the LMMS homepage, the features of the program are (Version 0.4.3),

  • Song-Editor for composing songs

  • A Beat+Bassline-Editor for creating beats and basslines

  • An easy-to-use Piano-Roll for editing patterns and melodies

  • An FX mixer with 64 FX channels and arbitrary number of effects allow unlimited mixing possibilities

  • Many powerful instrument and effect-plugins out of the box

  • Full user-defined track-based automation and computer-controlled automation sources

  • Compatible with many standards such as SoundFont2, VST(i), LADSPA, GUS Patches, and full MIDI support

  • Import of MIDI and FLP (Fruityloops® Project) files

Another view with more controls

Another view with more controls

An unbeleivable LADSPA plugin browser (click to zoom)

An unbeleivable LADSPA plugin browser (click to zoom)

Installing LMMS

****I recommend installing from the source as I have done (except for ubuntu and mandriva users). The source for the LMMS is to be compiled from Cmake. You can download it from this link. You can see my tutorial on compiling from source, or see the INSTALL file on the source folder. It reads: go to the source folder in the command line (use CD command) and type,

mkdir build

cd build

cmake ../ -DCMAKE_INSTALL_PREFIX=/usr

make && sudo make install

*****Without doing this , you can use the pre-compiled binaries. For ubuntu people,

apt-get lmms should do.

RPM’s are there for mandriva people. Check out www.rpmfind.net or use yum.

yum install lmms should do.

Dependencies:

JACK, vorbis, ogg, alsa, SDL, samplerate, sndfile, WINE, stk, fluidsynth . If you’re compiling from the source, you need the development packages (ex: SDL-devel) too. You don’t need to worry about these if you’re using apt-get, yum or package-manager which will do this (solving dependencies) automatically for you.

*****NOTE: Hydrogen is much similar program to fruity loops, and i’m yet to compile it. Will tell you people as soon as i’ve done it (have time to do it). You can check out their homepage till then.

P.S: I’ve created the hydrogen post now. You can visit it here.

Permalink 2 Comments

Installing linux players on fedora.

November 2, 2008 at 1:50 pm (Audio / Video, linux apps, Linux codecs, Linux installation) (, , , , , , )

This article is about using redhat package manager (RPM) to install Mplayer, xmms player, real player etc… on Fedora and redhat. I hope same techniques can be used for Suse and Mandriva.

For each of the given names of packages  below visit www.rpmfind.net or rpmsearch, and copy and paste the package name.

===============================================================================================

edit on 19/01/2010

Now it is much easier to install programs using yum and apt-get than from installing from the source. If you have set your repositaries correctly, following should work.

for  installing both mplayer and vlc player

p { margin-bottom: 0.08in; }

sudo apt-get install gmplayer vlc (for debian based systems)

yum install mplayer-gui vlc (for rpm based systems)

The information below were written two years ago and pretty much deprecated by now. 🙂

================================================================================================

Indentify your architecture (for pentium, dual core, C2D, athlon XP it’s i386 (x86); for 64-bit it’s x86_64. Learn more about RPM’s on my “Managing RPM’s” blog on linux installation category (This post may be pending). For example, you have p4, fedora9 and you want xmms, you choose

xmms-1.2.11-1.20071117cvs.1.fc9.i386.rpm note fc9 tag and i386 (if no tag is there, or noarch is there, you can choose for any architecture/fedora version).Package name with FC9 i386 compitable link as example.

1.Mplayer

mplayer-1.0-0.44.rc2.fc9.i386.rpm

2.Realplayer

http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.rpm (for all fedora dist, any arch)

3.Helixplayer

HelixPlayer-1.0.9-2.fc9.i386.rpm

4.xmms player, for this you need

xmms

xmms-1.2.11-1.20071117cvs.1.fc9.i386.rpm

xmms-mp3

xmms-mp3-1.2.10-16.fc7.i386.rpm

continue with xmms-wma, xmms-skins if necessary xmms-libs

5. Gstreamer-ffmpeg

gstreamer-ffmpeg-0.10.5-1.fc9.i386.rpm

for mp3 for gstreamer use fluendo codec (google this to find a downloadable link)

for installing RPM’s, type in command line

su –

passwd:(Enter your pasword here)

rpm -ivh (rpm file) example:

rpm -ivh /home/malshan/HelixPlayer-1.0.9-2.fc9.i386.rpm

if no dependency errors found, now you’ve got program installed. Right clicking on a file on your explorer and saying to open with this program automatically sets that type of file with the program.

enjoy!

If any errors found, please reply.

sudo apt-get install gmplayer (for debian based systems)

yum install mplayer-gui (for rpm based systems)

Permalink Leave a Comment

Adding A/V support for linux: Install Mplayer

November 1, 2008 at 6:14 pm (Audio / Video, Linux codecs) (, , , , , )

This is for Mplayer installing: x86 based PC on Linux

mplayer running on FC9, gnome

mplayer

Many people are talking about cannot getting videos or sounds to play on linux. (except for ubuntu new)
Even if you have installed codecs, you should really go for this player: It can even play with win32 codecs; just need to drop in to folder!

go to http://www.mplayerhq.hu/design7/dload.html to check it out

download from
http://www.mplayerhq.hu/MPlayer/rele…1.0rc2.tar.bz2
untar it using your archeive manager (open- and drag and drop where you want to copy)
go in to the folder in command line (termina/console) and type

./configure –enable-gui

if no errors found (if you get dependency errors you’ve to install them first — look the list down)
then type

make

this takes about an hour ——- wait and hope for good luck — program is being compiled from the source code………
then if it’s completed without errors, then go admin in command line
su –
passwd: (enter your admin passwd here)
(NOTE: you can always type “root” as username and passwd at linux login screen to be admin from the start-if you are not familiar with command line-so you can use normal GUI to copy files without permission problems.)
type:

make install

will install mplayer to every user but, without codecs
download codecs at
http://www.mplayerhq.hu/MPlayer/rele…071007.tar.bz2
untar it as i said before, and copy the codec files (not the folder) in to
/usr/local/lib/codecs, if no codecs folder exist, create one. (hope you know to use cp and mkdir commands)

now goto the codecs path and type (as admin/root)

chmod ugo+rwx *.*

now you can type

mplayer filename

to play anyfile!
ex: mplayer *.* will play all files in directory.

for the gui; use gmplayer instead
in order to GUI to work, you need skins, download this:
http://www.mplayerhq.hu/MPlayer/skins/Blue-1.7.tar.bz2
untar it,
and paste the whole folder
/home/(your user name)/.mplayer/skins
or
~/.mplayer/skins (as normal user, not admin)
go inside the folder and use chmod as before (as admin)
enjoy!
If need more help, please reply.
I’m using fedora 9 (and not windows)

dependencies:
If configure says your machine not having something — you can just ignore them if they are optional
or else goto www.rpmfind.net search and type it there to find what you want (for Suse, mandriva and fedora only)

Check for my “Compiling Linux apps from source” page for more help. 

Permalink 5 Comments