Using xAI’s Grok to Create a Music Player on a Web Page: Chapter 1

I have been experimenting of late with the idea of putting a music player on the Web server I have on our home network. This would give me the ability to easily share a song with a friend or family member, among other functionality. The Web server runs on a Raspberry Pi single board computer configured with Apache and replaces the server I maintained for some years on BlueHost:

Bluehost is a well-established web hosting provider that has been operating since 2003 and is known for its wide range of hosting services, including shared hosting, VPS, dedicated hosting, and specialized WordPress hosting. (via Grok)

Indeed, this new little the server provides this WordPress site on which I am posting this piece right now!

I already have two versions running, Player 1 and Player 2. The first generation player is about as basic of an application one can imagine. It consists of coding in HTML (HyperText Markup Language) and JavaScript, implemented with the help of one of the well-known generative AI systems, i.e. ChatGPT from OpenAI, Claude from Anthropic, or Gemini from Google. I found the second player on GitHub, and it is clearly the product of a lot of work by the developer, Laurens R. Krol, who included his information in the readme.txt for the software. To give credit where credit is due: (Here is Laurens personal Web site, and he is research director at “Zander Labs and scientific coordinator of Project NAFAS.”)

The bottom line is that each of these first two players suffers from a couple of limitations. The first version has no graphic design whatsoever, but hey, that was my first effort where I created something myself with these tools! 😊 Previously, I had “my guys” doing this sort of stuff in the lab at BYU. Now that I am retired, I no longer have any “guys” to do this sort of stuff. Not only that, but those “guys” would of course not have been doing this sort of personal project anyway! Because I have gotten back to programming in the past couple of years, I am excited about doing projects myself. After all I first started programming many years ago, beginning in January 1969 with Fortran.

Anway, back to the discussion of music players. The second player version is definitely an improvement. It has a nice graphical feel to it, but it also has the same serious limitation of the first. In each of those two cases I have to reference each song as an entry on a line of code in the program. This becomes a bit of a problem: there are 3,029 songs presently in my music collection!

Of course, I can access my music collection easily on my phone anywhere. Here at home, I can also use Amazon’s Alexa and the software system My Media for Alexa . When I say “Alexa, ask my media to play songs by the Beatles!” the system will very dutifully comply by connecting to the music player on a Raspberry Pi 3, one of the older single board computers running here. When is ask Alexa to play a French song, it’s a different story. Alexa’s lack of understanding is only sometimes resolved when I pronounce the title with the worst French accent imaginable!

Although my next project does not address that problem, I want to create a new version that mimics Winamp, an early media player for Windows on a PC. Here is how xAI’s Grok describes Winamp:

Winamp was not one of the very first media players on Windows, but it was among the earliest to gain widespread popularity. Before Winamp, there were players like Windows Media Player (which came bundled with Windows), but Winamp’s release in 1997 marked a significant shift due to its focus on MP3 playback at a time when this format was becoming mainstream due to the rise of file sharing.

To make that happen, I have started a discussion on xAI’s Grok. Because this is the first time that I am using that particular generative AI platform for anything substantive, I did not know how to return to previous chats. On the other platforms that I have used most extensively I can easily access previous queries. Not knowing that for Grok, I did know that could easily share a link. Thus, I am creating this post, to include this link, to document that query! 😊

P.S.

I just learned that to access previous chats, I only have to click on the “Chat history” icon that that appears at the upper right-hand corner to the left of the “New Chat” icon:

About Mike

I retired as a professor at Brigham Young University (BYU) in 2016 where I was Associate Professor of French and Instructional Pyschology & Technology. I arrived there in 1992 after my retirement as a Lieutenant Colonel from a 20-year career in the US Air Force. Most of that time was spent on the faculty at the US Air Force Academy (USAFA), during what I call my first career. For over forty years I have been creating interactive video applications for supporting language. The lab at the Language Learning Center at USAFA engaged in ground-breaking efforts conducted within a mentored learning setting. The lab’s work involved the development of technologies and instructional design strategies for the use of video in the language acquisition process as well as with architectures that support online learning and facilitate learning about learning. I have a BA in Political Science from BYU, an MBA from the University of Missouri, and a PhD in Foreign Language Education and Computer Science from The Ohio State University. At the Air Force Academy I was a key member of the team that designed what was then the largest interactive videodisc-based learning center on a college campus. When I retired from BYU I directed the ARCLITE Lab, which was involved in the creation of online learning materials for language learning as well as video and interactive technologies for learning.
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *