JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Playing music using MOC

Sun Apr 07, 2013 6:59 pm

I previously started a thread with the problem of playing music off a cd player, but I gave up on that, so I put the music on a USB stick and then copied them to the SD card and I am now playing them!!!

Unfortunately the music takes up rather a large amount of memory; about 0.6GB (not yet a problem, but I would like to not have to worry about it, especially when I want to add more).

Ultimately I would like to be able to simply put the music on a memory stick and play it directly from that, so how can I do it? (MOC currently doesn't recognise the memory stick, hence the need to copy the music to the SD card.
Last edited by JizzaDaMan on Mon Apr 08, 2013 11:02 am, edited 1 time in total.

broo0ose
Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Playing music using MOC

Sun Apr 07, 2013 8:04 pm

Is the USB drive mounted ?

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Playing music using MOC

Sun Apr 07, 2013 10:41 pm

When I inserted the stick it opened a window registering the fact that it had been recognised.
My user guide says that means it's been drive mounted automatically (I'm very new to this stuff, all I know is from the user guide :P )

broo0ose
Posts: 317
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Playing music using MOC

Mon Apr 08, 2013 7:12 pm

OK, you say it does not recognise the memory stick but you will not see it as a separate device because that is not how Linux works.

Insert the memory stick and if it has mounted it automatically have a look in the /media folder.

User avatar
azeam
Posts: 194
Joined: Fri Oct 26, 2012 11:13 pm
Contact: Website

Re: Playing music using MOC

Mon Apr 08, 2013 7:49 pm

JizzaDaMan wrote:I previously started a thread with the problem of playing music off a cd player, but I gave up on that, so I put the music on a USB stick and then copied them to the SD card and I am now playing them!!!

Unfortunately the music takes up rather a large amount of memory; about 0.6GB (not yet a problem, but I would like to not have to worry about it, especially when I want to add more).

Ultimately I would like to be able to simply put the music on a memory stick and play it directly from that, so how can I do it? (MOC currently doesn't recognise the memory stick, hence the need to copy the music to the SD card.
Did you change the music directory in MOC's config file? You need to update it to the directory where the USB drive is mounted, I think the config file is located at ~/.moc/config

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Playing music using MOC

Mon Apr 08, 2013 10:43 pm

Did you change the music directory in MOC's config file? You need to update it to the directory where the USB drive is mounted, I think the config file is located at ~/.moc/config
That may just work, I will try it tomorrow. That is where the file is located, I've edited it several times. Do you know what the property is called?

robinjoo1
Posts: 10
Joined: Mon Apr 08, 2013 12:55 pm
Location: netherlands

Re: Playing music using MOC

Tue Apr 09, 2013 1:27 pm

or look at /sda1

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Playing music using MOC

Tue Apr 09, 2013 1:44 pm

I have tried looking in the /media and there is a directory called 'externaldrive' but there's nothing in there.

I also tried changing the 'MusicDir' property in the config file to 'sda1' (the name of the USB drive that I obtained from entering 'sudo fdisk -l' ) but it doesn't exist according to MOC

User avatar
azeam
Posts: 194
Joined: Fri Oct 26, 2012 11:13 pm
Contact: Website

Re: Playing music using MOC

Tue Apr 09, 2013 2:02 pm

JizzaDaMan wrote:I have tried looking in the /media and there is a directory called 'externaldrive' but there's nothing in there.

I also tried changing the 'MusicDir' property in the config file to 'sda1' (the name of the USB drive that I obtained from entering 'sudo fdisk -l' ) but it doesn't exist according to MOC
What's the file system of the external drive?

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Playing music using MOC

Tue Apr 09, 2013 4:31 pm

FAT32

User avatar
azeam
Posts: 194
Joined: Fri Oct 26, 2012 11:13 pm
Contact: Website

Re: Playing music using MOC

Tue Apr 09, 2013 5:37 pm

JizzaDaMan wrote:FAT32
Ok. To automatically mount the hard drive after boot you'll need to edit the fstab file

Code: Select all

sudo nano /etc/fstab
Add the following line

Code: Select all

/dev/sda1       /media/externaldrive   vfat    defaults 0 0
Close (ctrl + x) and save (y). Read the information from fstab

Code: Select all

sudo mount -a
The drive should now appear at /media/externaldrive and it seems like you found the right place to change the directory in the MOC config file (it should be /media/externaldrive and not /dev/sda1).

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Playing music using MOC

Tue Apr 09, 2013 7:12 pm

worked perfectly, thank you so much :)

Return to “Beginners”