Banner
The Overworld Design Contest ends in
6 DAYS, 5 HOURS, 57 MINUTES AND 43 SECONDS
Views: 905,570,723
Time:
23 users online:  1UPdudes,  AmperSam,  Anorakun, Bench-kun, BootaNoBijuu, buggy789, DIRIMAC, edgar, FabioBR98, Florian1996, Frozen Aurora, Goomba-24, Infinity, Ixitxachitl, JonnyManjiro, Klug, l337f00l, Nowieso, PlagueofDoom, Rilla Roo, Rozen, underway, YouFailMe - Guests: 72 - Bots: 73 Users: 50,758 (2,067 active)
Latest: Florian1996
Tip: Pressing Ctrl + Del in Lunar Magic will delete all objects, sprites, and screen exits from the current level.
Not logged in.
Calculating Volume displayed in SPC700 Player
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - Calculating Volume displayed in SPC700 Player
Pages: « 1 » Link
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.

--------------------
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - Calculating Volume displayed in SPC700 Player

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks