# Animation nodes - animate object attribute/transform with Object ID Key and Sound Evaluation

I have followed several tutorials using the ID Key function in Animation Nodes to change the size of the objects. I'm trying to set up the nodes so I can use the spectrum from a sound clip to animate objects based on their ID Keys. But I'm completely stuck and need some help to see what I need to change.

I had read that the Spectrum Falloff type in the Sound Falloff node is based on the indices of the objects. So I thought by replacing the Evaluation Sound node with the Sound Falloff would solve my issue. But it doesn't seem to make any difference.

Any suggestion how to solve this? Thanks.

[Update] After adding the Get List Element node, I've changed the sorting for the ID Keys by either random or by names. The playback did not change. The images are all at frame 30. I'm including my blend file as well.

Sort by random 1

Sort by random 2

Sort by names

Blender file. SoundSpectrumCubeTesting

## 1 Answer

Your example index list is $$(10,14,3,\dots)$$, which means you want the 10th object to scale based on the first frequency band, the 14th object to scale based on the second frequency band, the 3rd object to scale based on the third frequency band and so on. So, if we left the sound data untouched and reordered the object list such that the first element becomes the 10th object, the second element becomes the 14th object and so on, we will get the desired effect. The same reordering should be done to the object's locations. This reordering is easily achieved by getting the objects and their locations at the ID indices:

• Thank you. What you described is exactly what I want to achieve. I uploaded some more screenshots and my blender file. I added the Get List Element node, but I don't see the change. Could you take a look and let me know what other settings might be wrong? Much appreciated. – fuzzcats Sep 28 '18 at 13:21
• @fuzzcats My bad, I forgot to say that the object's locations has to be reordered as well. I updated the answer. See the new example. – Omar Emara Sep 28 '18 at 16:26
• YAY! Thank you very much @Omar-ahmad! It worked! – fuzzcats Sep 28 '18 at 18:56