Language…
19 users online: Adsila, anonimzwx, Batata Douce, Blizzard Buffalo, BlueSheep123, David_Odie, Doopu, Ekimnoid, Hammerer, HD_DankBaron, LightAligns, LuigiTron, Maniek, MorrieTheMagpie, ppp9q,  Ringo, sinseiga, sugarfish456, WalrusLife - Guests: 258 - Bots: 342
Users: 64,795 (2,376 active)
Latest user: mathew

Calculating Volume displayed in SPC700 Player

Is there a formula that can be used to infer the volume that is displayed in the SPC700 player? Especially how panning with y0 - y20 affect it would be interesting.

In my case I need different v and y values at w255 to get specific volume levels (for example 21 2A or 25 15).
I also noticed that the values are rounded or quantized in some way, because e.g. v163 - v165 results in a level of 1F 1F.
A Discord bot named VilelaBot can give you the right values to put in the text file, calculated from SPC700's volume levels you input for the bot.
It's not in this site's Discord server, but it's in a Discord server named SnesLab.

(No, I don't know how to exactly calculate without relying on VilelaBot ATM)
The formula is not super complex but definitely tedious to do by hand, I usually use BRRPlayer which has a volume calculator function too (for whatever reason). The bot brickblock mentioned works well enough as well.
I have tested both variants and they work perfectly.
But I still have one question and that is where can I read the global volume in the SPC700 player? I had assumed that it is the MasterLv (7F 7F), but it seems not.
If you mean the wXXX value, no, there's no way. Especially because some spc engines may not even have a global volume command in the first place.
yes I mean the wXXX value. I have extremely strong fluctuations with the $FA $03 $XX command, so I'm going to assume that other SPC engines calculate their volume completely differently. My song is already big, so I don't want to use additional space with the $FA $03 command. The tool helps enormously though, because I get the y value and can calculate the v value at least approximately by adding the $FA $03 $XX factor (if it's a linear function).

What is the default value of wXXX anyway if you don't set it yourself? I would estimate it somewhere around w200.
Originally posted by Ahrion
What is the default value of wXXX anyway if you don't set it yourself? I would estimate it somewhere around w200.

The SPC engine that AMK uses always sets the global volume to 192 before starting playback of the song.
Originally posted by Ahrion
yes I mean the wXXX value. I have extremely strong fluctuations with the $FA $03 $XX command, so I'm going to assume that other SPC engines calculate their volume completely differently. My song is already big, so I don't want to use additional space with the $FA $03 command. The tool helps enormously though, because I get the y value and can calculate the v value at least approximately by adding the $FA $03 $XX factor (if it's a linear function).

What is the default value of wXXX anyway if you don't set it yourself? I would estimate it somewhere around w200.

$FA $03 is a linear volume multiplier, whereas v and w are exponential.
AMK uses the following formula for it:
Code
(computedvolume * volumemultipier / $100)

This means that $FF roughly doubles your output, but in dB it won't be twice as loud, whereas with v and w that should be roughly equivalent.