0
$\begingroup$

Just getting into Blender and Python. So much capability! I came across zeffii's answer but I'm getting a nondescript error.

Get raw sound data in Blender using python

I created a "Plane" and baked a sound onto the X location. The Plane moved as expected when playing. But when I ran the script it gives me an error and highlights the last line. It says to check the System Console which Blender does not have, unless it's the Python Console. Anyway, there is no error message to help me find the problem.

Zeffii did say, "you bake a sound file to its location keyframes". He used the plural of keyframes so I did bake the same file onto all three location keyframes, x, y, and z, but no joy. Same problem.

Perhaps there is a compatibility issue between the version of the script zeffii wrote (over 4 years ago) and the latest Blender 2.81a. Anyhoo, any thoughts?

I'm hoping to get to the point where I can separate the frequencies in my audio and move various objects using each frequency. OR, better still, I want to use the frequencies to adjust shading on an object, but first things first.

Thanks!

$\endgroup$
  • $\begingroup$ Replace scene.objects.link(obj) with scene.collection.objects.link(obj) The script does not separate separate frequencies, rather makes a mesh from the sound baked fcurve data. See blender.stackexchange.com/a/30786/15543 , once again this if for pre 2.8. Replace cursor_location with cursor.location. (and make sure the filepath is correct for audio file on your system) Also read blender.stackexchange.com/questions/6173/… $\endgroup$ – batFINGER Mar 18 at 0:29
  • $\begingroup$ You can find the "System Console" where errors are shown under the "Windows" menu "Toggle System Console" (last entry in the menu). It's not the Python Console, no. $\endgroup$ – Xylvier Mar 18 at 3:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.