Skip to content

Track volume limited to initial value #453

@jordanske

Description

@jordanske

Your environment

  • Version used: 1.2.0-alpha.64
  • Platform used: JavaScript
  • Rendering engine used: SVG
  • Browser Name and Version: Any
  • Operating System and version Win10
  • Link to your project:
    Example with track-volume.gp

Description

While working on #451 I noticed that when I increase the volume slider (of a track that is by default for example 20%) the volume does not increase. But if I go lower that 20% is does decrease. So it seems the volume is limited to the volume in the track information.

Expected Results

Volume increases when I increase the slider

Observed Results

Volume is limited to the initial value.

Steps to Reproduce (for bugs)

  1. Load any file with a track volume lower then the default, for example 50%
  2. Solo the track
  3. Hear that there is no difference if the slider is at 50% or 100%.
    But lower than 50% still lowers the volume.

As example you can use the project link, and the -16DB track.

Possible Solution

I am not sure what the intended behaviour is.

volumeSlider.oninput = function (e) {
e.preventDefault();
// Here we need to do some math to map the 1-16 slider to the
// volume in alphaTab. In alphaTab it is 1.0 for 100% which is
// equal to the volume in the track information
at.changeTrackVolume([track], volumeSlider.value / track.playbackInfo.volume);
};

If I read this than I think that the slider should initially always be set to 100%, and the slider is relative to the track information.

But I think that it would be more logical that the slider value represent the actual volume. So if the initial value from the track information is at 50%, the slider would also be at 50% and can be set higher by the user if desired.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions