Ejemplo n.º 1
0
        // Token: 0x0600332D RID: 13101 RVA: 0x00147E64 File Offset: 0x00146064
        protected override void ReadContent(MidiReader reader, ReadingSettings settings, int size)
        {
            InvalidMetaEventParameterValuePolicy invalidMetaEventParameterValuePolicy = settings.InvalidMetaEventParameterValuePolicy;

            this.Key   = (sbyte)KeySignatureEvent.ProcessValue((int)reader.ReadSByte(), "Key", -7, 7, invalidMetaEventParameterValuePolicy);
            this.Scale = (byte)KeySignatureEvent.ProcessValue((int)reader.ReadByte(), "Scale", 0, 1, invalidMetaEventParameterValuePolicy);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reads content of a MIDI meta event.
        /// </summary>
        /// <param name="reader">Reader to read the content with.</param>
        /// <param name="settings">Settings according to which the event's content must be read.</param>
        /// <param name="size">Size of the event's content.</param>
        protected override void ReadContent(MidiReader reader, ReadingSettings settings, int size)
        {
            var invalidMetaEventParameterValuePolicy = settings.InvalidMetaEventParameterValuePolicy;

            Key = (sbyte)ProcessValue(reader.ReadSByte(),
                                      nameof(Key),
                                      MinKey,
                                      MaxKey,
                                      invalidMetaEventParameterValuePolicy);

            Scale = (byte)ProcessValue(reader.ReadByte(),
                                       nameof(Scale),
                                       MinScale,
                                       MaxScale,
                                       invalidMetaEventParameterValuePolicy);
        }