ScotK
Full Member
Posts: 113
|
Post by ScotK on Feb 27, 2020 22:38:44 GMT
Nope, no internet connection needed. Everything runs locally.
|
|
|
Post by spetersen on Feb 28, 2020 1:07:39 GMT
Sounds great!, I'll likely follow your lead. I'm getting some old projects out of the way, then I can spend some quality time on this again
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Mar 5, 2020 14:06:01 GMT
A bit of an update to the web interface and programming...
So I ended up dumping Rompr for the web interface because it doesn't work well on a phone at all and does way more than I wanted it to or would ever use. I did some more searching and found a small web interface project called Bragi-MPD that acts as a front end for the MPD (Music Player Daemon) that runs under Linux. MPD is basically a remote controllable music player that runs as a service. MPD builds and keeps the music catalog, manages all the features like randomization, volume, playlists, etc, then you need a client to control it, which is where Bragi-MPD comes in. I got to work installing MPD and Bragi-MPD, reworked the volume and keyboard programs to make calls to MPD, and I couldn't be more pleased with the outcome. Everything that happens on the keyboard is now mirrored on the web control panel. If I push a volume button on the front of the consolette the volume slider moves up or down on the web and the volume changes. I created playlists in MPD for all the letter/number combinations and assigned 1 song to each playlist. For instance, I have "Wicked Game" by Chris Isaac on D4. So when I push D4 on the consolette it adds "Wicked Game" to the queue in MPD and starts playing it. I can keep making selections on the consolette and they queue up in order, all visible on the web. I have full play control on the web, so I can skip, fast forward, edit the queue, change the volume, etc, basically everything you could do on an iPod. I can browse the entire selection of MP3's on the web and add them to the queue as well. I also added buttons to enable free play, shutdown, and reboot. Bragi-MPD is based on good old javascript and HTML so it should work in any modern browser and stay working for the foreseeable future, and requires no internet connection at all. There are also MPD phone clients that can be gotten from the Google or Apple app stores that would allow direct control of MPD if one were interested. I might explore that next.
I'm going to get a USB sound card as I am getting a very low, barely noticeable buzz on the speakers (only happens with the case on), and some static noises from the speakers when the Pi is writing to disk. I'm hopeful that will make it sound better as well as get rid of the disk write noise. It might help with the buzz too. I've read many places that the Pi's native sound card is not good at all.
I'll take a video and post it to youtube now that I'm satisfied with this setup. The sound card and finishing the title strips are all that's left. I need to get a backup of the SD card too, just in case I need to replace it at some point in the future.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Mar 5, 2020 15:17:20 GMT
Posted a video. Not sure if it's accessible yet due to using real music. I marked it as fair-use, so we'll see what happens. youtu.be/w4uT6mnb9-c
|
|
|
Post by spetersen on Mar 5, 2020 16:11:52 GMT
That is terrific! I love the web parts! Are you using Stretch in command line? Does Bluetooth work? so many questions... do you sub MPD for mplayer? How much of my program needs to be changed to work with the web interface?
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Mar 5, 2020 16:46:49 GMT
That is terrific! I love the web parts! Are you using Stretch in command line? Does Bluetooth work? so many questions... do you sub MPD for mplayer? How much of my program needs to be changed to work with the web interface?
Thanks, I certainly am impressed with it. By Stretch, I'm assuming you mean Raspbian? I'm using Raspbian Buster, the latest version. I did sub MPD for mplayer, every part of this is running through MPD now. Bluetooth is working, I just had to figure out how to make it work. It's easy to switch outputs once it's paired but I don't have any way to pair anything except on the command line. I didn't write anything for it, and to make it work you have to embed the bluetooth MAC for the paired device in mpd.conf which is on a read-only partition anyway. I don't plan on pairing new devices unless the bluetooth receiver dies so I'm fine with doing it by hand. Very little of your program needs to be changed. It already figures out the letter/number combo, so you just do a command line call using mpc (the command line control program for MPD) to tell mpd to load the appropriate playlist. Basically I removed the file write and added this: os.system("mpc" + " load "+str(song)) os.system("mpc" + " play") First call is equivalent to "mpc load A1" and tells mpd to append the A1 playlist contents to the queue. Second call is to tell it to start playing if it isn't already.
|
|
|
Post by spetersen on Mar 5, 2020 17:19:19 GMT
I have to change things a little for my next box (AMI WRC) so I will build the new box following your lead, it looks great!
|
|
|
Post by Ron Rich on Mar 5, 2020 17:26:02 GMT
Hi Scot -s ! Seeing as this is now working, how about taking this thread to a PM, of some kind-- You guy's did hi jack it, and seemingly, there is little interest in it. Thanks, Ron Rich, Board Monitor
|
|
|
Post by spetersen on Mar 5, 2020 17:38:24 GMT
No Problem..
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Mar 6, 2020 4:53:09 GMT
Will do Ron. To close out the thread, I wanted to make a last post with the parts list and wiring diagram so that anyone that wants to try it the DIY way like I did can benefit from my work, as well as to express my sincere gratitude to everyone involved. Thanks to: Ron and his amazing memory (Still can't believe you came up with the part number for the 15 pin!), as well as this board to work from. Ron, Scott Peterson, Sooner, Scudie, your encouragement, involvement, feedback, and insights were invaluable and much appreciated. I literally could not have done this without the knowledge and feedback you all shared with me, for which I'm very grateful. The end result is that I have a great memory of doing this project and a living piece of history that I'll enjoy for many years, so all the time I spent was well worth it. I couldn't be happier with the final result. I'm so happy I might do a second one for my home office, and maybe one for my parents or brother! BOM: DC 5V 1 Channel Relay Module Board Shield High/Low Level Trigger with Optocoupler for Arduino www.amazon.com/gp/product/B079FJSYGY/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=15V 3.6A power supply from Digi-Key, model PSK-S20C-5-T www.digikey.com/product-detail/en/cui-inc/PSK-S20C-5-T/102-6063-ND/9997647PAM8406 Amp DIY Module DC5V 2X5W Class D Dual Channel Audio Stereo Amplify Board www.amazon.com/gp/product/B07Z6LX73G/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=115 pin CONN RECEPT/CAP 15POS MATE-N-LOK: Manufacturer Part Number 1-480324-0 www.digikey.com/product-detail/en/te-connectivity-amp-connectors/1-480324-0/A1426-ND/19279Raspberry Pi 3b www.raspberrypi.org/products/raspberry-pi-3-model-b/Pimoroni Automation HAT shop.pimoroni.com/products/automation-hat24vAC transformer (easy enough to find so I'll skip the link) My final wiring diagram is attached as well, for completeness of the post. Other posts have pics of how I mounted things so I won't post any of those here. I am not posting the volume or keyboard programs here but I would be more than willing to share those for anyone that would like to have them. Finally, I'm not sure how much I'll be on here in the future as there's little to no hope of me getting a real jukebox (at least until my kids are out of college in 10 years anyway). Someday I'd like to have a Wurlitzer 1080, or maybe a one more time CD bubbler. Thanks all! Scot out! Attachments:
|
|