So I want to make a mesh surface based on a wave file. I have been trying to convert sound to curves so I could extrude it to a mesh plane, but I am relatively new to Blender so I am not sure how to do this. Do anyone have any suggestions for a solution?
You can do that with the Animation Nodes (AN) addon.
Make a new AN tree.
Make a Sound Bake node and load your sound. Then click on "Bake".
Create an "Evaluate Sound" node and set its Frame Type from Offset to Absolute. The sound object you baked should be selected automatically.
Create "Loop Input" node and connect the Index socket to the Frame input.
Click on the plus icon next to New Generator Output and type "Vector List". This should create a new node that you can move to the right.
Connect the "Strength" output socket with the "Vector" input. A new "Combine Vector" node should appear inbetween, because a vector consists of 3 values and the Strength is only a single value. Reconnect the sockets like in the image below.
Insert an optional Math node to be able to control the width of the curve.
Create a "Invoke Subprogram" node and choose the loop you just created. Then set the Iterations socket to the number of frames you want to have in the final curve (too high numbers can slow Blender down, you may want to uncheck "Always" in the toolbar so that AN doesn't recreate the curve multiple times every second)
Create a "Spline from Points" node and connect it to the Vector List output of the other node.
Create a "Set Splines on Object" node. Then click on the little plus icon which will create an empty curve object in your scene that you can use as output object. The last step is to take the Spline we created before and put it on the Curve object. If you do this connection a "Create List" node gets inserted automatically because the Set Splines on Object node expects multiple splines (but we only have one, so we create a list with one spline).
Now you should see the curve in the viewport. You can just remove all nodes now or just make a copy of the curve in order to edit it further.
I've done this myself in the past, but the way I did it was fairly indirect. I loaded the file into Audacity, and took a screenshot of the audio visualization. Then I opened that file in Inkscape and cropped the screenshot to just the part of the audio that I wanted. I traced the image and saved the file as an SVG. I then imported this SVG into blender. Here's what that looked like when finished.
If you need help with the intermediary steps, let me know. None of the steps are overly difficult, but using an unfamiliar program can always be a challenge. :)
Hi I dabbled with this in 2013 as part of my Sound Drivers (then Speaker Tools) addon. The code required is still there (soundsurface.py) but needs to be run & edited manually, once the addon is installed.
I did get as far as wiring up the curve surface, which is a nice way to demonstrate how this is done.
A wav file (batman.wav) is associated with a speaker and then baked using default settings across 16 frequency ranges to custom properties (the channels) AA0 to AA15 into action
Clicking on the actions button in the visualisers toolbox gives me
the 16 frequencies as curves, which gives a nice vis of the "surface". This is simply the fcurves baked to a curve.
The following code uses the fcurves of the action going in the time directions and adds a crossing action to give me grid points, from which I created a displacement map, (top right hand corner of image below) which then used on a subdivided grid to give the surface effect.
The script to produce the displacement map is included in the sounddrivers addon as "soundsurface.py" and needs to be opened and run from the text editor.
This part needs to be edited, you will need to edit 'SOUND_AA_batman.wav' to match the channel and wav file name you use, and the settings on image size and frame step can be played around with,.
action = bpy.data.actions['SOUND_AA_batman.wav'] sound_surface_texture(action, bpy.context, frame_split=1, image_size_x=1024, image_size_y=1024)
All going well you will end up with an image named "SoundSurface" which can be applied to a grid as a displacement map texture.