Kineme read file + reset values

kundi's picture

Hello,

I'm working on a simple patch which would read cordinates from a file using Kineme struct from file when I trigger the signal.

I also want to have another signal, which would reset the cordinates, which are being sent to a patch that accepts cordinates.

I have no idea how to make it so that when I trigger the reset signal, QC would reset cordinates to default values, if I would trigger the "read file" signal it would read cordinates from file and send them to the patch.

How should I do this on elegant way?

How could I check if there is no file (if no signal comes from Struct read from file patch when the read signal is triggered) so that QC would automatically pass default values to the final patch?

Thanks a lot for help

usefuldesign.au's picture
Re: Kineme read file + reset values

How many ways can you skin a cat? haha… There are a few ways to do this and depending on the subtitles of what you are making I would lean to this or that solution. The most simple I can think to explain is to use multiplexer patch(es) to choose which co-ordinates you send.

Use the triggers and either a logic or maths patch to control the multiplexer index.

Also it's good to post a comp showing you workings so far — even if it's not working as you desire, a .plist tells a thousand words!

Try playing with this an repost your version if you can't do what you want with it. There are often other ways to do it in QC, of course.

Another way is to put all your values into structures using files/JS/Kineme-Structure-Tools-Patches and just set a single Multiplexer Patch to "Virtual" (anything) or "Structure" and then split the structure open to get the data after the multiplexer.

PreviewAttachmentSize
Multiplexers switching presets.qtz19.95 KB

usefuldesign.au's picture
Re: Kineme read file + reset values

It happens I need something sort of like this myself ATM so I made a demonstration composition about how to handle all the file read/write/load-error logic. It's a good deal more complex than the file I posted above so look at that first to get the basics down.

When you want to polish QC compositions for interaction, control or state logic and meaning feedback, it actually requires quite a bit of noddling around since there are no basic UI elements ready made (in Leopard anyhow and SL not much better).

Anyhow it is in the composition repository. Instructions on how to test for file loading errors with this comp are over there, please read them.