src/OPL2.cpp
/**
 * Enable or disable envelope scaling. When set to true higher notes will be shorter than lower ones.
 */
Enable or disable envelope scaling. When set to true higher notes will be shorter than lower ones.
Enable or disable envelope scaling . When set to true higher notes will be shorter than lower ones .
byte OPL2::setEnvelopeScaling(byte channel, byte operatorNum, bool enable) {
	byte reg = 0x20 + getRegisterOffset(channel, operatorNum);
	if (enable) {
		return setRegister(reg, oplRegisters[reg] | 0x10);
	} else {
		return setRegister(reg, oplRegisters[reg] & 0xEF);
	}
	return reg;
}
byte OPL2 :: setEnvelopeScaling ( byte channel , byte operatorNum , bool enable ) { byte reg = 0x20 + getRegisterOffset ( channel , operatorNum ) ; if ( enable ) { return setRegister ( reg , oplRegisters [ reg ] | 0x10 ) ; } else { return setRegister ( reg , oplRegisters [ reg ] & 0xEF ) ; } return reg ; }
Enable or disable envelope scaling.
Enable or disable envelope scaling .