How do I convert an img of a wave to a waveform

Is there an easy way to go from a bitmap image like this to a wav file? I have one black pixel per x with a certain y height and want to convert them into a sample.

2 Likes

I got help over there from a friendly blender user. Just in case anyone wants to know, too :slight_smile:

2 Likes

Hello,
This is very simple using the tool.
But why ? Pixel perfect sample? ™
It seems faster to me by drawing into the sample buffer.
This way the sample will have a length according to the pixel width of the image and the height of the images will be interpolated to -1 … 1.
To be clear, I’m not bashing it, I’m just wondering why.
For example: creating a wave in matlab and transferring it ?

The reason is simply that I am not very experienced with scripting and file handling etc. So I followed a crumb of codesnippets and now I that it works with any image and a .wav file, I am trying to read out the height-value of each point in my generated wave curve in order to directly plot it into the wav file. I doubt a lot of people will find this useful, but I want to get more accustomed to scripting and the API stuff. I learned quite a bunch on the way. Right now its a little like the overtune tool but in blender :slight_smile:

Hello,
quick try
I don’t want to expand it in any way, but here is a short video.
I only tested it on your sample. I don’t know if it will work on another, probably yes.

cz.martblek.Img2Wave.xrnx (4.6 KB)

Only BMP images are allowed :slight_smile:
Slider sets precision for pixel color.

3 Likes

Ha! This has been a fruitful sunday :slight_smile:
Thank you for spending your time on this.

:heart: :registered:enoise