/// <param name="code">MIDI 악기 번호</param> /// <param name="aPitchModulator">반주 음 높이 변경 함수</param> /// <param name="aRhythm">반주 음 길이 (64분음표: 1, 온음표: 64)</param> /// <param name="aVolume">반주 음량 (0 ~ 127)</param> public AccompanimentInstrumentInfo(int code, PitchModulator aPitchModulator, int aRhythm, int aVolume) { if (aPitchModulator == null) { aPitchModulator = (pitch) => pitch; } if (aRhythm < 0) { aRhythm = 0; } if (aVolume < 0) { aVolume = 0; } if (aVolume > 127) { aVolume = 127; } instrumentCode = code; characterPitchModulator = (pitch) => pitch; characterRhythm = 0; characterVolume = 0; whitespacePitchModulator = (pitch) => pitch; whitespaceRhythm = 0; whitespaceVolume = 0; sfxPitchModulator = (pitch) => pitch; sfxRhythm = 0; sfxVolume = 0; accompanimentPitchModulator = aPitchModulator; accompanimentRhythm = aRhythm; accompanimentVolume = aVolume; }
/// <param name="code">MIDI 악기 번호</param> /// <param name="wPitchModulator">공백 문자 음 높이 변경 함수</param> /// <param name="wRhythm">공백 문자 음 길이 (64분음표: 1, 온음표: 64)</param> /// <param name="wVolume">공백 문자 음량 (0 ~ 127)</param> public WhitespaceInstrumentInfo(int code, PitchModulator wPitchModulator, int wRhythm, int wVolume) { if (wPitchModulator == null) { wPitchModulator = (pitch) => pitch; } if (wRhythm < 0) { wRhythm = 0; } if (wVolume < 0) { wVolume = 0; } if (wVolume > 127) { wVolume = 127; } instrumentCode = code; characterPitchModulator = (pitch) => pitch; characterRhythm = 0; characterVolume = 0; whitespacePitchModulator = wPitchModulator; whitespaceRhythm = wRhythm; whitespaceVolume = wVolume; sfxPitchModulator = (pitch) => pitch; sfxRhythm = 0; sfxVolume = 0; accompanimentPitchModulator = (pitch) => pitch; accompanimentRhythm = 0; accompanimentVolume = 0; }
/// <param name="code">MIDI 악기 번호</param> /// <param name="sPitchModulator">효과음 높이 변경 함수</param> /// <param name="sRhythm">효과음 길이 (64분음표: 1, 온음표: 64)</param> /// <param name="sVolume">효과음 음량 (0 ~ 127)</param> public SFXInstrumentInfo(int code, PitchModulator sPitchModulator, int sRhythm, int sVolume) { if (sPitchModulator == null) { sPitchModulator = (pitch) => pitch; } if (sRhythm < 0) { sRhythm = 0; } if (sVolume < 0) { sVolume = 0; } if (sVolume > 127) { sVolume = 127; } instrumentCode = code; characterPitchModulator = (pitch) => pitch; characterRhythm = 0; characterVolume = 0; whitespacePitchModulator = (pitch) => pitch; whitespaceRhythm = 0; whitespaceVolume = 0; sfxPitchModulator = sPitchModulator; sfxRhythm = sRhythm; sfxVolume = sVolume; accompanimentPitchModulator = (pitch) => pitch; accompanimentRhythm = 0; accompanimentVolume = 0; }
/// <param name="code">MIDI 악기 번호</param> /// <param name="cPitchModulator">일반 문자 음 높이 변경 함수</param> /// <param name="cRhythm">일반 문자 음 길이 (64분음표: 1, 온음표: 64)</param> /// <param name="cVolume">일반 문자 음량 (0 ~ 127)</param> /// <param name="wPitchModulator">공백 문자 음 높이 변경 함수</param> /// <param name="wRhythm">공백 문자 음 길이 (64분음표: 1, 온음표: 64)</param> /// <param name="wVolume">공백 문자 음량 (0 ~ 127)</param> /// <param name="aPitchModulator">반주 음 높이 변경 함수</param> /// <param name="aRhythm">반주 음 길이 (64분음표: 1, 온음표: 64)</param> /// <param name="aVolume">반주 음량 (0 ~ 127)</param> public CharacterInstrumentInfo(int code, PitchModulator cPitchModulator, int cRhythm, int cVolume, PitchModulator wPitchModulator, int wRhythm, int wVolume, PitchModulator aPitchModulator = null, int aRhythm = 0, int aVolume = 0) { if (cPitchModulator == null) { cPitchModulator = (pitch) => pitch; } if (cRhythm < 0) { cRhythm = 0; } if (cVolume < 0) { cVolume = 0; } if (cVolume > 127) { cVolume = 127; } if (wPitchModulator == null) { wPitchModulator = (pitch) => pitch; } if (wRhythm < 0) { wRhythm = 0; } if (wVolume < 0) { wVolume = 0; } if (wVolume > 127) { wVolume = 127; } if (aPitchModulator == null) { aPitchModulator = (pitch) => pitch; } if (aRhythm < 0) { aRhythm = 0; } if (aVolume < 0) { aVolume = 0; } if (aVolume > 127) { aVolume = 127; } instrumentCode = code; characterPitchModulator = cPitchModulator; characterRhythm = cRhythm; characterVolume = cVolume; whitespacePitchModulator = wPitchModulator; whitespaceRhythm = wRhythm; whitespaceVolume = wVolume; sfxPitchModulator = (pitch) => pitch; sfxRhythm = 0; sfxVolume = 0; accompanimentPitchModulator = (pitch) => pitch; accompanimentRhythm = 0; accompanimentVolume = 0; }