Popular Posts

Friday, May 27, 2011

Pythagoras MIDI

The new instrument is undergoing some pretty big changes. I am still working with Wizdom on this (the guys are busy, so I am trying to get a lot of progress made until we meet again), and it will come out with a different name (because Pythagoras is taken). But I stumbled upon some code that completely demystified MIDI over WIFI and decided to give it a try. Within a few hours, I had something that sucked, but kind of worked.

Pythagoras won't really ever be a "MIDI controller", and still has a MIDI-Guitar mentality. The real sound engine is the audio engine, and it's finger and frequency oriented. What I mean by this is that there are no note up/down or note name/numbers. You can have multiple instances of the same note being played, and bend them all in different directions. It's fretless to the core. Here is a recent sound check (just before I got per-string legato and mono mode working in MIDI). It puts GarageBand's BigElectricLead patch in left channel versus the native sound on the right. The timing being a little off is due to WIFI latency/jitter versus my sound latency/jitter. Some of the note drops on the MIDI side are the issue I mention in detail at the bottom.


MIDI on the other hand forces you to sucessfully model an instrument as a box of buttons and sliders. It sounds possible to do correctly until you start looking at the zeroes and ones of the MIDI protocol and see its true limits. Specifically, you can model it as 16 independent boxes of buttons with their own pitch wheel. This *sounds* like enough to make microtonality and polyphony work well together, but the devil is in the details. The per channel pitch wheel defaults to only a lame whole tone bend width. You can set it higher, like an octave, but it's a very non-portable thing to do. If I am stuck at whole tone bends, then the note must retrigger if I exceed it. Because I don't have an actual pitch wheel, when I am at the top of my whole tone then an accidental note re-trigger is only one pixel away (because you bend with finger position of the note, not with a separate wheel that has a top and bottom).

The other issue is that even if I write all of my MIDI messages completely correctly spread out across 16 channels, some DAWs will gleefully mess up all my work and mash all the channels back down into one channel at playback (My GarageBand OSX!). When that happens, you have to write different MIDI (omni-mode MIDI versus single channel) out to the stream to account for overlapping instances of the same note so that notes don't stutter and cut each other short. (This isn't supposed to happen, but what your MIDI stream says to do, and what the brain does are always going to be two different things. :-( This is less true as you get more expensive gear, but people will give me a 1 star "worst instrument ever" if it doesn't work with some MIDI brain that doesn't do it right. A lot of people won't understand why MIDI does keyboard just fine, and this layout doesn't quite fit the mold.)

#90 means note on channel 0
#91 means note on channel 1
# second number in row means note number
# third number in row means volume
90 32 55
91 32 46
90 32 00
...

This is two fingers going down on the same note, something that's impossible on a piano, because they are mechanical keys. So one finger comes up, and if they are truly on different channels this sounds right. If GarageBand forgets that 91 means that that's a different copy of the same note, it will just turn that whole note off and I get silence when there should still be a note playing. I know the workaround and will write it in, but what you see is correct MIDI, and I have to write it wrong to make some cheaper brain happy while possibly getting a wrong result on higher end hardware. If both of these notes go down and are slightly bent in different directions, then they are *not* the same note and I can't use tricks to count how many times down and up and compensate.

Since MIDI is all about making keyboard controller (boxes of buttons and pitch wheels) manufacturers happy, they think of microtonality as tuning tables, and think that this problem is basically solved. (The microtonal google groups insist that MIDI is just fine with microtonality because of *.tun files, etc). But fretless instruments have no tuning tables. Each channel (ie: finger) is one long volume and expression changing bend. I only need an octave bend in practice, but fretless instruments by their nature can bend from the lowest to the highest frequency with no problems.

The thing about this instrument that feels so different is that even with the frets on, its fretless nature is always apparent. You can refret between 12, 24, 53, or 665 notes per octave and blur the lines between what is and is not a fretted instrument, especially when you set the snap speed (speed to drift to the closest fret) very low.

So, MIDI is in Pythagoras. I am actually *excited* about it because I can double the internal voice, which does expressiveness pretty well, with MIDI voices that do other things in a world class way. The main trick will be keeping complexity away.

I do NOT want to attract a lot of very high maintenance users that won't ever be able to agree on any simple controller configuration as an acceptable one. I am going to shoot for something that is expressive and simple. I know that MIDI kind of opens the gates of hell for a million new controls to play with.

No comments:

Post a Comment