About The Radio
- Video Explanation
- Basic Description
- Overall Concept
- TV Concept/Description
- Java Script Program
- Perl Program
Video Explanation:
Coming Soon!
Basic Description:
This is a web based radio I developed that utilizes a mix of Java Script and Perl to simulate a traditional radio experience. In order to connect all you need to do is visit any page on this site. The radio is visible on the sidebar, or larger on the radio page. There may be issues when you first connect, so if you see a connecting screen instead of music please reload and be aware you may need to do this multiple times before you can connect correctly. If you have any issues that you cannot seem to resolve please email evan@livingbythebeat.com and include a screenshot of your console which can be accessed by: right clicking inspect, then clicking console on the top right of the page. Besides that enjoy the radio!
Overall Concept:
The original Idea for the Living By The Beat Radio came to me when I first listened to “Japan” by Famous Dex. This song is from his album “Dexter Meets Dexter” and the construction of the verses and ad-libs makes it appear that Famous Dex Is actually two people both rapping on the same song. This gave me the idea for a radio show where there are two guests that in addition to answering questions and doing what you would traditionally expect would also engage in a loosely structured freestyle with each other. This would result in a song like “Japan” where both guests preform verses while the other makes comments or provides ad-libs, and then whenever one runs out of ideas the other would start a verse. At the time this idea was a pipe dream that I occasionally imagined doing in the future.
In addition to the idea for a radio show, the name Living By The Beat also came from another concept for a project. This was a very short lived idea for a tv following a “sound-cloud rapper” that had a pretty sucky life in an ultimately boring and disappointing way rather than an intersting hardship. This contributing to the name by providing the idea of getting by by the skin of your teeth, or [just barely] living by the beat. Meaning trudging along and following the beat, not with a strong purpose or determination. Although I never followed through with this idea at all the name stuck with me and I think that it has a nice ring to it. Instead of meaning just barely getting by can also be used to mean seeing life through music and enjoying it’s positive impact. This is definitely much closer to the mission of this project and the idea that I want to portray, for others that enjoy this and for myself when I develop it.
With both of these ideas I entered the break from school. In the beginning I was still riding the high of not having to wake up early in the morning and spent most of my free time playing video games. However soon I felt that I needed something more meaningful to do and that I would go crazy if i just wasted away at home. I had already previously contemplated the idea of making a web-based radio this year when Jharp was interviewed for VHSTV. I don’t remember exactly what my thought process was, but I remember mentioning to Josh White at lunch that I should make a radio to interview “all of the sound-cloud rappers at our school.” This very loose idea formed into a stronger reality when I found myself in need of a project to work on. In my usual manner I set my bar very high for what I wanted to do, an action that usually causes me to not finish what I set out to do. I decided to develop an online radio where users can simultaneously enjoy songs from multiple playlists throughout the day, and eventually an interview as well. I began my journey by first figuring out how to create a javascript program that had 3 parallel lists of youtube urls and the runtime for the songs. This program was to loop through the array and play the songs, changing to the next when one songs finished. This proved to be a fairly challenging program to write, but it was very simple compared to what I planned to do next. After a great amount of trial and error I eventually finished this section of my program.
The site then looped through songs, but it was not synchronous across users. At this point I believe I researched the next step slightly, before taking a couple break week to play fortnite. But eventually I came back to my project and was more committed to take it further. My parents, who have done web development for some years offered aid and guidance. With his help I put my songs in a json file on the server instead of a java-script array. Through this adjustment I also created objects for each song, making it much easier to use. Then through a couple of weeks of late night sessions we were able to develop a program that would shuffle the songs upon their access. At this point I had made great progress, but I became discouraged because I didn’t see the full picture and currently all we had done was re-develop my java-script program. This caused me to take a break for about a week and go back to playing fortnite. However, once again, I came back to work again on this project.
Then I learned the reason that a server-side script was vital to my program was because It could create and access a json file holding a list of songs providing a basis for the synchronic I was looking for. Through this development I then researched how these actions were performed and created a perl program that would either print out a json file of songs, or make a new one if it was outdated. From this I was able to configure the criteria to determine if the file was too old into a program that created different segments for my radio. I eventually complicated the perl program to, based on the current time and change time of the program create a new file of the song playlist for the current segment, or if the file was already up to date to simply send that song list to the user. Then I updated my java script program to read in this file and create an array of song objects and play them, instead of using my old double-array method. Then in order to finally achieve the synchronism I had been looking for since the beginning, I created another attribute for each of the object, the playtime. The playtime was the time that each song should play, calculated by adding each previous songs’ runtime to the current time when the file was created. Then in the java script when I read in the file I would start the array with the song that should theoretically be currently playing. The java-script program then calculated the “buffer” that the song should start at by comparing the user’s current time to the song’s playtime. Believe it or not, but after this I spent another week or so resolving bugs. I am still doing this at the time I’m writing this, but I am now much closer to the final product. I recorded an interview with Jharp over the weekend and as of today uploaded it to youtube privately. I couple more bugs to resolve and a transition clips to be played at the start of each segment to record. Besides that the site is ready and I plan to launch it on 5/22/20.
TV Concept/Description
The concept to create a tv broadcast came to me a while after I created the original radio. I figured that if I already had a program prepared to shuffle and play YouTube videos in a synchronous manner, that it would be very easy to create a tv broadcast as well. I started by duplicating the files that run the server side program and changing the list of videos they played to ones suitable for a tv broadcast. I then spent a while deciding on a system to change between the tv or radio, and finally decided to have two buttons above the radio side bar titled “Music” or “TV”. Then I wrote added a section to my JavaScript program that would change the color of the buttons when one was selected, giving it the appearance that one is activated while the other is deactivated. Then when running the JavaScript program for the radio, I changed the file of YouTube videos that was read from the server based on which of the buttons had been selected. This worked very well, but I wanted users to be able to navigate throughout the site without the radio switching to the default music setting each time they enter a new page. I had always gotten pop-ups alerting me that cookies are storing data to improve my experience with different sites, so I researched them as a possible solution. I was able to add a feature to the button click program that would write a cookie storing the name of the broadcast the user had selected. This cookie was then read each time the page loaded so that the site can keep track of which broadcast they last selected. After a few bug fixes I had the tv broadcast working well, but I thought that it would be too simplistic and boring to have a random shuffle of the same types of videos. I instead decided that the program should shuffle through a pattern of different videos, with a few shorter videos playing before one long video from a series that changes based on the time. This took a little while to figure out, but eventually I was able to impliment this system that added a new layer of vareity to the tv section of the radio. Overall I really enjoy watching the videos in the tv version of the radio, and am proud of the complexity that the new features add to my original program
Pages:Next
Recent Comments