New to Max APi - How to extract values from Abelton API to manipulate

Soup Sounds's icon

Hi - I am pretty new to Max and I am trying to work with Abelton APi - extracting info and sending values to another program via midi.

In this case I wan t to work out the length in ms of the first loop extracted from Abelton's looper.

I can work out how to use the get function to be able to see the value of the Tempo and length of the first clip.

What I cant work out is an easy way to actually take the numerical value of the tempo and length so I can manipulate them.

I have attached the basic patch I have been using.

Grateful for any ideas

Best Regards

Richard

2799.Tempoandlengh.amxd
amxd
secdef's icon

midi clock.

broc's icon

The clip duration in ms can be calculated with

(60000/T)*L

where T is tempo (BPM) and L is the clip length in beats.

Btw, in the patch you need to replace ‘route value' by 'route length' resp. 'route tempo'.

Soup Sounds's icon

Hi broc thankyou = That progressed my investigation quite a bit.

Now I am pusselled how to get the tempo including decimal points from the route command - It only produces the integer.

Best Regards

Richard

2807.Tempoandlengh.amxd
amxd
Stephane Morisse's icon

Just add 'float' as an argument to the route object.

broc's icon

[route tempo] produces a float, but it's converted to integer when connected to an integer number box.

I'd suggest to 'investigate' some basic Max tutorials ;)