max4node icon indicating copy to clipboard operation
max4node copied to clipboard

Slow performance of observe function — 4.7 Hz

Open dandaka opened this issue 9 years ago • 1 comments

Code:

// Fire the callback with the updated position of the clip (if it's playing).
max.observe({
  path: 'live_set tracks 1 clip_slots 0 clip',
  property: 'playing_position'
})
.on('value', function(val) {
  console.log('Playing position: ' + val);
  clipPlayingPosition = val;
});

I get 70 events every 8 beats with 120 BPM. So update frequency is roughly 1/120_70/8_60 ~= 4.7 Hz. This is far away from 100 Hz in midi clock.

Is it a limitation of Max? Live? Live Object Model? Node?

dandaka avatar Feb 14 '16 16:02 dandaka

This module doesn't use midi to handle communication. You bring up an interesting point though, the update speed as always been fast enough for my purposes but I honestly don't know where the bottleneck might be.

Dunno, you'll still find this module useful hopefully :)

alpacaaa avatar Feb 15 '16 09:02 alpacaaa