Ejemplo n.º 1
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            On = ByteUtils.ByteToBoolean(data[0]);

            GroupType = data[1];
            GroupId   = ByteUtils.NumberFrom4MidiPackets(data.Skip(2).Take(4).ToArray(), ByteUtils.Offset.None);
            LeftWave  = (Wave)ByteUtils.NumberFrom4MidiPackets(data.Skip(6).Take(4).ToArray(), ByteUtils.Offset.None);
            RightWave = (Wave)ByteUtils.NumberFrom4MidiPackets(data.Skip(10).Take(4).ToArray(), ByteUtils.Offset.None);

            WaveGain  = (WaveGain)data[14];
            Fxm       = ByteUtils.ByteToBoolean(data[15]);
            FxmColor  = (FxmWaveColor)data[16];
            FxmDepth  = data[17];
            TempoSync = ByteUtils.ByteToBoolean(data[18]);

            CoarseTune        = data[19] - 64;
            FineTune          = data[20] - 64;
            Panorama          = data[21] - 64;
            RandomPanorama    = ByteUtils.ByteToBoolean(data[22]);
            AlternatePanorama = (AlternatePan)data[23];

            Level = data[24];
            VelocityRangeLower     = data[25];
            VelocityRangeUpper     = data[26];
            VelocityFadeWidthLower = data[27];
            VelocityFadeWidthUpper = data[28];
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            On    = ByteUtils.ByteToBoolean(data[0]);
            Level = data[1];
        }
Ejemplo n.º 3
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            OneShotMode   = ByteUtils.ByteToBoolean(data[0]);
            RelativeLevel = data[1] - 64;
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            /**
             * 12   -> SysEx header & address offset
             * 12   -> Patch name
             * 1    -> Tone level
             * 5    -> Reserve
             * 6    -> Portamento, Mono, OctaveShift, Pitch Bend
             * 1    -> Reserve
             * 6    -> Partial switches
             * 1    -> Ring
             * 14   -> Reserve
             * 1    -> Unison
             * 2    -> Reserve
             * 2    -> Portamento mode, Legato
             * 1    -> Reserve,
             * 3    -> AnalogFeel, WaveShape, Tone Category
             * 5    -> Reserve
             * 1    -> Unison Size
             * 3    -> Reserve
             */

            Name               = Encoding.ASCII.GetString(data.Take(12).ToArray());
            ToneLevel          = data[12];
            Portamento         = ByteUtils.ByteToBoolean(data[18]);
            PortamentoTime     = data[19];
            Mono               = ByteUtils.ByteToBoolean(data[20]);
            OctaveShift        = data[21] - 64;
            PitchBendRangeUp   = data[22];
            PitchBendRangeDown = data[23];

            PartialOneSwitch   = ByteUtils.ByteToBoolean(data[25]);
            PartialOneSelect   = ByteUtils.ByteToBoolean(data[26]);
            PartialTwoSwitch   = ByteUtils.ByteToBoolean(data[27]);
            PartialTwoSelect   = ByteUtils.ByteToBoolean(data[28]);
            PartialThreeSwitch = ByteUtils.ByteToBoolean(data[29]);
            PartialThreeSelect = ByteUtils.ByteToBoolean(data[30]);

            Ring   = ByteUtils.ByteToBoolean(data[31]);
            Unison = ByteUtils.ByteToBoolean(data[46]);

            PortamentoMode = (PortamentoMode)data[49];
            Legato         = ByteUtils.ByteToBoolean(data[50]);

            AnalogFeel   = data[52];
            WaveShape    = data[53];
            ToneCategory = (Category)data[54];

            UnisonSize = (UnisonSize)data[60];
        }
Ejemplo n.º 5
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            PitchBendRange    = data[0];
            ReceiveExpression = ByteUtils.ByteToBoolean(data[1]);
            ReceiveHold1      = ByteUtils.ByteToBoolean(data[2]);
        }
Ejemplo n.º 6
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            Portamento         = ByteUtils.ByteToBoolean(data[0]);
            PortamentoTime     = data[1];
            Legato             = ByteUtils.ByteToBoolean(data[2]);
            OctaveShift        = data[3] - 64;
            PitchBendRangeUp   = data[4];
            PitchBendRangeDown = data[5];
        }
Ejemplo n.º 7
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            On                    = ByteUtils.ByteToBoolean(data[0]);
            Envelope              = (Envelope)data[1];
            UnknowParameter       = data[2];
            MicrophoneSensitivity = data[3];
            SynthLevel            = data[4];
            MicrophoneMixLevel    = data[5];
            MicrophoneHpf         = (HighPassFilter)data[6];
        }
Ejemplo n.º 8
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            On            = ByteUtils.ByteToBoolean(data[0]);
            Type          = (Type)data[1];
            Scale         = (Scale)data[2];
            Key           = (Key)data[3];
            Note          = (Note)data[4];
            Gender        = data[5] - 10;
            Octave        = (Octave)data[6];
            DryWetBalance = data[7];
        }
Ejemplo n.º 9
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            Name  = Encoding.ASCII.GetString(data.Take(12).ToArray());
            Level = data[16];
            Tempo = ByteUtils.NumberFrom4MidiPackets(data.Skip(17).Take(4).ToArray(), ByteUtils.Offset.None) / 100;

            VocalEffectType   = (Type)data[22];
            VocalEffectNumber = (EffectNumber)data[28];
            VocalEffectPart   = (Part)data[29];
            AutoNote          = ByteUtils.ByteToBoolean(data[30]);
        }
Ejemplo n.º 10
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            Shape           = (LfoShape)data[0];
            Rate            = data[1];
            TempoSync       = ByteUtils.ByteToBoolean(data[2]);
            SyncNote        = (SyncNote)data[3];
            PulseWidthShift = data[4];
            PitchDepth      = data[6] - 64;
            FilterDepth     = data[7] - 64;
            AmpDepth        = data[8] - 64;
            PanDepth        = data[9] - 64;
        }
Ejemplo n.º 11
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            Shape       = (LfoShape)data[0];
            Rate        = data[1];
            FadeTime    = data[2];
            TempoSync   = ByteUtils.ByteToBoolean(data[3]);
            SyncNote    = (SyncNote)data[4];
            PitchDepth  = data[5] - 64;
            FilterDepth = data[6] - 64;
            AmpDepth    = data[7] - 64;
            KeyTrigger  = ByteUtils.ByteToBoolean(data[8]);
        }
Ejemplo n.º 12
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            On                          = ByteUtils.ByteToBoolean(data[0]);
            Cutoff                      = data[1];
            CutoffKeyfollow             = (data[2] - 64) * 10;
            Resonance                   = data[3];
            EnvelopeVelocitySensitivity = data[4] - 64;
            Envelope.Attack             = data[5];
            Envelope.Decay              = data[6];
            Envelope.Sustain            = data[7];
            Envelope.Release            = data[8];
            EnvelopeDepth               = data[9] - 64;
        }
Ejemplo n.º 13
0
        /// <inheritdoc />
        public void CopyFrom(byte[] data)
        {
            if (data.Length != DumpLength)
            {
                throw new InvalidDumpSizeException(DumpLength, data.Length);
            }

            /**
             * 12   -> SysEx header & address offset
             * 1    -> Reserve
             * 3    -> TimeIntervalSensitivities
             * 2    -> Envelope Loop
             * 1    -> Chromatic Portamento
             */

            AttackTimeIntervalSensitivity     = data[1];
            ReleaseTimeIntervalSensitivity    = data[2];
            PortamentoTimeIntervalSensitivity = data[3];
            EnvelopeLoopMode     = (EnvelopeLoopMode)data[4];
            EnvelopeLoopSyncNote = (SyncNote)data[5];
            ChromaticPortamento  = ByteUtils.ByteToBoolean(data[6]);
        }