Just open the [pan2] abstraction helpfile and have a look. The [p anton] patcher contains a playback method using [groove~] and you can ignore the autopan bit. Just use the [slider] to control the panning location.
thanks everybody for your help. this forum is a great place to learn. Unfortunetally, I know only one person in Portland who knows how to use max, so these simple questions are very helpful in my learning process. I am now able to build patches, thanks to the max forum community. here is the pan2 object in action, for reference:
If you put the gain~ before the pan2 object, then you can still pan.
Or, you can put a gain~ after both outlets of the pan2, and connect the 2nd outlet of one of them to the 1st inlet of the other.
This lets one gain~ control the other.
You might want to take into account that the pan2 object attenuates the signal slightly when panned to the centre. So if you set the gain high, panned to the middle, you may be in danger of clipping when you adjust the pan.
Thats just a characteristic of the pan law of the pan2 object, it is possible to make one that has equal gain all through the left, centre and right.
pepperclouds wrote on Wed, 03 June 2009 18:07but there's a problem. my pan2 object has a left signal and a right signal out. when i hook it up to the gain, i can no longer pan my sample.
Hook all your left into one gain~, and your right into another gain~, then use one slider to control both. This will preserve the relative levels as you control the master volume. You can hide the gains~ in this case, just use a single master control slider. Also you can use a normal slider to control the gains~ instead of another gain~ if you want to limit the possible values, like from 0 to 127 (where 127 is 0dB), this could help avoid clipping. I always have one of these at the end of my audio chains, it's nice to have a single slider control the levels of everything while preserving relative levels.