2015-09-26 00:10:01 (edited by magurp244 2015-09-26 00:40:39)

Hey everyone, as some of you may or may not know, i've been porting Peter Meijers Sonifying code to Python and playing around with it. I thought i'd take a moment to share some source and examples for anyone else that wants to mess with it. The original source is licensed under a Creative Commons Attribution 4.0 International License, free to share and adapt for any purpose or use commercially provided that in all places where you describe or use the functionality you give credit to the original author and a link to his site: Copyright © Peter B.L. Meijer - http://www.seeingwithsound.com/im2sound.htm.

You can download the example scripts here.

The first example is a straight port of Meijers C code into python and doesn't depend on any 3rd party API's. The second example uses Pyglet to convert an external image into sound, which you can substitute for whatever you like. The third example converts an external image and pipes it directly out the sound card using OpenAL. The OpenAL segment of code works with either Pyglet or PyAL, but you'll still need pyglet to load and convert the image data.

Edit: Fixed a small bug in the 3rd example and added a 4th example script. The 4th script is the same as the 3rd, but optimized with Numpy arrays for a performance boost, you'll need Numpy 1.9.2 along with Pyglet and/or PyAL to run it.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2015-09-30 08:02:03

Interesting, thank you. I quickly tested your scripts. v1 and v2 are working. v3 couldn't because I didn't install openal yet. v4 couldn't work either because I didn't install numpy yet.