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: Winamp "Center Cut" DSP Plugin released (Read 92906 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Winamp "Center Cut" DSP Plugin released

dsp_centercut is Winamp plugin that separates stereo audio into side and center channels. It's based on the "center cut" filter from VirtualDub. The algorithm's author, Avery Lee, describes it as follows:
Quote
The classic "vocal cut" filter, except that the output is stereo instead of mono. This is accomplished through FFT phase analysis; the output will have some warbling in it, but stereo separation is preserved.

Download: dsp_centercut.zip (Binary and Source) - To use it, copy dsp_centercut.dll into your Winamp\Plugins directory and restart Winamp. Then go into Winamp's Preferences (CTRL+P) in the DSP/Effect Plug-ins section. Select "Center Cut v1.4.0" in the list, and you will see these options in the drop-down list below:
  • Center Cut - Sides:  Removes the 'center' channel (whatever is in both the left and right channels).
  • Center Cut - Center:  Keeps only the 'center' channel.
  • Center Cut - Sides (Bass to Sides): Removes the 'center' channel, except for bass.
  • Center Cut - Center (Bass to Sides): Keeps only the 'center' channel, except for bass.
  • Classic Vocal Remover:  This is simply the difference between the left and right channels ((L-R)/2).  Not very interesting compared to the other modes, but I included it for comparison.
Changes:
1.4.0 (2007-Jul-19)
  • Option to put bass in side channels, useful if your goal is vocal removal.
  • Improved workaround for Winamp's threading bugs.
1.3.2 (2006-Jul-14)
  • Another quality tweak.
1.3.1 (2006-Jul-12)
  • Fixed classic vocal remover which was broken in the previous version.
1.3.0 (2006-Jul-12)
  • Algorithm enhancement to improve quality (clicking problem is eliminated, echo is significantly reduced).
  • Rewrote a lot of inefficient code (it runs over twice as fast now).
1.2.0 (2004-Mar-30)
  • Output is now buffered, which allows larger FHT sizes to be used.
  • Default FHT size is now 8192, this will reduce warbling but add some slight echo.
  • Compiled with VC++ 6 using the Multithreaded DLL runtime library and "/filealign:512" to reduce the .dll size.
1.1.0 (2004-Jan-19)
  • Added a workaround for the crash bug when switching between options (this is actually a problem with Winamp unloading the DLL too early).
  • Now supports 8/16/24/32 bit audio (only did 16 bit before).
  • Code cleanup.
Known issues:  The buffer isn't cleared when the audio is stopped playing, so the next song you play will have a small bit of the previous song at the beginning.  I probably won't bother fixing this.

Enjoy

Winamp "Center Cut" DSP Plugin released

Reply #1
Very intersting...I might create a foobar2000 DSP based on this

Winamp "Center Cut" DSP Plugin released

Reply #2
Quote
Very intersting...I might create a foobar2000 DSP based on this

OMG, we need a vocal remover of some kind for Foobar2000. Please go ahead and make it. It would be very much appreciated. 

Winamp "Center Cut" DSP Plugin released

Reply #3
I just discovered a bug that can cause this plugin to crash when switching between the options in the dropdown list.  I think I've found the problem and will try to fix it tonight.

Winamp "Center Cut" DSP Plugin released

Reply #4
This is BY FAR the most effective plugin with a vocal remover that I have ever used. Thanks for releasing this. We really need a Foobar2000 port for this though. I dunno if Moitah or Chun-Yu will do it, but either way, if one of you guys does a nice stable Foobar2000 version of this, a lot of people here on the forum are going to love you. 

Winamp "Center Cut" DSP Plugin released

Reply #5
I wouldn't say its very effective as a 'vocal remover', but it depends on the song obviously.  I use it because I think it sounds cool and sometimes you can hear stuff you've never noticed in the song.

Winamp "Center Cut" DSP Plugin released

Reply #6
I'll do it later today, should be real simple.

Winamp "Center Cut" DSP Plugin released

Reply #7
I'm having a hard time finding the problem.  It doesn't help that I don't really know how to use the debugger .  If someone with more experience would like to help, it would be appreciated.  To reproduce the bug, I switch rapidly between the first 2 options in the dropdown list (the ones labeled "Center Cut - ") with the up/down arrow keys.  I can get it to happen pretty easily on my computer, but couldn't get it to happen on a different computer.

Winamp "Center Cut" DSP Plugin released

Reply #8
Here's some more detailed information I have discovered after a lot of testing:

This other computer I tried it on is running Winamp 2.80.  I copied the Winamp directory to my computer and ran it, and couldn't get the plugin to crash.  So maybe it's only with newer versions of Winamp (I can get it to crash on 2.90, 2.95, and 5.0).  Also, it seems like it's easiest to crash while playing FLAC and Monkey's Audio (I can get it to crash with MP3/Vorbis but it takes quite a bit longer).  I'm not sure why this is, but keep this in mind if you are trying to reproduce the problem.

Playing with the code, it appears that when the module type is changed in the dropdown list (switch between Side and Center... I don't think the Classic code crashes), the global variables are reset and the new module's "init" function is called WHILE the old module's "modifysamples" function is running.  When the old module's "modifysamples" function resumes, the global variables are different than when it started and I think the memory it allocated has been freed (causing an access violation when the memory is written to).

Any ideas?

 

Winamp "Center Cut" DSP Plugin released

Reply #9
Update: I've got this working in foobar2000, but...as code for my experimental DSP plugin that runs C# code you enter :B  A real version that doesn't require .NET should come soon.  I'll probably release this C# component separately since it's kinda fun to use to experiment with an idea before implementing it as your own component.

Winamp "Center Cut" DSP Plugin released

Reply #10
Quote
Update: I've got this working in foobar2000, but...as code for my experimental DSP plugin that runs C# code you enter :B  A real version that doesn't require .NET should come soon.  I'll probably release this C# component separately since it's kinda fun to use to experiment with an idea before implementing it as your own component.

Nice, keep up the good work. Please make a thread for it on the Foobar forums when you are done. Looking very forward to this.


Winamp "Center Cut" DSP Plugin released

Reply #12
I finally found the problem !  It has been fixed in v1.1.0 (the download link has been updated in the first post).

Chun-Yu:  Good job on the foobar2000 plugin .  I used the code as a reference when updating mine to work with 8/16/24/32 bit samples.

Winamp "Center Cut" DSP Plugin released

Reply #13
Quote
Very intersting...I might create a foobar2000 DSP based on this

PLease do. Id be glad to have one for foobar2k

Winamp "Center Cut" DSP Plugin released

Reply #14
 Please look 2 posts up from your post.

Winamp "Center Cut" DSP Plugin released

Reply #15
Very interesting! After my humorously-flawed and tension-induced attempts to explain how something like this could be done, it's nice to learn that someone actually accomplished it! (... and to the few folks who congratulated me on the "Center Channel" that was causing my mental-aberrance, my wife's test proved otherwise. Phase-cancellation?  Ah well... we aren't quite ready for a child yet, anyway.)

  Just curious, but has anyone considered reworking this as a VST-based plugin? I don't know enough programming to do so myself, or I would have already tried it.

    - M.

Winamp "Center Cut" DSP Plugin released

Reply #16
Version 1.2.0 has been released, I've updated the first post.

Winamp "Center Cut" DSP Plugin released

Reply #17
Good work.
I have looked at the source and might have a go at a VST plugin.
Only problem is I code in a real language (Pascal)  , and so have to translate the gibberish into something usuable 
(Of course, all in good fun  )

If I get it up and running, I will add in my crosstalk cancel plugin before this one. Should make a lot of difference. And remove hopefully the echos from the removed vocals.

Anyway again, good work.

Don't Blame Me, I Only Work Here!
Don't Blame Me, I Only Work Here!

Winamp "Center Cut" DSP Plugin released

Reply #18
GREAT!
Know with larger FHT this become a very PRO plug-in! Good Work!

Only one thing: I've tested it very deeply but sometimes I hear some strange "click" in the processed waves (both in realtime and in disk-streamed wav).

It seems to me that sometimes exists some "gaps" between one buffer block and another because these little cracks are periodical (looking the wave I see some big level gap that of course produce cracks) and their occourrence vary with the size of the buffer: the larger the buffer, the longer are the time between one click and another.

You can download a test wave I've produced using Winamp5 with the Disk-Write plugin on a stereo film soundtrack (the anime Boogiepop Phantom) using the center-cut (Side-Stereo) processing.
Here'is the ORIGINAL and the PROCESSED wav files at 48KHz-16bit-Stereo.
You can hear the cracks on the sonar-like sounds at the end of the file.

This is the only problem I've found on this plugin that in my opinion sounds very very very good! 

Winamp "Center Cut" DSP Plugin released

Reply #19
Moitah, congratulations for your work! I was looking for some years for such an application, but you actually built it!

I got vers. 1.20. I don't know how much this helps you, but, I believe the reason of crashing Winamp when switching "Sides" to "Center" is some kind of de-synchronization.

If you start Winamp in "center" mode, and then switch to "sides" mode, you'll note that music skips ahead with about a second. Maybe you should try to (somehow, I don't know), use the very same buffers for both of the two modes, "center" & "sides".

I believe there's a change in buffer size Winamp doesn't like when going from "center" to "sides". It doesn't always crash, since this is sort of a source material dependant.

Good luck!

Winamp "Center Cut" DSP Plugin released

Reply #20
i just grabbed this too.  great work Moitah! 

(talk about bringing a thread back from the dead!)

Winamp "Center Cut" DSP Plugin released

Reply #21
Quote
Moitah, congratulations for your work! I was looking for some years for such an application, but you actually built it!

I got vers. 1.20. I don't know how much this helps you, but, I believe the reason of crashing Winamp when switching "Sides" to "Center" is some kind of de-synchronization.

If you start Winamp in "center" mode, and then switch to "sides" mode, you'll note that music skips ahead with about a second. Maybe you should try to (somehow, I don't know), use the very same buffers for both of the two modes, "center" & "sides".

I believe there's a change in buffer size Winamp doesn't like when going from "center" to "sides". It doesn't always crash, since this is sort of a source material dependant.

Good luck!
[{POST_SNAPBACK}][/a]

The crashing is because Winamp's threading is buggy (it unloads your plugin from one thread while ModifySamples is still running in another).  There is a workaround in v1.2.0 which actually works pretty good but I guess not all the time.  I mentioned it on the Winamp forums a while back in hope of getting it fixed, but I don't think they care .

The skipping is because Winamp unloads/reloads the plugin when you switch between options in the dropdown list, so the buffer is cleared.  I could fix this by only having one option there, and switching between side/center in a GUI that comes up when you go into the plugin configuration.  This would fix the crashing problem when switching between side/center, but it might still crash when switching between different DSP plugins.  But I have never written any GUI in C++, and I haven't felt like learning how.

I actually have a C# version that I wrote, but haven't released it because I'm not happy with the other code that I wrote to host it, called DSPDotNet.  It doesn't have the problems you described, allows you to change the FHT window size in the GUI, has an option to use an algorithm modification made by Avery Lee in later versions of VirtualDub that usually makes the output sound crisper (though I have heard it mess up one sample), and also includes a fix discovered by myself recently to get rid of the clicking in the output (see [a href="http://forums.virtualdub.org/index.php?act=ST&f=2&t=10976]here[/url]).  I hope to fix it up sometime and release it, but I can't say when or if I will do it.  Screenshot:


Winamp "Center Cut" DSP Plugin released

Reply #22
You wouldnt feel like porting your plugin to foobar2000? Chun-Yu ported v1.0 to foobar2000 but it would be nice to benefit from the improvements of the newer versions. Perhaps your waiting for the v0.9 SDK to be public first?

Winamp "Center Cut" DSP Plugin released

Reply #23
I am releasing a beta of my DSPDotNet project, it's a wrapper written in Managed C++ and C# to allow Winamp DSP plugins to be written in .NET languages.  I mentioned in my last post that I wasn't happy with it, so it has been completely rewritten .  You can download the binaries here.  Just unzip it to your Winamp\Plugins directory, making sure to preserve directory structure.  The .NET Framework 2.0 is required.

It includes my C# port of Center Cut.  Features over the C++ version are switching between side/center without gaps, a "new algorithm" option (something Avery changed in the code which may or may not improve quality depending on the song), changing window size (it will eat some samples when you do this), and a modification by myself to fix clicking that occurred in the output sometimes.  The Center Cut code is GPL of course, so here's the source for it.

I plan to release the main DSPDotNet code (GPL) when it's finished and documented.

BTW, this runs over 50% faster than the C++ version (both using window size of 8192), most likely because the way I coded the C++ version wasn't so great .

Winamp "Center Cut" DSP Plugin released

Reply #24
Works and sounds great in Winamp!
Unfortunately crashes in foobar with Winamp DSP wrapper, but thats for another thread I guess.

Good work Moitah!