Sending SysEx from Max MSP

I’m making a patch that requests pattern dumps and stores them in Max to send to the Rytm later.

I can recall 3095 byte kits by this method no problem, but i can’t seem to send stored pattern dumps to the Rytm successfully. I’ve tried slowing the bytes down to 1 per ms , but still nothing is received. I know I’ve sent the right number of bytes (15090) and the bytes I’m sending are correct because C6 sends them successfully to the Rytm.

Does anyone have any idea why this might fail?

1 Like

have you found the issue? i`m also struggling with sysex, rytm and max…

1 Like

Are you sure the patterns are encoded properly? Requesting and Sending Sysex requires you to compute checksums. Use the libanalogrytm library on github. My app sends and receives patterns, and there is no need to slow down the sysex.

C6 just sends sysex without caring if it’s valid, so maybe the Rytm is disregarding it because it’s not formatted / encoded properly?

1 Like

As i remember the problem was the max object that i was using to send and receive sysex. I think the native ones didnt work and i ended up using lh_midiin and lh_midiout. But things may be different now

1 Like

Never been an issue for me

1 Like

I had alot of problems sending big sysex messages through them. maybe its fixed now.

would you mind sharing your patch with me?

I’m particularly interested in sysex in order to edit scenes / performances.
Any documentation / tips?

Lol, I read the thread title as “Sending SysEx from mars” :joy:

2 Likes

I’m also interested, if well documented. :smile:

2 Likes

Just received some sysex from mars.
Not easy. Here are 2 kits Sysex. First is default, second has a Perf with -128 on T1 filter value. Difference in bold.
@void ?
[MIDI-In1] - F0 00 20 3C 07 00 52 01 01 31 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 00 00 64 00 64 00 64 00 00 64 00 64 00 64 00 64 00 00 64 00 64 00 64 00 07 64 00 64 00 3E 6F 3A 40 4E 00 00 00 03 00 00 00 00 00 53 4F 55 4E 44 00 20 31 00 00 00 00 00 00 00 00 00 00 64 00 3A 00 00 2F 00 28 00 5A 00 00 06 00 00 00 40 00 40 00 00 40 00 00 00 00 00 00 00 00 78 00 00 00 00 00 00 00 00 00 00 40 00 00 40 00 7F 00 00 00 00 00 00 40 00 00 00 00 00 00 7F 00 00 00 00 00 00 00 00 40 00 6E 00 20 00 00 70 00 04 00 40 00 29 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 01 02 0F 00 00 00 7F 7F 7F 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 00 00 14 00 15 00 29 00 00 14 00 29 00 29 00 29 77 3A 4E 70 0C 3E 6F 3A 40 4E 00 00 00 03 00 00 00 00 00 53 4F 55 4E 44 00 20 32 00 00 00 00 00 00 00 00 00 00 64 00 40 00 00 4C 00 7F 00 40 00 00 20 00 40 00 2B 00 40 00 00 40 00 00 00 00 00 00 00 00 78 00 00 00 00 00 00 00 00 00 00 40 00 00 40 00 7F 00 00 00 00 00 00 40 00 00 00 00 00 00 7F 00 00 00 00 00 00 00 00 40 00 6E 00 20 00 00 70 00 04 00 40 00 29 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 01 03 01 02 0F 00 00 00 7F 7F 7F 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 00 00 14 00 15 00 29 00 00 14 00 29 00 29 00 29 77 3A 4E 70 0C 3E 6F 3A 40 4E 00 00 00 03 00 00 00 00 00 53 4F 55 4E 44 00 20 33 00 00 00 00 00 00 00 00 00 00 64 00 40 00 00 34 00 7F 00 30 00 00 08 00 40 00 22 00 40 00 00 (Sysex - 3079)

[MIDI-In1] - F0 00 20 3C 07 00 52 01 01 30 00 00 00 00 04 4B 49 54 00 20 34 39 00 00 00 00 00 00 00 00 00 00 00 64 00 00 64 00 64 00 64 00 00 64 00 64 00 64 00 64 00 00 64 00 64 00 64 00 07 64 00 64 00 3E 6F 3A 40 4E 00 00 00 03 00 00 00 00 00 53 4F 55 4E 44 00 20 31 00 00 00 00 00 00 00 00 00 00 64 00 3A 00 00 2F 00 28 00 5A 00 00 06 00 00 00 40 00 40 00 00 40 00 00 00 00 00 00 00 00 78 00 00 00 00 00 00 00 00 00 00 40 00 00 40 00 7F 00 00 00 00 00 00 40 00 00 00 00 00 00 7F 00 00 00 00 00 00 00 00 40 00 6E 00 20 00 00 70 00 04 00 40 00 29 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 01 02 0F 00 00 00 7F 7F 7F 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 00 00 14 00 15 00 29 00 00 14 00 29 00 29 00 29 77 3A 4E 70 0C 3E 6F 3A 40 4E 00 00 00 03 00 00 00 00 00 53 4F 55 4E 44 00 20 32 00 00 00 00 00 00 00 00 00 00 64 00 40 00 00 4C 00 7F 00 40 00 00 20 00 40 00 2B 00 40 00 00 40 00 00 00 00 00 00 00 00 78 00 00 00 00 00 00 00 00 00 00 40 00 00 40 00 7F 00 00 00 00 00 00 40 00 00 00 00 00 00 7F 00 00 00 00 00 00 00 00 40 00 6E 00 20 00 00 70 00 04 00 40 00 29 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 01 03 01 02 0F 00 00 00 7F 7F 7F 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 00 00 14 00 15 00 29 00 00 14 00 29 00 29 00 29 77 3A 4E 70 0C 3E 6F 3A 40 4E 00 00 00 03 00 00 00 00 00 53 4F 55 4E 44 00 20 33 00 00 00 00 00 00 00 00 00 00 64 00 40 00 00 34 00 7F 00 30 00 00 08 00 40 00 22 00 40 00 00 (Sysex - 3079)

1 Like

What’s the question? You need to unpack / decode the sysex to see a stream of numbers which represent actual parameter values. If not, you won’t be able to make sense of it.

2 Likes

This was the question.

I’m particularly interested in sysex in order to edit scenes / performances.
Any documentation / tips?

I’m afraid so! Above was an example.

1 Like

Its possible. I don’t think theres any documentation. I got it to work by trial and error when i had way too much time on my hands. What software are you using? I needed a colour coded hex editor (which i had to make) to find the right bytes and work out how they were packed. Its a nightmare tbh

1 Like

People should just use https://github.com/bsp2/libanalogrytm to decode / encode the sysex. Yes it uses code, but you can probably import c code in maxmsp by now, and it will save you the headache.

2 Likes

None yet, maybe the one quoted by @mekohler? :slight_smile:
Edit : This soft is dedicated to AR !?

Portable Sysex Library for the Elektron Analog Rytm Drum Computer

I usually use midi converters, but these sysex are pretty long. Maybe possible with RK002 retrokits, Bomebox…

My goal : make settings with CCs on Octatrack, send them and modify the kit to make Scenes, and / or Perfs. Not sure I will…:sketchy:

I wish a “make Scene / Perf from actual state fonction” !

Maybe Overbridge can help…

OB won’t be of use. You need to be able to receive / send Kit Sysex if you want to affect scenes / performances. I do this by using the linked github library.

2 Likes

I’ll try to make it work, doesn’t seem user friendly !
Thanks !

It’s not too bad, here is an example of me using the library in Objective-C…you send this function the kit sysex data (stream of bytes) and it uses the library to convert it to a struct that you can then use to get real values of parameters.

// This function accepts the Kit sysex data and uses libanalogRytm to convert and look at values

#define BUF_SIZE (1024 * 1024 * 4u)

- (void)kitFromSysexKitData:(NSArray *)data {

	// vars
	ar_sysex_meta_t meta;
	sU32 datSz;
	sysex = malloc(BUF_SIZE * 3);
	raw = malloc(BUF_SIZE * 3);

	// Copy the data from our incoming array to our sU8 array
	for (int i = 0; i < [data count]; i++) {
		sysex[i] = [[data objectAtIndex:i] unsignedCharValue];
	}


	// Convert and check for error
	err = ar_kit_syx_to_raw(raw, sysex, (int)data.count, &datSz, &meta);

	if (err != AR_ERR_OK) {
		MDLog(@"KIT PARSER: Error with ar_kit_syx_to_raw: %d", err);
	}

	
	// cast raw to our struct
	ar_kit_t *k = (ar_kit_t *)raw;

	// At this point you can look at the "k" variable to get all the paramters of a kit as defined in kit.h
	// k.tracks[0].synth_param_1, etc
}
2 Likes

Not sure I’d have patience / time for that !
Thanks for sharing.

With Collider, would you be able to create a Perf from 2 kits ?
1 kit as active kit, 1 kit as reference, a Perf applying differences…
A kit to Scene function ?

1 Like