API-functions "quantize" and "get_notes" -how to format messages??


    Apr 15 2013 | 12:13 pm
    Hi, i'm trying to use the functions "call quantize" and "call get_notes" on a live.object to manipulate midinotes in a clip.
    My problems are the parameters: "quantization_grid [int] and amount [double]" for quantize and "from_time [double] , from_pitch [double] ,time_span [double] ,pitch_span [double] " for get_notes I'm not able to find the right format for this messages, i've tried many variations of numbers after "calll quantize" but the max-window always says "invalid arguments. 'quantize...' , for example "call quantize 1 100" for quantization grid 1n at 100% amount doesn't work...
    Also with "get_notes" i have no luck... is it necessary to to use all arguments or can i just use the time related when the pitch doesnt matter? My purpose is to select all notes in the loop-range of a clip.
    I've searched the Max-documentations but didn't find out which mistake(s) i've done... Can someone give me an example for this??
    many thanks in advance!!!!

    • Aug 10 2013 | 5:28 pm
      sorry for bumping this one again, but i still have problems with the "quantize" call..
      someone here who can have a look?
    • Sep 10 2013 | 12:54 pm
      --sorry double post--
    • Sep 10 2013 | 12:55 pm
      Die you find out how to format the get_notes parameters?
      the call in your patch works for me
      on the right you have to use this path: path live_set tracks 0 clip_slots 0 clip view the numbers represent witch track an clip_slot
    • May 07 2014 | 1:36 am
      I was struggling with formatting the quantize command too. The quantize_grid parameter was tricky to figure out, but I found the answer in the description for the midi_recording_quantization function. In the LOM document there is a table of quantization values like this:
      1: 1/4 2: 1/8 3: 1/8T 4: 1/8 + 1/8T 5: 1/16 6: 1/16T 7: 1/16 + 1/16T 8: 1/32
      quantization_grid wants any whole number between 1 - 8 and amount wants a double in the range of 0.0 - 1.0.