wavelength 1.0.0
Loading...
Searching...
No Matches
SynthNull Class Reference

Sound output that does nothing, built when the configuration asks for no synthesiser. More...

#include <synthnull.h>

Inheritance diagram for SynthNull:
Collaboration diagram for SynthNull:

Public Member Functions

int Init () override
 Do nothing.
int Terminate () override
 Do nothing.
 ~SynthNull () override
int SendPackedMessage (unsigned int nPacked) override
 Discard a message.
int SendMessage (unsigned char nByte0, unsigned char nByte1, unsigned char nByte2, int nByte3) override
 Discard a message.
void UpdateTime () override
 Do nothing.
int Poll () override
 Do nothing.
int GetStreamFormat (int *pnRate, int *pnBlock) override
 Report nothing.
int Partition (const std::vector< int > &blocks) override
 Do nothing.
int GetBankBlockCount (const String &file) override
 Report an empty bank.
bool IsBankLoaded (unsigned short nSlot) override
 Report every bank loaded.
int LoadBank (unsigned short nSlot, const String &file, bool bSkipPending) override
 Do nothing.
int UnloadBank (unsigned short nSlot) override
 Do nothing.
int EnableSoftFx () override
 Do nothing.
int DisableSoftFx () override
 Do nothing.
Public Member Functions inherited from Synth
virtual void ResetSpu ()
 Vtable slot 3.
virtual ~Synth ()
 Vtable slot 4.
virtual int Unsupported ()
 Vtable slot 7.
virtual StreamPlayer * GetStream ()
 Vtable slot 10.
virtual void SetStream (StreamPlayer *pStream)
 Vtable slot 11.
virtual void SendStreamData (const void *pData, int nSize)
 Vtable slot 12.
virtual int GetStreamStatus ()
 Vtable slot 13.
virtual int IsBankPresent (unsigned short nSlot)
 Vtable slot 18.
virtual void SetSurround (bool bSurround)
 Vtable slot 21.
virtual void SetMono (bool bMono)
 Vtable slot 22.
virtual void SetLag (float fLag)
 Vtable slot 23.
virtual float GetLag ()
 Vtable slot 24.
virtual void SetSoftFxSweep (float fPosition)
 Vtable slot 25.
virtual void SetSoftFxModulation (float fValue)
 Vtable slot 26.
virtual void SetSoftFxFilter (const SoftFxFilter &filter)
 Vtable slot 27.
virtual void SetOutputLevel (float fLevel)
 Vtable slot 30.
virtual float GetOutputLevel ()
 Vtable slot 31.
virtual void SetSoftFxInput (int nInput)
 Vtable slot 32.
virtual void SetBusToCoreFx (int nOn)
 Vtable slot 33.
virtual void SetBusToSoftFx (int nOn)
 Vtable slot 34.
virtual void VirtualSlot35 ()
 Vtable slot 35.
virtual void SendMessages (const std::vector< unsigned int > &messages)
 Vtable slot 36.
virtual void QueueCallback (Callback pfnCallback, int nArg)
 Vtable slot 37.

Additional Inherited Members

Public Types inherited from Synth
typedef void(* Callback) (int nArg)
 Routine a queued callback job calls with its argument.
Static Public Member Functions inherited from Synth
static void TickThread ()
 The tick thread.
static int ProcessMidiMessage (unsigned char status, unsigned char data1, unsigned char data2)
 Act on one MIDI channel message.
static void ProcessDueEvents ()
 Act on every queued MIDI message that is due, as one batch of key changes.
static int QueueTimedEvents (const MidiEvent *events, unsigned int count)
 Queue MIDI messages stamped with delays from now.
static int ProcessMidiStream (const unsigned char *data, unsigned int size)
 Act on a MIDI byte stream with running status.
static void SetMono (bool mono)
 Select mono output.
static void SetSurround (bool enabled)
 Allow or forbid the surround inversion of the descriptors that request it.
static void ResetAllControllers (unsigned char channel)
 Restore a channel's controllers to their defaults, except its monophonic switch.
static void Init ()
 Reset the banks, channels, and voices, then the SPU2.
static void ResetSpu ()
 Initialise the SPU2: the mixer, the reverb areas and settings, and the voice mix.
static int CombinePan (unsigned char channelPan, unsigned char programPan, unsigned char samplePan)
 Combine three pan offsets around the centre, clamped to zero to 127.
static bool ChannelHasProgram (unsigned char channel)
 Report whether a channel has a program it can play.
static void NoteOn (unsigned char note, unsigned char velocity, unsigned char channel)
 Start a note on every descriptor of the channel's program whose key range covers it.
static void NoteOff (unsigned char note, unsigned char channel)
 Stop the oldest sounding instance of a note.
static void SelectProgram (unsigned short channel, unsigned short program)
 Point a channel at the program of its bank with a program number.
static void ProgramChange (unsigned char channel, unsigned short program)
 Act on a program change unless the channel already plays that program number.
static void BankSelect (unsigned char channel, unsigned short bank)
 Point a channel at a loaded bank, retaining its program number.
static void UpdateChannelVolume (unsigned char channel)
 Rewrite the volume registers of a channel's sounding voices.
static void SetPan (unsigned char channel, unsigned char pan)
 Set a channel's pan.
static void SetVolume (unsigned char channel, unsigned char volume)
 Set a channel's volume.
static void SetExpression (unsigned char channel, unsigned char expression)
 Set a channel's expression.
static void SetPitchBend (unsigned char channel, signed char semitones, signed char cents)
 Set a channel's pitch bend.
static int LoadBankHeader (const unsigned char *data, unsigned short bank)
 Load a bank's header.
static int LoadPrograms (const unsigned char *data, short size, unsigned short bank)
 Load a bank's programs, each record preceded by a size word.
static int LoadSampleDescs (const unsigned char *data, short size, unsigned short bank)
 Load a bank's sample descriptors, each record preceded by a size word.
static int LoadSamples (const unsigned char *data, short size, unsigned short bank)
 Load a bank's samples, each record preceded by a size word.
static int TransferDone (int channel, void *data)
 Notify the EE at the next tick that a waveform transfer ended.
static int EffectsApplied ()
 Notify the EE at the next tick that a reverb update ended, when the EE requested it.
static int TransferSampleData (unsigned char *data, int size, unsigned int offset, unsigned short bank)
 Start a waveform transfer into a bank's SPU2 area.
static int SetBankSpuLayout (const unsigned char *data)
 Place the banks' SPU2 areas one after another.
static int SetBankLoaded (unsigned short bank)
 Mark a bank loaded.
static int UnloadBank (unsigned short bank)
 Silence a bank's voices, detach its channels, and empty it.
static void SetPriority (unsigned char channel, unsigned char priority)
 Set a channel's voice priority.
static void SetDetune (unsigned char channel, unsigned char detune)
 Set a channel's detune switch.
static void SetStereo (unsigned char channel, unsigned char stereo)
 Set a channel's stereo switch.
static void SetMonophonic (unsigned char channel, unsigned char monophonic)
 Set a channel's monophonic switch.
static void SetControllerEnable (unsigned char channel, unsigned char controller, unsigned char value)
 Switch the live update of one controller on or off for a channel.
static void SetTranspose (unsigned char channel, signed char semitones)
 Set a channel's transposition.
static void SetBusMode (unsigned char channel, unsigned char busMode)
 Set a channel's dry and reverb mix for later notes.
static void SetBus (unsigned char channel, unsigned char bus)
 Set a channel's preferred core for later notes.
static void AllNotesOff (unsigned char channel)
 Release a channel's notes and forget every retired voice.
static void EffectThread ()
 The reverb thread.
static void SetEffectParam (unsigned char channel, unsigned char value, unsigned char param)
 Set one reverb setting of a core from a controller.
static void CommitKeys ()
 Key off and then key on every voice the current batch collected.
static void ClearKeyMasks ()
 Start a batch of key changes.
static void Create ()
 Build TheSynth and initialise it.
static void Destroy ()
 Terminate TheSynth, destroy it, and clear the pointer.
Static Public Attributes inherited from Synth
static constexpr int kNumChannels = 16
static constexpr int kNumCores = 2
static constexpr int kVoicesPerCore = 24
static constexpr int kMaxRetiredVoices = 50
static void * sNotifyAddress
static int sNotifyPending
static void * sEffectNotifyAddress
static int sEffectNotifyPending
static int sEffectThreadId
static unsigned char sInitFlag
static Channel sChannels [kNumChannels]

Detailed Description

Sound output that does nothing, built when the configuration asks for no synthesiser.

The RTTI includes the class name and records Synth as the base. The object is the vptr alone, and its vtable is at 0x003d3f10. Every member that the base leaves pure has an empty body here, and every body is expanded in the header.

Constructor & Destructor Documentation

◆ ~SynthNull()

SynthNull::~SynthNull ( )
inlineoverride
Ghidra address:
NTSC-U/C: 0x003960d0
Ghidra address:
PAL: 0x00404720

Member Function Documentation

◆ Init()

int SynthNull::Init ( )
inlineoverridevirtual

Do nothing.

Returns
0.
Ghidra address:
NTSC-U/C: 0x003960c0
Ghidra address:
PAL: 0x00404710

Implements Synth.

◆ Terminate()

int SynthNull::Terminate ( )
inlineoverridevirtual

Do nothing.

Returns
0.
Ghidra address:
NTSC-U/C: 0x003960c8
Ghidra address:
PAL: 0x00404718

Implements Synth.

◆ SendPackedMessage()

int SynthNull::SendPackedMessage ( unsigned int nPacked)
inlineoverridevirtual

Discard a message.

Parameters
nPackedThe message.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396100
Ghidra address:
PAL: 0x00404750

Implements Synth.

◆ SendMessage()

int SynthNull::SendMessage ( unsigned char nByte0,
unsigned char nByte1,
unsigned char nByte2,
int nByte3 )
inlineoverridevirtual

Discard a message.

Parameters
nByte0The first message byte.
nByte1The second message byte.
nByte2The third message byte.
nByte3The delay of the message.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396108
Ghidra address:
PAL: 0x00404758

Implements Synth.

◆ UpdateTime()

void SynthNull::UpdateTime ( )
inlineoverridevirtual

Do nothing.

Ghidra address:
NTSC-U/C: 0x00396110
Ghidra address:
PAL: 0x00404760

Implements Synth.

◆ Poll()

int SynthNull::Poll ( )
inlineoverridevirtual

Do nothing.

Returns
0.
Ghidra address:
NTSC-U/C: 0x00396118
Ghidra address:
PAL: 0x00404768

Implements Synth.

◆ GetStreamFormat()

int SynthNull::GetStreamFormat ( int * pnRate,
int * pnBlock )
inlineoverridevirtual

Report nothing.

Parameters
pnRateUnchanged.
pnBlockUnchanged.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396120
Ghidra address:
PAL: 0x00404770

Implements Synth.

◆ Partition()

int SynthNull::Partition ( const std::vector< int > & blocks)
inlineoverridevirtual

Do nothing.

Parameters
blocksUnused.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396128
Ghidra address:
PAL: 0x00404778

Implements Synth.

◆ GetBankBlockCount()

int SynthNull::GetBankBlockCount ( const String & file)
inlineoverridevirtual

Report an empty bank.

Parameters
fileUnused.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396130
Ghidra address:
PAL: 0x00404780

Implements Synth.

◆ IsBankLoaded()

bool SynthNull::IsBankLoaded ( unsigned short nSlot)
inlineoverridevirtual

Report every bank loaded.

Parameters
nSlotUnused.
Returns
True.
Ghidra address:
NTSC-U/C: 0x00396138
Ghidra address:
PAL: 0x00404788

Implements Synth.

◆ LoadBank()

int SynthNull::LoadBank ( unsigned short nSlot,
const String & file,
bool bSkipPending )
inlineoverridevirtual

Do nothing.

Parameters
nSlotUnused.
fileUnused.
bSkipPendingUnused.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396140
Ghidra address:
PAL: 0x00404790

Implements Synth.

◆ UnloadBank()

int SynthNull::UnloadBank ( unsigned short nSlot)
inlineoverridevirtual

Do nothing.

Parameters
nSlotUnused.
Returns
0.
Ghidra address:
NTSC-U/C: 0x00396148
Ghidra address:
PAL: 0x00404798

Implements Synth.

◆ EnableSoftFx()

int SynthNull::EnableSoftFx ( )
inlineoverridevirtual

Do nothing.

Returns
0.
Ghidra address:
NTSC-U/C: 0x00396150
Ghidra address:
PAL: 0x004047a0

Implements Synth.

◆ DisableSoftFx()

int SynthNull::DisableSoftFx ( )
inlineoverridevirtual

Do nothing.

Returns
0.
Ghidra address:
NTSC-U/C: 0x00396158
Ghidra address:
PAL: 0x004047a8

Implements Synth.


The documentation for this class was generated from the following file: