Example #1
0
        /// <summary>
        /// Метод, привязывающий параметры фильтра плагина к редактору.
        /// </summary>
        private void BindFilter(FiltersManager filter, EnvelopesManager env)
        {
            var color = (Brush)Resources["filterKnobColor"];

            // Filter
            FilterCutoff.AttachTo(filter.CutoffManager, color,
                                  Converters.FilterCutoffMultiplierToString);

            FilterResonanse.AttachTo(filter.CurveManager, color,
                                     Converters.PercentsToString);

            FilterType.AttachTo(filter.FilterTypeManager, color,
                                Converters.FilterTypeToString);

            FilterKeyTracking.AttachTo(filter.TrackingCoeffManager, color,
                                       Converters.PercentsToString);

            // Filter envelope
            FilterAttack.AttachTo(env.AttackTimeManager, color,
                                  Converters.EnvelopeTimeToString);

            FilterDecay.AttachTo(env.DecayTimeManager, color,
                                 Converters.EnvelopeTimeToString);

            FilterSustain.AttachTo(env.SustainLevelManager, color,
                                   Converters.PercentsToString);

            FilterRelease.AttachTo(env.ReleaseTimeManager, color,
                                   Converters.EnvelopeTimeToString);

            FilterEnvelopeAmp.AttachTo(env.EnvelopeAmplitudeManager, color,
                                       Converters.PercentsToString);

            FilterAttackCurve.AttachTo(env.AttackCurveManager, color,
                                       Converters.EnvelopeCurveToString);

            FilterDecayReleaseCurve.AttachTo(env.DecayReleaseCurveManager, color,
                                             Converters.EnvelopeCurveToString);
        }
Example #2
0
        /// <summary>
        /// Метод, привязывающий параметры второго осциллятора плагина к редактору.
        /// </summary>
        /// <param name="oscA"></param>
        /// <param name="envA"></param>
        private void BindOscB(OscillatorsManager oscB, EnvelopesManager envB)
        {
            var color = (SolidColorBrush)Resources["oscBKnobColor"];

            // OscA
            BPitchSemi.AttachTo(oscB.PitchSemiManager, color,
                                Converters.SemitonesToString);

            BPitchFine.AttachTo(oscB.PitchFineManager, color,
                                Converters.CentsToString);

            BTimbre.AttachTo(oscB.WaveTableManager, color,
                             Converters.WaveTableToString);

            // OscA envelope
            BAttack.AttachTo(envB.AttackTimeManager, color,
                             Converters.EnvelopeTimeToString);

            BDecay.AttachTo(envB.DecayTimeManager, color,
                            Converters.EnvelopeTimeToString);

            BSustain.AttachTo(envB.SustainLevelManager, color,
                              Converters.PercentsToString);

            BRelease.AttachTo(envB.ReleaseTimeManager, color,
                              Converters.EnvelopeTimeToString);

            BAmp.AttachTo(envB.EnvelopeAmplitudeManager, color,
                          Converters.PercentsToString);

            BAttackCurve.AttachTo(envB.AttackCurveManager, color,
                                  Converters.EnvelopeCurveToString);

            BDecayReleaseCurve.AttachTo(envB.DecayReleaseCurveManager, color,
                                        Converters.EnvelopeCurveToString);
        }
Example #3
0
        /// <summary>
        /// Метод, привязывающий параметры первого осциллятора плагина к редактору.
        /// </summary>
        /// <param name="oscA"></param>
        /// <param name="envA"></param>
        private void BindOscA(OscillatorsManager oscA, EnvelopesManager envA)
        {
            var color = (SolidColorBrush)Resources["oscAKnobColor"];

            // OscA
            APitchSemi.AttachTo(oscA.PitchSemiManager, color,
                                Converters.SemitonesToString);

            APitchFine.AttachTo(oscA.PitchFineManager, color,
                                Converters.CentsToString);

            ATimbre.AttachTo(oscA.WaveTableManager, color,
                             Converters.WaveTableToString);

            // OscA envelope
            AAttack.AttachTo(envA.AttackTimeManager, color,
                             Converters.EnvelopeTimeToString);

            ADecay.AttachTo(envA.DecayTimeManager, color,
                            Converters.EnvelopeTimeToString);

            ASustain.AttachTo(envA.SustainLevelManager, color,
                              Converters.PercentsToString);

            ARelease.AttachTo(envA.ReleaseTimeManager, color,
                              Converters.EnvelopeTimeToString);

            AAmp.AttachTo(envA.EnvelopeAmplitudeManager, color,
                          Converters.PercentsToString);

            AAttackCurve.AttachTo(envA.AttackCurveManager, color,
                                  Converters.EnvelopeCurveToString);

            ADecayReleaseCurve.AttachTo(envA.DecayReleaseCurveManager, color,
                                        Converters.EnvelopeCurveToString);
        }