Jump to content

Recommended Posts

Posted (edited)

This is a project that I have been working on for several months off and on.

It's a simple "What You Hear" MP3 @ 320Kbps and WAV audio recorder.


- LoudMax, a Gain Controller and Look-Ahead Limiter
- Auto Shut-Off after one minute of silence
- Side-by-Side Simulated LED Meter
- Running Time Counter

It started off being a large project, but I eventually stripped it down to its
bare essentials because I came to realize that it would be very difficult to
deal with every sound card and every way a PC is set up for audio. It would
have been a nightmare that I was not willing to go through.

This project contains the most up-to-date BASS.dll v. - December 17, 2019.

All BASS Dll's are 32bit. Those and the needed UDF's are included in the zip file.

I will try to explain how it works in the next post.



BASS VST Recorder v1.1.zip


Edited by ripdad
updated to v1.1

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post

Link to post
Share on other sites
Posted (edited)

-- About LoudMax

LoudMax is a Look-Ahead Brickwall Limiter with several other features.
You can learn more about it on its homepage where you can also download
this VST plugin at: https://loudmax.blogspot.com/

It can be used for recording or playing audio without railing. It can also be used
as an audio maximizer.

You can also learn how others are using LoudMax on youtube.com.


To download the VST...

1. On loudmax.blogspot.com Click -> VST Plugin v1.34 for Windows PC 32/64bit
2. On Dropbox, click the download icon above LoudMax_v1_34_WIN.zip on the right side of "Sign in".
3. Unzip and place all files from the zip to the VST Folder where this script resides.
4. Be sure to read the README.txt, which contains important information.


Okay, here we go...

If you talk with a dozen recording engineers, they will all have differing opinions
about methods of keeping levels at a good peak. Some talk about the use of an AGC.

An AGC (Automatic Gain Control) or (Automatic Gain Compensator) is evil for recording.
Most of them cause what is called "pumping". The ones that don't are too slow in response
time to be of any use, except for playing through a compressor. So I don't use them at all
for recording. Something like LoudMax is a much better solution if done properly.

-- There are four methods that I use with LoudMax.

1. Unity - keep original as possible - leaving headroom for post-processing.
2. Gain - leaving headroom for post-processing.
3. Maximizing - no headroom.
4. Recording an audio processed track or album for the car or media center - no headroom.

-- Settings for the above:  (none of this is written in stone)

1. Thresh: -2.0, Out: -2.0db
(respectively 1:1 ratio)

2. Thresh: -2.0 to -6.0db, Out: -2.0db
(most likely setting for recording unprocessed music)

3. Thresh: -6.0, -9.0, -12.0db, Out: -0.2db
(respectively light, medium, heavy (click the "ISP" button on for medium and heavy))

4. Thresh: 0db, Out: -0.2db
(processed audio (can also be used as a limiter for over-gained audio))

-- Adjusting source levels for the above:

There are three ways to approach this.

Since "What You Hear" levels can be affected by various controls, you first have to set
a baseline from which to set other controls. On Windows mixer, set ALL controls to 50%
(that's both Play and Recording controls).

If you need to, adjust your volume control on your physical speakers to a pleasing level.

Now, we can proceed...

1. Set the source audio at something like 50% and then vary the
Windows input mixer control for "peak level".

2. Set the Windows input mixer control at something like 50% and
then vary your source audio for "peak level".

3. Set the source audio at 50%, Windows input mixer control at
25% to 35%, then vary the "Thresh" on LoudMax for "peak level".

The third one is the one I use the most using LoudMax as a
Gain Controller and Brickwall Limiter. (#2 of the four methods)

To define "peak level" depends on which of the four methods are used.

Adjust until the vertical bar on LoudMax...

1. flickers between 0 and 1. Closer to 0 is better for unity.
2. bounces between 0 and 2. Try to average at 1. Don't worry if it goes a little bit over 2 at times.
3. bounces between 0 and the desired level for maximizing.
4. flickers between 0 and 1.

-- What is the best procedure for a decent recording?

The best way is to get a sample of the incoming level before you hit that record button.
It might take a minute or two to get the maximum peak level from the source. Then you adjust for it.

Make sure that the raw input level is not maxing red on the Green LED Meter. Good rule of thumb would
be about 75% to 85% of the meter scale. You can adjust it from the Windows mixer record input control
or your source audio output control.

In all this, don't panic if peak level's hit an unexpected high volume area.
The limiter will handle it gracefully. If you have to... adjust for it and re-record.

Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post

Link to post
Share on other sites
Posted (edited)

-- So, what does a decent recording look like?

The only real way to know for sure that you have a decent recording is to look at a
graph on an audio editor with something like Goldwave or Audacity.

It doesn't have to be perfect (since nothing is really perfect), just within a decent range.

The following audio graphs will show the various states of a recording...

(showing left channel only)





If you have any questions, I will try to answer them.


Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post

Link to post
Share on other sites

I overlooked 2 settings during testing.

I will adjust them with an update at a later time.

For now, please change:

At line 427 (70 to 50)

At line 518 (69 to 49)


"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post

Link to post
Share on other sites
Posted (edited)

I meant to revisit an old issue and forgot all about it.

BASS has several mystery's about it, one of which, doesn't make good sense to me.

But, I'm sure they have a good reason.

In Play mode...

When setting _BASS_ChannelSetVolume() to a level, _BASS_ChannelGetLevel() doesn't match to the same level.

In fact, if you set the volume to 0%, _BASS_ChannelGetLevel() keeps at 100%, which shows on the level meter.

It seems many had the same issue on their forum, but the solution was less than desirable. One was to set a global volume and another is a math equation. To me, that's just not accurate enough, nor does it seem right. You should be able to get the volume at the output and not earlier in the stream, like at the FX pin.

In any case, I have fretted and agonized enough over this issue and made a decision.

I have scrapped the _BASS_ChannelGetLevel() code on the play stream and now use the record steam from the loopback. The level was off by 3% difference between recording and playing. It was easily adjusted at _BASS_ChannelSetVolume() from 50% to 53%.

After I saw that it held up during testing (testing was done with a sine wave generator), I removed the play stream code that handled it. Recording and playing now match up within 0.3% on average, which suits me just fine.

I have updated the first post to v1.1

Please keep in mind that this is a recorder (first) and a player (second) to verify the recording. Any changes to volume controls in Windows Mixer while playing will affect the level meter. If you want to turn the volume up or down, do it at your physical speakers.

Also, you are free to do what you want with any of my code. If you don't like something about it or want to add/remove something, you can change it with my blessings.

Please let me know of any issues. Thanks!


Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By CYCho
      This file includes all the source codes and a compiled .exe version of zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional media player.  I made this to suit my purpose and you can tweak it to your taste. The source code is only about 1200 lines and only standard include files were used.
      zPlayer was my first AutoIt project through which I was hoping to learn coding. A media player capable of playing back audio and video files was my initial goal, but video was beyond my capcity for my lack of coding experience. So zPlayer was born as an audio-only player and remained so up to Version
      Just recently I decided to add video function to zPlayer now that I had gained some experience. I thought it would be possible, but I didn't expect it to be this simple. I made minimal changes to the existing code and added only about 80 lines and, voila, I have an integrated audio and video player, starting from Version
      This player has the following features:
      - Play back all formats of media files which can be palyed back by the Windows Media Player in your computer
      - Video window is independent of other windows and, when it is maximized, increases the immersiveness of the user
      - Graphical player similar to embedded Windows Media Player
      - Forward, backward, pause, repeat, shuffle funtion
      - Increase/decrease/mute sound volume
      - Change folders and create playlist for all media files in that folder and its subfolders, and support for manually-made playlists
      - Save play-back environment when terminating and resume that environment when restarting
      - With one click, you can see internet search results for the file selected in playlist
      - With a double-click, you can play back an item in the playlist
      - Search strings in the playlist
      - Option to see long file names including folder names
      - Resize the playlist and video windows, and restore them to their default positions
      - Very small footprint: very low CPU and memory usage, with only about 1MB when compiled
      - You can even hide all the windows and manipulate the player with hotkeys only
      Note: zPlayer is the name I used when I introduced the early version of this palyer in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
    • By ripdad
      This is an example script of how to load and use a VST using BASS in AutoIt.
      It is NOT immediately Plug and Play. You will need to download 2 VST's to run it.
      They are free for personal use.
      All information is in the header of the script.

      BASS VST HOST v0.4.zip
    • By ripdad
      I have been working on audio graphical scripts these last several months.
      This is my last script on this subject for now. On to other projects.
      Credits: UEZ, Eukalyptus, BrettF, Prog@ndy, Authenticity and the AutoIt Community.
      Thanks to all that made these scripts possible!
      Please let me know if you have any problems with it.

      LIVE Stereo Audio Waveform v2.zip

  • Create New...