Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_dsp_vlevel (Read 210482 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_dsp_vlevel

Hi,
I'm developing VLevel foobar2000 plugin.

VLevel is a dynamic compressor which amplifies the quiet parts of music
developing by Tom Felker. VLevel's site is http://vlevel.sourceforge.net/ .

Unfortunately, current version of foo_dsp_vlevel plugin will crash foobar2000
player when you inactive this plugin. I want to fix this stupid bug,
but I cat't find what is wrong. If you know the solution, please send me patch.

You can download and debug my foo_dsp_vlevel plugin from here:
http://wore.ma.cx/foobar2k/

Have fun,
wore (info@wore.ma.cx)

foo_dsp_vlevel

Reply #1
It should help if you move "vl=0;" behind "delete vl;" line in cleanup_buffers function.

foo_dsp_vlevel

Reply #2
Quote
It should help if you move "vl=0;" behind "delete vl;" line in cleanup_buffers function.

Thanks.

I've remove vl=0; in cleanup_buffers and tested it, but still crashes.

foo_dsp_vlevel

Reply #3
It's kind of odd... at first, the plugin crashed on a bad delete every time I went into the DSP window, but then it abruptly stopped crashing no matter what I did.  I guess what you should do is to do more pointer checking, so try checking each pointer individually before deleting them and stuff instead of assuming that all must be valid if vl is.  I think it's better to add a few possibly unnecessary if statements than to risk crashing.  Initialize your other pointers to 0 in the constructor, too.

Also, you'll want to put vl=0; after (not before) delete vl; in cleanup_buffers(), since otherwise, vl won't get re-initialized to a valid pointer if this line
Code: [Select]
if (vl!=0 && (chunk->get_channels()!=nch || chunk->get_srate()!=srate))
somehow evaluates to true.

foo_dsp_vlevel

Reply #4
Quote
I think it's better to add a few possibly unnecessary if statements than to risk crashing. Initialize your other pointers to 0 in the constructor, too.

I rewrote constructor and cleanup_buffers to correct deletes.
But, the reason of crashes is not in constructor and cleanup_buffers.

I've fprintf debug to find why Access violation occured.
Normally, on_chunk is called with 1024 samples.
But, when fb2k crash, on_chunk is called with more than 88200 samples.
Buffers allocated only 44100 or 48000 samples.

I'll upload fixed version of foo_dsp_vlevel and announce in next 12 hours.

Thanks.

foo_dsp_vlevel

Reply #5
Glad you got it fixed.  Sorry I was completely wrong about what was causing the problem.

foo_dsp_vlevel

Reply #6
Quote
Glad you got it fixed.  Sorry I was completely wrong about what was causing the problem.

Your advice was very helpful for making my plug-in more stable.
I appreciate it.

foo_dsp_vlevel

Reply #7
is the plugin coming anytime soon?

sorry if that sounds rude, its not meant to be

foo_dsp_vlevel

Reply #8
Quote
is the plugin coming anytime soon?

sorry if that sounds rude, its not meant to be

Check out the url in wores first post, there is a working version there spaceships. I have tried it out and had no major problems with it.

This looks really promising, I have removed it for now as it seems to be a bit of a resource hog and I do like to do other, CPU intensive things while listening to music.

foo_dsp_vlevel

Reply #9
Quote
Quote
is the plugin coming anytime soon?

sorry if that sounds rude, its not meant to be

Check out the url in wores first post, there is a working version there spaceships. I have tried it out and had no major problems with it.

This looks really promising, I have removed it for now as it seems to be a bit of a resource hog and I do like to do other, CPU intensive things while listening to music.

oh thanks, i thought he was going to put it as an attachment

my apologizes

foo_dsp_vlevel

Reply #10
You may have noticed problems with seeking before, but I worked on the code a bit and this should fix them.  I've sent this to wore, but in case anyone else finds it useful, here it is.  This is a debugging build, so it's big, and I don't have an optimizing compiler, so it may be too slow.

http://mtco.com/~tcfelker/foobar2000-vlevel/

foo_dsp_vlevel

Reply #11
release compile of foo_dsp_vlevel (as modified by Tom Felker):

http://www.stud.uni-karlsruhe.de/~uybc/foo_dsp_vlevel.dll


(I checked it out briefly and it seemed to work - didn't do any rigid testing though, so no guarantees.  )
A riddle is a short sword attached to the next 2000 years.

foo_dsp_vlevel

Reply #12
For giggles I just added a configuration dialog for the two main VLevel parameters (effect strength and max sample amplification) to foo_dsp_vlevel. oh yea, and a useless about box too. 

http://www.stud.uni-karlsruhe.de/~uybc/foo_dsp_vlevel.zip

have fun (plugin and source included in zip file)
A riddle is a short sword attached to the next 2000 years.

foo_dsp_vlevel

Reply #13
Hi ssamadhi97, wore,

I just released the most recent dll and put some news on Sourceforge.net, so more people may be using this soon.  Thanks for your help.

The GUI is great, just a few changes could be made.  First, we can implement buffer_length, which should vary between .1 and 10 seconds.  Second, it would be nice to have more steps on the strength slider, perhaps 50 or 100.  (Are the sliders 100px wide?)  Third, max multiplier is disabled when set to zero, but we should tell the user this.  One way would be to make it go 2 to 40, with a checkbox to enable it (which would set it to 0 when unchecked.)

I'd do this myself, but I'm very rusty with Windows GUI stuff, and besides, I have MSVC++ 6 standard, which doesn't have an optimizing compiler, so I suspect my compiles would result in bad performance.

I'm probably going to put the source code into the existing vlevel tree to keep everything in sync.  That basically means the include should now be ../volumeleveler/volumeleveler.h.  Also, I don't think I changed the API, but please use the latest CVS versions, available here (click on the version numbers, then Download).

Have fun.

foo_dsp_vlevel

Reply #14
Any progress on implementing the buffer length slider?  I like this plugin a lot for listening to (overly) dynamic live recordings, but the default length is quite long...

foo_dsp_vlevel

Reply #15
i love this plugin... any updates?
The only problem i can see is a little distortion at the end of every track... otherwise it does the job...

foo_dsp_vlevel

Reply #16
Bumpershoot.  I use this plugin very frequently, especially with classical pieces whose dynamic characteristics would otherwise cause me frustration as I adjust volume every half minute to keep it audible.

I'd also like to see Garf or somebody else give a thorough explanation of his dynamic compressor. It is more complicated than vlevel and I simply don't understand it, but it seems like it should be able to do the same thing as vlevel, but at default settings it seems to actually *increase* dynamics for most classical music. Crimony!

foo_dsp_vlevel

Reply #17
Hi !

Now that foobaar2000 version 0.9 is out:
Could somebody make this plugin working with 0.9 ?

Source code to the original plugin: http://www.mtco.com/~tcfelker/foobar2000-vlevel/

I am using Samadhi97's version all the time while listening to classical music, since I have the same problem with Garf's compressor like the previous poster.

foo_dsp_vlevel

Reply #18
Since I'm having fun fiddling with the foobar2000 SDK, I decided to try port some plugins with source available to foobar2000 0.9.

Here's an experimental version of foo_dsp_vlevel for 0.9:Notes:
  • I downloaded and compiled this against the latest version of VLevel.
  • This is the version with the simple GUI preferences, I'll take a look at extending it to include a buffer length option, should be easy enough.
  • I tested, and it seems to work here, I'm definitely noticing the effect. But more testing is ofcourse appreciated. (I normally don't use this plugin at all)
  • The DSP interface didn't change all that much, but it'd be swell if someone with the technical knowledge could take a look anyways. This is more or less a direct port. Specifically, I have no idea about the need_track_change_mark method (which is new), but I just return false there right now.

foo_dsp_vlevel

Reply #19
I've updated this again. The plugin is now configurable like any other DSP component: from the DSP manager(s). Buffer length is configurable, and the strength control now takes steps of 0.01 instead of 0.1. Note that if you've used the previous version you should properly check the strength control. Grab it here:

foo_dsp_vlevel

Reply #20
thanks G-Lite, excellent initiative!
work fine for me.

question: it is possible to add option to  menu  in order to activate/disable vlevel without open dspmanager, same for  equalizer?

regards, melomane
Music is my first love.

foo_dsp_vlevel

Reply #21
Thank you very much for all your work -- it's sincerely appreciated.

Somewhat off-topic: is there a way to apply some kind of dynamic compression to all my mp3s so that when I transfer them to my iPod I can avoid having to change the volume so often between loud/soft parts?

foo_dsp_vlevel

Reply #22
Thank you very much for all your work -- it's sincerely appreciated.

Somewhat off-topic: is there a way to apply some kind of dynamic compression to all my mp3s so that when I transfer them to my iPod I can avoid having to change the volume so often between loud/soft parts?


you could re encode them with foobar and select a compressor as DSP that is applied during compression.

foo_dsp_vlevel

Reply #23

Thank you very much for all your work -- it's sincerely appreciated.

Somewhat off-topic: is there a way to apply some kind of dynamic compression to all my mp3s so that when I transfer them to my iPod I can avoid having to change the volume so often between loud/soft parts?


you could re encode them with foobar and select a compressor as DSP that is applied during compression.


I'm hoping to avoid transcoding. Surely there's a way simply to adjust the volume level of a frame? :-/

foo_dsp_vlevel

Reply #24
There is a way to change the volume of mp3 frames. That's how mp3gain works. But that won't be a solution to your problem, since using this to change the volume during tracks would result in noticeable volume steps. In addition I doubt that a programm that can do that has ever been written.