[How to do instruction] An extension to support OLED, IR control, and CD playback - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] An extension to support OLED, IR control, and CD playback (/showthread.php?tid=2080) |
An extension to support OLED, IR control, and CD playback - ztb5129 - 01-14-2020 An Extension for Moode, including OLED display, IR control, and CD playback. For now, it is running in an RPi4B with Moode 6.4.0. With this extension, you can use the Apple Remote to control Moode in RPi4B and roon in Windows. Basically, I just integrated the following posts.
***NOTICE: Use these scripts at your own risk, some have not been fully tested!*** Demo I use this system under these scenarios.
Date Screen: Display date and IP. Play Screen: Display song info, only activate if Moode is playing. Renderer Screen: Only activate if Moode is not playing but DAC is occupied. The OLED display will go out after 10 seconds to prevent OLED burn-in and any key pressed on the Apple Remote will light it for 10 seconds. Hardware
Wire Connection IR Receiver Module The Argon One Case reserved a place for VS1838B, just connect it. Insert Flirc USB IR Receiver into a windows pc. OLED Module Installation Requirements
Code: cd /home/pi Remote Control Code: sudo cp src/RemoteControl/apple-silver-A1294-lircd.conf /etc/lirc/lircd.conf.d/ CD Playback Code: sudo chmod 755 geneCD.sh When you insert a CD, it will generate a playlist named CDPlayer automatically. Usage After installation, you can use the Apple Remote to control Moode in RPi4B. To control roon, you should set these key mapping in Flirc App. Here is the key mapping of mine. | Apple Remote Key | Description | | UP | Moode: Previous Track | | DOWN | Moode: Next Track | | Enter | Moode: Play/Pause | | LEFT | Roon in windows: Previous Track | | Right | Roon in windows: Next Track | | Play | Roon in windows: Play/Pause | | Menu | None | RE: An extension to support OLED, IR control, and CD playback - TheOldPresbyope - 01-15-2020 [My personal preference is to break out the various functions into separate guides since, for example, a user might want only to implement CD playback.] Good stuff! I'll restrict my comments to the CD playback portion of this post, and, please, consider this to be commentary by a techie, not criticism! The code here works. As I type I'm listening to a Stan Getz CD using this code. There's considerable similarity between the udev rule and associated script here and the material Ashley Cox sent me on which we subsequently worked jointly. It was new to me but I'm guessing it's one of those "how everybody does it" things. I think it's clever to create a playlist when the CD is inserted. Ashley and I were experimenting instead with adding the tracks directly to the MPD current queue. I can see pros and cons to both approaches. However, while the code here creates the playlist when the CD is inserted, it doesn't remove the playlist when the CD is ejected [1], leaving a playlist of zombie tracks. Fixable with a change to the udev rule and the addition of another shell script. Note that ejecting the CD also turns into zombies any tracks already copied to the current queue. This is a hard one; even with the fixes I allude to, the user will have to clear the offending queue entries manually. As an aside, in my tests, if a CD track is playing at the moment the CD is ejected, playback continues until an internal buffer is emptied. On my test system, playback ceases some dozen seconds after the eject button is pressed. [2] The code here doesn't deal with the case I ran into with the CD drive occasionally being enumerated as /dev/sr1 instead of /dev/sr0. Fixable with a change to geneCD.sh. What remains is the challenge of modifying the moOde playback screen so we get something intelligent instead of strings like "cdda:///1", "File does not exist" and "Unknown artist - Unknown album". One would also like to display some sort of CD logo instead of the default moOde logo when a track is playing. Fixing these issues requires modification of core moOde code and is a work in progress. Clearly I need to create a github repo of Ashley's and my work rather than just post to the forum. Regards, Kent [1] Indeed, I don't see any code here which deals explicitly with CD ejection. Perhaps I overlooked it? [2] In our approach, we clear the queue when the CD is inserted and then load the CD track list into the queue. We stop the player and clear the queue when the disc is ejected. This avoids all the points I raised with my "however" paragraph. In the approach here, on the other hand, the current queue and the currently playing track may be from some other source and shouldn't simply be cleared. RE: An extension to support OLED, IR control, and CD playback - gregvds - 03-07-2021 Hi Kent, any progress here on CD playback facility with Moode? Thanks again, Greg RE: An extension to support OLED, IR control, and CD playback - TheOldPresbyope - 03-07-2021 (03-07-2021, 02:28 PM)gregvds Wrote: Hi Kent, The Version 0 code in my moOdeCDPlay repo still works as far as I know. I haven't worked on Version 1 in a year for two reasons: 1) disruptive house moves and 2) loss of interest. After the novelty wore off, I realized that if I had a CD in my hands that I wanted to play once, then I wanted to rip it to my library so I can play it many times. Increasingly, I use streaming services for randomly sampling new music. Regards, Kent RE: An extension to support OLED, IR control, and CD playback - gregvds - 03-08-2021 Thanks Kent for this. I'll try it, even if I think it will always be easier to put the CD in my usual CD transport. If it helps me understand better linux stuff, rules, services and others, it's always a good thing :-). |