Forums > MaxMSP

Question about buffer~

Jan 15 2009 | 3:40 am

Hi I was wondering if anybody might be able to look at this patch to explain to me why when connecting these objects in this manner I get a distorted ring modulated sound instead of clean audio. This setup worked, producing clean audio and the desired effect the first time I hooked it up, but now it’s not.
It’s just

adc~ to Poke~

Count~ to inlet 2(index) of Poke~

Count~ to index~ to EZDAC~

Does it have something to do with the buffer~? it seems to get distorted when I change the size to anything but 0.

I can’t seem to figure out how to save this in the other text format either, so here it is long format.

Thanks in advance for your time and attention.

— Pasted Max Patch, click to expand. —
Jan 15 2009 | 4:13 am

Edit – Copy Compressed


Jan 15 2009 | 5:59 am


It’s not super obvious to me what you’re trying to do with this patch.Are you looking to just play audio through the patch and record it at the same time?

Maybe the record~ object would be a more straightforward way of achieving this.


Jan 15 2009 | 6:14 am

Yes. so that I can layer loops. I know I could use record~, but I was just experimenting with these objects to try and create an overdubbing effect. It actually worked the very first time I tried it, by feeding the index~ back into the Poke~ input. But then every time after that this kind of ring mod distortion, unless I bypass poke~ completely. I can’t figure out why it’s happening.

Thanks for taking a look!!


Jan 15 2009 | 6:17 am

yea, i agree with andrew, record~ or even sfrecord~ might be just as applicable… and it’s not completely obvious what this patch does since it plays and records at the same time constantly erasing what was previously recorded every time you play. Essentially, the patch just sends input straight through to the output(at least as far as the resulting sound) which makes me wonder if your particular problem might just be feedback? Because when I put my headphones on and just record normally from the computer mic, i don’t get anything sounding like ring-modulation or distortion even when resizing the buffer(i tried buffer lengths of 50, 1000, 2000, and 5000 and everything worked fine). Sorry i can’t help further but i did add separate play and record buttons so that you can hear what you just recorded before recording over it again and that might help you test whether it’s the recording or the playback on your comp(on my comp, there’s no probs whatsoever, though). also, you might want to mess with your vector sizes. sometimes i get a ring-mod type sound when i have a really small vector size and other CPU-intensive processes cause the playback to become choppy.
anyways, here’s the modded patch:

— Pasted Max Patch, click to expand. —
Jan 15 2009 | 6:32 am

Ah i c, you want overdubbing, sorry, just read your message posted right around the same time i posted my last one… in that case check out the endless-resampling patch by AndrewB@C74 pasted below which was copied from this thread:

— Pasted Max Patch, click to expand. —
Jan 15 2009 | 7:25 am

Thanks for the posts! The last patch is exactly what I am going for, although it seems a bit more complicated. What is the difference in using phasor~ to drive as opposed to count~?

I did get this one working. The vector size did happen to be set to the lowest setting. I also added another gain stage and that took care of the problem. Now it’s overdubbing quite well. Thanks again for your guidance on this!

By the way, how does one save compressed text?


Jan 15 2009 | 9:24 pm

great, glad i could help. about the phasor~ vs. count~ question: phasor~ allows you to loop the recording process more smoothly, whereas count~ will count beyond the length of the buffer~(recording nothing beyond that length) until it is manually reset again.

regarding the compressed text:
‘select all’ of your patch, then in the ‘Edit’ menu select ‘Copy Compressed’ and then paste it wherever(i think andrew was describing the same thing in his earliest post to this thread).

best of luck!

Jan 17 2009 | 2:03 am

So I just found out that when count~ is stopped, it is not actually shut off. It just continually sends out the sample that it was stopped on creating the ring mod like distortion.


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

Forums > MaxMSP