ComSquare
Public Attributes | List of all members
ComSquare::APU::DSP::Voice Struct Reference

#include <DSP.hpp>

Collaboration diagram for ComSquare::APU::DSP::Voice:

Public Attributes

std::array< int8_t, 2 > volume
 Volume register (VOL) More...
 
union {
   struct {
      uint8_t   pitchL
 Lower 8 bits of pitch register. More...
 
      uint8_t   pitchH
 Higher 8 bits of pitch register. More...
 
   } 
 
   uint16_t   pitch
 
}; 
 Pitch register (P) More...
 
uint8_t srcn
 Source number register (SRCN) More...
 
union {
   struct {
      uint8_t   adsr1
 Envelope register (ADSR) More...
 
      uint8_t   adsr2
 Envelope controllers register (ADSR) More...
 
   } 
 
   uint16_t   adsr
 
}; 
 
uint8_t gain
 Gain register (GAIN) More...
 
uint8_t envx
 envelope associated with this voice More...
 
uint8_t outx
 Wave height associated with this voice. More...
 
bool endx: 1
 Sample end register (ENDX) More...
 
bool kon: 1
 Key On register (KON) More...
 
bool kof: 1
 Key Off register (KOF) More...
 
bool pmon: 1
 Pitch modulation register (PMON) More...
 
bool non: 1
 Noise enable register (NON) More...
 
bool eon: 1
 Echo enable register (EON) More...
 
uint8_t konDelay
 Check if voice is in setup phase. More...
 
bool echo
 Check if the output will be echoed. More...
 
bool loop
 Check if this voice will be looped. More...
 
uint16_t brrAddress
 Current BRR associated with this voice. More...
 
uint8_t brrOffset = 1
 Current Offset in the BRR block. More...
 
bool prevPmon: 1
 Previous modulation. More...
 
bool tempNon: 1
 temporary NON register value More...
 
bool tempKon: 1
 temporary Key On register value More...
 
bool tempKof: 1
 temporary Key Off register value More...
 
std::array< uint16_t, 12 > samples
 all samples Decoded from BRR More...
 
uint8_t sampleOffset
 Offset of current sample in samples buffer. More...
 
uint16_t envelope
 Current envelope level. More...
 
uint16_t hiddenEnvelope
 Second envelope level used to make "special" waveforms. More...
 
Envelope envelopeMode
 current envelope Mode More...
 
uint16_t gaussOffset
 Relative fractional position in sample. More...
 

Member Data Documentation

◆ @13

union { ... }

Pitch register (P)

◆ @15

union { ... }

◆ adsr

uint16_t ComSquare::APU::DSP::Voice::adsr

◆ adsr1

uint8_t ComSquare::APU::DSP::Voice::adsr1

Envelope register (ADSR)

◆ adsr2

uint8_t ComSquare::APU::DSP::Voice::adsr2

Envelope controllers register (ADSR)

◆ brrAddress

uint16_t ComSquare::APU::DSP::Voice::brrAddress

Current BRR associated with this voice.

◆ brrOffset

uint8_t ComSquare::APU::DSP::Voice::brrOffset = 1

Current Offset in the BRR block.

◆ echo

bool ComSquare::APU::DSP::Voice::echo

Check if the output will be echoed.

◆ endx

bool ComSquare::APU::DSP::Voice::endx

Sample end register (ENDX)

◆ envelope

uint16_t ComSquare::APU::DSP::Voice::envelope

Current envelope level.

◆ envelopeMode

Envelope ComSquare::APU::DSP::Voice::envelopeMode

current envelope Mode

◆ envx

uint8_t ComSquare::APU::DSP::Voice::envx

envelope associated with this voice

◆ eon

bool ComSquare::APU::DSP::Voice::eon

Echo enable register (EON)

◆ gain

uint8_t ComSquare::APU::DSP::Voice::gain

Gain register (GAIN)

◆ gaussOffset

uint16_t ComSquare::APU::DSP::Voice::gaussOffset

Relative fractional position in sample.

◆ hiddenEnvelope

uint16_t ComSquare::APU::DSP::Voice::hiddenEnvelope

Second envelope level used to make "special" waveforms.

◆ kof

bool ComSquare::APU::DSP::Voice::kof

Key Off register (KOF)

◆ kon

bool ComSquare::APU::DSP::Voice::kon

Key On register (KON)

◆ konDelay

uint8_t ComSquare::APU::DSP::Voice::konDelay

Check if voice is in setup phase.

◆ loop

bool ComSquare::APU::DSP::Voice::loop

Check if this voice will be looped.

◆ non

bool ComSquare::APU::DSP::Voice::non

Noise enable register (NON)

◆ outx

uint8_t ComSquare::APU::DSP::Voice::outx

Wave height associated with this voice.

◆ pitch

uint16_t ComSquare::APU::DSP::Voice::pitch

◆ pitchH

uint8_t ComSquare::APU::DSP::Voice::pitchH

Higher 8 bits of pitch register.

◆ pitchL

uint8_t ComSquare::APU::DSP::Voice::pitchL

Lower 8 bits of pitch register.

◆ pmon

bool ComSquare::APU::DSP::Voice::pmon

Pitch modulation register (PMON)

◆ prevPmon

bool ComSquare::APU::DSP::Voice::prevPmon

Previous modulation.

◆ sampleOffset

uint8_t ComSquare::APU::DSP::Voice::sampleOffset

Offset of current sample in samples buffer.

◆ samples

std::array<uint16_t, 12> ComSquare::APU::DSP::Voice::samples

all samples Decoded from BRR

◆ srcn

uint8_t ComSquare::APU::DSP::Voice::srcn

Source number register (SRCN)

◆ tempKof

bool ComSquare::APU::DSP::Voice::tempKof

temporary Key Off register value

◆ tempKon

bool ComSquare::APU::DSP::Voice::tempKon

temporary Key On register value

◆ tempNon

bool ComSquare::APU::DSP::Voice::tempNon

temporary NON register value

◆ volume

std::array<int8_t, 2> ComSquare::APU::DSP::Voice::volume

Volume register (VOL)


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