help: Using RFID tags to trigger 4 audio tracks which need to play in sync
I'm just wondering if anyone can help.
What I want to be able to do is have four parts of an audio file which play simultaneously and in sync with one another.
And then have it so that you can turn the volume of each track on and off by placing an RFID tag over a reader. (in my mind each part of the track would have its own RFID reader).
This seemed like such a simple thing to do with maxMSP to me, in theory, but I am relatively new to max and might just be missing something obvious.
However so far i've basically only mannaged to produce an elaborate on off switch for 1 audio file. When what i want is a nice fade in fade out switch for 4 audio files, add to that that each one has to be activated by an RFID tag/reader.
Any help with this matter would be very highly appreciated as I'm really quite stuck. my patch so far is below :D
mrmathew
I don't have the [PhidgetRFID] object and don't know what you expect from it... but the volume thing is easy to do. here is one way. all you need to do is send it a "0" to fade out over a set amount (right now 5000 msec) and a "1" to do the opposite... have a look at the line~ helfile if you haven't already.
"However so far i've basically only mannaged to produce an elaborate on off switch for 1 audio file. When what i want is a nice fade in fade out switch for 4 audio files, add to that that each one has to be activated by an RFID tag/reader."
Use the reader (Phidgets?) and route each RFID index so you can turn on/off the audio for each of 4 sfplay~ objects (one for each part of the file). You can use cues (sflist~) for each part of the file, or better, just cut up the file elsewhere and save as 4 separate files, this would be simpler.
Use a line~ to fade in/out each when it's activated. Use a toggle for the line~, [sel 1 0] will either ramp up or ramp down the volume. Also look to matrix~ with a gain setting, this may be easier still (one matrix~ for each audio file, just one cell is needed for a ramp on/off). Or there's gainfader~ which can have a built-in slew (fade) time by setting the right inlet. So a "1" will set it to level 127, a "0" will set it to 0, just as if you clicked the fader manually. They will all do essentially the same thing: fade your audio signal up or down, over a certain timespan.
Check the ID values coming from the RFID reader with [print], then you can set [route] as needed. When I used the Phidgets RFID reader, each was a unique ID. As long as there aren't spaces in the ID you'll be fine just putting the relevant ones into [route] as arguments.
BTW I love your pic, looks like you're saying "whaaaaat?" :)
@ MIB thank you so much, this patch does exactly what I need each audio file to do, I'm only using the RFID tag(s) and reader(s) as a switch in place of a mouse click really.
Will also take a look at the "line~ helfile" as I haven't got to that yet.
You've been a really big help :D
Also thanks @seejayjames for all the really useful information, I really struggle to know what I need to be looking for in the help section as there's so much of it and I'm not familiar enough with the programme yet. many many thanks.
+ I think "whaaaaaaaaaat?" is what I've been thinking alot over the last few days (reguards my profile pic).
will let you both know how I get on and once again many thanks to you both.
mrmathew