• SONAR
  • Adjusting MIDI tempo by percentage? (p.2)
2017/01/23 10:35:07
brundlefly
SquireBum
promidi
2) Then menu item, Process | fit to time. make sure the format is set to MM:SS:FF 

 
 
   (pause "New Thru time for " percentage "% tempo scaling is " (meas time_pos) ":" (beat time_pos) ":" (tick time_pos)))
 

 
As Squirebum pointed out, the new Thru time has to be entered in SMPTE format, not M:B:T. You have to calculate total frames, divide that by the percentage (lower tempo means more time), and then convert to hh:mm:ss:ff.
 
If the CAL script can be made to give the new SMPTE time, that would be helpful. I have a spreadsheet that does it.
 
2017/01/23 11:04:09
brundlefly
dilletant
So, I select bars 1 thru 6 (i.e from the beginning to the end of bar 6), and CAL says new Thru time suppose to be 6:2:50.



- Original Thru for the sample you gave is 00:0010:06 (306 total frames at 30 fps).
- 306/.95 = 322.11 frames (approx.).
- The closest you'll get to this since you can't enter fractions of a frame is 00:00:10:22 (~95.03%).
 
Try that.
 
EDIT: Actually, I just tried with the M:B:T time format, and it worked perfectly with the better resolution of ticks giving the exact tempos. Make sure you are selecting 1:01:000 thru 6:01:000 in the timeline before executing, and enter 6:02:050.
2017/01/23 12:40:46
SquireBum
joden
This is cool guys!! @ Ron that is some nice work there!




Glad it helps, but @promidi should get credit for the bulk of the script.
 
-- Ron
2017/01/23 12:50:26
dilletant
First, I selected from 1:1:000 thru 6:1:000 and entered 6:2:050 for New Thru.

 
The results were the same as in my earlier post.

Then out of curiosity I started all over but this time entered 6:2:000 as New Thru

 
And got exactly what is needed!

 
2017/01/23 13:39:19
brundlefly
The percentage is of the total runtime. Changing all tempos by a percentage is not the same as changing the total runtime by a percentage, especially when the tempos are active for different periods of time as in your example. Changing all the tempos by the same percentage would not give the result you want. What Fit to Time is doing is correct to preserve the overall timing of the piece while speeding it up or slowing it down.
2017/01/23 14:09:00
dilletant
I understand that. What I don't understand is why it is so difficult to provide us sonarites with a simple and intuitive tool for tempo manipulating.
 
This is how it's done in DP.

Made for musicians: no scripts, no calculations, just a simple interface and musical terms.
2017/01/23 14:26:57
JayCee99
I'm not at my computer at the moment.  But out of curiosity, is it possible to open the "Event Viewer", filter the tempo changes, copy and paste them into a spreadsheet, manipulate them and then copy them back?  Might be a relatively simple workaround.
2017/01/23 14:27:15
SquireBum
 
dilletant
First, I selected from 1:1:000 thru 6:1:000 and entered 6:2:050 for New Thru.

 
The results were the same as in my earlier post.

Then out of curiosity I started all over but this time entered 6:2:000 as New Thru

 
And got exactly what is needed!

 



The fractional differences between the hand calculated tempos and the CAL script calculations are probably due to the fact that CAL does not handle fractions and does not round off division.  Unfortunately, CAL is no longer a supported part of SONAR and we must accept the tools we have.
 
If you take the tempo results of your last Fit To Time where 6:02:000 was used as the New Thru and run Fit To Time again using 6:01:000 as the New Thru, the process will not return your original tempos.  They will be: 119.99, 117.99, 115.99, 113.99, 11.99, 111.99, and 111.99.  (See screen shot below)
 
The point is that anytime a calculation occurs using a computer language there is always a potential for rounding errors.
 
For my work, 113.71 bpm is close enough to 114 bpm to be acceptable.  If you need greater accuracy than the script provides, then you would have to perform the calculations by hand or use something other than CAL to perform the calculations.
 

 
Hope this helps,
-- Ron
2017/01/23 15:22:09
brundlefly
dilletant
What I don't understand is why it is so difficult to provide us sonarites with a simple and intuitive tool for tempo manipulating.

 
That can't be answered by anyone here.
2017/01/23 15:32:42
dilletant
rlared
I'm not at my computer at the moment.  But out of curiosity, is it possible to open the "Event Viewer", filter the tempo changes, copy and paste them into a spreadsheet, manipulate them and then copy them back?  Might be a relatively simple workaround.


There are no tempo changes in the Event List
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account