Jump to content
  • 0

[Solved]CAL Specialists please, how to get the "Tick" Length of a measure


Heinz Hupfer

Question

HI:)

 

Following Problem:

I can for example move the From Time  in ticks:

(+= From 480) for an eigth, but how do I find out how many ticks a Measure has?

In 4/4 one Measure is 3840 ticks

In 3/4  - 2880

(+= From measure) or (+= From Beat) does not work for sure:) 

In the manual I can't find any solution.

 

Thanks;)

Bassman.

 

Edited by Heinz Hupfer
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

HI:) 

 

Thank you for the link but unfortunately not. 

In the manual for CAL I found something interesting but I don't know how to use it:

 

(meas Event.Time) displays the correct Measure Number of an Event.

(meas From) displays the correct Measure Number of the From Time

 

If I could now add or subtract 1 from (meas From) that would be the solution.

 

I mean (-= meas 1), but this does not work, perhaps I have to use (makeTime measure beat tick) ??

 

Perhaps like this:

= Var1 (meas From)

= Var2 (beat From)

= Var3 (ticks From)

++Var 1

=From (makeTime Var1  Var2 Var3)

 

Let's try out:)

Edit: ================================================

; This will move the Selection 1 bar(at 960 ticks per quarter note) to the right

(do

    (include "need20.cal")
    
    (dword var_meas)
    (dword var_beat)
    (dword var_tick)
    (dword var2_meas)
    (dword var2_beat)
    (dword var2_tick)
    
    
    (= var_meas (meas From))
    (= var_beat (beat From))
    (= var_tick (tick From))
    
    (= var2_meas (meas Thru))
    (= var2_beat (beat Thru))
    (= var2_tick (tick Thru))
    
    (+= var_meas 1)
    (+= var2_meas 1)
    
    
    (= From (makeTime var_meas var_beat var_tick))
    (= Thru (makeTime var2_meas var2_beat var2_tick))
)
===============================================

This works for moving the selection 1 bar to the right!

 

Thank you for the link, pointed me to the right direction to search for... @Nigel Mackay:)

 

Bassman.

 

Edited by Heinz Hupfer
  • Great Idea 1
Link to comment
Share on other sites

  • 0

There is a fixed Variable called TIMEBASE.  This will always be the number is ticks per quarter note.

So the number of ticks for measure would be TIMEBASE * 4

Note: If you rely heavily on CAL scripts in Cakewalk by Bandlab, always have your "ticks for quarter" notes set to 960.  Any other value and CAL has issues with any time related commands.

This is set in Preferences | Project | Clock.  Furthermore, this is a per project setting.

Link to comment
Share on other sites

  • 0
1 hour ago, Heinz Hupfer said:

HI:)

@Promidi

Thanks for the answer, but TIMEBASE*4 does not help with other meters. there should be a variable to read out which meter we have. 3/4, 4/4 or maybe 7/8.

With (meas From) we can re3ad out the number of the measure so it doesn't matter which meter we have to get 1 measure forward!

 

Greetz;)

Bassman.

 

Whoops...  you're right.....  forgot about those pesky time signature changes....    the meas command would indeed come to the rescue here.....

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...