Geertjan's Blog

  • May 11, 2008

JFugue Music Application Platform

Geertjan Wielenga
Product Manager
I suddenly realized that instead of turning Matt Warman's whole JFrets application into a single NetBeans module, I could turn each of its parts into separate modules. The cool thing is that JFrets provides a number of different tools that help with learning to play the guitar, such as a scale selector and a metronome. Here's the JFrets metronome:

I've always wanted a metronome in the JFugue Music NotePad... and now I do:

I simply copied the metronome parts of JFrets into a separate NetBeans module (which makes sense since both the original application and the destination application use Swing) and then slightly reorganized the ui so that it would fit snugly into the explorer view. When you click Start, the JFugue API is used under the hood to start the audible tick-tocking of the metronome, using the settings you set for the tempo, until you press Stop (which is what the Start button turns into once started). This means that I am now treating the JFugue Music NotePad as an application platform. Simply download the binary and then register it as a NetBeans Platform (under the Tools menu in the IDE). All the modules in the JFugue Music NotePad are then available to your own modules. One of these modules is the module that wraps the JFugue API JAR. So in your own module, such as the one which provides the JFrets metronome, you'd simply declare a dependency on JFugue, which the application made available. Then you can deploy the modules you create in the IDE to the JFugue Music NotePad, from within the IDE, via a menu item that would then start up the JFugue Music NotePad and install your module into it.

Now that the JFrets metronome is a module, I can do the same with all the other JFrets tools, as well as the main window itself. Then I could set up an update center that contains these additional modules. The update center would be automatically registered in the JFugue Music NotePad. All its users would then be able to install additional features, such as a metronome and scale selector, which originally all came from the same JFrets application. Of course, anyone else would also be able to install these tools into their own NetBeans Platform applications, such as the IDE. Not necessarily useful to have a metronome in the IDE, but it is at least possible.

Join the discussion

Comments ( 1 )
  • Matt Warman Sunday, May 11, 2008

    Thanks Geertjan. I hope this inspires even more music applications.

    Matt Warman

    Creator of JFrets https://jfrets.dev.java.net

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.