Skip navigation

Category Archives: News

First of all, I may have been neglecting this blog, but I haven’t been neglecting NusachDB, a growing collection of Jewish liturgical tunes. It’s up to almost 1000 tunes, though with all the double-counting (for various reasons that I don’t want to get into right now), it’s probably about 400 or so unique ones. While working on NusachDB, which involves transcribing tunes found on the internet, I came across some, well, awful design. One site has its recordings stored as Flash applets, which is annoying enough, but it doesn’t actually have any controls. You can press play or you can press stop; pressing play starts the recording from the beginning and pressing stop stops it. No pause. No way to rewind. As you can guess, transcribing this is extremely annoying and an enormous waste of time. Well, a bit of digging (by which I mean just looking at the source) shows that these are .swf files, which I can download. Great, that’s a good first step! But how do I retrieve the music inside?

At first I figured it was some sort of bundle, like .app, with various resources (like the music I needed) inside. Finder doesn’t seem to think so. I googled it, to no avail. There are plenty of commercial programs that will do this, some costing $100. $100 for sound conversion? Sounds like a scam. This is a simple enough task that it shouldn’t take a program that costs more than $5 to do, so it smells like someone is trying to make some very cheap money out of this. I might as well try it myself. The Wikipedia page doesn’t have anything useful on the file specification, but maybe I can open it as a text file or something just to see what would happen. Probably nothing interesting, but… wait, I right-click the file to open it in Sublime, but one of the programs listed in the menu is The Unarchiver?

Turns out .swf is an archive format after all. The Unarchiver opens it with no problems. So yeah, don’t be an idiot and buy a program to open a downloaded Flash applet, because it’s simply not necessary and might well be an enormous waste of money.

Secondly, a recent Chrome update broke the Microtonal Synthesizer. Very sad. I got emails about it — at least it still worked in Safari, which is usually a few versions behind Chrome. Well, had some time yesterday to try to debug this; obviously there was a change in the API that broke AudioLib.js, the underlying sound library I use for the synth. (One of these days I’ll make my own, I suppose.) The synth is supposed to use WebAudio, but it was using the PCM fallback, which is terrible in every way. I couldn’t believe that Chrome decided to stop supporting WebAudio, so it must be something else. Unfortunately, it also wasn’t obvious where the code chose the right framework to use. It took a while, but eventually I found the switch — a for loop over the available audio frameworks that enclosed the creation of the audio object in a try block. If object creation failed, it would move on; if it succeeded, it would return the new object. This of course relies on an exception being thrown in case of failure. Not sure if it’s the best design. But it’s interesting that there was no catch block to deal with the exception. So I decided to log it instead, and the culprit was soon discovered: a method of the AudioContext that was renamed because who needs backwards compatibility anyway? It was throwing an exception because the method was undefined, so it was causing the audio object creation to fail and the for loop to go to the next iteration until the PCM fallback succeeded. That’s a simple enough fix — call the correct name of the method — and hey, now the synth works again! Check it out. There’s nothing new there yet, but it still works, so that’s something!

To be fair, the new plugin is the same as the old one but with different numbers.  I’m planning on making a Sibelius plugin factory at some point, to allow custom plugins.  For now, though, enjoy the ability to write in 17-tone equal temperament!

Though “temperament” is a bit of a misnomer, because while 17-TET certainly sounds like it has quite a temper, it doesn’t actually temper out anything useful.  Here are the names of the 17 notes of 17-TET:

C Db C# D Eb D# E F Gb F# G Ab G# A Bb A# B (C)

If you’ve read my previous post on the mathematics of diatonic tunings (and actually understood my ramblings), you might remember (or not) that our diatonic 12-tone system depends on two kinds of half steps, the chromatic, from C to C# where the note name doesn’t change, and the diatonic, from C to Db where the note name does change.  The chromatic half step is seven fifths forward in the circle of fifths, and the diatonic half step is five fifths backward in the circle of fifths.  In 12-TET, there are only 12 notes, so those two half steps meet at the same notes, and they’re enharmonic.  C# is the same as Db, just spelled differently.  In other diatonic tunings, though, the chromatic and diatonic half steps have different sizes!  In n-TET, the circle of fifths has n notes.  Each diatonic half step steps backwards 5 fifths, and each chromatic one steps forward 7 fifths, so if your chromatic and diatonic half steps meet after c chromatic ones and d diatonic ones, there are n = 7c + 5d notes in the circle of fifths.  Heh, like that derivation?  Anyway, one of the values of n is 17, where equivalence is reached in 1 chromatic and two diatonic half steps because c = 1 and d = 2.  1 chromatic half step from B is B#; 1 diatonic half step is C and two is Db.  In 17-TET, B# = Db.  Kinda weird, isn’t it?  c and d are also the sizes of the intervals in 17-TET steps.  The chromatic half step is 1 17-TET step and the diatonic is two.  This explains the weird order evident in the note names.  I excluded double flats and double sharps (as well as Cb, E#, Fb, B#), but it’s easy to see where they go.

Problem number 1 with 17-TET: the major triad.  Let’s look at the cent values: the major third is 423.5 cents and the fifth is 705.9 cents.  12-TET has 400 and 700, and JI has 386.3 and 702.0.  The fifth is a little sharp — not much sharper than the 12-TET fifth is flat.  You barely notice it if at all.  But the third is 23.5 cents sharper than 12-TET and a ridiculous 37 cents sharper than JI!  It resembles a major third but it’s REALLY out of tune.  19-TET has a pretty close fifth as well, but its major third is 378.9 cents, closer to JI than 12-TET.  When you hear a major chord in 19-TET, it’s very consonant; in 17-TET, it’s an elementary school class of violinists.

So, you have to wonder: how would the second movement of Beethoven’s Sonata No. 8 “Pathetique” sound in 17-TET?  Well, it’s fairly odd that you were wondering that, but that’s OK because it’s right here:

Sonata No. 8 – II (12-TET)

Sonata No. 8 – II (17-TET)

Sonata No. 8 – II (19-TET)

These recordings were made in Sibelius; the 17-TET and 19-TET recordings using my plugins for the respective purposes.  It’s really easy to retune: select all, apply the plugin, done.  (So long as you wrote the music with one note in a staff at a time, anyway; I also had to transcribe the E major section as being in Fb major to keep spellings correct.)  Hopefully they give a good sense of how 17-TET works.

And that is that it doesn’t.

17-TET is AWFUL for tonal music.  Most of the piece is beautiful major chords, and if there’s one thing that sounds awful in 17-TET, it’s major chords.  Minor chords aren’t as bad.  17-TET does have a neutral third that sounds good, the D# (which is the same as Ed, E half-flat).  However, 12-TET does not have a neutral third, so Beethoven wasn’t gonna use it!

Note that 19-TET sounds considerably better.  The intervals that most diverge from their 12-TET counterparts are the half steps, both diatonic and chromatic (12-TET: 100 cents, 19-TET diatonic: 126 cents, 19-TET chromatic: 63 cents, 17-TET diatonic: 71 cents, 17-TET chromatic: 141 cents).  The sonata movement has a few chromatic passages, and it’s really obvious.  17-TET deals pretty well with leading tones, actually, which 19-TET doesn’t, but 17-TET makes up for it by totally destroying the major triad.  19-TET has better major triads than 12-TET!

Of course, you can write great music in 17-TET.  You can; I haven’t yet.  I will post when (and if) I do.  One thing that is painfully obvious upon hearing retunings of 12-TET music is that music conceived in 12-TET probably sounds better in 12-TET, and other ideas need to be worked out for other tuning systems.  With the Offtonic 17-TET plugin for Sibelius, you can play as you will!

Those familiar with my old site perhaps remembered that its main purpose was to host my compositions.  Well!  Those are all back!  There’s more work to be done in the design, and there are updates to be made as well: links to more recordings, etc.  The important bit, though, is that the music page is online.  And I even think it looks pretty, but what do I know.  The rest of the site will get a makeover soon (where “soon” doesn’t mean what you think it means — it actually means “eventually”).

Two more plugins; get them here!

UPDATE: You can also get them at the Sibelius website here and here.

Remove MIDI Pitch Bends just removes MIDI pitch bends, which is pretty useful if you bend a lot of pitches.  Offtonic 19-TET, on the other hand, is, in my humble opinion, a giant leap for microtonal composition!  …OK, my opinion may not be so humble.  It is, however, very cool, at least to a microtonal nerd like myself.  I’ll analyze the 19-TET scale in detail in a later post, with musical examples that I created using this very plugin, but for now, enjoy composing in 12-TET’s closest microtonal cousin!

Normally I’d also talk about the challenges I faced when writing these plugins, but honestly, it wasn’t so hard.  I looked at existing plugins to get an idea of the idioms, I looked at the .plg file in a text editor to see how the script was stored, and I wrote.  I would, however, be very glad to answer any questions about ManuScript, the plugin language.  Don’t be afraid to ask in the comments.

EDIT: It’s now available at the Sibelius website, too!

My first Sibelius plugin has been released!  This deserves an exclamation point because it’s SO COOL!!!!!!!1  Check it out:

Offtonic Plugins for Sibelius

…Didn’t really deserve that exclamation point, did it?  Well, TIL that making plugins for Sibelius is really, really easy.  The ManuScript scripting language that it uses is quite simple (though its differences from, say, Javascript are kind of annoying, like the single equals sign for comparisons).  My one complaint about the process is the horrible and buggy coding environment, but I hear that’s fixed in the new version of Sibelius, which I don’t have.

Read More »

Offtonic Pell Solver has been released!

Tired of the endless waiting?  No?  Well, if you had been, you could have stopped waiting now, provided you have OS X 10.7 (Lion).  This initial release solves a general Pell-type equation by finding all solutions when there are finitely many, and when there aren’t, it finds all of the fundamental solutions and generates an arbitrary number of new solutions from those.

Currently it only works for parameters up to 2^31 (and this is not changing anytime soon due to the difficulty in factoring such large numbers), and the solutions can go up to 2^63.  This latter limit will change to arbitrary size once I implement a large numbers library and rewrite my Pell solver to use it.  That’s the next version.

Read More »

The Microtonal Synthesizer has been updated.  I used it to explain to someone how to listen to beats and realized that I couldn’t set the cents of notes.  Turned out I was forgetting some factors of 100 in one of the functions handling the text fields, and “50” was magically changing to “0.05”.  This is now fixed.  (Update: as I was writing this post, I noticed that changing the frequency of a note wasn’t working.  It should be now.)

So I might as well explain how beats work.  Let’s say you have a note at some constant frequency of f.  This means that you have some sort of wave that repeats at a frequency of f; if f = 440 Hz, then the wave repeats 440 times per second.  It’s not a simple sine wave; the shape of the wave is what gives instruments their characteristic sounds.  A sine wave sounds more like an “ooh”, while a brighter sound like “aah” will be a more complex shape.  For now, though, let’s assume we’re talking about simple sine waves.

Read More »

On a housekeeping note, you’re probably seeing the default WordPress theme.  That will change.  Eventually.  Please be patient!

EDIT (7/19/2012): New theme.  It would be nice if the sidebars were actually on the side, but it at least looks nicer…

Welcome to the Offtonic Blog!

As you continue in your lifelong quest for knowledge (I can hear the trumpets now), there are times when you don’t know something that you want to know.  First step: Google.  Someone probably has posted an explanation somewhere.  But what if there is no easily digestible tutorial, and you have to (gasp!) work hard to figure it out?  Worse, what if you actually have to read documentation?  That can be dense and filled with a lot of material irrelevant to the task at hand, requiring some convoluted steps that you don’t understand yet, and in general, it can be a pain to learn anything that way.  The documentation often doesn’t cover what you actually want to do, only the building blocks, and it might not point you towards other possibly helpful references.  It’s why people write books.

Anyway, as a programmer who doesn’t know everything there is to know yet, I am often faced with this problem, and I have to learn how to do things the hard way.  …But you don’t, because once I learn something the hard way, I’ll post it here so that you can learn it the easy way!  Keep checking back.  There’ll be other content here, too, as well as news about Offtonic in general.  For example, I wrote a microtonal synthesizer you might enjoy.

Thank you for coming.  And if you want to, you know, offer me a job (I live in Somerville, MA), that would be swell and you should email me.  I’m up for collaboration as well.