Calculating triplets with plugsync~

estevancarlos's icon

My problem right now is a failure in logic or math. I am building an M4L patch and want to be able to calculate beats as triplets. I want to be able to detect when triplets occur. Presumably I would count the ticks according to the amount of ticks within a specified triplet duration. For example, there are 160 ticks in an 8th triplet note.

Plugsync~ outputs the ticks. I'm thinking I need to divide that by 160... that doesn't seem right at all. I change it to [/ 0.16]. That _seems_ right?

I'm NOT convinced I'm doing this correctly. Can anyone verify?

Max Patch
Copy patch and select New From Clipboard in Max.

broc's icon

Why don't you simply choose Div=12 (number of 1/8th triplets per 4/4 bar)?

Source Audio's icon

1/4 note has 480 raw ticks
So 1/8 triplet will have 160 ticks resolution. (480 / 3)
1/16 triplet 80 ticks
1/4 tripplet 320 ticks
So insert {% 160} followed by {sel 0} in raw ticks progress, and You get 1/8 triplet bang.

broc's icon

Note that [plugsync~] is different from [transport].
It doesn't output ticks but *beats* as float numbers (every 64 samples).

estevancarlos's icon

It doesn’t output ticks but *beats* as float numbers (every 64 samples).

I am confused either by what you're saying or Cycling's documentation. The hint for the 7th outlet states that it's "ticks". The help patch refers to it as "raw ticks" however the reference file does state "beats" instead.

My confusion right now is this. Are beats and ticks the same? Are these interchangeable terms OR are there typos somewhere in Cyclings documentation on this object?

Screen-Shot-2017-01-19-at-1.08.53-PM.png
png
estevancarlos's icon

via SOURCE AUDIO

So insert {% 160} followed by {sel 0} in raw ticks progress, and You get 1/8 triplet bang.

That's essentially what I tried beforehand and it doesn't work. Try it. Those ticks go by very slowly so I am basically waiting many, many seconds before one triplet 8th note occurs.

Screen-Shot-2017-01-19-at-1.23.50-PM.png
png
Source Audio's icon

I can't help You with maxforlive, I am not using that stuff.
Ticks is a term used for midi note duration, and if cycling uses it for something else,
than...
But nevermind, just park Your main transport at some known value,
and read what output 7 displays.
Then You will know.
But, as Broc said, You can divide the Bar, or Beat progress to get the value,
but that is not the same as it would be with real ticks, as they are bar indenpendent.
Detecting 1/4 triplet in 7/8 bar would be more work to do...

broc's icon

Ok, I wasn't aware that the plugsync help file uses the term 'raw ticks' which is in fact confusing.
But the reference file states correctly that the 7th outlet reports the current number of beats (as float).

Roland Sproll's icon

For those who are still looking for a solution (like me) - I solved it that way:

Max Patch
Copy patch and select New From Clipboard in Max.

Brodie Matthews's icon

@ROLAND SPROLL hey, could i use a similar method to divide a bpm? this was a huge find but i still can math.. trying to get dotted tick counts.