Manually converting 14-bit PB to MSB LSB
Please excuse this simple question: I need to be able to enter a number in cents and convert the number into a pitch bend number that can be entered into Sibelius software as a MSB/LSB MIDI command. I know MIDI PB is +/- 8191 but I don't know what formula to use to convert this into the 7-bit pairs that I need to write into Sibelius as MIDI commands. Any help much appreciated!
John Oliver
spamisevil@shaw.ca wrote on Mon, 23 March 2009 08:30I need to be able to enter a number in cents and convert the number into a pitch bend number that can be entered into Sibelius software as a MSB/LSB MIDI command.
Check [xbendout], it does the conversion for you.
Thank you Patrick: I just connected up a PRINT object to the output of xbendout and there were the numbers!
John
Okay, that works for looking at the MAX window, but if I want to unpack the list to display the three numbers separately, well, it turns out that xbendout is sending a comma-separated list and so UNPACK sends all of the numbers out the left outlet. Is there an object which will remove the commas and output the three numbers out three outlets?
Thanks,
John
not sure, but maybe [iter] or [zl iter 1] will help? although i thought xbend out sends 3 numbers in a row, rather than a list of 3?
thats what my print is showing me, anyway
is this what you mean? You don't really need the first number, though--unless you want to send it and do a [route 224] so that you don't get any extraneous messages.
How do you implement this in Sibelius? I can't seem to create my own pitch-bendy accidentals. Does it play back with Sibelius MIDI or through Max?
Edit: Also, is the 14-bit pitch bend linear, or does it have an exponential curve so that it corresponds closer to frequency than cents? If it's linear, it's pretty easy to just use [scale -100. 100. -8196 8196] for semitone up/down pitch bends. You'll run into trouble if you try to get this to work with rational intonation, though--you have to compensate for the temperament so that every single pitch has to be de-tempered. Pitch bend only really works with arbitrary microtonality. Anyway, good luck.
Thanks for the tip about routing out the 224! I've made a patch I'm still in version 4.5 that does the trick. But I can't get the MSB and LSB numbers to be displayed in the patch itself, just in the MAX window. I don't know how to do that since xbendout spits out the pairs separated with a comma.
In Sibelius I just manually enter the alterations for now. Eventually it would be nice to actually be able to just enter a symbol and have the pitch bend text entered automatically... I'm entirely unqualified to develop such software in MAX...
John Oliver
[zl group 3]
Thanks! That made it possible to complete a little converter app that shows the user what pitch bend information they can manually enter into a Sibelius score for microtuning using interval ratios, cents, Ben Johnston notation or direct raw pitch bend entry!
John Oliver
Right, Johnston stuff. Okay, so you have a problem here, though, and that's one of temperament and the tuning key reference. In Sibelius, you can put in a "Technique" statement of "~C40,127", for instance, that send a MIDI message 127 to CC#40. So, then you can have Max interpret that as, say, a - or + sign, or a syntonic comma or whatever. The issue is that all of these changes are being made to tempered intervals, so any sounds that you get will still be out of tune. That is, if you're using A as your 1/1, a +C# (81/64) will not be exactly 81/64, because the starting point is not C# as 5/4, but C# as four 12tet semitones. Basically, to get pure intervals, your pitch bend data will have to be different for every single pitch, even the non-inflected ones.
I would say, why bother with MIDI playback through Sibelius and CoreAudio when it's so antithetical to Just Intonation? I've just grouped each scale I use into different 12-tone wrappings, like [1/1, 16/15, 9/8, 6/5, 5/4...etc] that I can then change out with "~Cx,xxx" messages sent from Sibelius. The only downside (large downside) to that is that I have to build my own synths, which sound nothing like regular instruments. But, it's pretty easy to do if you check out some of the nice libraries for MaxMSP like Brad Garton's Percolate objects. Also, check out the [microtuner] object, part of the Max Magic Microtuner. And, if you end up getting Max5 and want my fairly rudimentary patch, I can e-mail that one to you, too. I just got through making a ton of Just-tuned mockups for some string players, all made by running Sibelius through "to MaxMSP 1", through my Just synth, and through Soundflower to record into Logic. They're not production-ready, but they're useful for teaching string players and singers to hear microtonal intervals. Sorry for the long response--I'll pretty much talk for days on microtonality.
Hello Mr. Smith,
You mention using CC controller #40. I use pitch bend commands in Sibelius. I didn't understand your explanation about CC#40 sending from Sibelius to MAX. Sounds like an interesting solution that I'd like to understand better or see in action. I'll have to see about the MAX 5 update...currently waiting for MAX for LIVE to come out.
I'm basically writing for orchestra. At this point the main concept is just intonation in C. So I use L'il Miss Scale Oven software http://www.nonoctave.com/tuning/LilMissScaleOven/ to create (or load in) just or other intonations. Then I export the code from there in Kontakt format and load it into the scripts of Kontakt (2) so that it retunes the samples I need for the ensemble. Then, when I want additional alterations to the diatonic just intonation, I enter pitch bend values. I'm still in the experimental stage with this, but so far it's pretty good. The main problem is the 12 MIDI notes per octave limit if I want the notation to actually generate the sounds in Kontakt. You can't, e.g. have different pitches for C# and D-flat, etc.
John
Oh, that's a good call. I just used CC#40 as an example. I actually used that method quite a bit, but the shortcoming (I found) was that pitch bends are for the whole channel. So, I couldn't do something like the low open G on a violin with a double-stop on the F as a 7/4.
Hm, I'm sure there's a quicker way than having a whole series of "~B0,48" "~B0,64" messages in Sibelius. You can do a "Sound ID" change with extra symbols, but it doesn't look like you can make your symbols send pitch bend messages, so you would have to add two extra steps to every accidental you write. One more option (if you want to use double-stops and have lots of time) is to do multiple mock-ups, each with different 12-tone tuning systems through Kontakt. Then, stitch them together with Logic or ProTools or something. It only really works (practically) if your music is more modal than full of ultra-microtonal, 1/6-semitone runs. It sounds like, though, if your starting point is JI in C it should work out.
Drop me an e-mail if you have a performance date for somewhere in the near Pacific Northwest. I'm in Oregon, and it seems like a small batch of people interested in microtonality, even with Perspectives of New Music just up the road. I may be out of the loop, though.
You'd think there'd be a faster way than inputting the ~B x,x text and the symbol in the Sibelius score, but so far I haven't found it. Adding Sound ID changes to the score is possible but all you can do is send...well... a sound ID change. So there might be a way to implement this using multiple slots with each slot being MASTER tuned to a different microtuning, but that seems very awkward indeed! I'm not quite sure it would even work. I think you'd have to do that with Manual Sound sets, and as soon as you do that, you lose all of the automated Sound ID stuff anyway I mean all the "SoundWorld" stuff in Sibelius (which doesn't work reliably as soon as you start entering too many pitch bend commands ANYWAY).
So the big question is: has anyone in the MAX/MSP community been looking into making a robust interface to Sibelius that allows the composition of microtonal music without all of this hassle?
John