ted godwin Posted June 4, 2008 Share Posted June 4, 2008 Hello All, Im posting this here because i dont know who to ask. I am FM9advanced Windows Newbie I need to know if there is a way where the contents of one field can change the contents of other field instantly upon its alteration. Im making a scanning database and need to change a series of calculations based upon the speed at which i scan the film. I have everything setup and working correctly for scanning at 25 frames per second. Field one has a value list of 24 and 25 in a pull down menu, which affects nothing when changed from one to the other. Field 2 and 3 are timecode in and out values. Field 4 is number of the first frame, calculated from the timecode in field //((Middle(timecode_IN; 1; 2)*3600) + (Middle(timecode_IN; 4; 2)*60) + (Middle(timecode_IN; 7; 2)) + (Middle(timecode_IN; 10; 2)/25)) Field 5 is the number of the last frame, calculated from the timecode out field ((Middle(timecode_OUT; 1; 2)*3600) + (Middle(timecode_OUT; 4; 2)*60) + (Middle(timecode_OUT; 7; 2)) + (Middle(timecode_OUT; 10; 2)/25)) Field 6 is total number of frames Ive made 2 sets of everything calculatable. One set all the calculations work on 24, and other set work on 25. I want to be able to change the value list from 25 to 24, and have fields 2-6 update, based now on calculations based on 24. Is there a way to replace the 25 based fields with the 24 based fields by changing the master value list from 25 to 24 and back again? Or is there a way to swap out a calculation in a calculation field based on the setting from a value list? I looked for if-then scenarios, but I dont know if this should be script based or calculation or relational or what. The control only has to happen on the local page and would not update or be affected by anything outside. Ill keep trying. Thaks in advance Link to comment Share on other sites More sharing options...
Techphan Posted June 4, 2008 Share Posted June 4, 2008 1) Make the dropdown field containing 24 and 25 a global field (call it Global::FPS) 2) Have the calculations: Field 4 before: //((Middle(timecode_IN; 1; 2)*3600) + (Middle(timecode_IN; 4; 2)*60) + (Middle(timecode_IN; 7; 2)) + (Middle(timecode_IN; 10; 2)/25)) (***** if this divided by 25 in the last row is based upon the above number******) Field 4 after: //((Middle(timecode_IN; 1; 2)*3600) + (Middle(timecode_IN; 4; 2)*60) + (Middle(timecode_IN; 7; 2)) + (Middle(timecode_IN; 10; 2)/Global::FPS)) Field 5 after: ((Middle(timecode_OUT; 1; 2)*3600) + (Middle(timecode_OUT; 4; 2)*60) + (Middle(timecode_OUT; 7; 2)) + (Middle(timecode_OUT; 10; 2)/Global::FPS)) Therefore your calculate value depends upon the number that is chosen. As long as Fields 4 and 5 are based upon calculatioons (not stored) then they should update immediately. ************* Is this what you were after? Link to comment Share on other sites More sharing options...
Norma_Snockurs Posted June 4, 2008 Share Posted June 4, 2008 1) Make the dropdown field containing 24 and 25 a global field (call it Global::FPS)Making it a Global field means that you have a value of 24 xor 25 for every record in the database. I think what Ted is after is a means to set either 24 or 25 fps on a per record basis. Furthermore, there is nothing to indicate that the involved fields use aggregate or relational parameters so an unstored calc is probably not necessary - a stored one will do the trick. If that is the case then the drop-down could be in a number field set up to store per record not globally. The other fields should be number fields with the calculation Auto-entered. Link to comment Share on other sites More sharing options...
Techphan Posted June 4, 2008 Share Posted June 4, 2008 Making it a Global field means that you have a value of 24 xor 25 for every record in the database. That is why I use a table called GLOBAL for most (not all) for of my global variables. I started doing this in the old DOS days with Clarion and it just makes sense to do so and not clutter local tables with unnecessary repetition of data. I think what Ted is after is a means to set either 24 or 25 fps on a per record basis. Then I would write from the global drop-down to the record via script. In fact, it would be a simple undertaking to write data from each calculation (24 and 25) to the record. But from his description of using 24 or 25 it did not sound like he needed to store the number resulting from the calculation but it was used at a later to determine frame numbers (for editing?? or such other task). Link to comment Share on other sites More sharing options...
Norma_Snockurs Posted June 4, 2008 Share Posted June 4, 2008 ...I use a table called GLOBAL for most (not all) for of my global variables .... and not clutter local tables with unnecessary repetition of data.I'm not sure why you make this point in the context of the post although it is good practice. I was questioning the validity of using a global at all as once the calc is made then you have no way of knowing whether the original frame rate used in it was 24 or 25. It made sense to me that it should be stored in the record along with the rest of the data, but without a detailed description of the purpose of the database I guess the only person who can advise one way or the other on that one is Ted. It's not clear from his description if he's storing results on a record by record basis but you have to excuse me for assuming that he might be - he's using a database development tool here after all.smiley-wink Link to comment Share on other sites More sharing options...
Techphan Posted June 4, 2008 Share Posted June 4, 2008 I was questioning the validity of using a global at all as once the calc is made then you have no way of knowing whether the original frame rate used in it was 24 or 25. It made sense to me... Excellent point Link to comment Share on other sites More sharing options...
ted godwin Posted June 5, 2008 Author Share Posted June 5, 2008 The resulting information is stored on a per line per page basis. Ill go into detail. An EDL (editor decision list) containing lines like this: Scene0020EDL 1 2 3 4 5 6 001 000026 V C 06:09:26:21 06:09:31:10 01:00:00:00 01:00:04:14 002 000027 V C 07:05:51:16 07:06:12:19 01:00:04:14 01:00:25:17 003 000027 V C 07:02:12:15 07:02:27:03 01:00:25:17 01:00:40:05 004 000027 V C 07:06:26:00 07:06:34:11 01:00:40:05 01:00:48:16 005 000027 V C 07:02:34:07 07:02:56:24 01:00:48:16 01:01:11:08 006 000027 V C 07:08:33:24 07:08:43:08 01:01:11:08 01:01:20:17 007 000027 V C 07:03:05:08 07:03:14:22 01:01:20:17 01:01:30:06 008 000027 V C 07:03:25:11 07:03:31:18 01:01:30:06 01:01:36:13 009 000028 V C 08:01:17:11 08:01:26:19 01:01:36:13 01:01:45:21 010 000028 V C 08:04:41:07 08:04:43:08 01:01:45:21 01:01:47:22 1 is the line number, while 5 and 6 are the timecode in and out HHMMSSFF are translatable with a timecode converter into a frame number. HHMMSSFF-HHMMSSFF also produces a duration in seconds which can be converted to a duration in frames The number of frames in a given period of time will increase based on how many frames are in each second, with more frames existing with a 30fps than a 24fps based timecode. I want to change this number interactively. :-) The EDL is representative of a scene, of which all lines are shots in that scene. The EDL is scanned at a certain timecode base rate of 24 25 or 30 frames per second All of the shots in a scene are of the same timcode base. (Meaning all of the shots in Scene 0020 are the same.) There is a mother (heirarchically) page containing a portal displaying selected fields from the shot pages. On the mother page there is the 24/25/30 value list. If i change this number, I want the values of all of the shots to change along with it. On each shot page i have a nonmodifiable edit box which displays the value of this value list ro the mother page. So if the value list changes, then the edit box on the shot page changes, and resultingly all of the frame numbers equivalent to the timecode in and out as well as duration will update. Fields on the shot page that will be modified by the selector on the mother page are first frame, last frame, and duration in frames For lines of the edl: the pages will read: tcin - tcout - firstframe - lastframe - duration in frames 06:09:26:21 - 06:09:31:10 - 554171 - 554285 - 113 07:05:51:16 - 07:06:12:19 - 638791 - 639319 - 527 07:02:12:15 - 07:02:27:03 - 633315 - 633678 - 362 etc based on a 25fps timecode base Should i change the value on the mother page to 30FPS, I want all of the ins and outs and durations to change to 06:09:26:21 - 06:09:31:10 - 665001 - 665140 - 138 07:05:51:16 - 07:06:12:19 - 766546 - 767179 - 632 07:02:12:15 - 07:02:27:03 - 759975 - 760413 - 437 Now I have all of this working. I did NOT use a separate GLOBAL table with a FPS field. Rather I used the field from the mother page instead in the calculation and it worked. I need the pages to change according to the mother page not anything higher. Shot pages are called TASK_SCANNING and the Mother page tracks this and is called TRACK_SCANNING: ((Middle(timecode_OUT; 1; 2)*3600) + (Middle(timecode_OUT; 4; 2)*60) + (Middle(timecode_OUT; 7; 2)) + (Middle(timecode_OUT; 10; 2)/TRACK_SCANNING::FPS)) .. so all of the shots update when the field changes. Im still working on this database's functionality, but your help has helped me get past this hurdle so thanks to all who have contributed.. Ted Link to comment Share on other sites More sharing options...
ted godwin Posted August 15, 2008 Author Share Posted August 15, 2008 Hi Everyone, Now that my database is 90% complete and functional, I've found that my calculation needs to come full circle. We've taken the TC and converted it into seconds and then from that, distilled the sequential number for the frames. Ive created the 24/25/30 variable switch, and have a new calculation for adding handles to the sequences. The handles are extra frames added before and after the given start and end point, that was easy to figure out: timecode_OUT_seconds_Global * TRACK_SCANNING::FPS + TRACK_SCANNING::HANDLES with the TRACK_SCANNING::FPS tag being the 24/25/30 variable, and the TRACK_SCANNING::HANDLES being the assigned number of extra frames to be scanned. Ill need to add the handle variable to the TCin and the TCout as well, so that if the timecode_IN is 01:20:20:10 then the addition of 5 frames of handles would change that number to 01:20:20:05, so that 5 more frames will be scanned. also so that if the timecode_OUT is 01:20:30:10 then the addition of 5 frames of handles would change that number to 01:20:30:15, so that 5 more frames will be scanned. I think the easiest approach is not reverse-engineering the process, but rather not to worry about adding handles to the source TC, but to take the new frame number and converting in into a new TC number, much like a timecode converter would, giving the converter a frame number, and having filemaker take that number and generating a TC number from that. So ill have the tcIN number coming from the EDL, getting the seconds, getting the frames, adding the handles, getting a new frame number, and converting that into tc again, the last part being the part I need help with. A simple converter at the end would remove the hassle of involving reverse variables and time code base changes.. keeping it a simple converter. Anyone got the calculation i can use to go from number to tc? I have looked around a lot but the solutions online are overly complex and i dont want to rethink the whole process at this time. thanks in advance Link to comment Share on other sites More sharing options...
Maarten Witberg Posted August 15, 2008 Share Posted August 15, 2008 is this post any help: http://filemakertoday.com/com/showpost.php?p=76572&postcount=10 please note the calcs will treat a number as a total number of frames, and based on the frame rate, compute a timecode. Link to comment Share on other sites More sharing options...
Recommended Posts