noob: playing/pausing a video from a binary 1/0?
I’m a complete beginner @ MaxMSP ( and fairly new to programming too! ).
I’ve got a bank of flonums equaling either 0 or 1, depending on earlier variables… if/when a flonum equals 1, I want it to play it’s own individual video, if the flonum then changes to 0, I want the video to remain on-screen, but paused until the same flonum next equals 1, when it would continue from where it left off.
Does that make sense?
I’ve messed about with VIZZIE, but can’t get it to react to a binary on/off.
Many thanks in advance!
Not sure what part of Vizzie the "it" refers to, but here’s the deal: Everything that passes between data inlets and outlets in Vizzie is a floating point number in the range 0. – 1.0. Everything.
Since that’s the case, using 1. and 0. to turn things on and off may not be useful, so *all* Vizzie module inlets understand the words "off" and "on."
If you send an "off" to the video inlet of a Vizzie module, it’s like honking on the pedal of a stompbox – the effect stops and the movie passes through the module without being modified.
If you send an "off" to the data inlet of a Vizzie module, It turns the inlet "off" – no data it receives will change anything until the inlet gets an "on" message. Characteristically, this can be cool for creating jumps/starts/discontinuous effects.
Since Vizzie is nothing more than a bunch of Max patches, you could certainly use something like this to convert 1. and 0. to messages that would turn modules on or off….
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 800.3oc0W0sbhBCE9Z7ofgqcc.DPcuaeN5zwIBG0rKjvPh1tam9tugj.RPRE sc6ZunRyIIm7c9N+k7xDGuMzmAlm62cev0w4kINNRQ0Bbzic7JPOmliXxk4U .LFZG3MUMGGdlKkGLqQD4PAljCb45C0BKQ7z8Xxt0UPJWcdAqhm4O0MX975O yCmEKFrblu6i58fyjZlt4meKHrQ6aoDNAU.xo9QEFk24boG3MGbfVpRD+2kf 5T87Z0espX3+HmHHbleszWmLo9mouS1fRtZ1HTxFgIQ0eh8kTiM1H3qEa3e8 wFwKFcrwp6Sxf.OIP2YbQoK6IrvdgJJcPVI3hrRnhUVrTNveXVYwm.qzEoPk lKzjgX03b3HTwvhjgS52w6j8rJQ4cklSRjLlOZYGCRvw6xoo+Bj1keivLX6U oDZIPNsA4JL9wbkXRYEv.BGw0Pu6AiNjyWOLQXN+VTJXcyC5Pb71UgynjZPX ryZwMGWcTfL0HtKtkqffJGXybJMeCp5Hlg2jCFdBQ.LhfKPbfiU3Izuce3hx JLganKffD5XOKshlmanJ0LGGXlL3HNEdBmw2K00I1xn2SmHGiTKC48RwTgpM rmsLIqYSKkgLAqjgA5xucY0dYTI8NnN4N9clIkVT.JdyyqQrr1g5eldiFqzt rZq9ixVWDNNSM1to1kTsWp3eJSX1lwRiWqsarQQgAIp7pkC2xoOGE08frmS+ tXvgZC8YPha2dqrXSRksF28Yw4esYQil7ljXk.Ufnbma6Miu4JT9x19Ki52u +r6Edqj472jLmp+6ZI0SsmxwDaU5klc87Cy1L5gpzFjnsQWSBHCXbLosY8Cs AV8V2dbVlYuQo6DmURE84zvy8wQEcbKnNXDnN5tB0wijqCtqP87Qh5j6JTG8 e.0ZgB3qtHOCcDxVKNEQEn0HNuBuQTCi0+h8u2a49FScoKXKdMvFTt9AGs5v PymgnAqToXA8S5jzoYQJ0K756D0uy67z6vtdEKdtEFq4LuVeOVnejr44p.4m jj1QJ21YOGcrfc0GOV6htOTrtXDXMvn35kAqAjDCdcxeALjAGLG -----------end_max5_patcher-----------
[if $i1 then on else off]
but greg, if you use symbols, one could as well use ints, as they are also not floats.
That’s true, but the basic idea with Vizzie (for better or worse) was to go with only three possible kinds of inputs: video, floats (0. – 1.0), and the words "on" or "off." Keeping it simple was in no small way informed by our experience with workshops and what constituted the same problems we say users having with Max. That’s not the only way to have done things, and I’m sure that someone else might have done it differently.
But in Vizzie, there’s only one numerical data type, and its range is set as well.
That said, I think we’re going to add a "read" message to the PLAYR. SO there will be four. :-)
sorry. "…problems we *saw* users having with Max."
okay, so at least there are really only these two (or four) messages, then it makes
sense to use messages.
but watch out that vizzie keeps remaining compatible to the 110.modular industry
standard or you might loose your patching license.
Thanks for your help guys… most of that makes sense!
Converting 1/0 to on/off is simple enough, but how do I send a "start playing" command to the PLAYR module? I know it’s a daft question… but I can’t fathom it out! Is Vizzie the correct thing to be using, or is there an alternative?
according to greg there are four commands: "on", "off", and "read".
Forums > MaxMSP