openMSX
|
#include <YM2413Burczynski.hh>
Public Types | |
enum class | KeyPart : uint8_t { MAIN = 1 , RHYTHM = 2 } |
enum class | EnvelopeState { DUMP , ATTACK , DECAY , SUSTAIN , RELEASE , OFF } |
Public Member Functions | |
Slot () | |
void | resetOperators () |
void | updateGenerators (const Channel &channel) |
Update phase increment counter of operator. | |
int | calcOutput (const Channel &channel, unsigned eg_cnt, bool carrier, unsigned lfo_am, int phase) |
int | calc_slot_mod (const Channel &channel, unsigned eg_cnt, bool carrier, unsigned lfo_pm, unsigned lfo_am) |
int | calc_envelope (const Channel &channel, unsigned eg_cnt, bool carrier) |
int | calc_phase (const Channel &channel, unsigned lfo_pm) |
void | setKeyOn (KeyPart part) |
void | setKeyOff (KeyPart part) |
void | setKeyOnOff (KeyPart part, bool enabled) |
bool | isActive () const |
Does this slot currently produce an output signal? | |
void | setFrequencyMultiplier (uint8_t value) |
Sets the frequency multiplier [0..15]. | |
void | setKeyScaleRate (bool value) |
Sets the key scale rate: true->0, false->2. | |
void | setEnvelopeSustained (bool value) |
Sets the envelope type of the current instrument. | |
void | setVibrato (bool value) |
Enables (true) or disables (false) vibrato. | |
void | setAmplitudeModulation (bool value) |
Enables (true) or disables (false) amplitude modulation. | |
void | setTotalLevel (const Channel &channel, uint8_t value) |
Sets the total level: [0..63]. | |
void | setKeyScaleLevel (const Channel &channel, uint8_t value) |
Sets the key scale level: 0->0 / 1->1.5 / 2->3.0 / 3->6.0 dB/OCT. | |
void | setWaveform (uint8_t value) |
Sets the waveform: 0 = sinus, 1 = half sinus, half silence. | |
void | setFeedbackShift (uint8_t value) |
Sets the amount of feedback [0..7]. | |
void | setAttackRate (const Channel &channel, uint8_t value) |
Sets the attack rate [0..15]. | |
void | setDecayRate (const Channel &channel, uint8_t value) |
Sets the decay rate [0..15]. | |
void | setReleaseRate (const Channel &channel, uint8_t value) |
Sets the release rate [0..15]. | |
void | setSustainLevel (uint8_t value) |
Sets the sustain level [0..15]. | |
void | updateFrequency (const Channel &channel) |
Called by Channel when block_fnum changes. | |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Definition at line 26 of file YM2413Burczynski.hh.
|
strong |
Enumerator | |
---|---|
DUMP | |
ATTACK | |
DECAY | |
SUSTAIN | |
RELEASE | |
OFF |
Definition at line 115 of file YM2413Burczynski.hh.
|
strong |
Enumerator | |
---|---|
MAIN | |
RHYTHM |
Definition at line 45 of file YM2413Burczynski.hh.
openmsx::YM2413Burczynski::Slot::Slot | ( | ) |
Definition at line 648 of file YM2413Burczynski.cc.
References OFF.
|
inline |
Definition at line 401 of file YM2413Burczynski.cc.
References ATTACK, DECAY, DUMP, openmsx::YM2413Burczynski::Channel::isSustained(), OFF, RELEASE, and SUSTAIN.
Referenced by calcOutput().
|
inline |
Definition at line 486 of file YM2413Burczynski.cc.
References openmsx::YM2413Burczynski::Channel::getBlockFNum(), and openmsx::FixedPoint< FRACTION_BITS_ >::toInt().
Referenced by calc_slot_mod(), and openmsx::YM2413Burczynski::Channel::calcOutput().
|
inline |
Definition at line 541 of file YM2413Burczynski.cc.
References calc_phase(), and calcOutput().
Referenced by openmsx::YM2413Burczynski::YM2413::generateChannels().
|
inline |
Definition at line 532 of file YM2413Burczynski.cc.
References calc_envelope(), and openmsx::YM2413Burczynski::SIN_MASK.
Referenced by calc_slot_mod(), openmsx::YM2413Burczynski::Channel::calcOutput(), and openmsx::YM2413Burczynski::YM2413::generateChannels().
bool openmsx::YM2413Burczynski::Slot::isActive | ( | ) | const |
Does this slot currently produce an output signal?
Definition at line 684 of file YM2413Burczynski.cc.
References OFF.
Referenced by setKeyOff().
void openmsx::YM2413Burczynski::Slot::resetOperators | ( | ) |
Definition at line 773 of file YM2413Burczynski.cc.
References OFF.
void openmsx::YM2413Burczynski::Slot::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 1298 of file YM2413Burczynski.cc.
References setWaveform().
Referenced by openmsx::YM2413Burczynski::Channel::serialize().
void openmsx::YM2413Burczynski::Slot::setAmplitudeModulation | ( | bool | value | ) |
Enables (true) or disables (false) amplitude modulation.
Definition at line 714 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setAttackRate | ( | const Channel & | channel, |
uint8_t | value | ||
) |
Sets the attack rate [0..15].
Definition at line 741 of file YM2413Burczynski.cc.
References openmsx::YM2413Burczynski::Channel::getKeyCode().
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setDecayRate | ( | const Channel & | channel, |
uint8_t | value | ||
) |
Sets the decay rate [0..15].
Definition at line 748 of file YM2413Burczynski.cc.
References openmsx::YM2413Burczynski::Channel::getKeyCode().
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setEnvelopeSustained | ( | bool | value | ) |
Sets the envelope type of the current instrument.
value | true->sustained, false->percussive. |
Definition at line 704 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setFeedbackShift | ( | uint8_t | value | ) |
Sets the amount of feedback [0..7].
Definition at line 736 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setFrequencyMultiplier | ( | uint8_t | value | ) |
Sets the frequency multiplier [0..15].
Definition at line 694 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setKeyOff | ( | KeyPart | part | ) |
Definition at line 665 of file YM2413Burczynski.cc.
References isActive(), and RELEASE.
Referenced by setKeyOnOff().
void openmsx::YM2413Burczynski::Slot::setKeyOn | ( | KeyPart | part | ) |
void openmsx::YM2413Burczynski::Slot::setKeyOnOff | ( | KeyPart | part, |
bool | enabled | ||
) |
Definition at line 675 of file YM2413Burczynski.cc.
References setKeyOff(), and setKeyOn().
void openmsx::YM2413Burczynski::Slot::setKeyScaleLevel | ( | const Channel & | channel, |
uint8_t | value | ||
) |
Sets the key scale level: 0->0 / 1->1.5 / 2->3.0 / 3->6.0 dB/OCT.
Definition at line 725 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setKeyScaleRate | ( | bool | value | ) |
Sets the key scale rate: true->0, false->2.
Definition at line 699 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setReleaseRate | ( | const Channel & | channel, |
uint8_t | value | ||
) |
Sets the release rate [0..15].
Definition at line 755 of file YM2413Burczynski.cc.
References openmsx::YM2413Burczynski::Channel::getKeyCode().
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setSustainLevel | ( | uint8_t | value | ) |
Sets the sustain level [0..15].
Definition at line 762 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setTotalLevel | ( | const Channel & | channel, |
uint8_t | value | ||
) |
Sets the total level: [0..63].
Definition at line 719 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setVibrato | ( | bool | value | ) |
Enables (true) or disables (false) vibrato.
Definition at line 709 of file YM2413Burczynski.cc.
Referenced by openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::setWaveform | ( | uint8_t | value | ) |
Sets the waveform: 0 = sinus, 1 = half sinus, half silence.
Definition at line 731 of file YM2413Burczynski.cc.
Referenced by serialize(), and openmsx::YM2413Burczynski::Channel::updateInstrumentPart().
void openmsx::YM2413Burczynski::Slot::updateFrequency | ( | const Channel & | channel | ) |
Called by Channel when block_fnum changes.
Definition at line 767 of file YM2413Burczynski.cc.
References updateGenerators().
Referenced by openmsx::YM2413Burczynski::Channel::serialize(), and openmsx::YM2413Burczynski::Channel::setFrequency().
void openmsx::YM2413Burczynski::Slot::updateGenerators | ( | const Channel & | channel | ) |
Update phase increment counter of operator.
Also updates the EG rates if necessary.
Definition at line 780 of file YM2413Burczynski.cc.
References openmsx::YM2413Burczynski::Channel::getFrequencyIncrement(), openmsx::YM2413Burczynski::Channel::getKeyCode(), and openmsx::YM2413Burczynski::Channel::isSustained().
Referenced by updateFrequency(), and openmsx::YM2413Burczynski::Channel::updateInstrumentPart().