#include <pcbModule.h>
Collaboration diagram for pcbModule:
Public Types | |
typedef unsigned char | BPM |
typedef unsigned char | SPEED |
typedef unsigned char | GLOBAL_VOLUME |
Public Methods | |
pcbModule () | |
pcbModule (const char* filename) | |
virtual | ~pcbModule () |
pcbModule (const pcbModule& mod) | |
const pcbModule& | operator= (const pcbModule& mod) |
Assignment operator. | |
bool | Load (const char* filename) |
bool | Save (const char* filenmame) |
bool | UsesInstruments () const |
virtual bool | Release () |
release the data from the module -- the instruments, the samples, the patterns. | |
unsigned char | GetOrder (int x) const |
unsigned char | GetRows (int x) const |
unsigned char | GetPan (int x) const |
int | GetLength () const |
unsigned char | GetPatterns () const |
unsigned char | GetChannels () const |
unsigned char | GetInstruments () const |
unsigned char | GetSamples () const |
unsigned char | GetSpeed () const |
unsigned char | GetBpm () const |
unsigned char | GetVolume () const |
const char* | GetError () const |
const char* | GetName () const |
const char* | GetMessage () const |
const char* | GetFilename () const |
bool | IsStereo () const |
int | GetRestart () const |
unsigned char | GetPeriodShift () const |
signed long | GetMinPeriod () const |
signed long | GetMaxPeriod () const |
period_t | GetPeriodType () const |
bool | IsLinear () const |
bool | SetBPM (BPM bpm) |
bool | SetSpeed (SPEED speed) |
bool | SetGlobalVolume (GLOBAL_VOLUME volume) |
bool | SetName (const char* name) |
Delete the old name. More... | |
bool | SetFileName (const char* filename) |
Delete the old name. More... | |
bool | SetDefaultPan (unsigned char channel, int pan) |
bool | SetSamples (unsigned char samples) |
bool | SetInstruments (unsigned char instruments) |
bool | SetInstrument (unsigned char id, pcbInstrument* in) |
bool | SetSample (unsigned char id, pp::Sample* sample) |
bool | SetRestart (int restart) |
bool | SetSongLength (int length) |
bool | SetOrder (unsigned char order, unsigned char pattern) |
bool | SetOrderLength (unsigned char length) |
bool | SetPeriodType (period_t type) |
bool | SetPeriodLimits (signed long least, signed long most) |
bool | SetPeriodShift (unsigned char shift) |
bool | SetChannels (unsigned char channels) |
There are a lot of things that need to happen when we change the number of channels in a module. More... | |
bool | AddChannel () |
bool | InsertChannel (unsigned char channel) |
bool | RemoveChannel (unsigned char channel) |
bool | RemoveChannel () |
bool | SetPatterns (unsigned char patterns) |
This will need to modify m_pattern_data, m_rows, and m_patterns. | |
bool | AddPattern () |
bool | InsertPattern (unsigned char pattern) |
bool | RemovePattern (unsigned char pattern) |
bool | RemovePattern () |
bool | SetPatternRows (unsigned char pattern, int rows) |
long | NoteToPeriod (int NoteNum, pp::Sample::finetune_t finetune=0, pp::Sample::relative_note_t relative_note=0) const |
Convert the given note to an amiga period. Make sure NoteNum is the real note number. The notes in the pattern data are stored as 1 + the real note number. Empty notes are stored as 0. xm.txt states this formula for amiga frequency table: Period=(PeriodTab[(Note%12)*8+FineTune/16]*(1-Frac(FineTune/16)) + PeriodTab[(Note%12)*8 + FineTune/16]*(Frac(FineTune/16))) *16/2^(Note DIV 12); (The period is interpolated for finer finetune values) Frequency = 8363*1712/Period; Period = 10*12*16*4 - Note*16*4 - FineTune/2; Frequency = 8363*2^((6*12*16*4 - Period) / (12*16*4)); | |
pp::Sample* | GetSample (int id) const |
pcbInstrument* | GetInstrument (unsigned id) const |
void | LinkInstrumentToSamples (unsigned id) |
Public Attributes | |
pcbNote*** | m_pattern_data |
Static Public Methods | |
unsigned short | FinetuneToC2SPD (unsigned char finetune) |
unsigned char | PeriodToNote (unsigned short period) |
long | NoteToXmAmiga (int NoteNum, pp::Sample::finetune_t finetune=0, pp::Sample::relative_note_t relative_note=0) |
xm.txt states this formula: Period=(PeriodTab[(Note%12)*8+FineTune/16]*(1-Frac(FineTune/16)) + PeriodTab[(Note%12)*8 + FineTune/16]*(Frac(FineTune/16))) *16/2^(Note DIV 12); (The period is interpolated for finer finetune values) Frequency = 8363*1712/Period; | |
Protected Attributes | |
pp::Sample** | m_samples |
pcbInstrument** | m_in |
|
There are a lot of things that need to happen when we change the number of channels in a module. Set the value of m_channels. We need to change the size of m_default_pan. We need to change all the patterns so that they have the correct number of channels and rows. |
|
Delete the old name. Allocate memory for the new name and copy the given name to that memory |
|
Delete the old name. Allocate memory for the new name and copy the given name to that memory |