| Constructor and Description |
|---|
NbsHeader() |
NbsHeader(com.google.common.io.LittleEndianDataInputStream dis) |
NbsHeader(short length,
byte nbsVersion,
byte vanillaInstrumentCount,
short layerCount,
java.lang.String title,
java.lang.String author,
java.lang.String originalAuthor,
java.lang.String description,
short speed,
boolean autoSave,
byte autoSaveInterval,
byte timeSignature,
int minutesSpent,
int leftClicks,
int rightClicks,
int noteBlocksAdded,
int noteBlocksRemoved,
java.lang.String sourceFileName) |
NbsHeader(short length,
byte nbsVersion,
byte vanillaInstrumentCount,
short layerCount,
java.lang.String title,
java.lang.String author,
java.lang.String originalAuthor,
java.lang.String description,
short speed,
boolean autoSave,
byte autoSaveInterval,
byte timeSignature,
int minutesSpent,
int leftClicks,
int rightClicks,
int noteBlocksAdded,
int noteBlocksRemoved,
java.lang.String sourceFileName,
boolean loop,
byte maxLoopCount,
short loopStartTick) |
NbsHeader(SongView<N> songView) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthor() |
byte |
getAutoSaveInterval() |
java.lang.String |
getDescription() |
short |
getLayerCount() |
int |
getLeftClicks() |
short |
getLength()
Can be -1 if the nbsVersion did not support this field
|
short |
getLoopStartTick() |
byte |
getMaxLoopCount() |
int |
getMinutesSpent() |
byte |
getNbsVersion() |
int |
getNoteBlocksAdded() |
int |
getNoteBlocksRemoved() |
java.lang.String |
getOriginalAuthor() |
int |
getRightClicks() |
java.lang.String |
getSourceFileName() |
short |
getSpeed() |
byte |
getTimeSignature() |
java.lang.String |
getTitle() |
byte |
getVanillaInstrumentCount() |
boolean |
isAutoSave() |
boolean |
isLoop() |
void |
setAuthor(java.lang.String author) |
void |
setAutoSave(boolean autoSave) |
void |
setAutoSaveInterval(byte autoSaveInterval) |
void |
setDescription(java.lang.String description) |
void |
setLayerCount(short layerCount) |
void |
setLeftClicks(int leftClicks) |
void |
setLength(short length) |
void |
setLoop(boolean loop) |
void |
setLoopStartTick(short loopStartTick) |
void |
setMaxLoopCount(byte maxLoopCount) |
void |
setMinutesSpent(int minutesSpent) |
void |
setNbsVersion(byte nbsVersion) |
void |
setNoteBlocksAdded(int noteBlocksAdded) |
void |
setNoteBlocksRemoved(int noteBlocksRemoved) |
void |
setOriginalAuthor(java.lang.String originalAuthor) |
void |
setRightClicks(int rightClicks) |
void |
setSourceFileName(java.lang.String sourceFileName) |
void |
setSpeed(short speed) |
void |
setTimeSignature(byte timeSignature) |
void |
setTitle(java.lang.String title) |
void |
setVanillaInstrumentCount(byte vanillaInstrumentCount) |
void |
write(com.google.common.io.LittleEndianDataOutputStream dos) |
public NbsHeader(com.google.common.io.LittleEndianDataInputStream dis)
throws java.io.IOException
java.io.IOExceptionpublic NbsHeader(short length,
byte nbsVersion,
byte vanillaInstrumentCount,
short layerCount,
java.lang.String title,
java.lang.String author,
java.lang.String originalAuthor,
java.lang.String description,
short speed,
boolean autoSave,
byte autoSaveInterval,
byte timeSignature,
int minutesSpent,
int leftClicks,
int rightClicks,
int noteBlocksAdded,
int noteBlocksRemoved,
java.lang.String sourceFileName,
boolean loop,
byte maxLoopCount,
short loopStartTick)
public NbsHeader(short length,
byte nbsVersion,
byte vanillaInstrumentCount,
short layerCount,
java.lang.String title,
java.lang.String author,
java.lang.String originalAuthor,
java.lang.String description,
short speed,
boolean autoSave,
byte autoSaveInterval,
byte timeSignature,
int minutesSpent,
int leftClicks,
int rightClicks,
int noteBlocksAdded,
int noteBlocksRemoved,
java.lang.String sourceFileName)
public NbsHeader()
public NbsHeader(SongView<N> songView)
public void write(com.google.common.io.LittleEndianDataOutputStream dos)
throws java.io.IOException
java.io.IOExceptionpublic short getLength()
public void setLength(short length)
length - The length of the song, measured in ticks. Divide this by the tempo to get the length of the song in seconds.public byte getNbsVersion()
public void setNbsVersion(byte nbsVersion)
nbsVersion - The version of the NBS format.public byte getVanillaInstrumentCount()
public void setVanillaInstrumentCount(byte vanillaInstrumentCount)
vanillaInstrumentCount - Amount of default instruments when the song was saved. This is needed to determine at what index custom instruments start.public short getLayerCount()
public void setLayerCount(short layerCount)
layerCount - The last layer with at least one note block in it, or the last layer that has had its name, volume or stereo changed.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - The name of the song.public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
author - The author of the song.public java.lang.String getOriginalAuthor()
public void setOriginalAuthor(java.lang.String originalAuthor)
originalAuthor - The original author of the song.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - The description of the song.public short getSpeed()
public void setSpeed(short speed)
speed - The tempo of the song multiplied by 100 (for example, 1225 instead of 12.25). Measured in ticks per second.public boolean isAutoSave()
public void setAutoSave(boolean autoSave)
autoSave - Whether auto-saving has been enabled (0 or 1). As of NBS version 4 this value is still saved to the file, but no longer used in the program.public byte getAutoSaveInterval()
public void setAutoSaveInterval(byte autoSaveInterval)
autoSaveInterval - The amount of minutes between each auto-save (if it has been enabled) (1-60). As of NBS version 4 this value is still saved to the file, but no longer used in the program.public byte getTimeSignature()
public void setTimeSignature(byte timeSignature)
timeSignature - The time signature of the song. If this is 3, then the signature is 3/4. Default is 4. This value ranges from 2-8.public int getMinutesSpent()
public void setMinutesSpent(int minutesSpent)
minutesSpent - Amount of minutes spent on the project.public int getLeftClicks()
public void setLeftClicks(int leftClicks)
leftClicks - Amount of times the user has left-clicked.public int getRightClicks()
public void setRightClicks(int rightClicks)
rightClicks - Amount of times the user has right-clicked.public int getNoteBlocksAdded()
public void setNoteBlocksAdded(int noteBlocksAdded)
noteBlocksAdded - Amount of times the user has added a note block.public int getNoteBlocksRemoved()
public void setNoteBlocksRemoved(int noteBlocksRemoved)
noteBlocksRemoved - Amount of times the user has removed a note block.public java.lang.String getSourceFileName()
public void setSourceFileName(java.lang.String sourceFileName)
sourceFileName - If the song has been imported from a .mid or .schematic file, that file name is stored here (only the name of the file, not the path).public boolean isLoop()
public void setLoop(boolean loop)
loop - Whether looping is on or off.public byte getMaxLoopCount()
public void setMaxLoopCount(byte maxLoopCount)
maxLoopCount - 0 = infinite. Other values mean the amount of times the song loops.public short getLoopStartTick()
public void setLoopStartTick(short loopStartTick)
loopStartTick - Determines which part of the song (in ticks) it loops back to.