API Reference Register getters and setters - DhrBaksteen/ArduinoOPL2 GitHub Wiki
byte OPL2::getAttack(byte channel, byte operatorNum);
Get the attck rate of the given channel and operator. The higher the value the faster the attack.
- When set to
0
the sound will never attack - When set to
15
the sound will immediately be at maximum level
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to set attack rate:OPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
The attack rate of the operator [0
, 15
]
Reads register based at 0x60
, bit 4 through 7
void OPL2::setAttack(byte channel, byte operatorNum, byte attack);
Set the attack rate of a channel operator. This defines the time it takes for the operator's output level to rise from 0 to maximum. The attack portion of the envelope is triggered when keyOn of a channel is set to true
. The higher the value the faster the attack.
- When set to
0
the sound will never attack - When set to
15
the sound will immediately be at maximum level
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to set attack rateOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
byte
attack
- Attack rate [0
,15
] where 0 is slowest and 15 is quickest.
This function alters bit 7-4 of the register at base address 0x60
.
byte OPL2::getBlock(byte channel);
Get the current frequency block for the given channel. The frequency block determines the frequency range of the F-numbers. This is sometimes interpreted as the current octave.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
]
byte
- The current frequency block of the channel
Block | F-num = 1 | F-num = 1023 |
---|---|---|
0 | 0.047 Hz | 45.503 Hz |
1 | 0.094 Hz | 97.006 Hz |
2 | 0.189 Hz | 194.013 Hz |
3 | 0.379 Hz | 388.026 Hz |
4 | 0.758 Hz | 776.053 Hz |
5 | 1.517 Hz | 1,552.107 Hz |
6 | 3.034 Hz | 3,104.215 Hz |
7 | 6.068 Hz | 6,208.431 Hz |
Reads register based at 0xB0
, bits 2 through 4
setBlock
, getFrequencyBlock
, getFNumber
, getFrequency
, getFrequencyStep
void OPL2::byte setBlock(byte channel, byte block);
Set the frequency block for the given channel. The frequency block determines the frequency range of the F-numbers. The interval between two F-numbers is the same as the frequency of F-num = 1 in the table below.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
block
- Frequency block [0
,7
]
Block | F-num = 1 | F-num = 1023 |
---|---|---|
0 | 0.047 Hz | 45.503 Hz |
1 | 0.094 Hz | 97.006 Hz |
2 | 0.189 Hz | 194.013 Hz |
3 | 0.379 Hz | 388.026 Hz |
4 | 0.758 Hz | 776.053 Hz |
5 | 1.517 Hz | 1,552.107 Hz |
6 | 3.034 Hz | 3,104.215 Hz |
7 | 6.068 Hz | 6,208.431 Hz |
This function alters bits 2 through 4 of the register at base address 0xB0
getBlock
, getFrequencyStep
, setFNumber
, setFrequency
, playNote
byte OPL2::getDecay(byte channel, byte operatorNum);
Get the decay rate of the given channel and operator. The higher the value the quicker the decay to sustain level will be.
- When set to
0
the sound will never decay to sustain level, but remain at maximum output level
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to get decay rate of:OPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
The decay rate of the operator [0
, 15
]
Reads register based at 0x60
, bits 0 through 3
void OPL2::setDecay(byte channel, byte operatorNum, byte decay);
Set the decay rate of the channel operator. This defines the time it takes for the operator's output level to drop from maximum to sustain level. The decay portion of the envelope is triggered immediately after attack. The higher the value the quicker the decay to sustain level will be.
- When set to
0
the sound will never decay to sustain level, but remain at maximum output level
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to set the decay rateOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
byte
decay
- Decay rate [0
,15
] where 0 is slowest and 15 is quickest
This function alters bits 0 through 3 of register at base address 0x60
.
bool OPL2::getDeepTremolo();
Returns whether deep tremolo is enabled. This is a chip-wide setting that applies to all operators.
- When disabled (default) tremolo depth is 1.0 dB
- when deep tremolo is enabled all tremolos have a depth of 4.8 dB
bool
If true
then deep tremolo applies for all operators
Reads register 0xBD
, bit 7
void OPL2::byte setDeepTremolo(bool enable);
This setting enables deeper tremolos. Normally tremolos will make the channel's output level vibrate with a 1.0dB depth, but when this setting is enabled tremolos wil have a 4.8dB depth. This is a chip-wide setting, meaning that it will affect all channels. By default this setting is disabled.
-
bool
enable
- Enables deeper tremolos whentrue
Alters register 0xBD
, bit 7.
bool OPL2::getDeepVibrato();
Returns whether deep vibrato is enabled. This is a chip-wide setting that applies to all operators.
- When disabled (default) vibrato will be 7/100 semi-tones
- When enabled it will be doubled to 14/100 semi-tones
bool
When true
then deep vibrato is enabled for all operators
Reads register 0xBD
, bit 6
void OPL2::byte setDeepVibrato(bool enable);
This setting enables deeper vibratos. By default this setting is disabled.
- When disabled (default) vibrato will be 7/100 semi-tones
- When enabled it will be doubled to 14/100 semi-tones
-
bool
enable
- Enables deeper vibratos whentrue
Alters register 0xBD
, bit 6.
byte OPL2::getDrums();
Returns a value where each bit indicates what drum sound is currently active. In order to play drum sounds the OPL2 must be set into percussive mode first using setPercussive
.
byte
A value that indicates what drum sounds are currently playing:
Bit | Drum Sound | Bit mask | Library Definition |
---|---|---|---|
0 | Hi-hat | 0x01 |
DRUM_HI_HAT |
1 | Cymbal | 0x02 |
DRUM_CYMBAL |
2 | Tom tom | 0x04 |
DRUM_TOM |
3 | Snare drum | 0x08 |
DRUM_SNARE |
4 | Bass drum | 0x10 |
DRUM_BASS |
Reads from register 0xBD
, bits 0 through 4
void OPL2::byte setDrums(bool bass, bool snare, bool tom, bool cymbal, bool hihat);
Plays various drum sounds. In order to play a drumsound the OPL2 must be placed in percussive mode using setPercussion(true)
. This function works the same as setKeyOn
. To play a drum sound the respective parameter must be set to true
and disabled first by setting it to false
before the same drum sound can be triggered again.
-
bool
bass
- Plays a bass drum sound -
bool
snare
- Plays a snare drum sound -
bool
tom
- Plays a tom tom drum sound -
bool
cymbal
- Plays a cymbal sound -
bool
hihat
- Plays a hi-hat sound
Alters register 0xBD
by setting bits 0 through 4 depending on what drum sounds are enabled or disabled
bool OPL2::getEnvelopeScaling(byte channel, byte operatorNum);
Returns wheter envelope scaling (KSR) is enabled. When enabled the duration of the envelope will be shorter as the frequency of the operator increases. By default envelope scaling will be disabled.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to get KSR:OPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
bool
If true
then envelope scaling is enabled
Reads from register based at 0x20
, bit 4
void OPL2::setEnvelopeScaling(byte channel, byte operatorNum, bool enable);
When enabled scale the duration of the envelope as the frequency rises. By default envelope scaling is disabled.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to set envelope scalineOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
bool
enable
- Enabled envelope scaling when set totrue
This function alters bit 4 of register at base address 0x20
.
byte OPL2::getFeedback(byte channel);
Get the feedback modulation factor for the given channel. When set to a value greater than 0
then operator 1 will send part of its otput back into itself.
-
byte
channel
- Index of the channel for which to get feedback factor [0
,MAX_CHANNEL
]
byte
Feedback modulation factor of the given channel
Feedback | Factor |
---|---|
0 | 0, No feedback |
1 | π/16 |
2 | π/8 |
3 | π/4 |
4 | π/2 |
5 | π |
6 | 2π |
7 | 4π |
Reads from register based at 0xC0
, bits 1 through 3
void OPL2::byte setFeedback(byte channel, byte feedback);
Set the feedback modulation factor of the given channel. This causes operator 1 to send a portion of its output back into itself when enabled. By default operator feedback is disabled.
-
byte
channel
- The channel to set feedback factor -
byte
feedback
- Feedback modulation factor [0
,7
]
Feedback | Factor |
---|---|
0 | 0, No feedback |
1 | π/16 |
2 | π/8 |
3 | π/4 |
4 | π/2 |
5 | π |
6 | 2π |
7 | 4π |
This function alters bits 1 through 3 of register with base address 0xC0
short OPL2::getFNumber(byte channel);
Get the frequency number for the given channel. The actual frequency of the channel depends on the frequency block set using the setBlock
function. When the F-number of a channel is set to 0
then its output frequency will always be 0 Hz, regardless of the block.
-
byte
channel
- Index of the channel for which to get the F-number [0
,MAX_CHANNEL
]
short
The frequency number [0
, 1023
]
Reads from register based at 0xB0
, bits 0 and 1 for the hi bits of the F-number and register based at 0xA0
for the lower 8 bits
void OPL2::setFNumber(byte channel, short fNumber);
Sets the frequency number for the given channel. The actual frequency of the channel depends on the frequency block set using the setBlock
function. When the F-number of a channel is set to 0
then its output frequency will always be 0 Hz, regardless of the block.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
short
fNumber
- The frequency number [0
,1023
]
This function sets the lower byte of the F-number to register at base address 0xA0
and the upper two bits to bits 0 and 1 of register at base address 0xB0
bool OPL2::getKeyOn(byte channel);
Returns whether the channel is currently generating a sound.
-
byte
channel
- Index of the channel for which to get key on [0
,MAX_CHANNEL
]
bool
If true
then the channel is generating sound, if false
then the channel is in the release portion of its envelope or silent
Reads from register based at 0xB0
, bit 5
void OPL2::setKeyOn(byte channel, bool keyOn);
Enable or disable audio output on a given channel. When a channel is enabled the attack portion of the channel envelope is triggered and the channel starts to output a tone at the set frequency that rises in volume according to the set attack rate. When disabled the release portion of the envelope is triggered that makes the note fade out at the set release rate until the channel is silent.
- Note that when percussion mode is enabled keyOn of channels 6, 7 and 8 must remain
false
as drum sounds are triggered differently.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
bool
keyOn
- Boolean value that enables audio output on the given channel whentrue
This function sets or clears bit 5 of register at base 0xB0
.
bool OPL2::getMaintainSustain(byte channel, byte operatorNum);
Returns whether sustain is enabled on the given channel and operator.
- If sustain is enabled then
setSustain
can be used to define a sustain level of an operator. The operator will remain at sustain level until the key is set to off withsetKeyOn (false)
- If disabled (default) then the operator will immediately jump to the release portion of its envelope after the decay period
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to get wheter sustain is enabled:OPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
bool
If true
then sustain is enabled on the operator
Reads from register based at 0x20
, bit 5
void OPL2::setMaintainSustain(byte channel, byte operatorNum, bool enable);
Alters whether the operator's envelope should maintain sustain level. When enabled the operator will hold the output at sustain level until the release phase of the envelope is triggered by disabling output with setKeyOn(false)
. If disabled the release phase of the envelope will trigger immediately after the decay phase. Note that setKeyOn must still be disabled before triggering the next note in this case. By default sustain will be disabled.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to enable or disable sustainOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
bool
enable
- Enables sustain for the given operator whentrue
This function alters bit 5 of register at base address 0x20
.
byte OPL2::getMultiplier(byte channel, byte operatorNum);
Get the frequency multiplication factor of the given channel and operator. The multiplication factor will be equal to the value set, except when set to 0
(default) when then multiplication factor will be 0.5. The F-number is multiplied by this multiplication factor to get the eventual frequency number.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get frequency multiplication rateOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
The F-number multiplication factor [0
, 15
]
Reads from register based at 0x20
, bits 0 through 3
void OPL2::setMultiplier(byte channel, byte operatorNum, byte multiplier);
Set the frequency multiplication factor for the given operator.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to set the multiplierOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
byte
multiplier
- The multiplier to set for the operator [0
,15
]. A value of0
multiplies the frequency by 0.5
This function alters bits 0 through 3 of register at abse address 0x20
bool OPL2::getPercussion();
Returns whether percussion mode is currently enabled or not. When enabled setDrums
can be used to play various drum sounds, but the number of available channels will drop from 9 to 6 as the OPL2 requires 6 operators to produce the drum sounds. By default percussion mode is disabled.
bool
When true
then the OPL2 is in percussive mode, if false
then the OPL2 is in melodic mode
Reads from register 0xBD
, bit 5
void OPL2::byte setPercussion(bool enable);
Set whether percussion mode is enabled or not. When enabled setDrums
can be used to play various drum sounds, but the number of available channels will drop from 9 to 6 as the OPL2 requires 6 operators to produce the drum sounds. By default percussion mode is disabled.
-
bool
enable
- Enables percussion mode whentrue
This function alters bit 5 of register 0xBD
byte OPL2::getRelease(byte channel, byte operatorNum);
Get the release rate of the given channel and operator. The higher the value the quicker the release.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get the release rateOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
The release rate of the operator [0
, 15
]
Reads from register based at 0x80
, bits 0 through 3
void OPL2::setRelease(byte channel, byte operatorNum, byte release);
Set the release rate of the given channel and operator. The higher the value the quicker the release.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get the release rateOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
release
- The release rate for the operator [0
,15
]
Writes to register based at 0x80
, bits 0 through 3
byte OPL2::getScalingLevel(byte channel, byte operatorNum);
Get the key scale level of the given channel and operator. This determines the attenuation of the output level as the frequency of an operator increases.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get key scale levelOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
Key scaling level of the given operator [0
, 3
]
Value | Attenuation |
---|---|
0 | - |
1 | 3.0 dB / Octave |
2 | 1.5 dB / Octave |
3 | 6.0 dB / Octave |
Reads from register based at 0x40
, bits 6 and 7
void OPL2::setScalingLevel(byte channel, byte operatorNum, byte scaling);
Set the key scale level of the given channel and operator. This determines the attenuation of the output level as the frequency of the operator increases.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get key scale levelOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
scaling
- The key scale factor for the operator
Value | Attenuation |
---|---|
0 | - |
1 | 3.0 dB / Octave |
2 | 1.5 dB / Octave |
3 | 6.0 dB / Octave |
Writes to register based at 0x40
, bits 6 and 7
byte OPL2::getSustain(byte channel, byte operatorNum);
Get the sustain level of the given channel and operator. The lower the sustain value the louder the sound. Note that in order for the OPL2 to apply a sustain the sustain bit of the operator must be set using setMaintainSustain
, oterwise sustain will not be applied and the envelope will continue with its release portion immediately after the decay period.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get sustain levelOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
- The sustain level of the operator [0
, 15
]
Reads from register based at 0x80
, bits 4 through 7
setSustain
, getMaintainSustain
, setAttack
, getDecay
, getRelease
void OPL2::getSustain(byte channel, byte operatorNum, byte sustain);
Set the sustain level of the given channel and operator. The lower the sustain value the louder the sound. Note that in order for the OPL2 to apply a sustain the sustain bit of the operator must be set using setMaintainSustain
, oterwise sustain will not be applied and the envelope will continue with its release portion immediately after the decay period.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get sustain levelOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
sustain
- The sustain value [0
,15
] for the operator
Reads from register based at 0x80
, bits 4 through 7
getSustain
, setMaintainSustain
, setAttack
, setDecay
, setRelease
byte OPL2::getSynthMode(byte channel);
Returns whether the given channel is using additive synth (AM) of frequency modulation (FM). By default each channel will operate in FM-synthesis mode.
- When a channel is put into additive synth mode the output of the two operators is added together
- In FM-synthesis mode only operator 2 will produce sound, but operator 1, the modulator, will be sent to the input of operator 2, the carrier, to modulate the frequency of operator 2
-
channel
- Index of the channel [0
,MAX_CHANNEL
]
byte
Where 0
or SYNTH_MODE_FM
for FM and 1
or SYNTH_MODE_AM
for AM
Reads from register based at 0xC0
, bit 0
void OPL2::setSynthMode(byte channel, byte synthMode);
Set whether the given channel is using additive synth (AM) of frequency modulation (FM). By default each channel will operate in FM-synthesis mode.
- When a channel is put into additive synth mode the output of the two operators is added together
- In FM-synthesis mode only operator 2 will produce sound, but operator 1, the modulator, will be sent to the input of operator 2, the carrier, to modulate the frequency of operator 2
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
synthMode
- Synth mode for the given channel [0
,1
] or {SYNTH_MODE_FM
,SYNTH_MODE_AM
} respectively
Alters register based at 0xC0
, bit 0
bool OPL2::getTremolo(byte channel, byte operatorNum);
Returns whether tremolo is enabled on the given channel and operator. When enabled tremolo causes the operator's amplitude to vibrate. By default this setting is disabled. When enabled normally this will cause the output level to fluctuate by 1.0 dB, but when deep tremolo is enabled by setDeepTremolo(true)
then tremolos on all channels will be 4.8 dB.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get whether tremolo is enabledOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
bool
If true
then tremolo is enabled
Reads from register based at 0x20
, bit 7
void OPL2::setTremolo(byte channel, byte operatorNum, bool enable);
Apply amplitude modulation to a certain channel operator, causing a tremolo effect. The depth of the tremolo can either be 1 dB, or 4.8 dB. This is controlled by setDeepTremolo
which is common to all operators. By default tremolo is disabled.
-
byte
channel
- Index of the channel [0, 8] -
byte
operatorNum
- The operator for which to set tremoloOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
bool
enable
- Enables tremolo for the given operator whentrue
This function alters bit 7 of registers at base address 0x20
bool OPL2::getVibrato(byte channel, byte operatorNum);
Returns whether vibrato is enabled on the given channel and operator. Vibrato causes the frequency of an operator to fluctuate. By default this setting is disabled. When enabled, normally the frequency will vibrate by 7/100 of a semi-tone. When deep vibrato is enabled by setDeepVibrato(true)
then vibrato on all channels will be 14/100 of a semi-tone.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get whether vibrato is enabledOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
bool
If true
then vibrato is enabled
Reads from register based at 0x20
, bit 6
byte OPL2::setVibrato(byte channel, byte operatorNum, bool enable);
Sets whether vibrato is enabled on the given channel and operator. Vibrato causes the frequency of an operator to fluctuate. By default this setting is disabled. When enabled, normally the frequency will vibrate by 7/100 of a semi-tone. When deep vibrato is enabled by setDeepVibrato(true)
then vibrato on all channels will be 14/100 of a semi-tone.
-
byte
channel
- Index of the channe; [0, 8] -
byte
operatorNum
- The operator for which to set vibratoOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
byte
enable
- Enables vibrato for the given operator whentrue
This function alters bit 6 of registers at base address 0x20
byte OPL2::getVolume(byte channel, byte operatorNum);
Get the volume of the given channel and operator. For the volume; the lower the value, the greater the volume.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get the output levelOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
- The volume of the given operator [0
, 63
]. The lower the value, the louder the volume.
Reads from register based at 0x40
, bits 0 through 5
void OPL2::setVolume(byte channel, byte operatorNum, byte volume);
Set the output level of a channel's operator. The lower the value, the higher the output level.
-
byte
channel
- Index of the channel [0, 8] -
byte
operatorNum
- Operator to change volumeOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
byte
volume
- Volume to set [0, 63] where 0 is loudest, 63 is silent
This function alters bits 0 through 5 of register at base 0x40
byte OPL2::getWaveForm(byte channel, byte operatorNum);
Return the currently selected waveform for the given channel and operator. Note that the waveform select bit must be enabled on the OPL2 using setWaveFormSelect
to allow for different waveforms per operator, otherwise all channels will use a sine wave.
-
channel
- Index of the channel [0
,MAX_CHANNEL
] -
operatorNum
- The operator for which to get the current wave formOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
byte
The currently selected wave form for the operator
Value | Waveform |
---|---|
0 | ![]() |
1 | ![]() |
2 | ![]() |
3 | ![]() |
Reads from register based at 0xE0
, bits 0 through 2
void OPL2::setWaveForm(byte channel, byte operatorNum, byte waveForm);
Select the waveform to use for a certain channel operator. To take effect waveform selection must be enabled with setWaveFormSelect(true)
first. By default each operator will use a sinewave.
-
byte
channel
- Index of the channel [0
,MAX_CHANNEL
] -
byte
operatorNum
- The operator for which to change the waveformOPERATOR1
/MODULATOR
orOPERATOR2
/CARRIER
-
byte
waveForm
- The wavefor to set for the operator [0
,3
]
Value | Waveform |
---|---|
0 | ![]() |
1 | ![]() |
2 | ![]() |
3 | ![]() |
This function alters bits 0 through 2 of register at base address 0xE0
bool OPL2::getWaveFormSelect();
Returns whether waveform selection is enabled on the OPL2. If true
then setWaveForm
can be used to select different waveforms per operator. If false
then all operators will use a sinewave. By default this will be set to false
.
bool
When true
then different wave forms can be set per channel operator
Reads from register 0x01
, bit 5
void OPL2::setWaveFormSelect(bool enable);
Enable or disable waveform selection for each individual channel operator. If disabled then all operators will output a basic sine wave. By default wave form selection is disabled.
-
bool
enable
- Enables wave form selection on all operators when set totrue
This function alters bit 5 of register 0x01