Posts Tagged ‘JavaFX’

Music Explorer FX 2.0: Now with Real Music

Sunday, May 16th, 2010

The latest version of Music Explorer FX is now available. It boasts some significant changes, most notably access to full-length, licensed audio tracks. Click the button to launch it, and read on for the new features.

Real Music

A significant limitation of previous versions of MEFX was the lack of access to licensed audio. Since most music is not freely available, MEFX would have to offer up whatever free content it could find on the internet. So if you brought up Lynyrd Skynyrd, for example, you were likely to come up with five remixes of someone sampling Freebird, when really all you wanted is the studio version of Sweet Home Alabama.

Thanks to a new content provider program between the Echo Nest, and Play.me (a music content provider) this problem is a thing of the past. MEFX can now offer up full-length audio.

By default, MEFX will play 30 second preview clips of any given artist. If you sign in with your play.me account though, you get access to the full-length versions (the sign in button is in the upper right part of the application).

signin

If you don’t have a play.me account, you can register (for free) via MEFX — only an email address is required. A free account nets five hours per week of full-length audio. If you feel like paying money you can get an unlimited amount of audio streaming (a bit of a disclaimer here: I’m told that Play.me is U.S. only…for now).

Playlists

Beyond access to licensed content, this new version also introduces the Playlist, found in the lower left corner of the application.

playlist

Instead of being limited to only playing audio from the artist in the middle as previous versions were, you can now add any artist to the playlist, and continue browsing. This keeps the music playing while you browse around the artist space.

Click the “+” button below the artist to add it to the back of the playlist. If you see something that you want to play immediately, then click the “>” button instead.

beck

Once in the playlist, you can hover over an artist to modify their position in the list.

Since MEFX is now pulling from a real catalog of audio data, the number of tracks per artist has grown significantly (over 20 tracks in some cases). In order to better manage this, you can click on the artist’s image to “flip it over” and view the available tracks. From here you can click on an individual track to include or remove it from the playlist. Here’s a screenshot showing the track list mid-flip.

flip

A New Look

MEFX 2.0 sports a new look — most notably this is reflected in the “shelf” component at the bottom, where most of the goodies reside.

shelf

In addition to the playlist, described above, the artist history resides here on the shelf as well on the right side.

Everything You Want to Know About an Artist

Videos, News, Bios, Reviews, Blog entries — all sorts of aggregated information about the artist is available to you. Just click on the “i” (”info”) button below the artist.

WhiteStripesInfo

Click the “images” button under the artist to view the image gallery (as with the older versions).

ChickenfootGallery

But Wait, There’s More…

Don’t forget the “shelf popup” in the lower right corner (click the “up arrow” to bring it up).

controlpanel

This extra control panel allows to to tweet your musical journey (as before), adjust the popularity of artist recommendations via the “Fame” knob, and toggle Auto-Play.

Auto-Play will enable MEFX to randomly pick artists and fill the playlist for you. This “auto pilot” mode is great for parties when you want to keep the music going without user intervention and also want something interesting happening on the screen.

I’m excited about this new version of MEFX. I feel that it has crossed over from “interesting experiment” to “useful application”. Please check it out, and let me know what you think.

Check out the main site for more information about MEFX.

Oh, and be sure to check out MEFX 2.0’s mention in a recent Billboard article.

Enjoy!

Flipping Nodes with the JavaFX PerspectiveTransform

Tuesday, April 13th, 2010

In working on some new features for Music Explorer FX 2.0, one of the issues I’ve had to think about is where to put track information for an artist. The current UI is mostly visual and doesn’t afford a lot of space per artist. For reference, here is how a typical artist is currently represented:

unflipped

Wouldn’t it be nice if we could just work within the current space constraints and flip that artist over to see the tracks that it has to offer? With JavaFX’s PerspectiveTransform (and the help of a Timeline for some animation) we can do just that.  Here’s a screenshot of a node flip in-progress.

halfflipped

Here’s a shot of the track listing on the “back” rotating into view.

halfflipped2

And here’s the final state.

flipped

This is just a prototype (clearly I don’t listen to Nickelback), but feel free to go ahead and try it for yourself. Once you launch the app, click on the “flip” button to flip the node back and forth.

The code to make this work is an amalgam of Josh Marinacci’s “Photo Flip” demo and the Flip Transition in Lucas Jordan’s “JavaFX Special Effects” book. The main issue to be aware of here is that, as explained in Lucas’ book, we’re not flipping 180 degrees from front to back. If we did that the track listing UI would be reversed.

Rather what is really happening is that halfway through the rotation when the front node is “on edge”, we’re swapping it for the back node (the track listing) and rotating the track listing the “last” 90 degrees of the rotation — as if it had made a complete rotation.

In other words we’re rotating a full 360 degrees, but cutting out the “middle” 180 degrees to make it look like half a rotation. If we didn’t do this, but rather just rotated 180 degrees, the track listing would appear backwards.

Feel free to check out the source code for details.

Incidentally, this is just one of many neat tricks in Lucas’ book, so be sure to pick up a copy. By way of full disclosure and self-aggrandizement, I was the tech reviewer for the the book — but don’t let that stop you from ordering your copy today!

JavaFX Tag Visualizer Source Code

Wednesday, March 17th, 2010

Some of my first experiments with JavaFX involved alternative ways of visualizing tag clouds. Specifically there was the “dome” visualizer, and the “radial” visualizer, both pictured below with their respective webstart links.DomeViz

tagcloud

radialviz

The source has been updated to JavaFX 1.2 and lives here for the dome visualizer and here for the radial visualizer. Thanks again to those who had interest in it. The usual caveat of “this is messy experimental code” applies.

JavaFX Family Tree Visualizer Source Code

Tuesday, March 16th, 2010

A couple people have requested the source code for this Family Tree Visualizer that I contributed to JFXStudio a while back. You can get the source code here (updated for JavaFX 1.2). Thanks to those who had interest in it.

This visualization foregoes the typical tree structure by displaying a family tree in concentric rings with the younger generations rippling out from the middle (much like a real tree). There’s also some animation to flip back and forth between the two examples (the Baggins line and the House of Durin from Lord of the Rings).Screen shot 2010-03-16 at 12.14.57 PM

Here’s the web start link again for convenience:

One of the great things about JavaFX Script is its declarative syntax, which lends itself to feeling like a DSL for constructing objects.  To illustrate this idea, here’s an excerpt of the DSL-like syntax for creating the family tree from the above screen shot:

FamilyTree {
person: Person {
name:”Durin”
children: [
Person {
name:"Dain I"
children: [
Person {
name: "Tror"
children: [
Person {
name: "Thrain II"
children: [
Person {
name: "Thorin II"
}
Person {
name: "Frerin"
}
Person {
name: "Dis"
children: [
Person {
name: "Fili"
}
Person {
name:"Kili"
}
]
}
]
}
]
}
FamilyTree {
  person: Person {
            name:"Durin"
            children: [
              Person {
                name:"Dain I"
                  children: [
                    Person {
                      name: "Tror"
                      children: [
                      Person {
                        name: "Thrain II"
                        children: [
                          Person { name: "Thorin II" }
                          Person { name: "Frerin" }
 ...

While it would be pretty generous to say that this is a full-blown DSL, its conciseness and structure certainly feels a lot like one. In my weaker moments I might even mistake it for a Groovy Builder.

I’ve heard it said many times over that JavaFX is a DSL for creating user interfaces. I may push that a bit farther and say that it’s a DSL for creating just about anything visual.

Next up, in keeping with recycling my old ideas, I’m going to update and release the source code for these tag cloud visualizers for those interested.

MEFX at SXSW

Monday, March 15th, 2010

Paul passes along this photo of Music Explorer FX being demoed at the SXSW music festival this past week.

mefx-sxsw

It’s nice to see that a) JavaFX is getting some representation at such a diverse and high profile festival and that b) Music Explorer FX is still a part of that promotion. This seems like a natural fit though since MEFX is an application for music discovery, and SXSW is, after all, a festival about discovering new music.

JavaFX at the Chicago Java Users Group

Saturday, December 12th, 2009

I’ll be giving a talk on JavaFX this upcoming Tuesday, December 15th at the Chicago Java Users Group. The talk is titled “JavaFX for Java Developers”, and is meant to be a survey of JavaFX from the perspective of someone already familiar with Java.

Thanks to the generosity of Apress, there will also be an ebook raffle for Lucas Jordan’s new book: “JavaFX Special Effects“, which I had the privilege of tech reviewing.

So if you live in the Chicagoland area, come check us out.

Music Explorer FX v1.1: Now with “Fame” Control

Wednesday, November 11th, 2009

Version 1.1 of the JavaFX-based music discovery application, Music Explorer FX has been released. You can try it here:

This version is mostly about performance and stability improvements and it’s also the first version to be released under JavaFX 1.2. Additionally, it sports a new feature: the “Fame” knob:

fame

For those not familiar with how the application works, MEFX will present you with artist recommendations based on an initial artist. Pictured below, for example, is a web of six artist recommendations that sound similar to the  popular alternative metal band, “Breaking Benjamin”.

BB

One potential issue with this kind of search though is that if you are a fan of BB, then you are likely to have already heard of many of these bands. This is where the Fame knob comes in. If you dial down the Fame knob, indicating that you want less famous recommendations, and rerun the search, you’ll now get these results:

BB_lessfame

These bands are still very similar to “Breaking Benjamin”, they just happen to be less popular. Note that the green “popularity” gauges are considerably lower than the artists on the first search. This can be a great way to explore the long tail of music.

The Fame knob works in the other direction as well. Turn it to the right (positive) and you’re guaranteed to get some mainstream results that even the RIAA would be proud of.

This release also boasts notable performance improvements and some crazy caching techniques.  In particular, I encourage you to check out the much improved image gallery (bring up your favorite artist, and click on the “photos” icon). For a more detailed rundown of MEFX, check out this post.

So whether you’re an old friend of MEFX, or a you stumbled across this post in search of what happened to that popular 80s musical, go ahead and give it a try.

Search is not Discovery

Friday, October 30th, 2009

Paul Lamere over at Music Machinery has a great write-up about Google’s new music search feature. To give you a sense of where he stands, he ends the post with a memorable mantra: “Search is not discovery”.

Search is great if I know that I’m looking specifically for Pearl Jam’s live cover of “Sittin’ on the dock of the bay“. Search becomes less useful if I’m sick of listening to Pearl Jam and want something new — something not Pearl Jam specifically, but something similar…you know, something that I’ll like.

This is where music discovery comes in. Companies like the Echo Nest are trying to make it possible to one day type “find music that I will like” into that ubiquitous search box and get back something meaningful.

On that subject, I’ve been experimenting with a feature for the next version of Music Explorer FX which will lend itself to music discovery “in the large”.

Currently MEFX allows you to explore the artist similarity space very linearly. Generally, once you’ve selected an artist you can go forward, or back, but you can’t easily branch off and return later, or see comparisons between more than a few artists at once.

But what if you could browse a much larger segment of the similarity space, and see connections between 100 artists, instead of just two? What if you could “plot a course” between Pearl Jam and Otis Redding, viewing all the artists along the way?

Below is a concept screen shot (written in JavaFX) illustrating this idea. I hope you like abstract dots!

web

More details to follow…

The Awkward Relationship Between Swing and JavaFX

Tuesday, October 27th, 2009

Here’s a recent awkward interaction between a Starbucks Barista and me:

Me: I’ll take a Grande Coffee (note, I don’t actually order “just a coffee”, but I’m too embarrassed to write out the actual drink. Being forced to write “Grande” instead of “medium” is embarrassment enough — I already conceded “barista” over “employee”).
Barista: Will that be all for you today?
Me: Yep — and my name’s not “Todd”.
Barista: I’m sorry?
Me: Did you just call me Todd?  My name’s not Todd.
Barista: No…I didn’t. I asked if you wanted anything else.
Me: …Ok, my mistake. (Note: a normal person would let the misunderstanding go at this point — but not me! More awkwardness to follow!)
Barista: That will be $3.50
Me: Today! You said “today”!
Barista: I don’t–
Me: You said “will that be all ‘today’”, and I heard it as “will that be all, Todd“!
Barista: Ok, well–
Me (visibly relieved): Oh man. I sure diffused that awkward situation. What a relief.

Swing and JavaFX currently find themselves locked in a perpetual cycle of awkward exchanges and misunderstandings.

We’ve been told from the beginning that JavaFX is targeted toward media-rich social internet applications and not meant to be a replacement for Swing. We then, however, have to then reconcile that viewpoint with news like SwingX’s funding drying up and the Swing Application Framework missing the JDK 7 train (or “boat” depending on how you feel these things travel).

Feelings of anger, disbelief, and dismissiveness seem to abound in the Swing community. “Why is Sun abandoning Swing? Why are they shoving another language at us?” I admit, as a Swing developer myself, the facts on the ground look bleak for Swing.

It does seem too bad that Swing and JavaFX are in a zero-sum relationship w/r/t allocated resources and active development. It’s hard to deny that many of the high-profile Swing developers are now actively pushing hard on JavaFX.

If we look beyond that, however, I think that there is plenty of room for both technologies in the client-side Java ecosphere.

The Java Platform has always been about choice — and lots of it. Today’s Java developer has a staggering amount of choice in the realm of web frameworks, persistence frameworks, logging, collections, aspects, and dependency injection frameworks. In fact, a Java developer has so much choice, they don’t even have to program in Java if they prefer a different JVM-friendly language.

But in the realm of client-side Java, the choice has been much more limited, mostly due, I imagine, to the fact that client-side Java has never exactly been an exploding marketplace of opportunity.

Web development has always eclipsed client-side work. It’s my hope that JavaFX can seek to change some of that; that it will be able to widen the reach of client-side Java and push development back onto the desktop and remind users that not every application needs to run inside of a web browser.

Sure, it’s possible that some day JavaFX will be the “Swing Killer”, but that would be a sad and unfortunate outcome. It’s my hope that JavaFX and Swing are playing a nonzero-sum game and that the world of client-side Java is big enough for both.

Music Explorer FX Mobile Edition

Tuesday, October 20th, 2009

Earlier in the year, I wrote a music discovery desktop application in JavaFX called Music Explorer FX.  Since JavaFX also has a Mobile SDK, it made sense to write a version of MEFX for JavaFX enabled mobile devices.

Although the idea and basic usage remain the same, MEFX Mobile is not just a port of the larger desktop version, but a completely separate application.

MEFX_Search

Here’s the initial screen. You can enter an initial artist in the search box as expected, or, since I find entering text on a mobile device extremely difficult, you can hit the “Surprise Me!” button to have the app randomly pick a top rated artist for you.

Once you get your initial artist, you’re presented with the usual “visual profile” complete with image, and the “familiarity” and “hotness” gauges similar to the desktop version.

MEFX_Artist

Selecting the middle button will bring you to the core of the application, which is the “artist similarity” screen.

MEFX_Similar

Here you’ll see a number of artists recommendations as provided by the Echo Nest. The left and right buttons will scroll through the list, and selecting an artist will promote it to the main “artist profile” screen pictured previously.

At any point, selecting the third button will return you to the search screen. Selecting the first button will bring you to a screen where you can browse through your history, which provides an easy way for you to return to a previous selection.

MEFX_History

One of the neat things about JavaFX is that (generally) the code that runs on the desktop can run on a mobile device (and vice versa) with little issue. So if you don’t have a JavaFX-enabled phone, don’t despair; you can click on the launch button to run the exact same application as a Java web start desktop app.

For those interested, I wrote the application specifically for the HTC Diamond, which is pictured here running the application.

MEFX_Mobile_HTC

MEFX Mobile is an open source application and exists as a sample over at JFXtras.org. So feel free to download the source code and play around with it, or even install it on your own phone.

Enjoy!