<commit_before>using Aurora.EffectsEngine;
using Aurora.Profiles;
using Aurora.Settings.Overrides;
using Aurora.Utils;
using NAudio.CoreAudioApi;
using NAudio.Dsp;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Media.Imaging;

namespace Aurora.Settings.Layers
{
    public enum EqualizerType
    {
        [Description("Power Bars")]
        PowerBars,

        [Description("Waveform")]
        Waveform,

        [Description("Waveform (From bottom)")]
        Waveform_Bottom

    }

    public enum EqualizerPresentationType
    {
        [Description("Solid Color")]
        SolidColor,

        [Description("Alternating Colors")]
        AlternatingColor,

        [Description("Gradient Notched Color")]
        GradientNotched,

        [Description("Gradient Color Shift")]
        GradientColorShift,

        [Description("Gradient (Horizontal)")]
        GradientHorizontal,

        [Description("Gradient (Vertical)")]
        GradientVertical
    }

    public enum EqualizerBackgroundMode
    {
        [Description("Disabled")]
        Disabled,

        [Description("Always on")]
        AlwaysOn,

        [Description("On sound")]
        EnabledOnSound
    }

    public class EqualizerLayerHandlerProperties : LayerHandlerProperties<EqualizerLayerHandlerProperties>
    {
        [LogicOverridable("Secondary Color")]
        public Color? _SecondaryColor { get; set; }
        [JsonIgnore]
        public Color SecondaryColor { get { return Logic._SecondaryColor ?? _SecondaryColor ?? Color.Empty; } }

        [LogicOverridable("Gradient")]
        public EffectBrush _Gradient { get; set; }
        [JsonIgnore]
        public EffectBrush Gradient { get { return Logic._Gradient ?? _Gradient ?? new EffectBrush().SetBrushType(EffectBrush.BrushType.Linear); } }

        [LogicOverridable("Equalizer Type")]
        public EqualizerType? _EQType { get; set; }
        [JsonIgnore]
        public EqualizerType EQType { get { return Logic._EQType ?? _EQType ?? EqualizerType.PowerBars; } }

        [LogicOverridable("View Type")]
        public EqualizerPresentationType? _ViewType { get; set; }
        [JsonIgnore]
        public EqualizerPresentationType ViewType { get { return Logic._ViewType ?? _ViewType ?? EqualizerPresentationType.SolidColor; } }

        [LogicOverridable("Background Mode")]
        public EqualizerBackgroundMode? _BackgroundMode { get; set; }
        [JsonIgnore]
        public EqualizerBackgroundMode BackgroundMode { get { return Logic._BackgroundMode ?? _BackgroundMode ?? EqualizerBackgroundMode.Disabled; } }

        [LogicOverridable("Max Amplitude")]
        public float? _MaxAmplitude { get; set; }
        [JsonIgnore]
        public float MaxAmplitude { get { return Logic._MaxAmplitude ?? _MaxAmplitude ?? 20.0f; } }

        [LogicOverridable("Scale with System Volume")]
        public bool? _ScaleWithSystemVolume { get; set; }
        [JsonIgnore]
        public bool ScaleWithSystemVolume { get { return Logic._ScaleWithSystemVolume ?? _ScaleWithSystemVolume ?? false; } }

        [LogicOverridable("Background Color")]
        public Color? _DimColor { get; set; }
        [JsonIgnore]
        public Color DimColor { get { return Logic._DimColor ?? _DimColor ?? Color.Empty; } }

        public SortedSet<float> _Frequencies { get; set; }
        [JsonIgnore]
        public SortedSet<float> Frequencies { get { return Logic._Frequencies ?? _Frequencies ?? new SortedSet<float>(); } }

        public EqualizerLayerHandlerProperties() : base()
        {

        }

        public EqualizerLayerHandlerProperties(bool arg = false) : base(arg)
        {

        }

        public override void Default()
        {
            base.Default();
            _Sequence = new KeySequence(Effects.WholeCanvasFreeForm);
            _PrimaryColor = Utils.ColorUtils.GenerateRandomColor();
            _SecondaryColor = Utils.ColorUtils.GenerateRandomColor();
            _Gradient = new EffectBrush(ColorSpectrum.RainbowLoop).SetBrushType(EffectBrush.BrushType.Linear);
            _EQType = EqualizerType.PowerBars;
            _ViewType = EqualizerPresentationType.SolidColor;
            _MaxAmplitude = 20.0f;
            _ScaleWithSystemVolume = false;
            _BackgroundMode = EqualizerBackgroundMode.Disabled;
            _DimColor = Color.FromArgb(169, 0, 0, 0);
            _Frequencies = new SortedSet<float>() { 50, 95, 130, 180, 250, 350, 500, 620, 700, 850, 1200, 1600, 2200, 3000, 4100, 5600, 7700, 10000, 10001, 10002 };
        }
    }

    public class EqualizerLayerHandler : LayerHandler<EqualizerLayerHandlerProperties>
    {
        public event NewLayerRendered NewLayerRender = delegate { };
<commit_msg>Remove unneeded high frequencies in Audio Visualiser layer<commit_after>using Aurora.EffectsEngine;
using Aurora.Profiles;
using Aurora.Settings.Overrides;
using Aurora.Utils;
using NAudio.CoreAudioApi;
using NAudio.Dsp;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Media.Imaging;

namespace Aurora.Settings.Layers
{
    public enum EqualizerType
    {
        [Description("Power Bars")]
        PowerBars,

        [Description("Waveform")]
        Waveform,

        [Description("Waveform (From bottom)")]
        Waveform_Bottom

    }

    public enum EqualizerPresentationType
    {
        [Description("Solid Color")]
        SolidColor,

        [Description("Alternating Colors")]
        AlternatingColor,

        [Description("Gradient Notched Color")]
        GradientNotched,

        [Description("Gradient Color Shift")]
        GradientColorShift,

        [Description("Gradient (Horizontal)")]
        GradientHorizontal,

        [Description("Gradient (Vertical)")]
        GradientVertical
    }

    public enum EqualizerBackgroundMode
    {
        [Description("Disabled")]
        Disabled,

        [Description("Always on")]
        AlwaysOn,

        [Description("On sound")]
        EnabledOnSound
    }

    public class EqualizerLayerHandlerProperties : LayerHandlerProperties<EqualizerLayerHandlerProperties>
    {
        [LogicOverridable("Secondary Color")]
        public Color? _SecondaryColor { get; set; }
        [JsonIgnore]
        public Color SecondaryColor { get { return Logic._SecondaryColor ?? _SecondaryColor ?? Color.Empty; } }

        [LogicOverridable("Gradient")]
        public EffectBrush _Gradient { get; set; }
        [JsonIgnore]
        public EffectBrush Gradient { get { return Logic._Gradient ?? _Gradient ?? new EffectBrush().SetBrushType(EffectBrush.BrushType.Linear); } }

        [LogicOverridable("Equalizer Type")]
        public EqualizerType? _EQType { get; set; }
        [JsonIgnore]
        public EqualizerType EQType { get { return Logic._EQType ?? _EQType ?? EqualizerType.PowerBars; } }

        [LogicOverridable("View Type")]
        public EqualizerPresentationType? _ViewType { get; set; }
        [JsonIgnore]
        public EqualizerPresentationType ViewType { get { return Logic._ViewType ?? _ViewType ?? EqualizerPresentationType.SolidColor; } }

        [LogicOverridable("Background Mode")]
        public EqualizerBackgroundMode? _BackgroundMode { get; set; }
        [JsonIgnore]
        public EqualizerBackgroundMode BackgroundMode { get { return Logic._BackgroundMode ?? _BackgroundMode ?? EqualizerBackgroundMode.Disabled; } }

        [LogicOverridable("Max Amplitude")]
        public float? _MaxAmplitude { get; set; }
        [JsonIgnore]
        public float MaxAmplitude { get { return Logic._MaxAmplitude ?? _MaxAmplitude ?? 20.0f; } }

        [LogicOverridable("Scale with System Volume")]
        public bool? _ScaleWithSystemVolume { get; set; }
        [JsonIgnore]
        public bool ScaleWithSystemVolume { get { return Logic._ScaleWithSystemVolume ?? _ScaleWithSystemVolume ?? false; } }

        [LogicOverridable("Background Color")]
        public Color? _DimColor { get; set; }
        [JsonIgnore]
        public Color DimColor { get { return Logic._DimColor ?? _DimColor ?? Color.Empty; } }

        public SortedSet<float> _Frequencies { get; set; }
        [JsonIgnore]
        public SortedSet<float> Frequencies { get { return Logic._Frequencies ?? _Frequencies ?? new SortedSet<float>(); } }

        public EqualizerLayerHandlerProperties() : base()
        {

        }

        public EqualizerLayerHandlerProperties(bool arg = false) : base(arg)
        {

        }

        public override void Default()
        {
            base.Default();
            _Sequence = new KeySequence(Effects.WholeCanvasFreeForm);
            _PrimaryColor = Utils.ColorUtils.GenerateRandomColor();
            _SecondaryColor = Utils.ColorUtils.GenerateRandomColor();
            _Gradient = new EffectBrush(ColorSpectrum.RainbowLoop).SetBrushType(EffectBrush.BrushType.Linear);
            _EQType = EqualizerType.PowerBars;
            _ViewType = EqualizerPresentationType.SolidColor;
            _MaxAmplitude = 20.0f;
            _ScaleWithSystemVolume = false;
            _BackgroundMode = EqualizerBackgroundMode.Disabled;
            _DimColor = Color.FromArgb(169, 0, 0, 0);
            _Frequencies = new SortedSet<float>() { 50, 95, 130, 180, 250, 350, 500, 620, 700, 850, 1200, 1600, 2200, 3000, 4100, 5600, 7700, 10000 };
        }
    }

    public class EqualizerLayerHandler : LayerHandler<EqualizerLayerHandlerProperties>
    {
        public event NewLayerRendered NewLayerRender = delegate { };

{'fraction_non_alphanumeric': 0.09506726457399103, 'fraction_numerical': 0.01554559043348281, 'mean_word_length': 2.979381443298969, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '534174', 'n_tokens_mistral': 2979, 'n_tokens_neox': 2625, 'n_words': 619}