|
![]() |
#1 |
Junior Member
Join Date: Jan 2022
Posts: 11
|
questions about bass,mid,treb and value1 value2
Been using Winamp since the 90s when it was first released. Never registered here, hi to all the admins
Was running some tests with linein:// and Milkdrop, looking at the existing presets to maybe author my own I noticed something odd that I'm still investigating, downloaded the Milkdrop 2.25 CPP source and going through the code there to see if I can figure this out, I'm not very familiar with CPP so it might take me a while. I used the source linked to from this post - http://forums.shoutcast.com/showthread.php?t=214971 I noticed that if I use bass, mid or treb (or bass_att, mid_att, treb_att) that it seems to only respond to one of the two stereo channels. if I use value1 or value2 they definitely do change independently of each other, so stereo sound is definitely making its way into those two variables, but when I use bass/mid/treb only one of the channels affects those values. I'm not sure if it's the left or right channel but it doesn't matter, you can test it yourself pretty easily. Just wanted to be sure that I'm not misunderstanding how bass/mid/treb should work, they should change based the combined left and right channels downsampled together to mono, correct? it wouldn't make sense if they only reflected values of one of the two channels. or is there a way to get bass/mid/left for either left or right channels? |
![]() |
![]() |
![]() |
#2 |
FRISIAN
Join Date: Sep 2003
Location: in a house
Posts: 16,464
|
[edit]
put original post here, others closed ~NJK[/edit] |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Sep 2016
Posts: 37
|
Hi Starjunk,
I'm far from an expert, but my understanding is that both channels do receive & forward information, but they are ultimately summed... could this line up with the results you are seeing? I'd assume this could be explained (corrected!) further... as long as Nitorami sees this thread ![]() |
![]() |
![]() |
![]() |
#4 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
yeah that was my understanding too, that bass, mid and treb get the same information as value1 and value2, but my tests don't show that. The only way to test this is to have two custom waves, one that uses bass,mid,treb and one that uses value1,value2, and then use linein:// with a source that has stereo sound. Then, start the visualization, and using your system's volume input balance, shift the balance from the left to the right. Shifting the balance to the left and right will force Milkdrop to only respond to either the right or left channels (because the opposite one would be muted) and so with the custom waves, the bass/mid/treb wave should respond to both if they are summed. Value1 and Value2 should only respond to one channel at a time if the source balance is shifted all the way left or right. I'll put together a simple visualization and post it up here. I'll try to make it as simple as possible so we can discuss the code and results. If anyone else has feedback in the meantime feel free... |
|
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Sep 2016
Posts: 37
|
I'd be interested to check any uploads you may provide
![]() On that topic - probably going to help my research more than your own, but... do you see the same behaviour (or notice anything interesting, in your opinion) if you use Jasper's line-in plugin instead of the stock linein:// ? Only asking because you can use that to set the number of channels to open 'on the input side' (i.e. line://nch=1 or line://nch=2 |
![]() |
![]() |
![]() |
#6 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
Actually with my initial tests, it looks like the general "volume" values are only from either the left or right channels, not both combined. So it seems it's not even just the bass,mid,treb values that do not take both stereo channels into consideration, it seems like it's everything *other than* value1 and value2. As you can see in the screenshots, the blue represents one channel and red presents the other channel. The green circle is just the standard simple waveform mode 0. With both channels at 100% volume both red and blue have activity, green in the centre as well. Shift the balance all the way one side and the blue and green still react, however shift it all the way to the other and the green stops reacting but the red still does. This means whatever variable is driving the green centre loop requires there to be input from the blue channel. See the screenshots of my testing, and the attached .milk -- only the essential values specified, all other values removed since Milkdrop will use default values if not specified. Here's the milk code, we can inspect each line if necessary code: |
|
![]() |
![]() |
![]() |
#7 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
Hi
Indeed my own tests confirm that the simple waveforms only use the right stereo channel, while bass, mid and treb only use the left channel. Surprise ! I had never noticed that, and always assumed these would be based on a mono mixdown. ![]() Value1 and Value2 contain the proper stereo signals, and you may use them to create your own volume signals. But note another important difference: bass/mid/treb are auto gain calibrated, which means that if your audio source only delivers a small signal, winamp will slowly increase the amplification to keep bass/mid/treb to an average of approximately 0.7...1. Vice versa for strong audio sources. Therefore you may expect decent bass/mid/treb signals to control the preset, independent of the average audio level. This is not the case for value1 and value2 which seem to be the raw audio signals. If your source level is 20dB below normal, value1 and 2 will be as well. While the level for commercial audio CDs is standardised, this is not the case for other sources such as youtube. So if you want to use value1/value2 in a preset, you should do something similar and calibrate them, otherwise your preset may under- or overreact depending on the audio level/source. |
![]() |
![]() |
![]() |
#8 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
Thanks for jumping in! I see you're very active and popular here so your insight, feedback and recommendations are very appreciated. I hadn't noticed that the "deafness" was not the same for simple waveforms vs bass,mid,treb so thank you for sharing that. When I noticed it happed with simple waveforms too I figured it was the same blockage that affected bass,mid,treb. Regarding proposing a fix, without knowing too much about what's involved, now that we have a few confirmations of unexpected behaviour, who do you think would have the knowledge/desire to implement a fix directly in the CPP? I had a quick look at the code but it's been a while since I touched CPP and pinpointing the lines and proposing a fix might take me forever. I suspect most other users would imagine it functions the way you and I expected: the signals of left and right would be downsampled/combined to mono. Or, if we're looking to improve it, we could propose synonymous bass/bass1 and add a new bass2 for example. Lots of options but translating it to code is the catch. Love to hear your feedback! Cheers |
|
![]() |
![]() |
![]() |
#9 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
Hi Starjunk
Milkdrop has not been worked on for years, and there is no active development. If you want something changed, you'll have to do it yourself. Sorry. I don't have the skills, and I would have other priorities than these signals, e.g. making the shader sections more flexible. There were discussions on making a new milkdrop version, see http://forums.winamp.com/showpost.ph...&postcount=238, but this was long ago, and I guess Litheon has long moved on to different things. Cheers Martin |
![]() |
![]() |
![]() |
#10 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
Then again the next step would be to compile the code if I were able to fix it, which I'm not sure I'd be able to do. If anyone can help guide me to compile the CPP code that would also be super helpful. Do you know if Ryan ever visits this forum? I see he has an active Twitter and YouTube... |
|
![]() |
![]() |
![]() |
#11 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
I think Ryan occasionally visits this forum but he keeps in the background.
But why are you so focused on these signals ? If you desparately need them to come from both channels, you can do that in the preset code as well, and that is far easier than manipulating the source code. |
![]() |
![]() |
![]() |
#12 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
As for fixing the code, well it's not a desperation thing since it's not my code, it's more for the community and contributing in a way that others might appreciate. I mean, if this bug does go back since Milkdrop 1.0 then it's a 20 year bug and if I can help with fixing it then that would be my way to contribute to the Winamp community. I'm just getting started with editing presets, how would I fix this in the preset code? If it's that easy then absolutely that would be easier than inspecting all the CPP code ![]() Cheers |
|
![]() |
![]() |
![]() |
#13 |
Major Dude
Join Date: Mar 2008
Location: Erlangen
Posts: 942
|
Alright. It may be a bug or not, but it has been like this for the past 20 years, and worked well. Changing it now would break backwards compatibility, or, in simpler words, make many presets react differently than intended. This is a no go.
In case you want to get into preset writing, I attach a sample code which demonstrates how to calculate your own bass, mid and treb signals, audio level normalised, and even separately for left and right channel. It should give you a good idea how to do these things. Cheers Martin |
![]() |
![]() |
![]() |
#14 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
as for the backward compatibility, yes I agree changing any existing behaviour would be bad since like you said it would break functionality... HOWEVER that is why I suggested synonyms bass/bass1 and adding bass2, thus by creating bass1/bass2 they would be unused variables in any existing preset and the original bass would continue to function as it did before. bass1/bass2 would thus follow the value1/value2 format and thereby be a natural continuation of the existing Milkdrop logic. I'm familiar with the importance of backward compatibility ![]() |
|
![]() |
![]() |
![]() |
#15 |
Junior Member
Join Date: Sep 2016
Posts: 37
|
Well, as usual - I've learnt a lot from all everyone's posts!
Starjunk, I know you said you'd like to focus on 'stock' for now (which I can understand) - plus, it would likely be more fulfilling to create and understand code based on the info & sample .milk from Nitorami - but I figured I should mention... WACUP (an ongoing project by one of the original Winamp devs) - check getwacup.com ![]() I suggest this as he has already fixed some long-standing Milkdrop bugs as part of the project. If you are interested, join in!; he would likely be able to fix the issue, or at a minimum, check the code and confirm if it's a possible/worthwhile/etc fix. |
![]() |
![]() |
![]() |
#16 | |
Junior Member
Join Date: Jan 2022
Posts: 11
|
Quote:
I'm not totally 100% committed to using stock so definitely if there is a fork with genuine effort behind it I'll be happy to contribute there in any way I can. Cheers |
|
![]() |
![]() |
![]() |
|
Tags |
bass/mid/treb, source code, stereo, value1, value2 |
Thread Tools | Search this Thread |
Display Modes | |
|
|