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
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.
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 692.3oc2WsrbaBCEcM9qfQcWGWO5AhGsq5OP+A5zoCFTHzAK7XjacRlju8ht HbLNw.FHjNcCftRHNmitu3gEVn04GDEH6Oa+caKqGVXYAlzFrLisPaBODkEV .KCsQTTDlHPKqlSINn.6jk1XaNFiqmQteSpLSnfWiZLdStTUjduPaiPWgeds 46U0KlXrVYRc2VQE.QH6eXlZanJ51TYxO2IhTUyRbbJ2OaZfdascI5qD+U3i ui9aKC2.aF5q6RCypgZZLXKe8u9Dggz1dbwB8kkiTTzP3cUTnX+oPTnCQTjh +T9xuPSJDYkdJjWUQHWihvtjhrNTlfV978d41vc02bfqT70pPACQfT4IIYhV Ehd5CjJU8hjLRM8NijmPE+I7r9iO8F53WjlHKOLZi2bOMSYtPP.ithOjyV2+ iDDJqRPBFifvmPAIKUJl.Mg1glTmMnGAILpwoYXYBX+amIvgCz547bWNQ.gL kkBy2JjuaUAAudJA3NyaXEAclxZf2rMK7tmro8WQHq3AbhuWqkBixyx2Y7l0 rDuxO.SBb0OgMOQNg3sDtbEANF40GBe7GXbCkUarH720v4CeCfRkZAkxK25R JPwAtZ5UYA8kR3MfCGw8wgQGS9jkGoSdVJ+bdamJMUdbWxhiGz5E+30WKTi1 nAKXEPlwy5LG9HZ6MIUQ99cQ0RloeMc230enXQgJUFpRykmrHVi0baZbrPdJ i1jFuMuLchACThmtZAi.0RIb1wQWP66KXCP5ljaGqmQnNAKw0qxkDPoA5vnQ BVBa5U1IP+5BQj4ER98.RAyJh5ywlaCGwt8wLg.U8X5CkRgAy.T4CFp75+wA FLRn51CnRoWGVGIj38ERymumtxVmY3bmeH0Gmr4CRkca1iStqLOF2AR76A2L +tidvHwpya.Ta.oxAOt3un6GuAI -----------end_max5_patcher-----------
"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.
Forums > MaxMSP