Forums

    14 posts

  • avatar
    3050 sounds
    476 posts
    Which transformation?


    Hi all,

    may seem obvious to many of you, but this is driving me nuts: time ago I converted a picture (of me) into a sound sample, the image could be seen looking at the spectral view ot this sound. Ok, as you may know, in FS2 there is an option to see each sample in spectral view with only one click (on the tiny 'histogram' of the sample window).

    Now, the problem is that the vertical scale is logarithmic and the image appears distorted, eg:

    http://s1.postimage.org/pkuz94x2o/Clipboard02.jpg

    So, which kind of transformation should one apply to a given sample so that the image appears right? I guess it should be some kind of counter-log, but can't figure out...

    D

    PS, user benboncan figured out quickly, I feel like an idiot... but still have no success!

  • avatar
    1896 sounds
    1735 posts


    dobroide
    So, which kind of transformation should one apply to a given sample so that the image appears right? I guess it should be some kind of counter-log

    some old texts refer to the exponential function as the antilogarithm.
    http://en.wikipedia.org/wiki/Exponential_function

    How about getting a screengrab of the distorted image (like the one above) then turning that screengrab upside down and submitting that to Freesound in sound: maybe the inversion will cancel out the distortion ?

    If that did work the image youÂ’d submit the first time around would have to be upside down to get the final (hopefully undistorted) image the right way up.

  • avatar
    527 sounds
    651 posts


    submitting that to Freesound in sound

    The original exists.

    http://www.freesound.org/samplesViewSingle.php?id=49403

    What is not logarithmic ?

    "I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
  • avatar
    13 sounds
    207 posts


    Hi Dobride

    Interesting!

    Post the original pic or send me a link to the original picture and I will attempt to "pre-distort" the Y axis exponentially so that conversion to sound sample will be inversely undistorted. This will be a lot simpler than fixing the sound, which would require a progressive sliding frequency down-shifting - logarithmically proportional to the inverse of of f0. i.e. 20kHz would remain at 20kHz, 10kHz would be shifted down to 1kHz and 1kHz would be slid down to 100Hz etc.

    What I can do will not be mathematically perfect because my transform curve would be like a hand drawn graph where the curve is extrapolated between about 10 "dots".

    It might take a few days to a week to post back (I'm a bit busyish - I'm not intending to spend sixty hours doing it!!!!).

    Wibby

    Heaven in the sky is to die for, Heaven on earth is to live for.
  • avatar
    1896 sounds
    1735 posts


    Benboncan
    submitting that to Freesound in sound

    The sound I suggested submitting was sound of the image an inverted (upside down) version of a screengrab of the freesound player, (above), thinking that applying the logarithmic distortion a second time to an inverted image would cancel out the logarithmic distortion.

    [NB: some DAWs have the choice to display spectrograms with a log(f) or linear vertical scale, maybe the image-to-sound software has a similar option].

  • avatar
    3050 sounds
    476 posts


    Yeah, thank you guys for the input, now I see the problem is hardest than I thought.

    As Benboncan says, one can download the sound, open it with audio software and simply look at it in spectral view using a linear scale. But how to upload a pre-distorted sound which, without modification, shows well under spectral view in FS2?

    Strangely_gnarled, you explain the problem in absolutely clear terms. Most audio software deals with transformations in the intensity of a sound/frequency (eg equalization) but what one needs here is variable modifications of pitch, applied in exponential increments. Not easy indeed!! So the only way to achieve this is to pre-distort the image, then convert it to sound and upload. In short, a task for Photoshop, not Audition wink

    @Strangely_gnarled and others willing to take the challenge:
    - the undistorted sound, http://www.freesound.org/samplesViewSingle.php?id=49403
    - the undistorted image, http://imageshack.us/photo/my-images/28/imageolms.jpg/

    cheers

    D

    Edit: @Timbre, good idea, I'll check Enscribe for an option to render (sound from image) with a log scale, thank you!

  • avatar
    527 sounds
    651 posts


    http://www.flickr.com/photos/benboncan/6031919531/

    http://farm7.static.flickr.com/6087/6031919531_88c4aa3714_b.jpg

    "I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams
  • avatar
    13 sounds
    207 posts


    Hi dobroide, (spelt your name right this time!)

    Pics for converting to watermark sounds.

    This one is pre-distorted and padded out to correct the aspect ratio (width to height) for freesounds 900x201 pixel player window, assuming it could be converted to sound without low frequency bandwidth limitations - the cause of the black area below the picture resulting in only the top half of the spectrum display to be used.
    http://www.fonehome.demon.co.uk/extlink/dobroide_predistorted2_padded_lowres.jpg

    This one is pre-distorted and padded to correct aspect ratio, as above, but also allowing for the black bar below the picture on the spectrum window.
    http://www.fonehome.demon.co.uk/extlink/dobroide_predistorted3_padded_lowres.jpg

    This one is not padded, so add some pink noise before and/or after the sound file to squash the image width till it's right.
    http://www.fonehome.demon.co.uk/extlink/dobroide_predistorted2_lowres.jpg

    This is a higher resolution unpadded version which, if usable, just might give a better result. (I up-ressed the originals before I could work on them. This is it before I down-ressed again)
    http://www.fonehome.demon.co.uk/extlink/dobroide_predistorted2_hires.jpg

    Hope one of them gives what you want. 30 years ago my brain could have crunched the maths and given guaranteed results, but now.... . . what were we talking about?

    Heaven in the sky is to die for, Heaven on earth is to live for.
  • avatar
    1896 sounds
    1735 posts


    strangely_gnarled
    http://www.fonehome.demon.co.uk/extlink/dobroide_predistorted2_padded_lowres.jpg

    Conehead smile

  • avatar
    3050 sounds
    476 posts


    ha ha ha, conehead indeed ! smile
    strangely_gnarled, thank you for the trouble you took, and I'll let you know how about the results

    D

  • avatar
    13 sounds
    207 posts


    Dobroide, you are very welcome.

    Fingers crossed.

    Heaven in the sky is to die for, Heaven on earth is to live for.
  • avatar
    3050 sounds
    476 posts


    well, I would say... success! I had to rotate the image clock-wise because that's the way Enscribe works, and ther is a little deformation in the lowest area (?), but hey, it's very cool, check for yourself:

    the lowres:
    http://beta.freesound.org/people/dobroide/sounds/124776/

    the hires:
    http://beta.freesound.org/people/dobroide/sounds/124777/

    (just click on the little histogram to see the spectral view)

    D

  • avatar
    13 sounds
    207 posts


    Actually the result is as at the top end of my expectations. The problem with the distortion is that the transformation curve is asymptotic to zero at the bottom so very small errors are exaggerated by the extreme slope.

    I did it by hand, using a screencap of the distorted version to "reverse engineer" the curve in PaintshopPro. Somebody out there will have the knowledge to apply a digitally accurate exponential (antilog) transformation using a computer script or program, but that's way outside my knowledge.

    I enjoyed the challenge. It took me back to the 1980's when I did stuff like designing audio taper controls from tapped linear potentiometers for Midas mixing desks. We didn't have computers designing for us back then.

    Heaven in the sky is to die for, Heaven on earth is to live for.
  • avatar
    3050 sounds
    476 posts


    You did a fantastic job, really.

    As a side note, I don't like the log-scale for the spectral view in FS2 (I recall having said this to Bram ages ago), mainly because it obscures high frequencies which for some sounds (e.g. bird songs) can be characteristic/diagnostic. With a linear scale I can identify many bird species just looking at the spectre, whereas in a log-scale this is impossible. Anyway, linear or log this FS2's new feature is terrific, I love it

    D

    14 posts