Sample playback issues with play~ and line~
I'm encountering a strange issue when working on a max for live audio effect. When playing back audio from a buffer~
using the play~
object, the resulting audio is played back at a slightly slower rate (and hence, also out of tune with the original audio recording).
For example, when I try to implement the simple record/playback patch from the max/msp sampling tutorial 1 I encounter this issue when attempting to implement the "variable playback" shown in section 4 of the tutorial patch. When I send the 0, 2000 2000
message to the line~
object to playback the audio at the original speed, it actually plays back slower than the original. In order to get it to play back in tune with the original audio that I recorded, I have to change the message to something like 0, 2000 1850
. This behavior started happening today, seemingly out of nowhere. Over the previous few days, while learning how to record and playback samples, I had not encountered this issue.
The audio plays back at the correct speed when I use the "simple playback" approach shown in section 3 of the tutorial patch.
Any suggestions? Thanks!
One other wrinkle I just discovered is that this issue only happens if I have the M4L patch open in max. When I use the patch as an audio effect in Ableton without actually opening the max device editor, the recorded samples playback at the appropriate playback speed.
Sounds like a sample rate discrepancy... Is it the same sampling rate when you hear the difference?
Oh, I think you're right! When I change the sample rate in Ableton to 44100, it seems to fix the problem. Thank you!