Hallo,
what formula might one be using to determine periodicity as rate in ms ?
For example, say you know total frames of a video file and you know this file is 24 fps. You can say that it vibrates at 24 Hz so what is the periodicity of the wave in ms ?
the appended patch implements an incomplete version the idea using [pix_film] ideally settings would be initialized using a [loadbang].
#N canvas 523 243 478 419 10; #X obj 38 178 pix_film; #X obj 37 138 gemhead; #X msg 130 122 bang; #X obj 130 142 openpanel; #X msg 130 162 open $1; #X msg 130 101 auto $1; #X obj 131 82 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 62 218 unpack 0 0 0; #X floatatom 61 250 5 0 0 0 - - -; #X floatatom 102 250 5 0 0 0 - - -; #X floatatom 142 250 5 0 0 0 - - -; #X text 53 267 length; #X text 99 267 width; #X text 142 267 height; #X obj 37 290 pix_texture; #X obj 36 322 rectangle 4 3; #N canvas 0 22 454 304 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X msg 67 70 set destroy; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X msg 156 71 set create; #X obj 67 41 route create; #X connect 2 0 7 0; #X connect 3 0 1 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X connect 6 0 1 0; #X connect 7 0 3 0; #X connect 7 0 4 0; #X connect 7 1 6 0; #X connect 7 1 5 0; #X restore 216 327 pd gemwin; #X msg 216 308 destroy; #X text 212 287 Create window:; #X obj 36 105 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 167 219 random; #X obj 148 195 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1; #X floatatom 227 177 5 0 0 0 - - -; #X obj 168 195 metro 500; #X obj 213 103 random 250; #X obj 214 125 + 1; #X obj 213 43 random 250; #X obj 214 65 + 1; #X obj 255 65 spigot; #X obj 292 42 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 279 84 5 0 0 0 - - -; #X obj 228 151 spigot; #X obj 265 131 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X floatatom 90 5 5 0 0 0 - - -; #X text 132 3 << manual frame index; #X obj 101 43 counter 240; #X msg 126 23 2; #X obj 102 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 155 23 1; #X text 273 177 << WHAT TO MAKE THIS; #X text 288 191 TO GET RESULT THAT IS; #X text 273 205 IDENTICAL TO THE ORIGINAL; #X text 291 219 RATE OF PLAYBACK ???; #X connect 0 0 14 0; #X connect 0 1 7 0; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 7 0 20 1; #X connect 7 1 9 0; #X connect 7 2 10 0; #X connect 14 0 15 0; #X connect 16 0 17 0; #X connect 17 0 16 0; #X connect 19 0 1 0; #X connect 21 0 23 0; #X connect 22 0 23 1; #X connect 23 0 20 0; #X connect 23 0 24 0; #X connect 23 0 26 0; #X connect 23 0 35 0; #X connect 24 0 25 0; #X connect 25 0 31 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 28 0 30 0; #X connect 29 0 28 1; #X connect 30 0 24 1; #X connect 31 0 22 0; #X connect 32 0 31 1; #X connect 33 0 0 1; #X connect 35 0 0 1; #X connect 36 0 35 1; #X connect 37 0 35 0; #X connect 38 0 35 1;
any help appreciated !
./d5
Hi,
I didn't try the patch, as I don't have Gem installed, and as a result I may be missing the point in what follows. But some useful equations (which you can rearrange using very basic algebra):
(time per frame in ms) = 1000 / (rate in fps)
(total time in ms) = (number of frames) * 1000 / (rate in fps)
(time per beat in ms) = 60000 / (rate in bpm)
A way of checking equations for plausibility is described in the first few paragraphs here: http://en.wikipedia.org/wiki/Dimensional_analysis
Claude
day 5 wrote:
Hallo,
what formula might one be using to determine periodicity as rate in ms ?
For example, say you know total frames of a video file and you know this file is 24 fps. You can say that it vibrates at 24 Hz so what is the periodicity of the wave in ms ?
Hallo, day 5 hat gesagt: // day 5 wrote:
what formula might one be using to determine periodicity as rate in ms ?
For example, say you know total frames of a video file and you know this file is 24 fps. You can say that it vibrates at 24 Hz so what is the periodicity of the wave in ms ?
You just take the inverse to convert between period (or wavelength) and frequency (like fps or Hz), so it's
[expr 1/$f1].
If you want to drive a [metro] with that, you have to take into account, that the metro wants milliseconds. So you'd use:
[expr 1000 * 1/$f1] == [expr 1000/$f1]
to convert from fps to a metro period, where the period is the time it takes for one frame to pass.
It's similar with converting BPM to a [metro] period, however there you have the additional problem, that BPM is beats per minute. As a minute has 60 seconds and a second has 1000 milliseconds, you do this:
[expr 60*1000 * 1/$f1] or better: [expr 60000/$f1]
It works both ways: Sending 120 (BPM) into this will give you 500 (ms), and sending 500 (ms) into it wil give you 120 (BPM).
Frank Barknecht _ ______footils.org_ __goto10.org__
Thanks to both of you gentlemen for very helpful responses.
./d5
On Nov 20, 2005, at 6:11 PM, Frank Barknecht wrote:
Hallo, day 5 hat gesagt: // day 5 wrote:
what formula might one be using to determine periodicity as rate in ms ?
For example, say you know total frames of a video file and you know this file is 24 fps. You can say that it vibrates at 24 Hz so what is the periodicity of the wave in ms ?
You just take the inverse to convert between period (or wavelength) and frequency (like fps or Hz), so it's
[expr 1/$f1].
If you want to drive a [metro] with that, you have to take into account, that the metro wants milliseconds. So you'd use:
[expr 1000 * 1/$f1] == [expr 1000/$f1]
to convert from fps to a metro period, where the period is the time it takes for one frame to pass.
It's similar with converting BPM to a [metro] period, however there you have the additional problem, that BPM is beats per minute. As a minute has 60 seconds and a second has 1000 milliseconds, you do this:
[expr 60*1000 * 1/$f1] or better: [expr 60000/$f1]
It works both ways: Sending 120 (BPM) into this will give you 500 (ms), and sending 500 (ms) into it wil give you 120 (BPM).
On Nov 20, 2005, at 5:58 PM, Claude Heiland-Allen wrote:
Hi,
I didn't try the patch, as I don't have Gem installed, and as a result I may be missing the point in what follows. But some useful equations (which you can rearrange using very basic algebra):
(time per frame in ms) = 1000 / (rate in fps)
(total time in ms) = (number of frames) * 1000 / (rate in fps)
(time per beat in ms) = 60000 / (rate in bpm)
A way of checking equations for plausibility is described in the first few paragraphs here: http://en.wikipedia.org/wiki/Dimensional_analysis