Forums > MaxMSP

Implementing System Realtime msgs

March 8, 2006 | 7:14 pm

Hi to all,

I have an external sequencer unit (Korg Electribe) and I am trying to get MAX to act as a master clock, so that the Electribe is running as a slave in sync to whatever material I am using in MAX.

I have the MIDI implementation chart for the electribe and it can run as a slave if set to external clock source. I am aware that I need to send it system real time messages, then start/stop the clock to make it run.

How on earth do i implement this in MAX? I can’t find anyone who has a clue or has done this before!!!

Do I just set up a counter with a metronome attached, sending out continuous bangs? If so, how do I make the electribe recognise these bangs as MIDI clock messages? How do I send START/STOP messages?

PLEASE HELP!!!

Alec J P


March 8, 2006 | 7:57 pm

Hi Alec,

I posted this a week ago:

The MIDI byte 248 belongs to the class of real time messages. This
means they are accepted at any time at high priority. The receiving
device being in external sync mode and in play mode (e.g. the
drummaschine) goes immedialely to the next 96th of the bar after
receiving the clock byte 248. This is no reference for the absolut
position just a continious time grid of 96th notes. The song position
can be transmitted by the song position pointer, see page 28 of Max
getting started pdf.

See the sync~.help file for an implementation example

Falk


March 9, 2006 | 1:13 am

Hi there

Thanks for the pointers, I have found the patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 885 356 69 196617 DP metro;
#P comment 691 354 107 196617 BeatClock/RealTime;
#P comment 583 351 39 196617 MTC;
#P message 898 218 35 196617 jam 1;
#P number 917 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 898 109 50 196617 stripnote;
#P number 898 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter;
#X flags 0 0;
#P newobj 898 259 66 196617 counter;
#P newex 898 186 52 196617 sel 60 72;
#P newex 898 80 91 196617 notein;
#P comment 956 187 57 196617 60: accent;
#P comment 955 206 60 196617 72: normal;
#P flonum 744 298 70 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 744 269 30 196617 / 24;
#P message 711 168 32 196617 set 0;
#P number 744 242 50 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter;
#X flags 0 0;
#P newobj 744 195 66 196617 counter;
#P newex 764 138 31 196617 print;
#P button 744 113 15 0;
#P button 716 113 15 0;
#P comment 715 139 30 196617 stop;
#P button 688 113 15 0;
#P newex 688 74 95 196617 route 250 252 248;
#P newex 688 47 25 196617 rtin;
#P number 509 205 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 509 183 44 196617 +;
#P newex 543 156 27 196617 < < 7;
#P newex 475 124 78 196617 unpack 1 1 1;
#P newex 475 88 83 196617 match 242 nn nn;
#P newex 413 263 28 196617 + 0;
#P newex 413 235 31 196617 * 16;
#P newex 377 263 28 196617 + 0;
#P newex 377 235 31 196617 * 16;
#P newex 341 263 28 196617 + 0;
#P newex 341 235 31 196617 * 16;
#P newex 305 263 28 196617 + 0;
#P newex 305 235 31 196617 * 16;
#P newex 305 210 160 196617 route 7 6 5 4 3 2 1 0;
#P newex 305 184 44 196617 pack;
#P newex 339 155 32 196617 & 15;
#P newex 305 155 30 196617 / 16;
#P newex 305 116 44 196617 unpack;
#P newex 305 85 70 196617 match 241 nn;
#P newex 305 51 35 196617 midiin;
#P number 413 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 377 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 341 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 305 336 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 305 312 32 196617 & 31;
#P comment 153 223 28 196617 start;
#P button 158 198 15 0;
#P button 120 197 15 0;
#P newex 120 167 86 196617 sel 9 2;
#P newex 56 141 93 196617 unpack 0 1 2 3 4 5;
#P newex 56 76 142 196617 match 240 127 127 6 nn 247;
#P newex 56 50 52 196617 sysexin h;
#P comment 116 223 28 196617 stop;
#P comment 558 207 100 196617 MIDI beat;
#P comment 557 225 100 196617 1 beat = 6 MIDI clock;
#P comment 557 240 100 196617 24 clock / quarter;
#P comment 687 139 30 196617 start;
#P comment 54 250 100 196617 MMC;
#P user panel 46 36 182 234;
#X brgb 171 192 173;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 283 35 381 337;
#X brgb 171 192 173;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 679 35 181 338;
#X brgb 171 192 173;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 876 35 181 338;
#X brgb 171 192 173;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P connect 56 1 60 1;
#P connect 60 0 57 0;
#P connect 60 0 61 0;
#P connect 58 0 59 0;
#P connect 62 0 58 0;
#P connect 57 1 58 0;
#P connect 57 0 62 0;
#P connect 56 0 60 0;
#P connect 52 0 53 0;
#P connect 50 0 52 0;
#P connect 49 0 50 0;
#P connect 47 0 49 0;
#P connect 51 0 49 0;
#P connect 43 2 47 0;
#P connect 43 1 46 0;
#P connect 43 0 44 0;
#P connect 42 0 43 0;
#P connect 39 0 40 1;
#P connect 38 2 39 0;
#P connect 40 0 41 0;
#P connect 38 1 40 0;
#P connect 37 0 38 0;
#P connect 22 0 23 0;
#P fasten 22 0 37 0 310 78 480 78;
#P connect 28 7 36 1;
#P connect 36 0 21 0;
#P connect 35 0 36 0;
#P connect 28 6 35 0;
#P connect 28 5 34 1;
#P connect 34 0 20 0;
#P connect 33 0 34 0;
#P connect 28 4 33 0;
#P connect 28 3 32 1;
#P connect 32 0 19 0;
#P connect 31 0 32 0;
#P connect 28 2 31 0;
#P connect 26 0 27 1;
#P connect 24 1 25 0;
#P connect 24 1 26 0;
#P connect 28 1 30 1;
#P connect 17 0 18 0;
#P connect 30 0 17 0;
#P connect 29 0 30 0;
#P connect 28 0 29 0;
#P connect 27 0 28 0;
#P connect 25 0 27 0;
#P connect 23 0 24 0;
#P connect 13 1 15 0;
#P connect 13 0 14 0;
#P connect 12 4 13 0;
#P connect 11 0 12 0;
#P connect 10 0 11 0;
#P window clipboard copycount 66;

It seems from looking at the other thread this came from, that it is what i’m looking for…

However, I know how to save patches I make as a txt file but have no idea how to convert txt files to patches. When you refer to page 28 of the Getting Started .pdf, is this where the solution is supposed to be?

I looked through the file menu commands and found no way of converting the txt file to a max patch. How is this done?

Also, I when I type in sync~, it says "no such object" in the MAX window.

Just one more thing…

When you refer to sending MIDI byte 248 to the external sequencer, how do I send it out. Does it involve sxformat, midiout or what?

I would be very grateful for anyones assistance on this matter!!! :)


March 9, 2006 | 7:53 am

Just copy the text…..

In the filemenu in MAX choose New From Clipboard

That’s it…

Sometimes if it wont work….try copying the TEXT to an empty TEXT document, and remove the space in front of each line…..


March 9, 2006 | 9:19 am

So can this only be done on a mac then? I have windows and I don’t have the option "New From Clipboard" in the file menu.

Is there some way of doing it in windows, or some sort of workaround?

Thanx


March 9, 2006 | 9:28 am

New from clipboard was added in max 4.5.5 AFAIR. mac and Windows. If
you upgrade to the latest version you will have it. If not, add

max2;

as first line of the text, and

pop;

as last one. Now you will be able to open as a Max patch saves as
text. I don’t necessarily exactly remember the syntax out of the top
of my head, so open an existing patch as text, and copy first and
last lines to make sure that you get it right.

Best,
Trond


March 9, 2006 | 10:55 am


March 9, 2006 | 11:21 am

Thank you to all who have tried to help – now i’ll try to get on with my project!

Hope i dont have to make any more posts on this thread!!! :-)


March 9, 2006 | 11:18 pm

Alec Pritchard wrote:
> Thanks for the pointers, I have found the patch:
> Also, I when I type in sync~, it says "no such object" in the MAX
> window.

Which version of Max are you using? If its an older one, put it into
your signature ;-)

I found more and more patches sent to the list need Max 4.5. Though most
of my patches could run on older versions, and have been made in the
first place with older versions, alone one object like patcherargs is
now in almost any patch I make. But its 4.5…

I might start a little hacking to replace some of the new objects with
abhaXions for those who are still on pre 4.5, but with patcherargs its
hard to get the same behaviour. It would only work partially.

> When you refer to sending MIDI byte 248 to the external sequencer,
> how do I send it out. Does it involve sxformat, midiout or what?

Yes, midiout.

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


March 10, 2006 | 11:53 am

Thank you for the suggestions…

So, what functionality does patcherargs have?

I’m on the verge of upgrading and will do so soon cos i’m getting left behind a bit!

I’v managed to control my external sequencer using midi bytes 248, 250 and 251 (sent out of midiout) in conjunction with the tempo object. Seems to be working well, so I’m sorted for now!

Cheers

Alec J P


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