Forums > MaxMSP

Rotary phone patch assistance

Dec 14 2011 | 4:42 pm

Hi good people.

I am a newbie, and could really use your advice. Below is a description of what I’m trying to do, and what I am struggling with. At the very bottom, I have posted the patch.

I am programming a rotary phone in order to use the dial and headset receiver to trigger audio and video.
(the video is working, when the receiver is engaged, video plays. When receiver on hook, video paused)

Here’s the idea:
1) receiver on phone – ring occasionally (don’t have enough power to do this natively, so it will load a ring from a speaker)
2) pickup receiver, sound piece begins to play and will play until end, unless,
3) user dials – piece advances to next clip

What I’ll do is play clip 1, it will advance to clip 2 if user moves dial, or if clip reaches the end.
At the end of clip 4, the piece will end.
If user hangs up, piece starts again at 1.

The headset produces the #1023 when off the hook (in use), and a series of other numbers (mostly 0) when on the hook (not in use).
The rotary dial, likewise, produces the #1023 when engaged.

My idea was contingent upon translating the 1023 to a 1, and anything else to a zero (using sel object) and connecting that to a coll object that selects the audio track.
The problems is that this is coming in as a constant ‘bang’. My audio file is stuck looping the first second of audio as it constantly is resending this ‘1’.
I have tried to make use of a gate, but not certain how.

Summary of what I am seeking help with:

1. translating 1023 into triggering series of audio files
2. allowing these tracks advance according to ‘end’ or dial trigger, and stop at end of 4th track.
(currently the audio is cycling from 1-4 in rapid succession, which is the same problem – no time to actually play the track).
3. playing the ring audio file 3 times at ever 15 seconds when phone is off the hook, disabling when phone’s headset is engaged.

Many thanks!

-- Pasted Max Patch, click to expand. --

Dec 14 2011 | 9:43 pm

put a change object after your message boxes with the 0 and 1… this will filter out the repetitions… should be good to go!

-- Pasted Max Patch, click to expand. --

Dec 15 2011 | 3:55 am

Thank you, thank you, MIB! Will try this out. Might have a few more questions then.
Really appreciate it.

Dec 15 2011 | 4:48 am

This reminds me of a piece I was doing with an anonymous Hasidic fellow in Williamsburg. Best of luck!

Dec 17 2011 | 5:16 am

prismspecs, I venture to guess I know you. Is this project you speak of before or after you were occupying maxmsp? ;)

Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP