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: Vorbis plugin for Winamp 1.17 (Read 11692 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Vorbis plugin for Winamp 1.17

The Vorbis decoder for Winamp is out of beta now, get it if you didn't get it previously.

Update: Decoder now supports  ReplayGain.

http://www.blorp.com/~peter/zips/wa2update.exe

Vorbis plugin for Winamp 1.17

Reply #1
Woohoo, thanks Wish.
And thanks PP, of course!

Vorbis plugin for Winamp 1.17

Reply #2
Any ideas when/if Winamp is going to include it as part of the default install?  I currently stay all-mp3 for the simple reason that I often like sending songs to friends, and most of them are not technically literate enough to do something like manually install a decoder plugin.  If they could play oggs with the default Winamp install it'd be much nicer.

Vorbis plugin for Winamp 1.17

Reply #3
Last I hard all of wa2update will be in the next Winamp release (including the Vorbis decoder)

Vorbis plugin for Winamp 1.17

Reply #4
Steve was on #vorbis a few days ago, he's gonna direct AOL freaks to some lawyer guy who checked for all possible legal problems with Vorbis before, so expect things to get moving finally.
whole wa2update thing hasn't been officially approved by Justin, but I consider it 'official' update (because most of that stuff will go to next Winamp setup, including new output plugins which actually have been approved by Justin). if i even can't get Vorbis stuff to Winamp setup, i'll keep both plugins (encoder and decoder) in wa2update; the more people install it, the better - maybe those damn n00bz will start using Winamp to encode oggs instead of making wma shit.
Microsoft Windows: We can't script here, this is bat country.


Vorbis plugin for Winamp 1.17

Reply #6
yes, i'll add that soon (doing something else right now)
Microsoft Windows: We can't script here, this is bat country.

Vorbis plugin for Winamp 1.17

Reply #7
Quote
Originally posted by zZzZzZz
yes, i'll add that soon (doing something else right now)


Glad to hear that and thanks

Vorbis plugin for Winamp 1.17

Reply #8
Peter, don't want to be obnoxious, but could you be willing to implement the separate decoder - common ReplayGain control panel idea?
Replay Gain: state of play (http://www.hydrogenaudio.org/forums/showth...t=1339#post6110 )

Ah, you can call me obnoxious if you want 


--ephemeros

Vorbis plugin for Winamp 1.17

Reply #9
done (it's very experimental at the moment) - http://www.blorp.com/~peter/zips/in_vorbis_test.exe
common control panel what ? for all formats ? that would require all input plugins to cooperate. not possible in winamp v2.x. (quite possible to do in wa3 i think)
Microsoft Windows: We can't script here, this is bat country.

Vorbis plugin for Winamp 1.17

Reply #10
This is doublepost from link I mentioned earlier - but I think it's better to discuss this at abovementioned thread (ReplayGain: state of play):

Quote
2. If a player is going to handle Replay Gain properly and consistently across all formats, how should this be done? The obvious answer is to have a single RG control panel, where you can edit the stored values (if needed), set the pre-amp level etc etc. However, at the moment, each format's individual Winamp plug-in is handling the RG adjustment for each format. Hands up who programs with Winamp? How can the plug-ins pass the RG values into a separate RG plug-in which does the processing?


Wouldn't it be better to make the control panel pass it's values (enabled/disabled, pre-amp, ...) to the decoder - like saving in .ini file or something? Decoder support is needed anyway, and I guess quality will be higher. The RG-plugin would only be a common frontend for the different inputs

--ephemeros

 

Vorbis plugin for Winamp 1.17

Reply #11
Oh boy, that was fast. Thanks

Now to go testing

Minor quibble: I hope you will let the user be able choose between using radio or album gain.

Vorbis plugin for Winamp 1.17

Reply #12
ok, no prob.
btw, i've seen Garf's source; may i ask what's the bloody deal with rc3 ov_read_float problems ? (i'm too lazy to look for answer myself; new in_vorbis uses ov_read_float all time).
Microsoft Windows: We can't script here, this is bat country.

Vorbis plugin for Winamp 1.17

Reply #13
Quote
Originally posted by zZzZzZz
ok, no prob.
btw, i've seen Garf's source; may i ask what's the bloody deal with rc3 ov_read_float problems ? (i'm too lazy to look for answer myself; new in_vorbis uses ov_read_float all time).


ov_read_float is a new undocumented function in rc3 (which only you and me are using AFAIK). As you probably have noticed, it's got a weird API. In the normal ov_read, you can specify how many samples you want to get back at most. ov_read_float doesn't allow that, and you have no idea how large a thing you're going to get back. That's a bug (which makes some things more complicated than they should be), and it's going to be fixed in rc4.

Code: [Select]
rc3 ov_read_float:



ret = ov_read_float(&vf, &pcm, &iforgotwhatthiswas);



rc4 (and later) ov_read_float:



ret = ov_read_float(&vf, &pcm, max_number_of_samples_you_want, &iforgotwhatthiswas);


If your code can handle the rc3 behaviour, it'll handle the rc4 behaviour too, you'll just have to add a parameter in the calling sequence.

This wasn't discovered until now because nearly noone used ov_read float. I stumbled over it when implementing ReplayGain in XMMS, and Stan Seibert stumbled over it when implementing ReplayGain in ogg123. xiphmont agreed the current behaviour wasn't what was intended, and decided to change it while still not too many people are using it.

As for ReplayGain support in the vorbis plugin:
if you add a switch for Radio vs Audiophile gain, make sure that if Audiophile gain is selected, and no RG_AUDIOPHILE tag is present, you use the RG_RADIO one. You might want to make the switches read Radio/Track Gain and Audiophile/Album Gain for extra clarity.

Also, if it's not too much trouble, add a seperate switch (seperate from the ReplayGain stuff) 'Clipping prevention'

Psuedocode for impelementation:

Code: [Select]
if (there_is_a_rg_peak_tag())

  peak = to_float(get_rg_peak_tag());

else

  peak = 0.99;



if (cfg->use_replaygain)

  replaygain = to_float(get_right_tag_here_depending_on_user_settings());

else

  replaygain = 0.0;



scale = pow(10. , replaygain/20);



if (cfg->use_clippingprevention)

{

  if (scale * peak > 1.0)

  {

      scale = 1.0 / peak;

  }

}


Lastly, if you still have time, perhaps make the RG_* tags in the file info window appear a bit nicer, and perhaps allow adjustment of RG_RADIO and RG_AUDIOPHILE (not of RG_PEAK) via a simple spin button or so.

--
GCP

Vorbis plugin for Winamp 1.17

Reply #14
Pseudocode for a preamp+hard limiter:

(this really should have been in the WinAmp native preamp btw )

assuming sample is a float with 1.0 being full scale (the stuff you get out of ov_read_float) and is already ReplayGain-processed

Code: [Select]
if (vorbis_cfg.use_hq_preamp)

{

  sample *= pow(10., preamp_db/20);

       

 /* hard 6dB limiting */

 if (sample < -0.5)

              sample = tanh((sample + 0.5) / (1-0.5)) * (1-0.5) - 0.5;

  else if (sample > 0.5)

             sample = tanh((sample - 0.5) / (1-0.5)) * (1-0.5) + 0.5;

}    


Since a) it makes the player slower because of the arithmetic and b) many people will not want the limiter, this should also be a toggelable switch.

preamp_db should be a slider from -12dB to 12dB or so.

--
GCP

Vorbis plugin for Winamp 1.17

Reply #15
ok, thanks for info.
http://www.blorp.com/~peter/zips/in_vorbis_test.exe - still a test version; if you find any problems - report them here.
Microsoft Windows: We can't script here, this is bat country.

Vorbis plugin for Winamp 1.17

Reply #16
Beautiful, simply beautiful

Such a great plugin, such teamwork, such fast progression, such a great idea, such respectfullnes, such helpfulness, such such such....
...
...
*sniff* I'm overwhelmed.
(And obviously losing it)

Thanks a bundle.

Vorbis plugin for Winamp 1.17

Reply #17
just finished porting stuff to wa3. yay. too bad i'm using wa3 sdk which works only with 'leet' internal builds (you will probably have to wait for wa3 beta3 before you can see any binaries).
the fun part is - vorbis wa3 plugin now outputs floats, then a new component (float->pcm converter) converts them to regular PCM (16/24/32bit) and applies replaygain / preamp stuff (optionally with hard limiter, which kicks major ass); any input plugin can produce 32/64bit floats now, add RG_* tags, then my component will handle the rest. hell, it will be even possible to make a "replaygain control panel" which looks much more sweet than the image on replaygain.org, hehehe.
Microsoft Windows: We can't script here, this is bat country.

Vorbis plugin for Winamp 1.17

Reply #18
ReplayGain and the new Winamp Vorbis plugin seems to work just fine on my W2K system (on the few files I've tested it on, using album gain). Thanks guys (Garf and PP)!

I only miss one thing: an option in ReplayGain to not re-calculate the gain if the tags are present. Then I can use my simple bat file to re-scan a bunch of folder and only process the new stuff.

Vorbis plugin for Winamp 1.17

Reply #19
Quote
Originally posted by Lear
I only miss one thing: an option in ReplayGain to not re-calculate the gain if the tags are present. Then I can use my simple bat file to re-scan a bunch of folder and only process the new stuff.


Okay, I'll add this.

--
GCP

Vorbis plugin for Winamp 1.17

Reply #20
Can someone please explain to me what a hard limiter does?

Vorbis plugin for Winamp 1.17

Reply #21
Quote
Originally posted by Wizard
Can someone please explain to me what a hard limiter does?


If you try to increase the amplitude of a digital signal too much, there is a chance it will go outside the range that you can represent. Because you really can't go outside that range, all samples which are outside it will have the same, maximal value. This is known as 'clipping'. For an example, turn the standard WinAmp preamp to +20dB and listen to the result. The sound will have some heavy crackling and very bad quality.

What a hard limiter does is dynamically compressing the digital signal, so that it will never go outside of that range. A graph shows better what happens:



Y-axis are output sample values, X-axis is input

As you can see, the part up until from -0.5 to 0.5 is a straight line. No compression happens, the input sample value is mapped directly to the output sample value without anything changing. But as soon as you go higher the values start getting reduced but they are still monotonically rising. If the input value gets bigger and bigger (or smaller and smaller) the ouput starts curving and approaches -1/1 asymptotically, but never reaches it ('cos that would be clipping).

I hope this makes things clearer, as I'm not very good at making things simple sometimes :-/

--
GCP

Vorbis plugin for Winamp 1.17

Reply #22
Quote
Originally posted by Wizard
Can someone please explain to me what a hard limiter does?


A hard limiter is a compressor. It reduces gain above a given threshold of loudness, limiting all peaks above the threshold to the threshold level. So the high volume parts would get limited, and the low volume parts can be louder. This way you can avoid clipping, and still get the maximum possible loudness for the song, a technique which is, in some variations, widely used in radio and TV broadcast.

The louder you can make a song sound on the radio, the more attention you will get with it. It's the reason why most "singles" are optimized for maximum loudness, whereas the albums are sometimes more carefully produced.


Vorbis plugin for Winamp 1.17

Reply #24
Garf and CiTay, thank you very much for such a detailed explanation