Results 1 to 11 of 11

Thread: Amplification of sound in VB6

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Amplification of sound in VB6

    Hi,

    How would I increase the amplification of an audio file and will that amplification change if say the original sound file was a wave and then the file was converted to a format such as mp3?

    Thanks,


    Nightwalker
    Last edited by Nightwalker83; Aug 9th, 2014 at 05:21 AM. Reason: Fixed Title!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Amplification of sound in VB6

    Are you asking how to change it permanently to be stored within the file?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Amplification of sound in VB6

    Quote Originally Posted by LaVolpe View Post
    Are you asking how to change it permanently to be stored within the file?
    Yes, that is correct!

    Edit:

    I guess I need to added the types and code that CVMichael uses in post #12 here, although minus the generating sub. The code that I have at the moment contains the code from post #33 here.
    Last edited by Nightwalker83; Aug 9th, 2014 at 06:48 PM. Reason: Adding more!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  4. #4
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: Amplification of sound in VB6

    Amplification is multiplication.
    Multiply too much and you'll get clipping as the loudest parts exceed the maximum/minimum value that can be stored.

  5. #5

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Amplification of sound in VB6

    Quote Originally Posted by passel View Post
    Amplification is multiplication.
    Multiply too much and you'll get clipping as the loudest parts exceed the maximum/minimum value that can be stored.
    Yes, I know that but what do I need to multiply?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: Amplification of sound in VB6

    Quote Originally Posted by Nightwalker83 View Post
    Yes, I know that but what do I need to multiply?
    Find the highest amplitude within both channels of your sound (song, whatever).

    e.g. when you found within 16Bit PCM-Stereo (looping over both, the left and right
    channel), the max. Amplitude (Abs(signed 16bit integer)) of 19500, then your formula
    would become:

    19500 * ScaleFactor = 32767

    So, in this case you would not cause any clipping, when you multiply with a
    ScaleFactor smaller or equal to 1.68

    Olaf

  7. #7

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Amplification of sound in VB6

    I found WaveIn Recorder which, does what I need except it is for WaveIn. Does Wave-in work the same way as loading a sound file and permanently changing the amplification of the file? The reason I ask if because I found some code that allows for the amplification of Wave-In which then allow the user to save the result to a file and I was wondering if I could use that code?
    I think the only different between Wave-In amplification and load file amplification is that the Wave-In method saves the after amplify the sound whereas loads the in to the program then amplifies the sound?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  8. #8
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: Amplification of sound in VB6

    Quote Originally Posted by Nightwalker83 View Post
    ...
    I think the only different between Wave-In amplification and load file amplification is that the Wave-In method saves the after amplify the sound whereas loads the in to the program then amplifies the sound?
    That form of english I have a hard time understanding.

    Quote Originally Posted by Nightwalker83 View Post
    ... The reason I ask if because I found some code that allows for the amplification of Wave-In which then allow the user to save the result to a file and I was wondering if I could use that code?
    I think the intuitive answer is if you have to ask then the answer is probably no.
    If you don't know what the code is doing, or what your code is doing well enough to answer the question, then probably you will have problems trying to adapt and use it in your project.

  9. #9

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Amplification of sound in VB6

    Quote Originally Posted by passel View Post
    If you don't know what the code is doing, or what your code is doing well enough to answer the question, then probably you will have problems trying to adapt and use it in your project.
    I am trying to find code that will allow me to change the amplification of the file itself rather than via the sound card.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  10. #10
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: Amplification of sound in VB6

    Then why not use one of the (OpenSource) commandline-tools for that (which should also exist in different windows-versions).

    IIRC, these will allow to read one format (e.g. *.wav) - and write it out in either the same format -
    or as *.ogg or *.mp3 ... then often supporting quite some extra-params - as e.g. "reduce to Mono",
    or "enhance to Pseudo-Stereo" or "change BitDepth" or "change amplitude using a ScaleFactor",
    or "normalize amplitude".

    Just google for them (I don't remember them from the top pf my head) - but:
    [Sound conversion commandline utilities] or something like that should raise some results.

    Olaf

  11. #11

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Amplification of sound in VB6

    Quote Originally Posted by Schmidt View Post
    Just google for them (I don't remember them from the top pf my head) - but:
    [Sound conversion commandline utilities] or something like that should raise some results.
    Are they part of Windows?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width