Shaking it out

UPDATE a few hours later:

I have to apologize to iOS Safari. I am using the flexbox layout system, and didn't have the flex-shrink dialed in correctly. With that in place, things render OK on Chrome, iOS Safari, and Firefox.

With about a week "on the air", and our first appearance in the local paper, things have picked up here at Radio Vashon.

I've had a nice mix of styling suggestions from my daughters! Neither of them codes, but they both have an eye for appearance and continuity. You might have already noticed some changes, with more to come.

My front page made it onto the first page of search results under "Vashon Radio", but my nicely sparse front page didn't give my search result anything meaningful to see. I've added an intro box, and will be trimming it back with a "more" option (more help from the daughters)!

The latest iOS broke how–get ready for it–buttons are displayed. Or not. iOS Safari somehow decided buttons should be 0 pixels tall. Definitely a browser bug, and I had to scramble for a workaround.

Another listener found that pause/resume on iOS never successfully resumed. You could always just hit reload, but still... that fix will be rolling out RSN. (This one was on me, not a browser bug.)

Android and desktop browsers seem to be doing fine with the site. Knock on wood.

Finally There

Radio Vashon crossed a milestone this last week–it is a fully legal and licensed music streaming service! I turned on the front page, and anybody who swings by can try it with a click, or create an account (for free) and become a regular listener.

It's a lot of work to design a music station web site. And more work to do streaming support for web browsers, also simple streaming devices like Squeezeboxes and such.

And then it's a lot of work to build a station library, and get all the artist/album/title along with the side information of its ISRC (an industry code for billing played tracks), album art, year, genre, gender, ....

And then it's a lot of work to create scheduling software which thinks about a day's programming, and makes a bunch of tradeoffs as it tries to meet the sound for a given hour, make the tracks "fit" with each other, move the overall station sound towards successive targets, avoid repetition, ....

After all that, you have to enter into contracts with a bunch of corporations:

  • Sound Exchange
  • ASCAP
  • BMI
  • SESAC

And then you write even more code, to generate machine readable reports each month of what was played, and to how many listeners.

But I did it. It was quite a software dev journey, along with stretching my creativity as I made a system which embodies the music programming ideas I've created by thinking back on my years as a human music DJ.

Different parts of the broadcast day have different sounds. Once you're listening to the station, please take a look at the "schedule" button at the top of your page, which will give you an idea of what kind of music gets played when.

I hope you'll find at least stretches of the day which bring you enjoyment!

Andy Valencia

Google stimulates the business card industry

I got a surprise today. A friend who was testing some of my Radio Vashon infrastructure told me the contact address on my business cards had stopped working. I had used a dedicated gmail address with a forwarder on the account, so it was basically an easy way to filter some spam and read it along with all the rest of my email once it was forwarded to my regular email inbox.

So I logged onto the gmail account and was told, yeah, my account had been deactivated for violating their Terms of Service. Which, if you go look, runs to several pages. Which one did I break? I didn't spot one which said it was against the rules to receive a few pieces of email. I never sent through it, mind. They can't be bothered to give you any idea at all.

So there's a way to challenge this, and I said basically the same thing–a personal project, received a little email, nothing else. Can you turn it back on, please?

A half hour later they were back. They were really sorry, and it was back on and they would like to give me some money for my inconvenience.

Not.

They said you have to challenge it Real Soon after they shut it off. I apparently hadn't been in touch Soon Enough, so it's gone. Fuck Off. (They didn't say that last part, I was reading between the lines.)

Lesson learned. Do not, ever, build upon Google. They're very, very large. And they care very, very little.

If you want to reach me, it's now:

http://vsta.org/contact/radiovashon.html

I'll have new cards printed in a few days. If you have one of my old ones, keep it as a reminder of what little people mean to big corporations.

What's the Delay?

Hey, I was racing towards Beta, and all of a sudden, things stopped.

Sorry about that.

The music industry is old, like think negotiating with King George of England's minions old. Well, maybe not quite that old, but definitely in that direction.

So part of being a "radio" station (even if you're streaming over the Internet) is licensing–ASCAP, BMI, SESAC, and Sound Exchange. Each take a bite. You have to get licenses started with each of them before you go live.

Well, in the case of Sound Exchange, they have a fixed annual cost. And–get ready–it's based on calendar year, with no prorating. So yes, if you start on December 31st, you pay the full price, and then one day later they're back for all of that money again.

Because of that, I'm holding off the launch until 2019. Kind of a bummer, but it does give me a chance to pursue some interests in the area of ham radio. Packet radio (data) in particular. I'll post a pointer here if anything interesting happens over on that side.

And you'll certainly see a post when 2019 rolls around!

Under the Hood

I sometimes get questions (admittedly, from the more technical side of my testers!) about what Radio Vashon uses "under the hood".

The basic workhorse for Radio Vashon is Python, more specifically the Tauthon fork of the language, which adds some Python3 amentities while remaining true to the "classic" language. Python drives everything.

Radio Vashon is actually several separate systems. First is the music scheduling system; all of the tracks which could possibly be played are indexed in a MongoDB database. MongoDB also holds information on artists, and even holds the schedule of tracks for each day.

A nightly task pulls all the entries for the upcoming day, encodes them in a JSON file, and pushes this out to each media server.

When you first connect, you don't talk with a media server; your browser presents its cookie via SSL to a "root server". This looks up your account, verifies your cookie (and does email/password if it's missing or expired), and sends you on to your assigned media server.

The media server presents the user interface, verifies you belong on that server, and supplies you streaming tracks. It supports both the web player, iOS Safari web mode, as well as more traditional streaming MP3 players.

Except for the back end MongoDB, most data storage is via the excellent, incredibly efficient SQLite3 database. One exception is logging, which uses traditional text files with CSV.

FAQ

FAQ's for Radio Vashon

(I'll update this post in place, and link to it from the player page.)

It Didn't Work!

If you went to radiovashon.com with your browser, and didn't get a working page, the first thing to check is whether your browser is out of date.

Most phone makers supply a "browser" on the phone; it's usually built upon out-of-date Google browser bits. This isn't just about having the snazziest new software; old browsers have unfixed security flaws. It's the rule rather than the exception that phone software vendors don't stay on top of the fixes to keep their customers safe.

So please go install the latest Chrome or Firefox from whatever app store you have at hand. Either will work, though I must say that somewhere around 2017 Firefox got their act together and made their browser faster and yet use less memory than Chrome.

(For iOS users, Chrome and Firefox actually are forced to use Safari's browser engine underneath, so it doesn't matter much which one you use–Chrome, Firefox, or Safari.)

How Much Data Will I Use?

The system's HTML, CSS, and JavaScript are all hand-written by me. They're small and load quickly.

But data usage is dominated by the audio stream! I tried many different formats, and settled on MP3 48k ABR ("Average Bit Rate") as the best tradeoff of small size and acceptable audio quality. You should see about 6K bytes per second, so an hour of listening consumes 22,118,400 bytes–22 megabytes, or 1/48th of a 1 gigabyte data plan.

If you switch to playing one of other Internet radio stations:

Radio buttons with Radio Paradise

do be aware that they're all quite a bit heavier in data usage.

I have a table top streaming player...?

The primary interface for Radio Vashon is a modern web browser. That said, there are some very nice table top players which can access a streaming Internet radio station. Radio Vashon supports these.

You can play Radio Vashon on most simple streaming players which accept a URL. From your account management page, use the "Create URL for your streaming player" to set up a custom URL which will stream Radio Vashon to a "dumb" streaming device. Once you set one up, copy the generated URL to the control panel for your device.

When streaming in this fashion, Radio Vashon tries very hard to behave like a full-featured streaming radio service, including so-called Icecast metadata with album art updates.

I like X, but you play it too much

Use "Comment on this Track" with "tired" as the text.

You should play Y

Use the player menu, "Suggest a Track". Our favorite submissions are the ones with a Youtube URL or ID, so we can directly give it a listen!

Why Does the Player Stop Sometimes?

Network interruptions can stop the player. The great thing about web based services is you can always close the tab or hit refresh.

I've tried to make network interruptions seamless, but there are endless tradeoffs. If you encounter a scenario where it could behave better, please submit a general comment. (Thanks!)

Any one user account only plays from a single stream. If your account is being used to play at one location, and then you start a new device, the old one will stop. The album art will be replaced with a message telling you which device took over your streaming.

The 'Ready to Play' button is blank?

The big button (which turns into album art once you're playing) uses SVG with SVG animations. If you're a power user and have disabled "GIF Animations", at least Firefox will also disable displaying our SVG image in its entirety.

You can still tap the big dark circle (or the smaller play button) and music will still start.

I have a big red "Audio Error" button

(You get this when you try to start playing music.)

This means when Radio Vashon tried to play, the audio system sent back an error instead of playing the music. This is often just a transient error (i.e., on your phone as you transition from Wifi to cell), but if the player sees too many errors in a row, it stops trying to play and shows you that error indication.

This can be caused by an ad blocker (i.e., "disable access to audio devices"), or by advanced settings within your browser or OS. Once you've hopefully fixed the problem, you can click the "reload" button on your browser (or, you can kill and restart your browser entirely) and see if it'll play for you.

Puzzling music

I'm listening to an artist on my station ( Dogfooding ) and I heard a track by Rebecca Black, she of Youtube Friday song fame. She came out with a very nicely done EP in 2017 "RE/BL", and for some reason nobody seems to have noticed, or listened, or cared.

(I noticed, and listened, and added several tracks from her EP to the station library.)

Which got me thinking about good music which never found its listeners. Certainly Ms. Black's RE/BL fits that description, and thinking more generally, it seems to come down to two basic phenomena. One is where the established perception of the artist keeps the would-be listener from hearing the music which is actually entering their ears.

Rebecca Black's "Friday" was a Youtube hit, but to many it represented an exercise in privilege. Her parents bought her a package which included studio time, a producer, a video, and help launching the result. The sheer amount and intensity of hate communicated on things like Youtube's comments was sobering.

Each of us goes into the world with our advantages and disadvantages. Yes, having well-to-do parents was one of her advantages. But when I watch her video, what strikes me is how much effort she put into the craft of pop music–songwriting, performance, voice lessons. Her hard work is what made her parents help meaningful. I respected the talent of a young woman, and was very interested to see what she would do as she matured. RE/BL was, to me, a nice answer.

Another artist whose image blocks the ears of the "listeners" is Britney Spears. In 2016 she came out with "Glory". While no one track quite reached the peak of "Toxic", as an overall album it was probably her strongest ever, with almost half the tracks being top-40 worthy (they're in the station library, you'll eventually hear them if you listen during pop hours). And yet the image of Ms. Spears as a drugged sex pot seemed to eclipse the music, precluding most people from actually hearing what she had created. Which was good. Very good.

Sometimes people just can't let the perception they hold adapt to the reality trying to enter their eyes and ears.

The second category of good music which misses its listeners is where it lands off-target of a genre. Blondfire had a moderate hit back in 2014 with "Waves", and in 2016 came out with the "True Confessions" EP. This is Erica Driscoll at the top of her songwriting and singing form, and I thoroughly enjoyed her EP.

But nobody listened. Or cared. Why? So far as I can tell, because she landed out in the fuzzy zone between rock and pop. This is the area perhaps best defined by Avril Lavigne–and where is she now? The rock audience seems to be frozen in "greatest hits of the 80's and 90's", so not a lot of help to be found there. And pop, when it wants to straddle genres, seems to be focused on bridging towards the rap/hip-hop audiences.

So Ms. Driscoll did an excellent EP, and I love all five tracks, but it never found an audience at large.

Except on Radio Vashon! It fits into the "shoulder" hours where we go do some rock and pop fusion programming. Today I see her scheduled near the top of the 3PM hour. Give her a listen! You might enjoy discovering an artist the world decided to miss.

Not being open to new music is like being unable to entertain a new idea. Or find a new enthusiasm. Which is to say, unable to find new ways to have a good day.

I hope you listen to–and enjoy–Radio Vashon. Even if you don't, I hope you have a great day!

iOS Limitations

Radio Vashon is an Internet streaming station–specifically, a web based station. This means you reach us via your web browser, not via an app built for some specific device like iPhone, Android, Windows, whatever. In the old days, these so-called "native apps" were necessary because web technology was so young and limited.

But those days are pretty much over. The web has evolved into a suite of very, very capable technologies.

And this brings us to the iPhone running iOS. It comes with a browser, Safari, which supports a subset of web technologies. And no, you can't install Chrome or Firefox to get around these limitations. On iOS, Apple requires all browsers to be skins around Safari's underlying browser engine, so whatever web limitations Apple mandates are forced on you, even if you use Firefox or Chrome on iOS.

Why would Apple do this? I haven't found a clear statement from the company. Many developers note that if you have to ship as an iOS app, you have to pay to be a developer. And Apple can pull the plug on your apps whenever they feel the need. Perhaps most notable, they take a 30% cut of sales you make through the app. Emirically, Apple's interests are served better by apps than by web pages.

I brought Radio Vashon up on Firefox desktop, then mobile, then over to Chrome desktop and mobile. The switch from Firefox to Chrome found a few bits and pieces which had to be fixed, but nothing worth mentioning. Viva la web.

Then over to iOS. I'm not saying Apple cripples their web browser so you're forced to do an iOS app and pay them money. But that's how it felt.

Even before you begin, you find out that you have to buy a Mac to debug a web page on iOS–Firefox and Google support Linux and Windows (as well as MacOS), but Apple does not return the courtesy.

iOS Safari won't let you adjust the audio volume. So when you pause, I have to just chop off the sound, since I can't do a nice fade like I do everywhere else.

iOS won't let you update the display of which track is playing. I mean, you can, but it won't show on your lock screen–you have to stop the audio and start it again to get it to update. So I just leave the label at "Radio Vashon" rather than having you look at the name of a track that played an hour ago.

You can't move from one track to another unless your screen is on and the player's tab is the current one. What happens is your web page just halts until you unlock your phone and look at the player tab.

These two together also mean you can't cross-fade between tracks.

So on iOS I concatenate the tracks back on the server, and feed a single endless stream to a single audio element on the web page. The server notes where it is in the stream, and pushes messages to your Safari browser alongside the stream, telling it what track is playing. If you have the tab open in front of you, you'll see it update in real time. If not, well, "I have no mouth yet I must scream." You're not able to update that information.

It's clunky, but it mostly works. it feels a little fragile, so if you're an iOS user, let me know if anything goes wrong and I'll fix it as well as I can! If Apple lets me.

Some features of the Radio Vashon player

I tried to make the player screen as intuitive as possible, but sometimes it just helps to highlight the interesting bits.

First, hit play. This lets all the fields get filled in–Radio Vashon tries to be as careful as possible with your battery and data plan, so it will only pull in stuff when it's pretty sure it'll help.

The top line is three items. On the left is the title for the current programming. For me as I write this it's "PM Drive"/"Pop with some Rock & Roll". This is a general theme for the programming you're hearing. A label like this will apply for one or more hours in a row.

Picture of top menu

In the middle is "Schedule", which is clickable. This shows the titles of programming across the whole broadcast day. This gives you an idea of what kind of programming you can expect at a given time of day. Click the popup window to make it go away.

Note, I'm a West Coast USA station, so the broadcast day follows Pacific time, with Daylight Savings when appropriate.

On the right is the usual menu icon. Comments and requests can be entered through there, also account management (including logging off) and maybe in the future other amenities. Hmmm, maybe a hook to this blog?

The second line has track time on the left. Click it to cycle between current amount played, amount left, and total track duration.

Picture of second menu

In the middle is Love/Hate buttons on either side of your "play" button (which will be a "pause" button if it's currently playing). On the right is a "skip", in case the current track doesn't make you happy enough.

Tracks start neutral; you can click up to two levels of love or hate. This becomes part of your user profile, and I consider your "votes" when choosing which tracks to add to the station. At some point, it may cause you to hear a track less often if you dislike it.

Following this line is album art–if available–and information on who's playing, what album, what year it came out, things like that.

There's always an "Artist", but sometimes there will also be one or more people listed under "Artists". This is used internally so that if, say, a "No Doubt" track plays, the scheduling system knows that Gwen Stefani was on the track, and thus it will try to not play Her again–even from her solo albums–too soon thereafter.

Next are some buttons in a row, one green, the rest pink. I wrote about these earlier; they let you connect with Radio Vashon, but also a number of other streaming stations. If you just feel like a big change, you can jump to another station. There's six buttons, the first one is always Radio Vashon. The others have default settings, but long hold one and you can choose another station for that position.

Last is track history. When and who played.

All of this will always be displayed, but it gets shuffled a bit depending on the size of your display, and also its orientation (landscape versus portrait).

For web geeks, we use the fairly modern "flexbox" layout system, and when it's available also the even more modern "grid" layout system.

If you're into web development, this means something. Otherwise just be sure that I test on the latest Chrome and Firefox, both mobile and desktop. And also iOS Safari (which works, but has the most limitations–it needs its own article to describe them!).