Geertjan's Blog

  • March 6, 2006

Syntax Highlighting for MIDI Files and Other News

Geertjan Wielenga
Product Manager
The MIDI Editor that I'm building (see yesterday's blog entry) is providing a great opportunity to learn about syntax highlighting in the IDE. There's a tutorial on this subject, but this is the first time that I've actually tried it out on something other than Manifest files (which is the use case in the tutorial). I've discovered that it is really easy to create syntax highlighting, except for the creation of the tokens and making sure that the right element is matched to the right token. In other words, the tricky part is creating the syntax itself. I've heard that this is going to be simplified at some stage, though. So, anyway, I've implemented syntax highlighting for a subset of the MIDI syntax:

Here you see a different syntax color for the instrument, the note, the octave, and the length. There's a lot more that I'll need to implement, but clearly the start is already there.

By the way, there are two new update centers (that I know of—if you've set up an update center, please let me know and then I'll blog about it here):

  • An update center belonging to Michel Graciano. Click here to get there. Go to that update center if you want to get his cool Copy Action History plug-in module. It looks really handy (you get a small list showing the copy history, then you can select an item for insertion in the editor.)

  • An update center belonging to Ramon Ramos. Click here to get there. In his update center, he's got the WebSearch Engines plug-in module, which I blogged about a few times recently.

What's also cool is that in both cases, the plug-in modules extend the Options window. So, if you're developing plug-in modules that make use of the Options window, give those two plug-in modules a look. Things are actually much easier now than they used to be, because API Support Update 1 Beta is now available in the Beta Update Center. For a list of feature highlights and other fixes, click here. In fact, if you're a plug-in module developer (or a rich-client application developer), your help is needed! Please install API Support Update 1 Beta (from the Beta Update Center) and send an empty e-mail to testing-subscribe@apisupport.netbeans.org. This will subscribe you to the mailing list for the people testing this Beta release. And then, follow the instructions here for reporting issues that you discover in the Beta release. Apparently, the five best bug reporters will get a t-shirt!

One of the minor cool things of API Support Update 1 Beta is that its help files have been extensively expanded. The picture on the left shows you what NetBeans IDE 5.0 provides in the Help | Help Contents for plug-in module/rich-client application development, while the picture on the right shows you what's in API Support Update 1 Beta:

So, if you don't have enough reason to try out API Support Update 1 Beta, just the expanded reading material should pull you over the edge... Note, though, that some of the sections and topics are placeholders—they'll be filled out by the time the final release of this plug-in module becomes available.

Join the discussion

Comments ( 2 )
  • James Branam Monday, March 6, 2006
    This is really cool stuff!
  • Paul Mercier Thursday, October 6, 2011


    Sorry for my english I will try to do the best I can.

    I need information about the midi grammar or midi syntaxe, because i want to create a program that allows me to write a midi score and read it to write it on a kind of visual score.

    I just need documents that explain it correctly because i don't find anything very interesting or there is a lack of details.

    Could you help me?

    Paul Mercier

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