Forums > MaxMSP

system exclusive messages for Mac AU synth

July 17, 2009 | 10:13 am

I can send channel messages (and regular midi, of course) from Max/MSP to my Mac’s synth but I have NEVER gotten a single sysex message to work and I’m starting to wonder if anyone else has been able to. If you have, can you give me an example?

I started out trying to send complex messages like Bulk Retuning, which didn’t work, so I kept looking for simpler and simpler messages, like single note retuning, but I haven’t gotten ONE single sysex message to work. I can get "regular" messages to work by putting them in a message box (just to avoid other errors) and they work, so I put [240 127 127 8 2 60 3 60 33 0 0 61 32 0 0 62 72 0 0 247]-which translates to hex [F0 7F 7F 8 2 3C 3 3C 21 0 0 3D 20 0 0 3E 48 0 0 F7]- in a messagebox Attempting to change three notes tunings, but nothing. I also tried to put them in program "0" instead of "60" but I was worried that Apple may have locked down tuning "0" and "1". Anyway, it didn’t work, so I chose program "60" and then sent another message to change the active tuning to "60" (176 100 3 101 0 6 96).

For some background (so you can understand why I’m not using MidiPipe, MaxMagictuner, etc to do this), I’ve built a patcher that gives you the ability to tune while playing a virtual instrument so it has to re-tune on the fly, while its window is open. I can get it to work relatively easily up to the point where it has to send out the sysex messages, then it’s a brick wall, I can’t get the AU synth to respond to any sysex message at all. Any help, actual examples of sysex mesages, a clue about Apple’s ID number, anything, would be appreciated.

thanks, jawny


July 18, 2009 | 4:54 am
jawnypants wrote on Fri, 17 July 2009 12:13
I can send channel messages (and regular midi, of course) from Max/MSP to my Mac’s synth but I have NEVER gotten a single sysex message to work and I’m starting to wonder if anyone else has been able to.

No, there’s no sysex to/from Apple’s "DLSMusicDevice".
And from Max5, there’s no support for AudioUnits.


July 18, 2009 | 6:29 am

Hi
There is certainly support for the AU_DLS synth. Check Max help.

For the DLS to respond to sysex you would definitely need the apple manufacture ID and probably a device ID as you can instantiate multi copies. Without these numbers nothing will work.

Not sure about the DLS format and retunings but as its sample based it should not be a problem. They may or may not implement the single note retuning you are trying to do. You may only be able to change scale by download of a new soundfont, really not sure

I would suggest checking midi.org for further info as well. I have gotten id’s from somewhere there. And they should have info on the DLS specifications as well.

Cheers
Macciza


July 19, 2009 | 12:47 am
Macciza wrote on Sat, 18 July 2009 08:29
There is certainly support for the AU_DLS synth.

MIDI only, no support for its parameters from Max:

// Parameters for the DLSMusicDevice unit
// Global, Cents, -1200, 1200, 0
kMusicDeviceParam_Tuning = 0,

// Global, dB, -120->40, 0
kMusicDeviceParam_Volume = 1,

// Global, dB, -120->40, 0
kMusicDeviceParam_ReverbVolume = 2

Quote:
For the DLS to respond to sysex.

DLSMusicDevice does not respond to sysex.
(Check the AudioUnit.framework / AudioUnitParameters.h)


July 19, 2009 | 2:36 am

Hi
Thanks for the ref to the framework. I had a quick look . .
The bits you quote appear to be parameter constant defs. It will respond to a lot more as well. MIDI is providing the transport to the synth. And we are able to define synths and load sounds to them then select banks and patches from Max as well.

My other point was that if it ‘did’ respond to sysex he would definitely need the correct number or it would not work.
And MusicDevice does seem respond to sysex.
(Check the AudioUnit.framework / MusicDevices.h)
EXTERN_API( ComponentResult )
MusicDeviceSysEx(

Unfortunately DSLv1 only defines the following sysex messages-
Turn DLS Level 1 On:
Turn DLS Level 1 Off:
Turn DLS Level 1 Voice Allocation Off:
Turn DLS Level 1 Voice Allocation On:

So jawnypants it looks like you are out of luck.
Your approach using sysex single note retuning will only work on a synth that supports that facility
You may be able to make up your own soundfonts with appropriate tunings and select between them . . .
Or perhaps try the MIDIPipe-style approach and work out appropriate pitchbend values for the different notes . .
Or build-your-own DLS aka ‘loop-based sample-playback synth’ and have complete control over playback parameters

Hope that helps, thanks for the ref, sorry if it seems tense but I had to rewrite it because of net dropout, grrr

Cheers
Macciza


July 22, 2009 | 11:06 am

(Sorry for the delay, I’m "camping")
Macciza and PhiDjee;
Thanks for the advice and research, but I’m still in a quandry…

How does MaxMagic do it? I understand how MidiPipes does it with PitchBend, but Max Magic can do 22 tone scales and -apparently- as many custom tuned notes as you like. I sent myself one of MM’s sxformat messages and it is in the same format as mine. Now, that said, I realize that MaxMagic may NOT be using sysex to communicate with the AU synth, perhaps it is only used for external synths.

But "golly darn it" if Max Magic can do it, I think I should be able to do it as well. Maybe I’ll ask Victor C directly.

And I hate to sound like a dumbo, but what the heck is "AudioUnits"?

Best, Jawny


July 23, 2009 | 3:14 am
jawnypants wrote on Wed, 22 July 2009 13:06
How does MaxMagic do it

See the "QuickTime Music Architecture"

Quote:
I understand how MidiPipes does it with PitchBend, but Max Magic can do 22 tone scales and -apparently- as many custom tuned notes as you like. I sent myself one of MM’s sxformat messages and it is in the same format as mine. Now, that said, I realize that MaxMagic may NOT be using sysex to communicate with the AU synth, perhaps it is only used for external synths.

MMM communicates with the QT synth, not with the AU DLSMusicDevice.

Quote:
if Max Magic can do it, I think I should be able to do it as well. Maybe I’ll ask Victor C directly.

You should!

Quote:
And I hate to sound like a dumbo, but what the heck is "AudioUnits"?

Have a look at the "AudioUnit Programming Guide".

Or just start from Apple’s Audio reference library.


Viewing 7 posts - 1 through 7 (of 7 total)