Showing posts with label MOC. Show all posts
Showing posts with label MOC. Show all posts

Playing audio through Raspberry Pi

My Raspberry Pi and my BBC Master both share a 32 inch TV screen.  The problem is that I wish to continue using my Pi as a media player whilst simultaneously working with the BBC microcomputer (which doesn't play media).  In its default setting the Raspberry Pi sends audio through the HDMI to the TV and so all is very quiet when I switch to the BBC computer on SCART.

The Pi has an audio output however nothing happens when you plug an audio jack in.

A little Linux is required:


    lsmod | grep snd_bcm2835


Followed by:

    amixer cset numid=3 1


(To return to the default settings change the final '1' to '2'.)


I can now use the Pi as a media player, whilst simultaneously using my BBC computer as a productivity machine.  My music media files are stored on an external hard drive on my home network.  Altogether I am a happy nerd.

I cannot, however, force the audio through the headphones audio jack when using RISCOS on the Raspberry Pi.  I have tried changing the config.txt file by following online instructions but so far have had no luck.  If anyone knows how to do this then please get in touch.


Music on Console for Raspberry Pi

Following on from last week's post on setting up my RISC OS Pi machine as a media center, I started to play around with the Raspbian distribution. I needed a lightweight media app to play music as i work, and a little research led me to MOC, or Music On Console.

The MOC console running on Raspbian.
Installation
This is very straight-forward.  If you are interested, type:

sudo apt-get install moc

Launch the application with:

mocp

MOC will run even if you don't have a GUI installed.  You can even close the terminal window or tab and your music will continue to play.


General Instructions

MOC is very simple to use. Navigation through your folder structure uses the cursor keys. Press 'Enter' to play.  Press 'n' to skip to the next track.

Press 'h' for help. This will bring up the list of keyboard short-cuts for controlling the system.  I have only just scratched the surface here.

It is also possible to control MOC from the command line through flags, ie characters following a dash.  For example, to stop the current playback, use:

mocp -s

Or, to display information about the current song file:

mocp -i


Th..th..that's all folks!
MOC looks good and I look forward to experimenting with all that it can do over the next few weeks. It really is a very lightweight app - it is currently using less than 1% of my system resources.



Label