home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Quality Assurance
Bugreports
Archive
VU meter code - possible error?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ajs" data-source="post: 1224630" data-attributes="member: 68833"><p>[USER=10391]@hwahrmann[/USER]</p><p>Plz help <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> I read the documentation and can not understand anything.</p><p>RMS Function in MP: <a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs#L2213" target="_blank">MediaPortal-1/BassAudioEngine.cs at master · MediaPortal/MediaPortal-1 · GitHub</a></p><p>Used:</p><p>1. First: <strong>BASS_Mixer_ChannelGetLevel</strong> or <strong>BASS_WASAPI_GetLevel</strong>, both return values for Left, Right channel (Left - LowWord, Rigth - HiWord) and value by channel <strong>from 0 to 32768</strong>. <a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs#L2232-L2242" target="_blank">MediaPortal-1/BassAudioEngine.cs at master · MediaPortal/MediaPortal-1 · GitHub</a></p><p></p><p>2. Then <strong>LevelToDB</strong>(peakL, 65535) - from un4seen forum <a href="http://www.un4seen.com/forum/?topic=4831.msg32212#msg32212" target="_blank">dB to BASS volume?</a> this function work as: <strong>20 * log10( level / maxLevel )</strong> and for <strong>32768</strong> return<strong> -6.020461</strong> and for <strong>1</strong> return <strong>-96.478175</strong>, for <strong>0</strong> return <strong>-infinity</strong></p><p>3. Then in <a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/Common.GUIPlugins/Music/GUIMusicPlayingNow.cs#L723-L724" target="_blank">MediaPortal-1/GUIMusicPlayingNow.cs at master · MediaPortal/MediaPortal-1 · GitHub</a> both channel value Increase by an absolute value multiplied by 0.5 and start to coincide with values from <strong>< -15 (VU1.png)</strong> to <strong>>= 3 (VU15.png)</strong>. <a href="https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/Common.GUIPlugins/Music/GUIMusicPlayingNow.cs#L728-L788" target="_blank">MediaPortal-1/GUIMusicPlayingNow.cs at master · MediaPortal/MediaPortal-1 · GitHub</a></p><p>Ie:</p><p><strong>~Min: 1</strong> -> -96.478175 -> -96.478175+(96.478175*0.5) -> <strong>-48.239087</strong></p><p><strong><strong>Max: 32768</strong></strong> -> -6.020461 -> -6.020461+(6.020461*0.5) -> <strong>-3.010231</strong></p><p>and</p><p><strong>Min</strong> -48.239087 < -15 Then return <strong>VU1.png</strong></p><p><strong>Max</strong> -3.010231 < -2 Then return<strong> VU9.png </strong>but how about <strong>VU10..VU15</strong>? <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /></p><p><strong></strong></p><p><strong>I did not calculate correctly? Or I did not understand the documentation correctly? Or do we still have a problem with displaying the level through the channels? Or we do not have a problem and then please tell me where I was wrong? <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite27" alt=":whistle:" title="Whistling :whistle:" loading="lazy" data-shortname=":whistle:" /><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite29" alt=":coffee:" title="Coffee :coffee:" loading="lazy" data-shortname=":coffee:" /> </strong></p><p><strong></strong></p><p>Thankful in advance for the answer.</p></blockquote><p></p>
[QUOTE="ajs, post: 1224630, member: 68833"] [USER=10391]@hwahrmann[/USER] Plz help :) I read the documentation and can not understand anything. RMS Function in MP: [URL='https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs#L2213']MediaPortal-1/BassAudioEngine.cs at master · MediaPortal/MediaPortal-1 · GitHub[/URL] Used: 1. First: [B]BASS_Mixer_ChannelGetLevel[/B] or [B]BASS_WASAPI_GetLevel[/B], both return values for Left, Right channel (Left - LowWord, Rigth - HiWord) and value by channel [B]from 0 to 32768[/B]. [URL='https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/Core/MusicPlayer/BASS/BassAudioEngine.cs#L2232-L2242']MediaPortal-1/BassAudioEngine.cs at master · MediaPortal/MediaPortal-1 · GitHub[/URL] 2. Then [B]LevelToDB[/B](peakL, 65535) - from un4seen forum [URL='http://www.un4seen.com/forum/?topic=4831.msg32212#msg32212']dB to BASS volume?[/URL] this function work as: [B]20 * log10( level / maxLevel )[/B] and for [B]32768[/B] return[B] -6.020461[/B] and for [B]1[/B] return [B]-96.478175[/B], for [B]0[/B] return [B]-infinity[/B] 3. Then in [URL='https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/Common.GUIPlugins/Music/GUIMusicPlayingNow.cs#L723-L724']MediaPortal-1/GUIMusicPlayingNow.cs at master · MediaPortal/MediaPortal-1 · GitHub[/URL] both channel value Increase by an absolute value multiplied by 0.5 and start to coincide with values from [B]< -15 (VU1.png)[/B] to [B]>= 3 (VU15.png)[/B]. [URL='https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/Common.GUIPlugins/Music/GUIMusicPlayingNow.cs#L728-L788']MediaPortal-1/GUIMusicPlayingNow.cs at master · MediaPortal/MediaPortal-1 · GitHub[/URL] Ie: [B]~Min: 1[/B] -> -96.478175 -> -96.478175+(96.478175*0.5) -> [B]-48.239087 [B]Max: 32768[/B][/B] -> -6.020461 -> -6.020461+(6.020461*0.5) -> [B]-3.010231[/B] and [B]Min[/B] -48.239087 < -15 Then return [B]VU1.png Max[/B] -3.010231 < -2 Then return[B] VU9.png [/B]but how about [B]VU10..VU15[/B]? :( [B] I did not calculate correctly? Or I did not understand the documentation correctly? Or do we still have a problem with displaying the level through the channels? Or we do not have a problem and then please tell me where I was wrong? :whistle::coffee: [/B] Thankful in advance for the answer. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Bugreports
Archive
VU meter code - possible error?
Contact us
RSS
Top
Bottom