# Beginner Help - Instance becomes single object with certain inputs

Hi all! I am still fairly new to TD and i am sure there is a good reason why this happens but for some reason, certain chops i add to an instanced geometry make everything merge back into a single object.

In the attached file, i know its something in the chain started with the audio in. its instanced to “translate y” and if you remove that, you see the individual geometry… but when “translate y” is set to Chan2 we get a single large object.

This has popped up a few times for me, and I cant seem to find an answer anywhere online. Any guidance to why this happens and how to avoid it would be appreciated!

I look forward to what i assume will be a glaringly obvious answer in retrospect. Thank you!!
Instance1.toe (12.0 KB)

Hey @dcastaldimicca,

this has something to do with samplerates and the number of values in each CHOP.
With your setup currently, you are creating 103.856 instances of the incoming rectangle geometry.

Probably not necessarily what you wanted - from the rest of the file it looks like you meant to create 128 instances.

The huge number comes from the audio. The incoming Audio Waveform has a sample rate of 44.100 Hz - which means that per second there are 44.100 values in an audio waveform. With TouchDesigner set to 60fps, the result is 735 samples per frame (44.100/60)
Feeding this into the Audio Spectrum CHOP will result in even more samples as each sample of the Audio Spectrum is equivalent to the amplitude of the frequency at this position: Sample 20 will show you the Amplitude of the waveform at 20hz. So now we are at 22.050 Samples.
As a next step you added a Stretch CHOP where you set the Length Scale value to 4.71 meaning the number of samples is multiplied by that value to now a total of 103.856 samples.
Merging it all together results in the final data being given to the instancing to have that length.

A straight forward fix would be to make use of a Resample CHOP. For this to properly work, turn the “Timslice” parameter on the Resample CHOP’s Common Page to off and choose New Rate, New Interval for the “Method” parameter on the Resample Page.
Lastly connect the select1 CHOP into the second input of the Resample CHOP and now by middle mouse clicking on it, you can confirm that the data has a samplerate of 60 with a total length matching that of the tx channel.

Also check out how you can use the Pattern CHOP to create the same values as with the Wave CHOP but have a simpler setup as it can use the length and samplerate of the input CHOP.