Help with a multi layer recorder (using count~ and poke~)

F_Dos's icon

Max Patch
Copy patch and select New From Clipboard in Max.

I try to build a simple multi layer sample using this basic patch.

The size of the buffer is set to 10 seconds(10,000 milliseconds) but it actually recording only two seconds. I guess it is because the count is set to count from samples 0 to 88200 (?)
How can I make it record 10 second long ?

another question regarding the count~ object - what is the function of the third element ( the number 1) - I changed it to a different number and did not notice any different in sound.

Thanks for helping!

👽!t W∆s ∆lienz!👽's icon

I guess it is because the count is set to count from samples 0 to 88200 (?)

correct. so just take your sample-rate and multiply it by 10
(at 44.1kHz, multiplied by 10 = 44100 * 10 = 441000) and enter that number for the second argument.

what is the function of the third element ( the number 1)

it decides whether to start counting right away as soon as audio is turned on, or to leave it off until you trigger it... you probably know this, but just in case it helps, the way i find this info. is go into the helpfile, then click the 'Reference' doc icon on the right-hand toolbar(if you're editing the helpfile and have selected other objects, you might need to make sure the count~ object is selected to see info. specific to it), and then select the 'argument' entry you want to learn more about and info. will be displayed in the bottom section like this:

hope it helps 🍵

Roman Thilenius's icon

to fully snchronize a bunch of such objects,

- turn audio off
- start things like count~
- turn audio on again

F_Dos's icon

Thank you both! you made those things clearer to me!
And just to be sure I understand the count~ function.
it count from an initial value (0) to whatever number - lets say 88200.
what excatly it is outputing? and it seems it output a pulse with a value greater by 1 for each sample (?)

So if my sound card is at 44100 sample rate and I'm using count~ from 0 to 88200 - it output a number from 0 to 88200 in the rate of my sample rate? the distance between those counts are related to my sample rate ?

Max Patch
Copy patch and select New From Clipboard in Max.

Thanks

Roman Thilenius's icon

it outputs a signal where the first sample has the value "0.0" and the seventh sample has the value "6. 0

it always counts in integer steps at samplingrate, that is all it does. that´s why it is called count~. :)

and the argument in samples is just the length. you could also call it the maximum count value, because when it reaches the max, it starts all over.

btw. (if i am not mistaken, it is early here) you should start with 1 for [index~], then it is exactly what [index~] expects to play the buffer from the beginning (the first sample of buffer is "1")

👽!t W∆s ∆lienz!👽's icon

(if i am not mistaken, it is early here) you should start with 1 for [index~]

just a small mistake here, no worries, just clarifying what you probably already know but was still too early to remember(all buffer~ memory spaces are 0-indexed, index~ will use the same system... the index~ helpfile also shows this)...
BUT! channel-indexing is very weird: in gen~ using something like 'peek' and 'poke' the channels are 0-indexed whereas in MSP, for some odd reason(see poke~ reference) they start at 1(i think they'll just keep it that way for backwards-compatibility...)... this might've been what Roman was remembering.