Basic Beginners question regarding timing/synch/metro

Jul 3, 2006 at 8:15pm

Basic Beginners question regarding timing/synch/metro

hello
I’ve just started having a potter about with max, worked through the tutorials etc and have been putting together some basic patches to get a feel for how to do the basics. One thing i seem to be having terrible trouble with is getting my objects to synch perfectly whether using metro or tempo.
In the basic patch i’ve got (which i can either copy in text to the forum or upload to my site), I’m trying to synch an uber-basic sequencer made up of triggers to a loop-player playing a 1-bar sample (using groove~). However every now and again the sample will start slightly delayed or the beat from the sequencer will slip, making it fall out of sunch for a bar, before recovering again afterwards.

Ive tried using both tempo and metro as i say, and tried it with overdrive on and adjusting the performance settings to favour the requisite processes. still it keeps happening. i’m starting to think either i’m being phenomenally stupid (possible as i really am a beginner here) or else it may be my pc.

my hardware: acer travelmate laptop runnign WinXp, 768mb ram, 2.6ghz processor, and an emu 1616 pcmcia soundcard.

let me know how best to show the patch and ill get that on display.

thanks!

#26679
Jul 3, 2006 at 8:33pm

There are a couple of things you can experiment with to
determine if the timing of your events is solid.
Under DSP status, play with setting the “Max scheduler
in Overdrive” and “Scheduler in Audio interrupt”.
If you still hear delays in your event timing after
setting both on, you may need to review your design and
see if there are any places that something might get delayed.
In gerneral if you really need time critical events to
take place, use an audio rate signal to sync things instead
of metro.

Anthony

#80048
Jul 5, 2006 at 3:48pm

Hello,

You won’t get everlasting perfect sync by relying on messages, so I’d reccomend looking into using audio rate signals to do this instead, as Anthony suggested.

To post a patch, just select all and copy-paste into your post, et voila.


Owen

#80049
Jul 9, 2006 at 7:14am

This happens with Windows too ?

(Forehead hits desk)

Didn’t I read somewhere that these timing issues were a result of OSX being multi this and preemtive that ? Is my Intel Mac not going to solve these problems (bad timing even on light work)?

O please, say it’s not true.

Stuart

#80050
Jul 9, 2006 at 12:19pm

On 9-Jul-2006, at 9:14, Stuart Grimshaw wrote:
> Didn’t I read somewhere that these timing issues were a result of
> OSX being multi this and preemtive that ? Is my Intel Mac not going
> to solve these problems (bad timing even on light work)?

In what way does an Intel Mac change the OS? You’re still running
atop BSD Unix, it’s still multi-tasking, it’s still pre-emptive, it’s
still all the things it’s always been.

If anyone thinks a change in processor is going to change timing
issues, he’s in for a let down. Even hoping “at least the
inaccuracies will be faster” is pushing your luck.

Don’t matter if it’s a VW or a Daimler, when you drive on cobblestone
it’s still a bumpy ride.

– P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +—> Litter Power & Litter Bundle for Jitter
Heavy-Duty Mathematics for Everyday Use
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de

#80051
Jul 9, 2006 at 12:29pm

>On 9-Jul-2006, at 9:14, Stuart Grimshaw wrote:
>>Didn’t I read somewhere that these timing issues were a result of
>>OSX being multi this and preemtive that ? Is my Intel Mac not going
>>to solve these problems (bad timing even on light work)?
>
>In what way does an Intel Mac change the OS? You’re still running
>atop BSD Unix, it’s still multi-tasking, it’s still pre-emptive,
>it’s still all the things it’s always been.
>

but suddenly (yes, took me time !!) this post/question made me wonder
if people using maxmsp on windows do have the same timing problems
than we have on macs??? – when a medium-level patch (i certainly did
not build the MOST…. etc max patches) has great timing problems,
when a single metro is NOT something you can truct in any way (except
for banging at random, from time to time, which actually is often ok
with me)?

__I never paid attention if the (numerous) posts about timing
problems were only from the mac users… if so, for patches which
need a good (or normal) timing accurancy, would it be better, on new
macs, to boot on Windows??

thanks

best

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

#80052
Jul 9, 2006 at 2:22pm

On 9 Jul 2006, at 14:19, Peter Castine wrote:

> Don’t matter if it’s a VW or a Daimler, when you drive on
> cobblestone it’s still a bumpy ride.

Not if it’s a Citroen.

– N.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#80053
Jul 9, 2006 at 3:09pm

On 9-Jul-2006, at 16:22, Nick Rothwell wrote:

> On 9 Jul 2006, at 14:19, Peter Castine wrote:
>
>> Don’t matter if it’s a VW or a Daimler, when you drive on
>> cobblestone it’s still a bumpy ride.
>
> Not if it’s a Citroen.

Exactly my point. It’s the suspension, not horsepower nor fuel type,
that makes the difference.

– P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/

#80054
Jul 9, 2006 at 3:16pm

>On 9-Jul-2006, at 16:22, Nick Rothwell wrote:
>
>>On 9 Jul 2006, at 14:19, Peter Castine wrote:
>>
>>>Don’t matter if it’s a VW or a Daimler, when you drive on
>>>cobblestone it’s still a bumpy ride.
>>
>>Not if it’s a Citroen.
>
>Exactly my point. It’s the suspension, not horsepower nor fuel type,
>that makes the difference.
>

so what about the windows suspension?????

best

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

#80055
Jul 9, 2006 at 3:40pm

On 9-Jul-2006, at 14:29, Kasper T Toeplitz wrote:
> this post/question made me wonder if people using maxmsp on windows
> do have the same timing problems than we have on macs???

Je crois que si. C’est a dire : non.

My (modest) experience with Max on Windows indicates that there are
also timing issues. I’m not sure they’re identical.

It seems likely that when the problem is audio processing competing
with the scheduler for CPU time, you will have similar problems on
either platform. And similar solutions (tweak Performance Options…)
However, if the question is the OS preempting the CPU when the
scheduler needs processor time, then both OS’s can be difficult but
there will be differences in the details.

I don’t know if anyone involved with implementing the Max/MSP
scheduler wants to go into the gory details of how the various
architectures compare. I’m sure it is pretty gory.

– P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/

#80056
Jul 9, 2006 at 6:52pm

Kasper,

don’t know if I am wrong but the original question was by an user
using windows xp…

All the best

Alessandro Fogar

you said

> so what about the windows suspension?????

he said :

> I’ve just started having a potter about with max, worked through the tutorials etc and have been putting together some basic patches to get a feel for how to do the basics. One thing i seem to be having terrible trouble with is getting my objects to synch perfectly whether using metro or tempo.
> my hardware: acer travelmate laptop runnign WinXp, 768mb ram, 2.6ghz processor, and an emu 1616 pcmcia soundcard.
>
> let me know how best to show the patch and ill get that on display.

#80057
Jul 9, 2006 at 8:59pm

I’m doing the same thing.

Don’t go through my hardships, metro/tempo are WAY inaccurate and get even more innaccurate the more things you do as max needs time to process all your other things. Don’t even bother…

Just some math and time should do it.

convert your BPM to milliseconds (hint: 60,000/x) = time for one beat

then depending on the resolution you want, use a signal (square wave?) to do the same thing that tempo/metro will do. except for the fact that everything will be in time because of signals using rates i believe.

correct me if im wrong before i dive into it headfirst :)

#80058
Jul 11, 2006 at 9:08pm

This audio rate business is all very well, but my little programme is a sociable chap, and needs to communicate with the outside world… VIA MIDI.

And on OSX, the midi sync I’m sending is, well, adventurous to say the least. I was hoping that my Intel Mac running Windows (sorry, I lost track of the car analogy) – which I haven’t bought yet, hence the questions – would prove to be more reliable.

There IS no way to avoid the scheduler when dealing with midi.Or am I missing something ?

Stuart

#80059
Jul 11, 2006 at 9:43pm

The scheduler handles all message/control data, the audio interrupt
handles all audio data. Why don’t you have an audio
rate signal trigger a midi messages. Something like a
phasor~->threshold->noteout.

Anthony

#80060
Jul 11, 2006 at 11:29pm

On 11-Jul-2006, at 23:08, Stuart Grimshaw wrote:
> Intel Mac running Windows

You didn’t say that before.

You said:
> Is my Intel Mac not going to solve these problems

If you say “Intel Mac” without anything else, it is reasonable to
assume you mean “running OS X” and that’s the context of the follow
up so far.

But if you want to switch to Windows:

- AFAICT Max timing is no better on Windows than on Mac OS.
Caveat: I have not made extensive comparisons, this is just
gut feeling.
- Windows XP (and several generations of its predecessors) are
every bit as preemptive, etc. as OS X, but without the
geeky tweaking things Unix allows.
- Buying an Intel Mac to run Windows is a relatively
expensive approach to XP unless you have reasons for
wanting both Mac OS and XP in one box.
- Changing OS is pretty major culture shock. Sort of like moving
from Hannover to Magdeburg 20 years ago. (For that matter, even
today).

Hope this helps,
P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/

#80061
Jul 12, 2006 at 7:12am

#80062
Jul 12, 2006 at 8:42am

#80063
Jul 12, 2006 at 9:33am

Quote: Peter Castine wrote on Wed, 12 July 2006 10:42
ra).
>
> None of those machines were doing DSP on the motherboard. So it’s not
> as if everything was better in the old days.

I knew there was somrthing I’d forgotten.
>
> If what you want is a tight MIDI beat, the best platform would be an
> absolutely minimal OS that lets one application take over the
> machine. None of today’s desktop OS’s fills that bill.

I still have to use Finale on OS9, and pressing the play button hogs da whole show. That’s just what I need to do – have my programme behave impolitely. The Macs that can run OS9 are too slow, but maybe an older Windows ? On a Mac Mini, meine ich.

> Maybe it’s because if I do something complex, the complexity goes
> inside an external written in C.

I have a barage of ctlin’s (which don’t get used that heavily), but apart from that it’s just the sync~ to midiout. Hardly complex, even by my standards. Even if I have audio rate CPU load at, say, 30%,I’m still getting major problems.

Is this maybe a problem unrelated to Max/OSX ?

And yet. Logic, Reason et al all run with no problems. Is it just the fact that Max is not built to be tight but flexible ?

> Dell or Sony will probably have something vaguely similar with a
> lower price tag. Comparable? Comparing computers depends on so many
> factors.

Comparable = small, will fit into the wooden box that The Other Stuff is nailed into :-) Not a tower.

I’m off to do some windowshopping…

#80064
Jul 15, 2006 at 12:45pm

hello
thanks for the responses; i’ve since realised that some more diligent searching of the list archives would have found me some great strating points for audio-rate metronomes etc. My problames are now sorted and i’m able to make some headway. I think the confusion lies in the fact that the manual suggeests that using ‘tempo’ or ‘metro’ is the best way to go about timing…had i not posted to teh list i’d have probably been ripping my laptop apart trying to find where it had (yet again) let me down :)

thanks again.

Ruaridh
ruaridh@marciablaine.com

#80065

You must be logged in to reply to this topic.