public PanPanel(Settings.ControlCommand.Pan settings, MMLStyle mmlStyle) { InitializeComponent(); this.settings = settings; this.mmlStyle = mmlStyle; }
protected override string GenerateString(Settings settings, SoundModule module) { string sign; Settings.ControlCommand.Pan panSettings = settings.controlCommand.pan; if (Value <= panSettings.BorderLeft) { sign = "P1"; } else if (panSettings.BorderRight <= Value) { sign = "P2"; } else { sign = "P3"; } return(sign); }
protected override string GenerateString(Settings settings, SoundModule module) { string sign; int newValue; Settings.ControlCommand.Pan panSettings = settings.controlCommand.pan; if (panSettings.CommandCustom == 0) { sign = panSettings.MIDICommandCustom; newValue = Value; } else { newValue = -1; if (Value <= panSettings.BorderLeft) { sign = panSettings.LeftCommandCustom; } else if (panSettings.BorderRight <= Value) { sign = panSettings.RightCommandCustom; } else { sign = panSettings.CenterCommandCustom; } } if (newValue < 0) { return(sign); } else { return(sign + newValue); } }
protected override string GenerateString(Settings settings, SoundModule module) { string sign; int jud; int newValue; Settings.ControlCommand.Pan panSettings = settings.controlCommand.pan; if (Value == 64) { jud = 2; newValue = 128; } else { if (Value > 64) { jud = 0; newValue = (Value - 64) * 127 / 63; } else { jud = 1; newValue = (64 - Value) * 127 / 64; } } if (panSettings.CommandFMP7 == 0) { sign = "P"; switch (jud) { case 0: newValue = 128 + newValue; break; case 1: newValue = 128 - newValue; break; default: break; } } else { switch (jud) { case 0: sign = "PR"; break; case 1: sign = "PL"; break; default: sign = "PC"; newValue = -1; break; } } if (newValue < 0) { return(sign); } else { return(sign + newValue); } }