Saturday, October 29, 2011

Update: YouTube streaming, fast edit, backup tools

Sorry! I couldn't wait.

The new version of Stoffi (named Shang) was supposed to be released tomorrow but I couldn't wait that long. So here it is. Tons of features. Many improvements. Millions of tracks.


Millions and millions of tracks
Honestly we don't know how much music there is. YouTube hasn't released any numbers for the last years. We only know one thing: it's much!

Our current YouTube support includes playing any track from YouTube, watching the video inside our embedded browser, mixing YouTube tracks with normal files in playlists or the queue, bookmarking tracks inside a playlist (otherwise they will vanish) and a button to go to YouTube's website to watch the video.

Some kinks I didn't manage to fix before release includes the equalizer not being applied to YouTube sound, fullscreen of videos missing and bookmarks not being saved if you don't keep the track inside a playlist. But don't worry, I'll fix it for you as soon as I can.

Improved properties window
I renamed the old "Information" window that you can access by right-clicking on a song. It's now called "Properties" and has been made to look more like the properties window of Windows Explorer - with a few modifications.

In place edit inside details pane
The details pane has been upgraded to allow for in place edit of meta data. It also dynamically changes the number of fields that are visible depending on the size. Thanks to Tevin for his work on this.

Language support
When Tevin asked me if he could translate Stoffi to Chinese I was forced to quickly implement support for changing language in Stoffi. The result is pretty impressive. You can change language without restarting Stoffi. Really cool!

Stoffi is also offered in Traditional Chinese.

Polished interface
I had time to rewrite the whole list view, abstracting it into its own control. This takes me one step further towards implementing additonal views such as an icon grid. The new view includes icons, support for dropping files or folder onto it and some other cool stuff.

The interface has been polished to look even better.

Easy backups
I have added the ability to export the whole configuration, including added sources, playlists, column configurations and even current searches and selected navigation. The exported file is in an XML format so you can easily open it in an editor or other application if you want to.

It's faster
Even though we have gotten more features I managed to make it even faster. My tests shows a startup time of 1.7 seconds and a scanner speed of 444 tracks per second on my system.

It's smaller
Not only is Stoffi faster it is only smaller. The size of the installation package has gone from 5.5 Mb to 4.8 Mb. That's over 12% smaller!

Get it!
Enjoy all this cool stuff by downloading Stoffi now!

The first release of Stoffi was installed in C:\Program Files and thus required an UAC prompt so it could get admin rights (which it needed in order to upgrade itself). I got a feature request to remove this and thus I moved Stoffi into the user folder.

For those of you on the old version I really suggest doing a reinstallation. Also, during my release testing I noticed that some systems did not have this UAC prompt and thus can't upgrade themselves. So if this is the case you are forced to reinstall.

A bit disappointing since I was looking forward to letting Stoffi shine with the silent upgrades but I guess that'll have to wait for our next release.

That's it for now. Stay tuned for a write up on the updates to the website. Oh, and we have an upcoming beta release with some cool remote control features as well.


Thursday, October 27, 2011

Found some old websites

As I have been digging through the server I decided to move the old versions of the website back onto the Internet. When I was looking at them I found one of the first screenshots of Stoffi. Even though Stoffi was great even at the very beginning it had some shortcomings and there has been a lot of improvements since then.

Website Version 1
This screenshot is from the first website of Stoffi. The website is dark and at one time I had an image on the front page.

With front image:
Without front image:

Website Version 2
The second version of the website is much lighter and features our beloved orange color. It is very sparse and you are welcomed by a big screenshot on the first page.

That's it. But we are far from done with the website updates. The Zhou release will introduce a whole new account system and thus will feature a pretty large update to the website. It will also include our first mobile version of our website.

Even though the biggest upcoming update to the website is the Zhou release our imminent Shang update will bring some cool enhancements as well, for example a very much improved tour. Want a sneak peak? Check it out!

Tuesday, October 25, 2011

Meeting PlusFourSix

Back in August I met with some people at a company called PlusFourSix. These are the guys that handle all licenses for Spotify. The meeting was coordinated by my good friends at MuchDifferent and even though the agenda was not mainly about Stoffi I was asked to come along and do a short demo about my upcoming release with YouTube support.

Initially I was unsure what exactly the meeting was going to be about. I was unsure about my role and how much these people actually knew about Stoffi. The meeting was set up by former Nokia music manager Åsa Carild and the CEO of MuchDifferent and close friend of mine Christian Lönnholm.

I had many questions: what did PlusFourSix do? How much did they know about Stoffi? What was the meeting going to be about?

I got one answer: It turned out that PlusFourSix had no idea what Stoffi was. I was supposed to introduce these people to the project. For the answer to the rest of my questions I'd have to wait.

When we arrived at the headquarters of PlusFourSix we met up with two people: their CEO and a technical manager. We all introduced ourselves, the two gentlemen explained that PlusFourSix has made a business out of collecting all licenses from different music labels and selling them. As Spotify grew the managing of licenses and rights to their music became more complex. So Spotify turned to PlusFourSix.

The rest of the meeting was very informal and mostly focused on network infrastructure - an area that MuchDifferent is really good at. I felt like I had no real place at those discussions. I was also unsure what exactly I could expect - or even wanted - from these people. Was I suppoed to be going for a deal? What could these people offer me?

Our Shang version was in alpha and had a somewhat stable YouTube playback. During the development of the YouTube support I had decided to drop the immediate plans on adding support for Spotify; I had no need for it. Sitting there at the meeting I realized that the only feature these people would be able to offer me was some ability to let my users buy (with money or ad exposure) music (either as files or streams). But why would my users want to pay money, or see ads, to listen to music that I am already giving them for free via YouTube? I didn't see a need for any of this.

Then the meeting shifted focus and the attention was on me. I was supposed to demo Stoffi. Earlier in the meeting someone had said that the business model of their company was fine as long as no one came and offered what Spotify had - but for free. So being a little snarky I started my presentation with the comment "You mentioned something about a free clone of Spotify earlier and that is exactly what I have here". I put on a big smile and showed Stoffi. I quickly searched for some YouTube music inside Stoffi, added it to a playlist, queued some tracks and quickly showed them the rest of the interface. Then I paused and looked at them, awaiting some response.

Not a word. I looked at them. They looked at the screen. I tried to read their faces but I couldn't tell if they didn't understand or just wasn't impressed. I was hoping for the latter.

All I got was some nods and "uh hum"s. Then the CEO's cellphone rang. He excused himself and left the room. The technical manager moved his eyes away from my screen and started to talk about the network infrastructure again.

Nothing more was said about Stoffi. On our way out we went into the office of the CEO and said goodbye. He expressed his hope to continue talking with MuchDifferent about the network infrastructure.

That was it.

Monday, October 24, 2011

Project Social: Report 6


Time for my sixth report on Project Social.

Last Week
Last time, I mentioned that I hoped to get some work done before the week's end. But after the exams we're over I just felt like having a little me-time (translation: I got lazy), so I didn't do any work to Project Social last week.

This Week
But now I have one week on me to get in some final touches to get the functions working just right. And given the time, I may be able to share a whole playlist instead of separate songs.

Finding a way to share a playlist effectively.

Be seeing you next week.

Project Mind Reader: Report 6

As predicted it was a slow week.

Last week
This week as said in my last post, was a slow one. I modified my code to make it compatible with the coding convention. And removed the problem that I created a list of my own which contained all the songs that had been matched, which caused redundancy issues as pointed out by Christoffer.

This week
I will add weights to the songs being added. And the weights if they are played together or nexted when they are close together. And all other weights that are needed. Saving the button for polish time.

Project Remote: Report 5 & 6

An update on the lack of progress of the app!

Last two weeks
I have barely worked on the app because of vacation and examination weeks. However, a lot of work have been done on the Genesis project which in turn means that there is very little work left to get the app to remote control desktop instances of the Stoffi player!

This Week
The upcoming week I will finish all integration with the Stoffi cloud services, meaning the app will be able to remotely control the configurations of desktop Stoffi players. A simple GUI has already been made and is already hooked up to control the local configuration (on the device), so once the pushing and pulling of the configuration is complete, the app should work as specified! Once this is up and working, I will define which features will be included before the feature freeze this sunday. Most importantly, I will decide which attributes of the configuration that will be remotely accessible by the iPhone app.

Project Genesis: Report 6

My final week before the feature freeze - and what a week! A lot of progress as I actually managed to remotely control media state (play/pause) with my cellphone yesterday just before I went to bed. Truly a remarkable feeling!

Last week
Last week I worked on getting the asynchronous communication up and running. I decided to use Juggernaut which runs on a separate server and integrates with Rails to allow the web server to push out data to any connected clients. Juggernaut supports the use of "channels" so we can selectively send out data only to relevant clients. For example only a client which is viewing a configuration would be interested in any updates to that configuration. A client looking at the About page will not be as interested.

Furthermore I have also added the support for both mobile and embedded modes on the server. The modes is initially detected using the user agent string but can be forced by setting the parameters mobile and embedded to either 1 or 0.

The solution was to add two additional mime-types and then use a session cookie to keep track of which version a client wishes to use. Then it is as simple as just adding additional files for each view. For example the profile pages would be:


Really simple!

The main idea here is that the mobile version will be more compact and fit better in smaller screens while the embedded version will be stripped down and without headers or fancy colors - thus making it integrate well in external applications.

The main challenge was the Juggernaut code. I've had trouble having the connection alive for more than five minutes. This means that any client will lose connection to the server and won't receive any updates after five minutes of idling.

The solution to this will be to update to the newer version of Juggernaut (google apparently gave me results of a very old and abandoned version). The new version supports even more methods to get the data out to the clients using protocols such as:

  • WebSocket
  • Adobe Flash Socket
  • ActiveX HTMLFile (IE)
  • Server-Sent Events (Opera)
  • XHR with multipart encoding
  • XHR with long-polling

It also adds some great reconnection support as well as support for SSL. However, I am currently having some trouble installing the new version so we'll see if I can get it fixed this week.

I've also noted that Stoffi is having trouble sending out updates to the server. It seems that the first few requests are sent out fine but then it just stops and hangs when it tries to send any data. Sniffing the network with Wireshark tells me that no data is actually sent onto the network so the problem is somewhere inside .NET (as usual!). I'll have to check it out and see why this is the case.

This week
This week I'm not gonna have much time to continue on the Genesis project. Most of my focus will instead be on getting Shang released so we can move Zhou (the hackathon version) into the beta channel.

As usual when it comes to releases the biggest hurdle is to migrate the settings properly. Hopefully my new and improved code in SettingsMigrator will make this job a little easier.

I'll also have to look into the problems with Juggernaut and see if I can solve that before feature freeze.

Tuesday, October 18, 2011

Project Social: Report 5


This project has calmed down a bit for the last week but for good reason.

Last Week
I haven't paid much attention to Stoffi, that's thanks to the exams as Ephracis mentioned last week.

Not getting distracted while studying, it's harder than it sounds.

This Week
The exam week continues with one more exam, but after that I will bring more of my attention to this project! Hopefully I'll have enough time to devote to Stoffi before the feature-freeze gets put in effect next week.

Bye for now!

Project Genesis: Report 5

A calm week when it comes to the Stoffi front. Exam period was in full swing and my priorities was elsewhere. But yesterday the exam period ended and this week will be all about finishing up the first half of this Hackathon before feature freeze.

Last week
Last week I had to focus on my other courses. I had two exams yesterday and hopefully they went very well. So now I can move my focus back to Stoffi and get it ready for the feature freeze in two weeks.

This week
I will try to finish up most of the stuff this week as I need to take the next week for preparing the stable release of Shang. So this week I will connect Stoffi with the configuration API and get the synchronization up and running. My goal is that at the time I write the next report it will be possible to have two instances of Stoffi running on two computer and have them share a single configuration.

The biggest challenges will be in getting the asynchronous bit in place. I need a way to send changes from the server back to the clients.

As I noted above time will also be a challenge. I have two weeks to both get my current alpha code ready for a feature freeze and I'll have to get the Shang release out the door which includes some work.

Hopefully I'll manage to get everything ready in time.

Monday, October 17, 2011

Project Mind Reader: Report 4 & 5

The last two weeks have been very slow and over shadowed by my data mining exam.

Last weeks
I haven't done much. Just updated some very small problems in my code. The rest of the time was dedicated to the data mining exam I had, which as a plus is very relevant to my project. Since my project is working towards extracting some knowledge about music from users listening habits. Hopefully some better knowledge in the subject will help me.

Next week
Unfortunately I have an AI exam as well that will consume most of the time this week but hopefully to the weekend I will have some spare time. The first thing I will do is make sure that all code I've written so far will be up to the code convention standard, and then hopefully will starting to add some weights so I can play around with the code I've written. Also quite liked Christoffers idea of the toggling shuffle button and hopefully that can be easily implemented.

Making sure that everything scales to large collections of data and making sure that the correct weights are added at appropriate places.

Tuesday, October 11, 2011

Project Remote: Report 4

Yet another update on the progress of the app!

Last week
Since the last update it has been all about getting the communication with the server working. There have been lots of speed bumps during this transition, but most of the problems have been resolved and there should not be more than a few days of work left before the app can remotely change the configuration of other Stoffi clients.

Packaging the requests to the REST-api correctly so that the server would accept them. I ran into a lot of problems when trying to POST or PUT data to the server while signing the request with my acquired authentication token.

This Week
The upcoming week I will be RESTing by the beach in Alanya, Turkey ;). I will catch up the following week by finishing the remaining networking and starting with the GUI.

Monday, October 10, 2011

An early Christmas gift to all Hackathoners

I have decided to move the release of Zhou forward two weeks. This decision was taken for mainly two reasons: to give us time to focus on exams, and because the nature of Stoffi's release system encourages it.

To start with, the exams for this period actually occured a few weeks before the first half of the semester is over. I had anticipated that the exams would be held a few weeks later and thus coincide with the beta period of Zhou, effectively giving us time to decrease our time and focus on Stoffi and let us move on to our other courses.

But this didn't happen. Instead we now have to study for exams at the same time that we need to put in the final code for the features of Zhou before it hits feature freeze. Not a very ideal situation. By moving Zhou forward two weeks I am giving everyone extra, unplanned time during which they can either recover from lost time (if they fell behind their Stoffi schedule because they focused on other courses) or take a break from Stoffi in order to pass their exams.

Secondly, the very nature of how Stoffi's releases are organized encourages parallell development. That is, Stoffi loves it when there's one version in beta, being tested and translated, while another version is in alpha, being under heavy development.

Our old schedule had Qin enter alpha right after Zhou entered Stable. Instead, the two versions will now overlap. At the same time I added one extra week to Qin alpha, so the two versions will overlap with a total of three weeks.

So, I hope everyone will enjoy their extra time. And hopefully we will all be able to both pass all our respective courses while delivering code of high quality to the Zhou version.

Good luck on the exams!

Project Genesis: Report 4

Really busy week. A lot of new stuff. The API is in place, a connection for sharing (and listening) has been made to Facebook and asynchronous communication is in place.

Last week
Last week I finished the API calls. It is now possible to create, read, update and delete devices, configurations, songs, artists, albums and playlists. All actions are available both as a normal HTML pages and as JSON, XML and YAML over OAuth signed requests in true RESTful style.

I've also worked with Mark in looking into getting a connection up to Facebook. Mark did some really great work in getting Stoffi Music Player connected to our new cloud services and we have managed to get sharing up and running. Mark also put in code to share playlists and submit the listening of songs. I had some trouble implementing this in our cloud system, more about that in "Challenges".

Furthermore, I've managed to get an asynchronous communication working on the website. It is implemented for the device page. If you create a device and show it in your browser and then open another browser and change either the name or the version of the device, it will automatically be changed in the first browser. No need to hit F5!

The two features that Mark implemented in Stoffi - sharing of playlists and submission of the listening to songs - will have to be pushed into the next release.

Playlists require us to put some more thought into how one will be able to listen to playlists, both with Stoffi installed and without.

The listening of songs is implemented all the way to our server but the Facebook API is just a few weeks old (it was announced at this year's F8). Their API is full of bugs and our calls to the API results in 401. However, making the very same call with the same parameters using Facebook's own Graph API Explorer does submit the listening of a song to the users Facebook profile, but the response is an OAuthException with the message "An unknown error has occured". We will have to wait for Facebook to work these things out and for their new API to stabilize.

This week
This week I will be busy studying for exams next Monday so I don't plan on actually doing any work on Stoffi.

Project Social: Report 4


We've had a very busy week and we can now share a song!

Last Week
Sharing a song is now possible through Stoffi Player. It will create a post on your Facebook wall saying the title and artist of the song. It even comes with a link to the website so you can watch the YouTube song there. Later you will also be able to open the song in your own Stoffi Player or in YouTube.

I've also added a function for sharing playlists. But that one will be more complex than just sharing a song and will have to wait for next version.

Getting to use our test users for testing the app was (and still is) a problem. The thing is that we need to have their password (to login) but getting it is difficult. The only way to getting "logged in" as a tester user is to "switch" to it from inside the app, which is not possible to do from inside Stoffi.

This Week
Now it is time to start testing for bugs and document this whole project.

Without any proper test users it will be difficult as I would rather not have my own account to test the app.

See you next week!

Thursday, October 6, 2011

Beta update: improved scanner, volume tooltip, bug fixes

A minor update to the beta channel has just been released.

This update brings improvements to the scanner (which boosts startup performance for large libraries) and fixes a bug which caused some instances of Stoffi from responding during first startup. It also brings improved stability when modifying a Library while Stoffi is running.

Other fixes include playback pane compression with Aero Snap, delayed YouTube search among others.

Lastly, a small tootip has been added to the volume slider.

As always, Stoffi will update itself automatically but you can always download the new beta here.

Tuesday, October 4, 2011

Project Mind Reader: Report 3

Behind schedule but at least some code has been written.

Last week
Since the decision last week on how to implement the mind reader, I have began creating data structures for the simple large table approach. This is currently done in a large C# Dictionary that simply maps the songs. It has been a busy week but will try to make up time this coming week.

Implementing everything efficiently.

This WeekHopefully everything should be implemented in this week so that weights are added. And also that you can look up which songs are connected to a single song. Which essentially would make a working system, but without the data mining alternative for large scale data sets. I might start working on that as well. Maybe also adding a button for the starting of smart shuffle.

Monday, October 3, 2011

Project Remote: Report 3

Time for yet another report on the progress of the app!
Last week
I prepared for the future integration with Stoffi cloud services. Since the server was not ready to handle requests concering the users configuration, I created a temporary server simulator that responded to the apps requests just like the server would. I also created the classes required to handle the logged in users configuration and pulling/pushing this data to the server, as well as a temporary GUI with buttons and sliders to change the user configuration.

Making the configuration manipulation as flexible as possible.

This Week
The upcoming week is the one where it all happens: This weeks goal is to connect the app to the cloud services, allowing the user of the app to remotely control a desktop players state! :)

What's going on with this Hackathon?

While I'm sure no one on this earth have missed that we at Stoffi is doing a half-year long Hackathon as part of our studies, there may be some of you who haven't the full picture of all the awesome stuff that's going on here.

So I thought that I'd take some time to give you a nice wrap up on what we've done so far. I'll also talk a little about some of the plans we have, both for the rest of the Hackathon as well as the future ahead.

This weekend we had a little sprint where we gathered at my house and was up all night hacking on Stoffi, playing games and watching series. First I want to thank everyone for coming and I want to congratulate everyone on the work that got done. Every project have now moved into their implementation phase and we have some amazing stuff in place now.

Music in heaven
Stoffi has now a cloud platform where you can register an account and connect your Stoffi Music Player to that account. Furthermore you are able to link that account to Facebook, Twitter and/or Google. You can even use one of these accounts to signup to Stoffi so you won't have to register at all. And you can do it all right inside Stoffi without ever having to open a web browser!

It is also possible to register your own app and use it to access the Stoffi platform just as Stoffi Music Player will be able to do. It's open for everyone!

Telekinesis with a different sound
One app we've created that will use this platform is an iPhone and iPad app named Stoffi Remote which will let you remotely control any running Stoffi application. It can currently be connected to our services and has a draft GUI in place, and it looks really good!

As usual our aim will be on an amazingly looking interface and a smooth user experience, fully integrated. It will be a natural part of your iPhone, iPad or iPod. (You'll event think that it's not really a separate app but something that Apple shipped with your device!)

Music is social
These new amazing services has opened up an opportunity to create some amazing new features. Stoffi will now be connected to your social network and can become a part of your life in a much more engaging way.

We have created a sharing button inside Stoffi for any YouTube track which lets you share your favorite tracks with your friends with just one click.

Stoffi will also submit all the tracks you have listened to up to our server where we'll be able to push it out to stuff like Facebooks new OpenGraph. This way your friends will be able to see what you are listening to in real time directly in Facebook.

Intelligent by design
Stoffi has just gotten a new memory where it will be able to remember what songs you like. Using this memory it will even be able to predict what other songs you may like and thus it will be able to suggest new songs for you or even take over the playback and play the songs you are most likely to want to hear right now.

This is some really cool stuff and the data structures are in place along with some methods for manipulating this structure.

Soon in your hands
In a few weeks we'll have our first feature freeze before our mid-release of this Hackathon. For this release we'll have a ton of stuff ready for you.

You will be able to...
  • ...share songs with your friends
  • ...keep several running Stoffis in sync with each other
  • ...remotely control Stoffi using an iOS device
  • ...see what your friends are listening to on Facebook
  • ...see where you have Stoffi running

A bright future
With our new service platform we will be able to deliver a lot more stuff to you even after this Hackathon is over. One example is an automated system for finding out the artist, title, album and genre of a YouTube track, or even find instruction videos on how to play your favorite song on the theremin!

We also plan on bringing more services in together with your music experience such as MySpace, LinkedIn, Soundcloud, and many more.

Music has never been this exciting!

Project Genesis: Report 3

It's that time of the week again. Another report from the cloudy sky!

I've been doing some real progress even though I have actually moved some focus toward the current Shang beta. The Shang release is really moving in closer and when Shang is released Zhou will move into beta and we'll have a feature freeze. So right now I am trying to tidy up Shang while at the same time push in all the planned features of Project Genesis into Zhou.

Busy, busy, busy!

Last week
So, let's start with the work that was done last week. As planned I've managed to create some basic OAuth in the client so it's now possible to connect your Stoffi Music Player with an account on

There's a whole new ServiceManager in place which will handle all communication with our servers. It currently handles authentication and sharing of a track (even though the server won't currently act upon that share).

As I predicted a week ago the biggest challenge was finding a suitable OAuth client for .NET but I found one that's really lightweight and works pretty well. There's a few rough edges and some beauty polish left to take care of though.

This week
This week I will be focusing on bringing about some configurations for users so that Project Remote and Stoffi Music Player can actually communicate with the server and synchronize the configuration of Stoffi.

I will also assist Project Social in connecting our server backend with Facebook for the share API calls.

The biggest challenge I predict for this week will be the ability to push out changes to the clients via our HTTP API. We'll see if I can get some persistent connections up or if I'll start simple by just pulling the server, as a first step. I need a solution that works over HTTP(S) (so we won't suffer from tight firewalls) and has support in Rails and .NET (Project Remote will be using push notifications).

Project Social: Report 3


Code has been typed, meaning things are going underway!

Last Week
A new button has been added! A share button is now available when right-clicking a YouTube track. For the moment it doesn't do anything noticeable, but it will send information to your account in the server and from there send it to Facebook, Twitter and/or Google Buzz. That is, if you're account is connected to any of those services.

A "listened" function is also in the works, thanks to Christoffer. What it does is send information specifically to Facebook's Open Graph service, adding it to the new ticker there. Like share, it doesn't do anything spectacular for the moment, but it's getting there!

The schedule (that I wrote down in our wiki page) hasn't exactly been followed to the letter, but that's no big deal since it will be taken care shortly anyway.

There have been some issue with another course, so my mind have been wandering to that one at times.

Not much coding have been going on last week, but there have been some more researching so there have at least been some progress.

This Week
Now it's time to finish the coding that is left for the app, the server, and what little there is left to do with the share and listened functions in the Stoffi Music Player.

With this being the last week before feature-freeze there will be some rushing to get this done this week, at least so that we have all the necessary features before testing it out for bugs.

There will be more reading up on Facebook too on how to use its new Open Graph API for our application.

Stay tuned for next week, folks!