Jump to content
Thomas Helzle

Python Audio Import...

Recommended Posts

After a request from @srletak I post my python audio import HDA here.

This is the original post this was used for: 

Multiple qualifiers apply:
- This was my first python script and I somehow do not really agree with this funny language so far (was raised on C...) so it's really hacked together without me knowing what I do.
- I didn't know where to put the library I used for import so I copied the relevant part into the script directly.
- This is the library: https://github.com/mgeier/python-audio/blob/master/audio-files/audio-files-with-wave.ipynb
- I only wanted to load 24Bit, 48KHz, Stereo Wave files, so that's the only thing it deals with - one small sample .wav is included.
- I didn't understand how to make python read a spare parameter so you have to go into the code of the HDA and set the path to the audio file manually (I marked the line in the script).

- Since geometry generation with python turned out to be abysmally slow, I removed the code for that and only import the points and some file info (see the detail attributes).
- There is one group for the left channel to help separate left and right.

The included .hip file does nothing but load the HDA. You can then go into the code (rightclick the node -> Type Properties -> Code) and enter the (absolute) path to where you put the audio file.
This gives you every sample of the wave file as a point in space for further mangling.

I'm sure a real Python wiz can do a much better job, so if you improve the script, feel free to post it here or do with it whatever you want.

This was created in Houdini Core 16.5.




Share this post

Link to post
Share on other sites

@Thomas Helzle I can’t thank you enough.

Noise and regular C3. Now imagine just on the tip of the box or circle, Fifth (  or harmonic minor) that stretch along normals and then connect those points. .Thanxxxxxx


Edited by srletak

Share this post

Link to post
Share on other sites

Cool it works for you!

I wanted to apply a FFT to the audio to be able to extract frequencies and the phase etc. but haven't been able to find an OpenCL (or other) solution for that so far (other than the strange CHOP-stuff which works up to a point but not how I'd like it to)...



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now