public class ID3v24FrameBodyReverb extends ID3v24FrameBody
A reverb frame body is associated with an ID3v2.4 RVRB
frame
which is used to adjust echoes of different kinds when
the .mp3 file is played. The reverb frame body contains the following fields:
Field | Description | |
---|---|---|
1. | left | the delay between every bounce (in ms) on the left channel |
2. | right | the delay between every bounce (in ms) on the right channel |
3. | leftBounces | the number of bounces that should be made for the reverb on the left channel. (0x00 == 0 bounces, 0xFF == an infinite number of bounces) |
4. | rightBounces | the number of bounces that should be made for the reverb on the right channel. (0x00 == 0 bounces, 0xFF == an infinite number of bounces) |
5. | feedbackLeftToLeft | the volume that should be returned to the next echo bounce. 0x00 is 0%, 0xFF is 100%. |
6. | feedbackLeftToRight | if this value were 0x7F, there would be 50% volume reduction on the first bounce, 50% of that on the second and so on. |
7. | feedbackRightToRight | left to right means the first bounce is heard on the left channel, the second bounce on the right channel, and so on. |
8. | feedbackRightToLeft | right to left means the first bounce is heard on the right channel, the second bounce on the left channel, and so on. |
9. | premixLeftToRight | the amount of left sound to be mixed in the right before any reverb is applied, where 0x00 id 0% and 0xFF is 100%. |
10. | premixRightToLeft | setting both premix to 0xFF would result in a mono output (if the reverb is applied symmetric). |
There may only be one reverb frame in an ID3v2.4 tag
.
buffer, dirty, frameType
nextNullTerminatorIndex, nullTerminatorIndex
Constructor and Description |
---|
ID3v24FrameBodyReverb()
The default constructor is called when creating a new frame.
|
ID3v24FrameBodyReverb(java.io.InputStream inputStream,
int frameBodySize)
This constructor is called when reading in an existing frame from an .mp3 file.
|
ID3v24FrameBodyReverb(int left,
int right,
byte leftBounces,
byte rightBounces,
byte feedbackLeftToLeft,
byte feedbackLeftToRight,
byte feedbackRightToRight,
byte feedbackRightToLeft,
byte premixLeftToRight,
byte premixRightToLeft)
This constructor is called when creating a new frame.
|
Modifier and Type | Method and Description |
---|---|
byte |
getFeedbackLeftToLeft()
gets the left to left feedback, which is the volume that should be returned to the next echo bounce on the left channel.
|
byte |
getFeedbackLeftToRight()
gets the left to right feedback, which is the volume that should be returned to the next echo bounce.
|
byte |
getFeedbackRightToLeft()
gets the right to left feedback, which is the volume that should be returned to the next echo bounce.
|
byte |
getFeedbackRightToRight()
sets the right to right feedback, which is the volume that should be returned to the next echo bounce on the right channel.
|
int |
getLeft()
gets the amount of reverb in the left channel.
|
byte |
getLeftBounces()
gets the number of bounces that should be made for the reverb on the left channel.
|
byte |
getPremixLeftToRight()
gets the amount of left sound to be mixed in the right before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.
|
byte |
getPremixRightToLeft()
gets the amount of right sound to be mixed in the left before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.
|
int |
getRight()
gets the amount of reverb in the right channel.
|
byte |
getRightBounces()
gets the number of bounces that should be made for the reverb on the right channel.
|
void |
parse()
parses the raw bytes of the frame body and stores the parsed values in the frame's fields.
|
void |
setBuffer()
If the frame body's values have been modified, then resize the raw binary buffer and store the new values there.
|
void |
setFeedbackLeftToLeft(byte feedbackLeftToLeft)
sets the left to left feedback, which is the volume that should be returned to the next echo bounce on the left channel.
|
void |
setFeedbackLeftToRight(byte feedbackLeftToRight)
sets the left to right feedback, which is the volume that should be returned to the next echo bounce.
|
void |
setFeedbackRightToLeft(byte feedbackRightToLeft)
sets the right to left feedback, which is the volume that should be returned to the next echo bounce.
|
void |
setFeedbackRightToRight(byte feedbackRightToRight)
sets the right to right feedback, which is the volume that should be returned to the next echo bounce on the right channel.
|
void |
setLeft(int left)
sets the delay between every bounce (in ms) on the left channel.
|
void |
setLeftBounces(byte leftBounces)
sets the number of bounces that should be made for the reverb on the left channel.
|
void |
setPremixLeftToRight(byte premixLeftToRight)
sets the amount of left sound to be mixed in the right before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.
|
void |
setPremixRightToLeft(byte premixRightToLeft)
gets the amount of right sound to be mixed in the left before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.
|
void |
setRight(int right)
sets the delay between every bounce (in ms) on the right channel.
|
void |
setRightBounces(byte rightBounces)
sets the number of bounces that should be made for the reverb on the right channel.
|
java.lang.String |
toString()
gets a string representation of the reverb frame body showing all of the frame's fields and their values.
|
getFrameType, getNextNullTerminator, getSize, isDirty, save, save
getNextNullTerminator, pricesToString, stringToBytes
bytesToInt, bytesToInt, bytesToShort, bytesToShort, bytesToSynchsafeInt, bytesToSynchsafeShort, formateDate, hex, hex, hex, intToBytes, littleEndianBytesToInt, pad, shortToBytes, synchsafeIntToBytes
public ID3v24FrameBodyReverb()
public ID3v24FrameBodyReverb(int left, int right, byte leftBounces, byte rightBounces, byte feedbackLeftToLeft, byte feedbackLeftToRight, byte feedbackRightToRight, byte feedbackRightToLeft, byte premixLeftToRight, byte premixRightToLeft)
left
- the delay between every bounce (in ms) on the left channelright
- the delay between every bounce (in ms) on the right channelleftBounces
- the number of bounces that should be made for the reverb on the left channel. (0x00 == 0, 0xFF == an infinite number of bounces)rightBounces
- the number of bounces that should be made for the reverb on the right channel. (0x00 == 0, 0xFF == an infinite number of bounces)feedbackLeftToLeft
- the volume that should be returned to the next echo bounce. 0x00 is 0%, $FF is 100%.feedbackLeftToRight
- if this value were 0x7F, there would be 50% volume reduction on the first bounce, 50% of that on the second and so on.feedbackRightToRight
- left to right means the first bounce is heard on the left channel, the second bounce on the right channel, and so on.feedbackRightToLeft
- right to left means the first bounce is heard on the right channel, the second bounce on the left channel, and so on.premixLeftToRight
- the amount of left sound to be mixed in the right before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.premixRightToLeft
- setting both premix to $FF would result in a mono output (if the reverb is applied symmetric).public ID3v24FrameBodyReverb(java.io.InputStream inputStream, int frameBodySize) throws java.io.IOException
inputStream
- input stream pointing to a reverb frame body in the .mp3 file.frameBodySize
- size (in bytes) of the frame's body.java.io.IOException
- if there is an error while reading the frame body.public void parse() throws java.lang.IllegalArgumentException
parse
in class ID3v24FrameBody
java.lang.IllegalArgumentException
- if an invalid value is detected while parsing the frame body's raw bytes.public int getLeft()
setLeft(int)
,
getRight()
public void setLeft(int left)
left
- the amount of reverb in the left channel.getLeft()
,
setRight(int)
public int getRight()
setRight(int)
,
getLeft()
public void setRight(int right)
right
- the amount of reverb in the right channel.getRight()
,
setLeft(int)
public byte getLeftBounces()
setLeftBounces(byte)
,
getRightBounces()
public void setLeftBounces(byte leftBounces)
leftBounces
- the number of bounces where 0x00 == 0 bounces and 0xFF == an infinite number of bounces.getLeftBounces()
,
setRightBounces(byte)
public byte getRightBounces()
setRightBounces(byte)
,
getLeftBounces()
public void setRightBounces(byte rightBounces)
rightBounces
- the number of bounces where 0x00 == 0 bounces and 0xFF == an infinite number of bounces.getRightBounces()
,
setLeftBounces(byte)
public byte getFeedbackLeftToLeft()
setFeedbackLeftToLeft(byte)
public void setFeedbackLeftToLeft(byte feedbackLeftToLeft)
feedbackLeftToLeft
- the volume that should be returned to the next echo bounce on the left channel.getFeedbackLeftToRight()
public byte getFeedbackLeftToRight()
setFeedbackLeftToRight(byte)
public void setFeedbackLeftToRight(byte feedbackLeftToRight)
feedbackLeftToRight
- the volume that should be returned to the next echo bounce. 0x00 is 0%, 0x7F is 50%, 0xFF is 100%.getFeedbackLeftToRight()
public byte getFeedbackRightToRight()
setFeedbackRightToRight(byte)
public void setFeedbackRightToRight(byte feedbackRightToRight)
feedbackRightToRight
- the volume that should be returned to the next echo bounce on the right channel. 0x00 is 0%, $FF is 100%.getFeedbackRightToRight()
public byte getFeedbackRightToLeft()
public void setFeedbackRightToLeft(byte feedbackRightToLeft)
feedbackRightToLeft
- the volume that should be returned to the next echo bounce. 0x00 is 0%, 0x7F is 50%, 0xFF is 100%.public byte getPremixLeftToRight()
public void setPremixLeftToRight(byte premixLeftToRight)
premixLeftToRight
- the amount of left sound to be mixed in the right before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.public byte getPremixRightToLeft()
public void setPremixRightToLeft(byte premixRightToLeft)
premixRightToLeft
- the amount of right sound to be mixed in the left before any reverb is applied, where 0x00 id 0% and 0xFF is 100%.public void setBuffer()
setBuffer
in class ID3v24FrameBody
public java.lang.String toString()
toString
in class java.lang.Object