Class: Id3v2RelativeVolumeFrameChannelData

March 10, 2023 · View on GitHub

node-taglib-sharp / Exports / Id3v2RelativeVolumeFrameChannelData

Class: Id3v2RelativeVolumeFrameChannelData

Represents the relative volume data that applies to a specific channel of the audio.

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new Id3v2RelativeVolumeFrameChannelData(channel)

Constructs a new instance of relative volume information that applies to the provided audio channel.

Parameters

NameTypeDescription
channelId3v2RelativeVolumeFrameChannelTypeChannel that the relative volume information applies to

Accessors

channelType

get channelType(): Id3v2RelativeVolumeFrameChannelType

Gets the channel that the current instance applies to.

Returns

Id3v2RelativeVolumeFrameChannelType


isSet

get isSet(): boolean

Gets whether the current instance actually contains a relative volume adjustment.

Returns

boolean


peakBits

get peakBits(): number

Number of bits used to express the peak volume.

Returns

number

set peakBits(value): void

Number of bits used to express the peak volume.

Parameters

NameTypeDescription
valuenumberBits used to express the peak volume. Must be an integer betweenInclusive 1 and 64

Returns

void


peakVolume

get peakVolume(): bigint

Value of the peak sample in the file. It's unclear exactly how this works, but the ID3v2.4 documentation explains this value as betweenInclusive 0 and 255 - but can be expressed using any number of bits (peakBits).

Returns

bigint

set peakVolume(value): void

Value of the peak sample in the file. It's unclear exactly how this works, but the ID3v2.4 documentation explains this value as betweenInclusive 0 and 255 - but can be expressed using any number of bits (peakBits).

Parameters

NameTypeDescription
valuebigintPeak volume value. Must fit in the number of bits set in peakBits

Returns

void


volumeAdjustment

get volumeAdjustment(): number

Volume adjustment of the track in dB.

Returns

number

set volumeAdjustment(value): void

Volume adjustment of the track in dB. This value is expressed as a fixed-precision value betweenInclusive -64 and 64. Don't worry about the math, we'll do it for you.

Parameters

NameTypeDescription
valuenumberVolume adjustment. Must be between -64 and 64, inclusive.

Returns

void

Methods

render

render(): ByteVector

Generates a raw byte representation of the current instance.

Returns

ByteVector


fromData

Static fromData(bytes): Id3v2RelativeVolumeFrameChannelData

Constructs a new instance from the raw bytes of channel data.

Parameters

NameTypeDescription
bytesByteVectorRaw bytes that contain the channel data object.

Returns

Id3v2RelativeVolumeFrameChannelData