Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


[How To] CD playback
#21
Purists will no doubt object that I'm really talking here about the label of the filesystem in a partition and not a label of the partition itself. Sorry about that.

Also, they'll no doubt point out that the lsblk command combines what I did in two steps, e.g.,

Code:
pi@moode3a:~ $ lsblk -f
NAME        FSTYPE LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT
mmcblk0                                                                      
├─mmcblk0p1 vfat   boot   4BBD-D3E7                             198.9M    21% /boot
└─mmcblk0p2 ext4   rootfs 45e99191-771b-4e12-a526-0779148892cb   25.3G     9% /
Sorry about that, too. My excuse is I'm old and lsblk wasn't invented until long after I cut my eye teeth on Unix.

Regards,
Kent
Reply
#22
Quote:My excuse is I'm old and lsblk wasn't invented until long after I cut my eye teeth on Unix.

We are never too old to enjoy a happy childhood.... Wink Big Grin 
My #1 Wifelet tells me mine is just beginning... Angel
----------
bob
Reply
#23
(03-06-2020, 05:47 AM)DRONE7 Wrote:
Quote:My excuse is I'm old and lsblk wasn't invented until long after I cut my eye teeth on Unix.

We are never too old to enjoy a happy childhood.... Wink Big Grin 
My #1 Wifelet tells me mine is just beginning... Angel

...being there, done that, wearing the T-shirt (if I remember unaided where I've left it last night)... Angel


... on to greater things now, hold on... where's my list?
Reply
#24
Quote:(if I remember unaided where I've left it last night)
Bathroom floor prolly and tomorrow you'll be in the dogbox for that.... Wink

Quote:... on to greater things now, hold on... where's my list?


Brahms and Liszt...sort of list ?

I can never remember where I put those either... Exclamation Undecided Sleepy
----------
bob
Reply
#25
(03-06-2020, 02:05 AM)TheOldPresbyope Wrote: @Onionhead

Hi.

Try starting in the root directory (named rootfs on your Mac, probably) instead of the boot directory.

Regards,
Kent

Added after posting:

Let me be more explicit. Once flashed with the moOde image, the uSD card has two partitions, labelled "boot" and "rootfs" respectively. 

Your Mac is automounting the contents of these two partitions to two directories (mountpoints) having the same names.

After an RPi boots from the card, the separate filesystems in these two directories are merged into one running filesystem. You can see this from the command line



Code:
pi@moodecd:/var/www/command $ ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 15 Feb 22 13:57 boot -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 15 Feb 22 13:57 rootfs -> ../../mmcblk0p2

pi@moodecd:/var/www/command $ mount|grep mmcblk
/dev/mmcblk0p2 on / type ext4 (rw,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)


mmcblk0p2 (e.g. partition 2 on the sdcard) is mounted on /
mmcblk0p1 (e.g., partition 1 on the sdcard) is mounted "beneath" it on /boot
Got that  Rolleyes

Regards,
Kent

With the sdcard in the RPI3 I typed in the command you suggested or at least I think I did but my results don't track with yours. Perhaps this is all too advanced for me at this time. Thanks for replying I'll continue trying to find a way forward.

Code:
pi@moode:~ $ /var/www/command $ ls -l /dev/disk/by-label
-bash: /var/www/command: Is a directory
Reply
#26
@Onionhead 

Sorry, I've been using the command line for so many years I forget others may not be at the same level of literacy.

First, all the commands I used in my follow-up posts were intended just to illustrate how the filesystems in the two partitions on the uSD card end up as a merged filesystem when moOde is running. That was only because in your first post you said

Quote: Have the sd card with moOde 6.4.2 in my mac. Zip file is on the mac. Using terminal I have navigated to the sd card "boot" and then typed in cd /home/pi which gives error No such file or directory.


I was trying, clumsily as it turns out, to show why, in this Mac-editing mode, you would have to navigate to the sd card "rootfs". (I should have gone a step further and pointed out that you would then type in "cd home/pi" --- e.g., without the leading "/", because the card's filesystem has been mounted at "rootfs" in your Mac's filesystem.)

But now you're trying commands on the RPi so let's start over.

When you ssh into moOde, you are presented with the command-line prompt

Code:
pi@moode:~ $

This says you are logged in as user "pi" on a host named "moode" and in your home directory "~", is the command-line interpreter's shorthand for "/home/pi". The "$" character is the actual prompt. [1] You type in your commands after it.

If you were at some other level in the directory system, you'd see something like

Code:
pi@moodecd:/var/www/command $

which is what you saw in one of my examples: I was logged in as user "pi" on host "moodecd" and in the "/var/www/command" directory. The directory that I was in was irrelevant to the problem I was discussing; I should have taken care to return to my home directory before executing the command I was showing.

The point is that only what comes after the "$" is something you'd want to enter.

So let's go back to square one.

You've booted your moOde player.  You've ssh'ed into it. You're sitting at the command line prompt I showed in the first code block above. Now you should be able to enter the commands just as I gave them in the README in my github repo.


Regards,
Kent

[1] I shall resist the urge to talk about differences in command line interpreters. We're running bash by default in moOde/Raspbian.
Reply
#27
I mentioned in Post #17 that "...I need to get back to the promised Version 1 of the CDPlay".

Here's a screenshot of what I've come up with so far.


[Image: OwgFZd4.png]

Compared to the zeroth version in my moOdeCDPlay github repo currently, this version displays a default cover, which I created by editing Tim's default moOde cover file, and cleans up some of the text information.

That reported encoded value "16/44.1" is fake, by the way. My code doesn't ask MPD, it just displays the Redbook values for an audio CD.

I haven't decided yet what to do about those "Unknown artist - Unknown album" lines in the playlist.

The corresponding "Audio info" popup says

Code:
Audio Information
INPUT / OUTPUT
Source:     cdda:///19
Encoded at:     File does not exist
Decoded to:     16 bit, 44.1 kHz, Stereo,
Destination:     Local
Output rate:     16 bit, 48 kHz, Stereo, 1.536 Mbps
...


so I suppose I should "fix" the encoded value here too.

I don't show an example here, but this version looks fine in the Play bar at the bottom of the radio/folder/tags/albums views, too.

To get this far took only modest modifications in /var/www/inc/playerlib.php but this does mean a somewhat more involved installation process.

Regards,
Kent
Reply
#28
Thanks for your immense dedication to the project. I think I can speak on behalf of everyone stating that we are all waiting for the new version (v.1) ... but the recommendation is: "please be focused on the definitive (v.2)"; I am agog to see it.
Best regards and thanks again,
Francesco
Reply
#29
Kent,

Maybe we should try to integrate this into r650 given the rich set of features already completed and planned?

As long as we can detect its a CD we can add some logic to display "16/44.1" and hide the "unknown.../unknown..." line from Playlist.

Artist/album/title lookup would be something to look at post r650

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#30
(03-09-2020, 12:17 AM)Tim Curtis Wrote: Kent,

Maybe we should try to integrate this into r650 given the rich set of features already completed and planned?

As long as we can detect its a CD we can add some logic to display "16/44.1" and hide the "unknown.../unknown..." line from Playlist.

Artist/album/title lookup would be something to look at post r650

-Tim


Fixed audioinfo.php this afternoon. Now working on blanking the Unknowns. So far, V1.0 appears to consist of simple additions to playerlib.php and audioinfo.php along with the handful of service and bash scripts already in V0.1.

The V2.0 wish list looks much harder even with the wonderful abcde bash script [1] as a pathfinder. I'd almost want to implement a simple Internet-connected CD player first to gain some experience with the online metadata/coverart services.

I should be done with cleaning up V1.0 (like deleting the snarky comment lines I planted as I was figuring out how php does things!) and testing the result in a fresh moOde install in the next day or so.

I'm developing in 6.4.2. I want to try using diff/patch to add the php code to 6.5.0.

Regards,
Kent

[1] 5585 lines of beautifully organized bash code---a model for programmers to study.
Reply


Forum Jump: