MP3 Encoder with Blade encoder-VBForums
Results 1 to 15 of 15

Thread: MP3 Encoder with Blade encoder

Hybrid View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,728

    MP3 Encoder with Blade encoder

    OK, this is something I'm sure all of you will like...

    This is basically what I've done in this thread 2 years ago.
    http://www.vbforums.com/showthread.php?t=163097

    This app, records sound with DirectXSound, and encodes it REAL TIME to an MP3 file, no other files in between...

    You can record to MP3 in Mono or Stereo, sample rates of 48000, 44100 and 32000, and with those bitrates: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320

    First of all, download the BladeEnc.dll from this website:
    http://home.swipnet.se/~w-82625/skeleton/DL.html
    This is the website I found by searching on the net, there are probaly many other places where you will also find the dll.
    Unzip the dll in your system folder

    From the ZIP attached, place the BladeEncVB\Release\BladeEncVB.dll in the system folder also.
    I made the BladeEncVB.dll because you cannot reference the BladeEnc.dll directly from Visual Basic, so I had to make something in between.
    I also added a digital volume, and will amplify the sound up to however much you like, in the app i made the limit up to 600%, but you can change the code to amplify much more than that.

    Now you can run the application, record away !
    Attached Files Attached Files
    Last edited by CVMichael; Jul 26th, 2006 at 12:22 PM.

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,728
    A screen shot...
    Attached Images Attached Images  
    Last edited by CVMichael; May 10th, 2005 at 04:24 PM.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    37,200
    The code/files within this thread (submitted: 03-07-2004) have been checked for malware by a moderator.

    Disclaimer: This does not necessarily mean that any compiled files (DLL/EXE/OCX etc) are completely safe, but any supplied code does not contain any obvious malware. It also does not imply that code is error free, or that it performs exactly as described.

    It is recommended that you manually check any code before running it, and/or use an automated tool such as Source Search by Minnow (available here or here).
    If you find any serious issues (ie: the code causes damage or some sort), please contact a moderator of this forum.

    Usage of any code/software posted on this forum is at your own risk.

  4. #4
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,452

    Re: MP3 Encoder with Blade encoder

    Michael, I followed this post & link which brought me here.
    http://www.vbforums.com/showthread.p...ht=sound+event
    While I realize that these are very old posts of yours, I'm interested in doing the same thing that the OP wanted to do. Namely. I want to trigger an event when audio level from the mic input is above a predetermined level.

    My question is... There are two files listed at the link to BladeEnc.
    http://home.swipnet.se/~w-82625/skeleton/DL.html

    One is BladeEnc082.zip and BladeDLL-082-intel.zip. Which of these files should I download, or is it both?

    Thanks
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,728

    Re: MP3 Encoder with Blade encoder

    For your last question... I don't remember... I made this project a while ago, I don't remember having as many options as there are listed now

    I would go for: BladeDLL-082-intel.zip and if it does not work, then try the other one, you don't have to install the DLL, therefore, if it does not work, you can just delete it, and try the other one. I will try it myself later....

    To encode to MP3 I now use the Lame ACM codec, I don't use the BladeEncoder anymore. I did not have time to make a project to put it in the CodeBank (or tutorial) using the Lame ACM.

    Anyways....

    But for your first question... you don't need to encode to MP3 in order to get the sound level... you only need DirectX... At the time I posted in the thread
    "How get voice-key event in VB6?" I did not have my sound tutorial.

    Here's what to do:
    Download the attachment from Post #5 from my sound tutorial: From Here

    This code is a "clean" code on how to record, just remove the code where it saves to the wav file.

    Now replace the DisplayWaveData16 from the tutorial with the ShowWAVData16Bit from the MP3Encoder, of course you will have to make a few modifications to make it work.

    What you need is the LAve & RAve from the ShowWAVData16Bit sub.
    In fact you can strip all the code from the function except where the LAve is calculated.
    Or... you could see how LAve is calculated, and just modify the code in the tutorial to calculate the LAve.....

    LAve stands for Left channel average, and RAve stans for Right channel average. But since you will record in Mono (microphone is mono), you only need the "LAve".

    Now all you have to do is something like:
    If LAve > your_threashold Then RaiseEvent...

    I did not do this for you because I think it will help you understand what is going on in the project better, since your gonna work with the code.

    But if you have any problems, I will make a project for you that does what you need.

  6. #6
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,452

    Re: MP3 Encoder with Blade encoder

    Michael, it's 0130hrs and I need to get to bed, but I wanted to get this posted befor I hit the sack. What can I say .... IT'S GREAT!! I love it! I won't pretend to understand all the code but I'm just dangerous enough to plod through others code to make it do what I want. I added this test code in the Private Sub DisplayWaveData16(DataBuff() loop.

    Code:
    Label1.Caption = RY     '  Display input level digitaly
           If RY >= 0.8 Then Label2.Caption = "Threshold Reached"  'Display Threshold level reached
    Ultimately I will be including a timer that will be enabled by an input level that is greater than my threshold value and be disabled when a second audio value exceeds a similar value.
    Thank you so much for your knowledge and skill.
    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,728

    Re: MP3 Encoder with Blade encoder

    Ow... I now understand what you wanted... I was telling you to basicaly get the average of the whole buffer, and check the peek of that... but you actually want to see if any sample within the buffer is over the peek....

  8. #8
    New Member
    Join Date
    Dec 2010
    Posts
    3

    Unhappy Re: MP3 Encoder with Blade encoder

    Quote Originally Posted by CVMichael View Post
    For your last question... I don't remember... I made this project a while ago, I don't remember having as many options as there are listed now

    I would go for: BladeDLL-082-intel.zip and if it does not work, then try the other one, you don't have to install the DLL, therefore, if it does not work, you can just delete it, and try the other one. I will try it myself later....

    To encode to MP3 I now use the Lame ACM codec, I don't use the BladeEncoder anymore. I did not have time to make a project to put it in the CodeBank (or tutorial) using the Lame ACM.

    Anyways....

    But for your first question... you don't need to encode to MP3 in order to get the sound level... you only need DirectX... At the time I posted in the thread
    "How get voice-key event in VB6?" I did not have my sound tutorial.

    Here's what to do:
    Download the attachment from Post #5 from my sound tutorial: From Here

    This code is a "clean" code on how to record, just remove the code where it saves to the wav file.

    Now replace the DisplayWaveData16 from the tutorial with the ShowWAVData16Bit from the MP3Encoder, of course you will have to make a few modifications to make it work.

    What you need is the LAve & RAve from the ShowWAVData16Bit sub.
    In fact you can strip all the code from the function except where the LAve is calculated.
    Or... you could see how LAve is calculated, and just modify the code in the tutorial to calculate the LAve.....

    LAve stands for Left channel average, and RAve stans for Right channel average. But since you will record in Mono (microphone is mono), you only need the "LAve".

    Now all you have to do is something like:
    If LAve > your_threashold Then RaiseEvent...

    I did not do this for you because I think it will help you understand what is going on in the project better, since your gonna work with the code.

    But if you have any problems, I will make a project for you that does what you need.


    CVMichael,

    I know that some time ago but you do not program in VB6, but help me, change your project using the Lame ACM MP3 and WAV to please.

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,728

    Re: MP3 Encoder with Blade encoder


  10. #10
    New Member
    Join Date
    Dec 2010
    Posts
    3

    Red face Re: MP3 Encoder with Blade encoder

    Quote Originally Posted by CVMichael View Post
    OK, this is something I'm sure all of you will like...

    This is basically what I've done in this thread 2 years ago.
    http://www.vbforums.com/showthread.php?t=163097

    This app, records sound with DirectXSound, and encodes it REAL TIME to an MP3 file, no other files in between...

    You can record to MP3 in Mono or Stereo, sample rates of 48000, 44100 and 32000, and with those bitrates: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320

    First of all, download the BladeEnc.dll from this website:
    http://home.swipnet.se/~w-82625/skeleton/DL.html
    This is the website I found by searching on the net, there are probaly many other places where you will also find the dll.
    Unzip the dll in your system folder

    From the ZIP attached, place the BladeEncVB\Release\BladeEncVB.dll in the system folder also.
    I made the BladeEncVB.dll because you cannot reference the BladeEnc.dll directly from Visual Basic, so I had to make something in between.
    I also added a digital volume, and will amplify the sound up to however much you like, in the app i made the limit up to 600%, but you can change the code to amplify much more than that.

    Now you can run the application, record away !
    Michael,

    I wish your project utilized the "Lame ACM" and not "Blade encoder", you have to change, please?

    please
    please
    please
    please

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.