| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ||||||||||||||||||||||||||
2 | Disclaimer: Im no expert in this and I created it since I needed it myself. I encourage you to come with feedback such as feature requests, bugs or other stuffs. You will find the script in 'Apps Script' under the 'Extenions'-menu. You will have to manually copy and paste this script into all documents you want to use it in. If there's a bug and it needs update, all these instances would have to be manually updated. =/ Make a copy of this document to your own gDocs/gDrive, once there you can edit it and access the script in the script editor. If that doesn't work, write something in the comments. There's a built-in limitation in gDocs for how many times a script can be called per second. This is important to have in mind and if you see a lot of '#ERROR!' cells, hover over them to see what the issue is. If it's related to this limitation try to work with ranges instead, examples below. Ranges also improves speed a lot! Sometimes a script can error out for no apparent reason, reloading normally helps. ⚠️ If you get an error about too many redirects when editing the script, sign out of all other google accounts and try again. Seems to be a google thing. | |||||||||||||||||||||||||
3 | Updates / News: | 2021-11-01, v0.62. Added the '2s' function. It will convert tc1 to seconds with the option to output in raw seconds or formatted as proper TC. In the latter it would more or less be a "round this TC to closest second". Updated docs and installation since google have moved some stuffs around. Maybe look at other ways of deplying and distributing this? Seems to be some sort of marketplace for stuffs now. | ||||||||||||||||||||||||
4 | 2021-05-12, v0.61. I took a look at the popular request of calculating duration of a column of TC's. This should now work but I have honestly not tested the shit out of it. In the 'validate_operations' tab I have done a couple of tests and comparisions with the old "helper column" method and from what I can see it works fine. Report any errors/isses to me. An example can be seen at the bottom here and in range F45:H55. Note that for the moment this is ONLY for duration/"dur" and NO other operations. It's somewhat of a workaround but probably something I can build upon for the other operations that would benefit from 'same column' operations. | |||||||||||||||||||||||||
5 | 2015-03-29, v0.6. 29.97 and 59.94 drop frame support implemented. During this process i've learnt that there is no such thing as 23.976 drop frame so that has ben dropped, no pun intented. =) There is support for 23.976 calculations though. Use the drop frame framerates in calculations with "29.97df" and "59.94df" or with cell reference. I've added some sheets at the bottom with auto validation's so that I more ealisy can test the script. Works as a good validation for you as well, so that you can see that it works and what it does. In the 'validate_frame_ranges' sheet you can see that it drop frames when it should for 29.97df and 59.94df. I still haven't gotten inter-column math to work. With inter-column I mean that it should be possible to add tc's from one single column, A1:A5, in one operation. Sadly, with my lack of skills and experience it probably means that I have to re-do alot of the script. It's next on the list and it'll be part of a major rewrite where you should also be able to do calculations on spread out cells. Turned out it's not that easily achieved though and might require a bigger brain than mine. | |||||||||||||||||||||||||
6 | ||||||||||||||||||||||||||
7 | ||||||||||||||||||||||||||
8 | Addition, cell referenced | Addition, manually entered and cell referenced | Subtraction, cell referenced all values | |||||||||||||||||||||||
9 | =tc(B12, C12, 25, "add") | =tc(F12, "00:09:23:21", 24, "add") | =tc(J12, K12, L12, "sub") | |||||||||||||||||||||||
10 | TC1 | TC2 | TC1 + TC2 | TC1 | TC2 | TC1 + TC2 | TC1 | TC2 | SOURCE FPS | TC1 - TC2 | ||||||||||||||||
11 | 10:08:40:18 | 00:01:04:15 | 10:09:45:08 | 10:08:40:18 | -- | 10:18:04:15 | 10:08:40:18 | 00:31:13:09 | 24 | 09:37:27:09 | ||||||||||||||||
12 | ||||||||||||||||||||||||||
13 | ||||||||||||||||||||||||||
14 | Division. TC2 is the divisor in this operation | Multiplication. TC2 is the multiplier in this op | Convert. TC2 is the target framerate in this operation | |||||||||||||||||||||||
15 | =tc(B18, C18, 25, "div") | =tc(F18, G18, 25, "mult") | =tc(J18, K18, L18, "conv") | |||||||||||||||||||||||
16 | TC1 | TC2 | TC1 / TC2 | TC1 | TC2 | TC1 * TC2 | TC1 | TC2 | SOURCE FPS | CONVERTED | ||||||||||||||||
17 | 10:08:40:18 | 2.3 | 04:24:38:14 | 10:08:40:18 | 1.4 | 14:12:09:00 | 10:08:13:12 | 25 | 24 | 09:43:53:19 | ||||||||||||||||
18 | 10:08:13:12 | 59.94df | 24 | 04:03:32:00 | ||||||||||||||||||||||
19 | 10:08:13:12 | 23.98 | 29.97df | 12:39:31:02 | ||||||||||||||||||||||
20 | Percentage. TC2% of TC1 | 10:08:13:12 | 23.98 | 20000 | 47:27:13:20 | |||||||||||||||||||||
21 | =tc(B24, C24, 24, "per") | 10:08:13:12 | 59.94df | 29.97df | 05:04:06:42 | |||||||||||||||||||||
22 | TC1 | TC2 | RESULT | 10:08:13:12 | 40000 | 24 | 00:00:21:44 | |||||||||||||||||||
23 | 10:08:40:18 | 22 | 02:13:54:14 | 10:08:13:12 | 2 | 23.976 | 21:38:42:00 | |||||||||||||||||||
24 | ||||||||||||||||||||||||||
25 | ||||||||||||||||||||||||||
26 | Convert TC to frames | Convert frames to TC | Subtraction, cell referenced all values. Negative result support | |||||||||||||||||||||||
27 | =tc(B30, , 24, "2f") | =tc(F30, , 24, "2tc") | =tc(J30, K30, L30, "sub") | |||||||||||||||||||||||
28 | TC1 | TC2 | RESULT | TC1 | TC2 | RESULT | TC1 | TC2 | SOURCE FPS | TC1 - TC2 | ||||||||||||||||
29 | 10:08:40:18 | 876498 | 876498 | 10:08:40:18 | 10:08:40:18 | 12:31:13:09 | 25 | -02:22:32:16 | ||||||||||||||||||
30 | ||||||||||||||||||||||||||
31 | Addition, cell referenced for a range | Convert TC to frames for a range | Convert frames to TC for a range | |||||||||||||||||||||||
32 | =tc(B36:B42, C36:C42,24,"add") | =tc(B36:B42, , 24, "2f") | =tc(J36:J42, 0 , L36, "2tc") | |||||||||||||||||||||||
33 | TC1 | TC2 | TC1 + TC2 | TC1 | TC2 | RESULT | TC1 | TC2 | TARGET FPS | RESULT | ||||||||||||||||
34 | 00:00:10:22 | 00:00:15:06 | 00:00:26:04 | 00:00:10:22 | 262 | 262 | 24 | 00:00:10:22 | ||||||||||||||||||
35 | 00:00:15:06 | 00:00:17:04 | 00:00:32:10 | 00:00:15:06 | 366 | 366 | 00:00:15:06 | |||||||||||||||||||
36 | 00:00:17:04 | 00:00:19:00 | 00:00:36:04 | 00:00:17:04 | 412 | 412 | 00:00:17:04 | |||||||||||||||||||
37 | 00:00:19:00 | 00:00:21:23 | 00:00:40:23 | 00:00:19:00 | 456 | 456 | 00:00:19:00 | |||||||||||||||||||
38 | -00:00:21:23 | 00:00:24:05 | 00:00:02:06 | -00:00:21:23 | -527 | -527 | -00:00:21:23 | |||||||||||||||||||
39 | 00:00:24:05 | 00:00:25:13 | 00:00:49:18 | 00:00:24:05 | 581 | 581 | 00:00:24:05 | |||||||||||||||||||
40 | 00:00:25:13 | 00:00:26:21 | 00:00:52:10 | 00:00:25:13 | 613 | 613 | 00:00:25:13 | |||||||||||||||||||
41 | ||||||||||||||||||||||||||
42 | ||||||||||||||||||||||||||
43 | Duration of a column of TC's | Convert frames or TC to seconds | ||||||||||||||||||||||||
44 | .=tc(F45:F51, , G45, "dur") | =tc(J48:J54, 0 , L48, "2s") | ||||||||||||||||||||||||
45 | TC1 | FPS | RESULT | TC1 | TC2 | TARGET FPS | RESULT | |||||||||||||||||||
46 | 00:00:10:22 | 24.00 | 00:01:30:03 | 262 | 24 | 11 | ||||||||||||||||||||
47 | 00:00:15:06 | 366 | 15 | |||||||||||||||||||||||
48 | 00:00:17:04 | 412 | 17 | |||||||||||||||||||||||
49 | 00:00:19:00 | 123 text | NaN | |||||||||||||||||||||||
50 | -00:00:21:23 | -00:00:21:23 | -22 | |||||||||||||||||||||||
51 | 00:00:24:05 | 00:01:42:15 | 103 | |||||||||||||||||||||||
52 | 00:00:25:13 | 00:00:42:11 | 42 | |||||||||||||||||||||||
53 | 23:21:59:15 | 24 | 23:22:00:00 | |||||||||||||||||||||||
54 | 00:00:42:12 | 29.97df | 42 | |||||||||||||||||||||||