max newbie borax

annam's icon

Want to store midinotes in coll. But the deltatime of borax determines the duration of the note played in before an not of the actual note! Another problem is how to get the duration of the last note when borax will not
output deltatime! Appropiate and elegant solutions? Thanks a lot!
Hermann

Luke Hall's icon

Perhaps check the velocity output instead, this will be a zero when the current note ends rather than making you wait until the next note begins.

annam's icon

As far as I know, borax measures the time between 2 noteons, so deltatime of borax only fires when a noteon is seen.

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

This has not been tested much, so there are probably bugs lurking, but it should get you started:

`

annam's icon

Thank You very much Chris. Try to understand Your patch, works very well and
lookes very professional. Will try to quantize the deltatimes and to solve the problem with the length of the last note, which i cannot get from borax.
Thanks once again for Your help

Chris Muir's icon

The length of the last note should be fine, it's the delta time until the next note which is a bit dodgy. I send the delta message to borax when recording is turned off, which will report the delta time between the note and when recording is turned off. There could be improvements here for sure.

Also, if it wasn't harder to deal with on the forum, I would have made a couple of abstractions that held most of this stuff.

annam's icon

I looked at your stuff, but i think its askink too much for me now. But I will have further looks. My problem is the last note´s length should not end when I press the record button, it should match with the end to the bar. By the way, do you know keykit?
Thanks, Hermann

Chris Muir's icon

How are you deriving bars? And do you really mean note length? The length is how long you play the note for, the delta time is the time until the next note.

I looked at Keykit _many_ years ago, but I never really used it.

annam's icon

With length I don´t mean the duration but the dealtatime.
I think of something like to add up the quantized deltatimes and if a bar takes for example 2000 ms, the deltatime of the last note is 2000 minus sum of other deltatimes for this bar. What do You think?

annam's icon

Chris, just understood Your patch, the trick with the nsub message. Very fine!