how to overlap samples(same length) in to one buffer?

May 20, 2013 at 10:26am

how to overlap samples(same length) in to one buffer?

hi,everyone.

I’m trying to use a ADC~ object to record a segment of sound running for 4’33”, then continue to sample the same segment of  sound from the same environment for the same length over and over again into ONE buffer~, in other words, the total length of the final piece should always be 4’33”.  Here is my question: How can I manage to overlay the multiple samples automatically in real-time ??

 

thx very very much

#249955
May 20, 2013 at 11:26am

So you are doing a mashup of 4’33″ and “I am sitting in a room” ?

At any rate, I would go to a double-buffer scheme. It’s not _that_ much more memory, and makes this a fairly tractable problem.

#249964
May 20, 2013 at 1:10pm

Thanks for mentioned “ I am sitting in a room”,or I’ll never know the great work of Alvin Lucier. this is the address of the piece: <   http://ubu.artmob.ca/sound/source/Lucier-Alvin_Sitting.mp3    >, if anyone’s interested.

 

yes , i do use two buffer~s ,but i can’t figure it out how to add one sample into a buffer which already been added all the samples before, meanwhile the overlapped one is been play~ing/groove~ing.

 

sorry , my english is no very good. i hope everyone can understand what i’m trying to say. this is emergency! thanks again!

Attachments:
  1. Untitled1.maxpat
#249972
May 20, 2013 at 1:42pm

I haven’t looked at your patch yet, but I liked the idea of the build up of 4’33″ so I did this:

<code>

– Pasted Max Patch, click to expand. –

</code>

#249977
May 20, 2013 at 2:36pm

litter.nada ?

#249985
May 20, 2013 at 3:45pm

chris muir, thanks a lot! this patch is really helpful!

but one problem is ,how can i control the samples under an appropriate volume? anyway, we don’t want to get a pure noise if some loud sound is sampled.

this is my solution , but if adc~ captured a loud sound, it will suddenly decrease the volume a lot .

Attachments:
  1. chong.maxpat
#249997
May 20, 2013 at 3:46pm

.

#249999
May 20, 2013 at 4:09pm

Putting a compressor on the input might help, but if your source is loud enough to clip the input, there’s not much you can do about it.

Normalization seems like a bad idea. It will bring up the noise floor immediately. Also, when Sample_A is recording, it is mixing with Sample_B and vice versa, so there is never really a “safe” time to normalize.

#250008
May 21, 2013 at 9:12am

thanks chris. it seems this is not a “safe” patch, we can’t control each element that ADC captured. but it still worth a try. I’ll add some modulation on the final sample, make it more comfortable to audiences’ ear.

 

and thanks again :>

#250086

You must be logged in to reply to this topic.