Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
databending and raw import settings
#1
Hi all,

I have been trying to find image software for Ubuntu that can replicate a databending process I figured out on my mac. I used GraphicConverter 11 to import a .wav file as raw data, transferred the resulting image to GIMP and modified it, exported that as .bmp, and then used Audacity to import the .bmp's raw data, coming full circle back to audio.

I got my best results when I imported the data as a Grayscale image in Unsigned Long format.
   

With those specifications, aspects of the original file were recognizable in the altered version, and it was not totally destroyed. As a matter of fact, the end audio only differed significantly from the original if I actively edited it in image form (the IWarp effect is great for this). This process yields a very clean transfer.

I now have a new laptop with Lubuntu 18.04.5, for which GraphicConverter is not supported. I tried importing raw data with GIMP, but the import settings do not seem to include Grayscale or Unsigned Long. I've tried a few other image-editing applications, including Converseen, UFRaw, and RawTherapee, but I haven't found anything that will do what I need. Is there any way I can get GIMP to do this, and if not, is there another program for Ubuntu that may work instead?
Reply
#2
File>Open, select file type "Raw image data" (corresponds to .data extension) and then you have a dialog asking the image size and how to interpret the bytes in the file.

   
Reply
#3
(08-26-2020, 06:45 AM)Ofnuts Wrote: File>Open, select file type "Raw image data" (corresponds to .data extension) and then you have a dialog asking the image size and how to interpret the bytes in the file.

interesting- when I get to the dialog it still doesn't give me any of the grayscale options. I notice, however, that you're using GIMP 2.10 and I'm only on 2.8. I'll install the newer version and see if that fixes my problem. Thank you!
Reply
#4
update: It works!

For any interested in trying this themselves, this is my new process: Import settings in GIMP 2.10 should be "Gray 16-bit Little Endian", and the image's horizontal resolution should be a multiple of 20 (I don't understand why, but it works best this way). Normally, audacity will read the bmp backwards, but it will read the rows of the image forwards, which leads to some interesting distortion; if you wish, you can avoid this by flipping the image vertically before exporting it. The raw import setting for Audacity should be "Unsigned 8-bit PCM", and I haven't been able to detect any difference between Big or Little Endian in that stage of the process. The resulting wav file will be several times slower, but you can fix that easily by speeding it up.

Many thanks, Ofnuts!
Reply
#5
0
(08-26-2020, 04:54 PM)belgiumlimp Wrote: update: It works!
This sounds awesome. I've been trying to import a raw file I exported from Audacity. I can't seem to get any of the screens to come up that you all have posted. Any chance I could get more of a play by play approach?
Reply
#6
(10-31-2021, 11:32 PM)capncrockett Wrote: 0
(08-26-2020, 04:54 PM)belgiumlimp Wrote: update: It works!
This sounds awesome. I've been trying to import a raw file I exported from Audacity. I can't seem to get any of the screens to come up that you all have posted. Any chance I could get more of a play by play approach?

Can you post your file somewhere and provide a URL? Or it's small enough, put it in a ZIP and attach the ZIP here?
Reply
#7
Just compiled these screenshots, not wasting them, Ofnuts never reads them anyway Wink

Importing your Audacity RAW file gets screwed because Gimp now assumes a RAW graphics file.

(1) Export from Audacity 'something.data' Audacity will query the name, just OK it.  Use the settings as previous post Raw (headerless) Unsigned 8 bit PCM
(2) Gimp will open that .data file and bring up the dialogue. Set width multiple of 20 as previous post
(3) When you come to export that, the defaults seem to work here ( I applied a motion blur to the image )

   

(4) Into Audacity and Import as Raw Data
(5) Choose the .data file 
(6) Set Unsigned 8 bit PCM as the Encoding

   

As previous post, the result was compressed, a 10 second clip squashed to 4 seconds.  Interesting though.
Reply
#8
Wow, I’m glad to see other people are interested in this! I can give a few more tips:

If you want to, you can skip the step of exporting a .data version from audacity. I’ve been able to get gimp to read directly from .wav files and it works fine.
Also: I don’t know why, but I seem to get the best results with mono audio saved as stereo wav. Straight up mono wav files always seem to come out too short for me- unfortunately, only one channel of sound is preserved when you use a stereo file. So: use mono audio, but save it as a wav with two channels, and then when you go to re-import it to audacity, choose 1-channel(mono). If you want to edit in stereo, you can repeat the process for each channel. I have some ideas on how to join two channels for editing processes and then separate them, but I haven’t developed them yet.

So:
1) export mono audio as a stereo wav.
2) open gimp import window, click “show all files.” select your wav, then select file type as raw image data.
3) set image type as “gray 16-bit little-endian,” set image width to a multiple of 20, adjust height until you see blank space at the end.
4) flip image vertically (if you want it played forward and without reverse granular slicing) and make edits.
5) export as bmp.
6) import into audacity as 16-bit unsigned long, adjust speed if necessary.
   I haven't perfected this process, and wonky results can be just as interesting as a clean transfer, so feel free to experiment with variations on this.


I’m linking to a visual and audio sample, per ofnuts’ request. I used the warp tool for editing.
https://soundcloud.com/belgiumlimp/prepg...al_sharing

I have another question pertaining to this process, but I'm not sure whether to start a new thread for it. It has to do with logarithmic color storage- since digital images are stored logarithmically, and wav data is stored linearly, I find that there's often a positive or negative skew in my final wavs after making edits, especially edits where colors get blended, brightness-contrast adjustment, etc. Is there a way to correct for this, or change how Gimp manages color values?
Reply


Forum Jump: