Example #1
0
        /// <summary>
        ///
        /// </summary>
        public FormYMF262Editor(YMF262 inst, YMF262Timbre timbre, bool singleSelect) : base(inst, timbre, singleSelect)
        {
            this.timbre = timbre;
            InitializeComponent();

            Size = Settings.Default.YMF262EdSize;

            var gen = new YMF262GeneralContainer(inst, timbre, "General");

            AddControl(gen);

            AddControl(new YMF262OperatorContainer(timbre.Ops[0], null, "Operator 1"));
            AddControl(new YMF262OperatorContainer(timbre.Ops[1], null, "Operator 2"));
            AddControl(new YMF262OperatorContainer(timbre.Ops[2], gen, "Operator 3"));
            AddControl(new YMF262OperatorContainer(timbre.Ops[3], gen, "Operator 4"));
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        public YMF262OperatorContainer(YMF262.YMF262Operator op, YMF262GeneralContainer gen, string name) : base(op, name)
        {
            InitializeComponent();

            this.op = op;
            if (gen != null)
            {
                this.gen          = gen;
                gen.ValueChanged += Gen_ValueChanged;
                Gen_ValueChanged(null, new PropertyChangedEventArgs("ALG"));
            }

            AddControl(new RegisterValue("AR", op.AR, 0, 15));
            AddControl(new RegisterValue("DR", op.DR, 0, 15));
            AddControl(new RegisterValue("RR", op.RR, 0, 15));
            AddControl(new RegisterValue("SL", op.SL, 0, 15));
            AddControl(new RegisterValue("SR", op.SR == null ? -1 : op.SR.Value, 0, 15, true));
            AddControl(new RegisterValue("TL", op.TL, 0, 63));
            AddControl(new RegisterValue("KSL", op.KSL, 0, 3));
            AddControl(new RegisterValue("KSR", op.KSR, 0, 1));
            AddControl(new RegisterValue("MFM", op.MFM, 0, 15));
            AddControl(new RegisterValue("AM", op.AM, 0, 1));
            AddControl(new RegisterValue("VIB", op.VIB, 0, 1));
            AddControl(new RegisterValue("EG", op.EG, 0, 1));
            AddControl(new RegisterValue("WS", op.WS, 0, 7));
            AddControl(new RegisterOplWaveForm(
                           (RegisterValue)GetControl("WS")
                           ));

            AddControl(new RegisterSpace("spc")
            {
                Dock = DockStyle.Right
            });
            AddControl(new RegisterEnvForm(
                           (RegisterValue)GetControl("AR"),
                           (RegisterValue)GetControl("TL"),
                           (RegisterValue)GetControl("DR"), true,
                           (RegisterValue)GetControl("SL"),
                           (RegisterValue)GetControl("SR"),
                           (RegisterValue)GetControl("RR")
                           ));
        }