< Back to IRCAM Forum

Spat5.sfplay~

Hi guys,
I am a newbie in using max and spat5. I was wondering on whether anyone can provide any tips on how to control (how frequent) the current pos(ms) dump output gets updated on the spat5.sfplay~ object. I do plan to use it to drive my video object (determining which frames to show). At the moment, it’s output frequency is pretty low such that my resulting frames are ‘jumpy’ (losing around 5 frames for each update).

Many thank’s in advance.

Kind Regards,

Ronny

Hi Ronny,

The rightmost signal outlet delivers the sample-accurate playback position.
So it’s really up to you to choose the update frequency.
See attached patcher.

Best,
T.


----------begin_max5_patcher----------
1832.3oc6Zs0aaaCE94jeEDB6gM.WWRcW6othAzWVAF1dXOjVDPKQ6vVIRCI
pjzNz7ae7lrkkkUjskyFFpAr0ERwygemK7iG4+95qbVvejT4.9YvMfqt5uu9
pqz2RciqrWekSA9wzbbktaNEoyyo2SluBSYO4Lyzi6wkLbA4vcfUWPY4DgdL
P1aJGSQ5cXFijmxqYBUaw11nY5Aiu3SuB40ZT30hlgw2d203RorEjxaIL7hb
RaQX5t3KqIl4nSQctfZEZEcECm6LC3n9tLmiEpSxoURU4iaFcoNRYqtsjjJL
CR.bNbFvCpOf7MGPwygadnJ78jrawBQIcQsfr8rJKxZgVExkWS3Katcy8aOq
x4rUCht6z6Bo0R0yPoV0WqTlp0WEA6s8p63khwKrFfsugplQEUhuXrG9l1+1
0Wu8f92uc8rQ53IgOAmMnCUamF29cZPC3z.OjSyBLa0vdDt9ygAQH2Dn4imq
zAIHZdvLfpIyufOdBS6TdQAQFaXEtf7nVlNUDA.CRy4oeFHnEDffCJIqklO.
tVvKvR2bbd9WZdvkb1VC6uTRUN9C.kKpWzITpE3lzO1BaIpJ5WMOMpwOqObK
DoCdbiMGPg5CdmHTo8UyZMyZmVZuFeNOnn9mjtmRVms4WNZuH2HS9EXv7De2
3HjsMWoqk+EKmCUF7pvJsdIEYiT5qS6C.GN8UWqPuotBfP3fYuPiH2kMVfxj
Mce+xazYubO+rWGJLNstrTdevZdkDL4LvOVT8SN6DDVQyHcCulpH4foJR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fWWZHs7XnY2A5xETxpo1fYIhHEo9MA
0Y84s7cTUV9O0zIu88DlkLtDHVhkjU1E8VrZIMOOkmaTu17EZH43XZ0VnUmM
88F.btahOBI8nfy8PdQtg5yjmDDzZkX6yfZdH+.+Dnqpq9gtQ9A5yhc8B7Tm
A67XtakEDkXj.LIF5aNSdKzL.p8igYqrulrV+oBbVWxUu.NKpKezjM8uVvWU
hynDye4icIEMy57opuxlW.miES0r+Zdl1Nq6ZLJnOdtFgMJX+XpWTneDRCIw
9xfdMl1AWNQ3riAehMBSIV+qFvUFo9VddF324Jp5zgP91bxuQyJuI9dhTk26
+aOm7adlar6TAnT9921PiJ1dqCpLhi1DAka2c5mgiEoOtYJ7+fyzlsG9833C
DG2S87uo0dx5yKXXW8o0BheLZLNqe2PNMIjk3sjKE3OHqpywVJDm9n8oEK9t
QarQeiMJKYxBx9bUNURU8uT7XGxN0BIzuxwc9YhzESMEeadMY3L13zTo.1w1
3gTNAJKR3FdpIV+hoVAeWIgvNZMDpTo.O0G0YnvXIM5IU4zuK22IWb9n0MEP
A0d1AItn.MNhZ6Ye7JnYSV55Eqzvp010UzkU95uc8+zqx2VC
-----------end_max5_patcher-----------

@kurnitb i m not sure that’s the best approach for doing what you want to do, unless i missed something.
What about just load the video and the sound and trig the start/stop or resume, or position, in ms? woriking around frame rate always represents some kind of risk as you can get frame drops.

best.

1 Like

Thank’s guys for the inputs. Much appreciated. @fraction, I have to play the audio through a 41ch speaker system and therefore I’ve separated out the video and the audio playback. Apparently for some reason if I went and play the video and the audio at the same time, they will be out of sync with each other after around the 30s playback. This what made me decide to have the audio driving the video playback.

ok. So you have i think several ways to adress this. First is to export the video as a multi channel audio movie, which is possible from Premiere for instance. then you would use a patch like this basic example not using any spat object but playing the movie as a regular file :


----------begin_max5_patcher----------
1326.3oc6Ys0hiaCE94jeEB+bZPR999zrKEVnzEJzGJkgkfhsFOZpsUP1dtz
kc+s2ijr83jIIiSF2gVHy.9xwR5b667oic917YNqkOxqbPe.c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58vwFoOMOE+ePOsaeyyu.uG7u+5U2v.uPi46
F44RLtj2N0bmYo5nCcmUAdac7fT4MrNZexVo3cQAGGpOsYP1igiArdIQNMDx
+BqPVvVcqHCJdytslmtRp.CgerfOKIAz1.mjn6SDuzr2Et0qlDy6t0qufBFa
47XKaimrzyeUkKf9w9CcyZGKOsKTYqCSjs.uE2pm344xGNInKDJg2JN1jN77
gTi4pPqrgakuNaqYgWL3v1i6bwjmG.qGIScioDyzn8sTRC0f5iBmOjiLccNt
X9K8w3.LXZll.zM8ZJ.I9AQAtaGM447hcSXQ88IGB8aGZbYRWa1uZKIGa1fc
sMZr8SC7VgPCWx0M00suaz.drwgsd+BgCsXcJERrxlMGrpdDVyvUr8KN+FVs
i3amRxXBXaNdCmW3a9+OeyHczK7MW3adO3anW3atv2bgu4Bey+x7M.v3S4M7
Su+Fh9Up0lUPO7Mt8srmZC7yJNu7jsP6GqvU+mIvGngKSuw8mmW+gQTehI7E
FQhLHCreru2NubyNeINpdPXbzT4.MEq4pOKySOYyWmowlBNefFy23Ijgr6mt
AZ+gkL+fsZKrZS62sz765N+6y+G.GdVL1
-----------end_max5_patcher-----------

Second approach would indeed use spat5.sfplay and would require to report frame position converted from ms position in the audio file to the jit.movie. You have to make sure that both of files have exact same length. I have never tried this solution but have a look again on this example (replace the pworld by a jit.world objet for test in condition)


----------begin_max5_patcher----------
1636.3oc6Y0zaaaCF9bxuBAgcZvykTj5qcpqX.8xJvv1gcHnHf1lVkYxjBRT
oIqX8293GR1Rtx1zwzA6PCPrknH066y6mOj9K2dS3BwSzlvfeN3tfat4K2dy
MlgzCbS282Dtg7zxRRiYZgb5mEKdHbl8QR5SRyv0hVIM.D.6eBucCiWRklUg
5FjsxLY0K3mPYCloZw6OU6PxmqnVsKLbV2+AeraJUD4xOw3E2WSWJsyJBlLG
LK.ka9J17YTzbPvG0K4eu8V8GytLnVJHqVP3EShT32hznzoQJ7PH07xOFJQv
XMvv.fAkYWCTZcnqqZlDlQS.SzzvL5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
HCCT6New.KQ8Q2EA5NcCfdll6tzn.WzarOBBRcHvNxGoPQotTgMxGRJ50J7B
BdsjThKVOeHn7WKDk9pY6hcJdvGBxA4D6iHbWnPD6ilQNwJZbKh8Jep1yWb+
oit65Q5kk6Fop5QZcS261nRJ1wOHLsaxlYtkws2Z1LPXM8QV+7siPpUzPkJB
k5ytVS68oD6dgB2HTMt3srNNGJigRjlCXZO9h6X92thI9SIQ11b+Gn7VK4Yk
MXMQwKdrgaQwZVY4RQoU8FxesmOcn8ocG0U314dW.XdTNFByTFw4HHJMJwbk
5h33A0l6VCreQXUOHPjdp3jnTbr4prHTLReEXukEsSV.XtUBf7L.1dkZHnRV
CWFgWXYaGM3z9BqpEUh59H.0Ry2N+VonnlrhQsGA5XR5y5h6pUOc645E1YSM
azneMCiSG6L1n+QptLmvVEbZaJJMAmBMljLLBZLN38rKuPy4dNbO6D7os9Ws
FW0VlemnbUvuKz6JjcLK+vMZemYq1842dRU9.92Nk76Wycc6YOPq7i2T+9p3
vMupKF5rKBLOK1+HzUK84gTv+CQZ+IQ7873CjGOwOD7cCXoOUTvwC08qGj7T
pKAqe2Q5mBxJ6c.LJ3OnEskjNJDu721CKV7cmlqYetlkk6sjr+tojonp9WZd
rGyOMvRXNa0Qe3Icwddzuqrkd7J1jkKUBXjuAA0AAZORxVdp4cwE9VAeeMkx
OaMDnUoXj9O8UvjLEMZupbsaVPqeup47YqaZCEvDYGmGAiM1Q3vH6yWAsaxx
7aMn0vlpt9JleRha+2a+OYKrDFC
-----------end_max5_patcher-----------

best
-e

1 Like

In the past, I did something similar to the 2nd approach proposed by @fraction.
Except I was using the “time_secs” message to jit.movie~ instead of “frame”.
It might not be perfect, but it was doing the job for my project.

Best,
T.

1 Like

Thank’s guys for all the help, I have managed to get it to work.