mirror of
https://github.com/DarthAffe/KeyboardAudioVisualizer.git
synced 2025-12-12 23:28:30 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 008fd65c08 | |||
| f7f30f36c7 | |||
| e62259ca63 | |||
| b30bb88762 | |||
| 6ad2e861a0 | |||
| 967dde1d3d | |||
| 7216eae954 | |||
| e94c0723c5 | |||
| 5dfc02eeab | |||
| 806dd3aae7 | |||
| dde304b007 | |||
| 7eac420a8e | |||
| 7cf179421f | |||
| b54e01a96b | |||
| 7b6c2c184e | |||
| 8f53049bdf | |||
|
|
0ec92488e4 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -286,6 +286,3 @@ __pycache__/
|
|||||||
*.btm.cs
|
*.btm.cs
|
||||||
*.odx.cs
|
*.odx.cs
|
||||||
*.xsd.cs
|
*.xsd.cs
|
||||||
/NuGet.Config
|
|
||||||
/NuGet.Config
|
|
||||||
/KeyboardAudioVisualizer/NuGet.Config
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@ -8,6 +8,8 @@ using KeyboardAudioVisualizer.Configuration;
|
|||||||
using KeyboardAudioVisualizer.Helper;
|
using KeyboardAudioVisualizer.Helper;
|
||||||
using KeyboardAudioVisualizer.Legacy;
|
using KeyboardAudioVisualizer.Legacy;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using RGB.NET.Brushes.Gradients;
|
||||||
|
using RGB.NET.Core;
|
||||||
using Settings = KeyboardAudioVisualizer.Configuration.Settings;
|
using Settings = KeyboardAudioVisualizer.Configuration.Settings;
|
||||||
|
|
||||||
namespace KeyboardAudioVisualizer
|
namespace KeyboardAudioVisualizer
|
||||||
@ -53,7 +55,11 @@ namespace KeyboardAudioVisualizer
|
|||||||
|
|
||||||
if (settings == null)
|
if (settings == null)
|
||||||
{
|
{
|
||||||
settings = new Settings { Version = Settings.CURRENT_VERSION };
|
settings = new Settings
|
||||||
|
{
|
||||||
|
Version = Settings.CURRENT_VERSION,
|
||||||
|
Background = new LinearGradient(new GradientStop(0.5, new Color(64, 0, 0, 0)))
|
||||||
|
};
|
||||||
_taskbarIcon.ShowBalloonTip("Keyboard Audio-Visualizer is starting in the tray!", "Click on the icon to open the configuration.", BalloonIcon.Info);
|
_taskbarIcon.ShowBalloonTip("Keyboard Audio-Visualizer is starting in the tray!", "Click on the icon to open the configuration.", BalloonIcon.Info);
|
||||||
}
|
}
|
||||||
else if (settings.Version != Settings.CURRENT_VERSION)
|
else if (settings.Version != Settings.CURRENT_VERSION)
|
||||||
|
|||||||
@ -14,6 +14,7 @@ using RGB.NET.Devices.Corsair;
|
|||||||
using RGB.NET.Devices.Logitech;
|
using RGB.NET.Devices.Logitech;
|
||||||
using RGB.NET.Devices.Novation;
|
using RGB.NET.Devices.Novation;
|
||||||
using RGB.NET.Devices.Razer;
|
using RGB.NET.Devices.Razer;
|
||||||
|
using RGB.NET.Devices.SteelSeries;
|
||||||
using RGB.NET.Groups;
|
using RGB.NET.Groups;
|
||||||
using Point = RGB.NET.Core.Point;
|
using Point = RGB.NET.Core.Point;
|
||||||
using GetDecoratorFunc = System.Func<KeyboardAudioVisualizer.AudioProcessing.VisualizationProvider.VisualizationType, KeyboardAudioVisualizer.AudioProcessing.VisualizationProvider.IVisualizationProvider, RGB.NET.Core.IBrushDecorator>;
|
using GetDecoratorFunc = System.Func<KeyboardAudioVisualizer.AudioProcessing.VisualizationProvider.VisualizationType, KeyboardAudioVisualizer.AudioProcessing.VisualizationProvider.IVisualizationProvider, RGB.NET.Core.IBrushDecorator>;
|
||||||
@ -37,6 +38,8 @@ namespace KeyboardAudioVisualizer
|
|||||||
|
|
||||||
private readonly Dictionary<VisualizationIndex, IEnumerable<(ILedGroup group, GetDecoratorFunc getDecoratorFunc)>> _groups = new Dictionary<VisualizationIndex, IEnumerable<(ILedGroup group, GetDecoratorFunc getDecoratorFunc)>>();
|
private readonly Dictionary<VisualizationIndex, IEnumerable<(ILedGroup group, GetDecoratorFunc getDecoratorFunc)>> _groups = new Dictionary<VisualizationIndex, IEnumerable<(ILedGroup group, GetDecoratorFunc getDecoratorFunc)>>();
|
||||||
|
|
||||||
|
public TimerUpdateTrigger UpdateTrigger { get; } = new TimerUpdateTrigger();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Commands
|
#region Commands
|
||||||
@ -61,19 +64,20 @@ namespace KeyboardAudioVisualizer
|
|||||||
{
|
{
|
||||||
RGBSurface surface = RGBSurface.Instance;
|
RGBSurface surface = RGBSurface.Instance;
|
||||||
|
|
||||||
surface.UpdateFrequency = 1.0 / MathHelper.Clamp(Settings.UpdateRate, 1, 60);
|
UpdateTrigger.UpdateFrequency = 1.0 / MathHelper.Clamp(Settings.UpdateRate, 1, 60);
|
||||||
surface.UpdateMode = UpdateMode.Continuous;
|
surface.RegisterUpdateTrigger(UpdateTrigger);
|
||||||
|
|
||||||
LoadDevices(surface, CorsairDeviceProvider.Instance);
|
LoadDevices(surface, CorsairDeviceProvider.Instance);
|
||||||
LoadDevices(surface, CoolerMasterDeviceProvider.Instance);
|
LoadDevices(surface, CoolerMasterDeviceProvider.Instance);
|
||||||
LoadDevices(surface, NovationDeviceProvider.Instance);
|
LoadDevices(surface, NovationDeviceProvider.Instance);
|
||||||
LoadDevices(surface, RazerDeviceProvider.Instance);
|
LoadDevices(surface, RazerDeviceProvider.Instance);
|
||||||
LoadDevices(surface, LogitechDeviceProvider.Instance);
|
LoadDevices(surface, LogitechDeviceProvider.Instance);
|
||||||
|
LoadDevices(surface, SteelSeriesDeviceProvider.Instance);
|
||||||
|
|
||||||
surface.AlignDevices();
|
surface.AlignDevices();
|
||||||
|
|
||||||
ILedGroup background = new ListLedGroup(surface.Leds);
|
ILedGroup background = new ListLedGroup(surface.Leds);
|
||||||
background.Brush = new SolidColorBrush(new Color(64, 0, 0, 0)); //TODO DarthAffe 06.08.2017: A-Channel gives some kind of blur - settings!
|
background.Brush = new LinearGradientBrush(Settings.Background);
|
||||||
|
|
||||||
LinearGradient primaryGradient = Settings[VisualizationIndex.Primary].Gradient;
|
LinearGradient primaryGradient = Settings[VisualizationIndex.Primary].Gradient;
|
||||||
LinearGradient secondaryGradient = Settings[VisualizationIndex.Secondary].Gradient;
|
LinearGradient secondaryGradient = Settings[VisualizationIndex.Secondary].Gradient;
|
||||||
@ -86,6 +90,7 @@ namespace KeyboardAudioVisualizer
|
|||||||
switch (device.DeviceInfo.DeviceType)
|
switch (device.DeviceInfo.DeviceType)
|
||||||
{
|
{
|
||||||
case RGBDeviceType.Keyboard:
|
case RGBDeviceType.Keyboard:
|
||||||
|
case RGBDeviceType.Keypad:
|
||||||
case RGBDeviceType.LedMatrix:
|
case RGBDeviceType.LedMatrix:
|
||||||
ListLedGroup primary = new ListLedGroup(device);
|
ListLedGroup primary = new ListLedGroup(device);
|
||||||
|
|
||||||
@ -113,6 +118,7 @@ namespace KeyboardAudioVisualizer
|
|||||||
|
|
||||||
case RGBDeviceType.Mousepad:
|
case RGBDeviceType.Mousepad:
|
||||||
case RGBDeviceType.LedStripe:
|
case RGBDeviceType.LedStripe:
|
||||||
|
case RGBDeviceType.HeadsetStand:
|
||||||
ILedGroup left = new RectangleLedGroup(new Rectangle(device.Location.X, device.Location.Y, device.Size.Width / 2.0, device.Size.Height));
|
ILedGroup left = new RectangleLedGroup(new Rectangle(device.Location.X, device.Location.Y, device.Size.Width / 2.0, device.Size.Height));
|
||||||
left.Brush = new LinearGradientBrush(new Point(0.5, 1), new Point(0.5, 0), tertiaryGradient);
|
left.Brush = new LinearGradientBrush(new Point(0.5, 1), new Point(0.5, 0), tertiaryGradient);
|
||||||
tertiaryGroups.Add((left, (visualizationType, visualizer) => CreateDecorator(visualizationType, visualizer, LevelBarDirection.Top, 0)));
|
tertiaryGroups.Add((left, (visualizationType, visualizer) => CreateDecorator(visualizationType, visualizer, LevelBarDirection.Top, 0)));
|
||||||
@ -124,6 +130,11 @@ namespace KeyboardAudioVisualizer
|
|||||||
|
|
||||||
case RGBDeviceType.Mouse:
|
case RGBDeviceType.Mouse:
|
||||||
case RGBDeviceType.Headset:
|
case RGBDeviceType.Headset:
|
||||||
|
case RGBDeviceType.Speaker:
|
||||||
|
case RGBDeviceType.Fan:
|
||||||
|
case RGBDeviceType.GraphicsCard:
|
||||||
|
case RGBDeviceType.DRAM:
|
||||||
|
case RGBDeviceType.Mainboard:
|
||||||
ILedGroup deviceGroup = new ListLedGroup(device);
|
ILedGroup deviceGroup = new ListLedGroup(device);
|
||||||
deviceGroup.Brush = new LinearGradientBrush(secondaryGradient);
|
deviceGroup.Brush = new LinearGradientBrush(secondaryGradient);
|
||||||
secondaryGroups.Add((deviceGroup, (visualizationType, visualizer) => CreateDecorator(visualizationType, visualizer)));
|
secondaryGroups.Add((deviceGroup, (visualizationType, visualizer) => CreateDecorator(visualizationType, visualizer)));
|
||||||
@ -145,7 +156,8 @@ namespace KeyboardAudioVisualizer
|
|||||||
{
|
{
|
||||||
surface.LoadDevices(deviceProvider, RGBDeviceType.Keyboard | RGBDeviceType.LedMatrix
|
surface.LoadDevices(deviceProvider, RGBDeviceType.Keyboard | RGBDeviceType.LedMatrix
|
||||||
| RGBDeviceType.Mousepad | RGBDeviceType.LedStripe
|
| RGBDeviceType.Mousepad | RGBDeviceType.LedStripe
|
||||||
| RGBDeviceType.Mouse | RGBDeviceType.Headset);
|
| RGBDeviceType.Mouse | RGBDeviceType.Headset
|
||||||
|
| RGBDeviceType.HeadsetStand);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO DarthAffe 12.09.2017: This is just a big mess - is this worth to rework before arge?
|
//TODO DarthAffe 12.09.2017: This is just a big mess - is this worth to rework before arge?
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
namespace KeyboardAudioVisualizer.AudioCapture
|
using System;
|
||||||
|
|
||||||
|
namespace KeyboardAudioVisualizer.AudioCapture
|
||||||
{
|
{
|
||||||
public class AudioBuffer
|
public class AudioBuffer
|
||||||
{
|
{
|
||||||
@ -29,64 +31,68 @@
|
|||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
|
||||||
|
public void Put(float left, float right)
|
||||||
|
{
|
||||||
|
_currentIndex++;
|
||||||
|
if (_currentIndex >= _capacity) _currentIndex = 0;
|
||||||
|
|
||||||
|
_bufferLeft[_currentIndex] = left;
|
||||||
|
_bufferRight[_currentIndex] = right;
|
||||||
|
}
|
||||||
|
|
||||||
public void Put(float[] src, int offset, int count)
|
public void Put(float[] src, int offset, int count)
|
||||||
{
|
{
|
||||||
lock (_bufferLeft)
|
if ((count & 1) != 0) return; // we expect stereo-data to be an even amount of values
|
||||||
lock (_bufferRight)
|
|
||||||
|
if (count > _capacity)
|
||||||
|
{
|
||||||
|
offset += count - _capacity;
|
||||||
|
count = _capacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < count; i += 2)
|
||||||
|
{
|
||||||
|
_currentIndex++;
|
||||||
|
if (_currentIndex >= _capacity) _currentIndex = 0;
|
||||||
|
|
||||||
|
if (Prescale.HasValue)
|
||||||
{
|
{
|
||||||
if ((count & 1) != 0) return; // we expect stereo-data to be an even amount of values
|
_bufferLeft[_currentIndex] = src[offset + i] / Prescale.Value;
|
||||||
|
_bufferRight[_currentIndex] = src[offset + i + 1] / Prescale.Value;
|
||||||
if (count > _capacity)
|
|
||||||
{
|
|
||||||
offset += count - _capacity;
|
|
||||||
count = _capacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < count; i += 2)
|
|
||||||
{
|
|
||||||
_currentIndex++;
|
|
||||||
if (_currentIndex >= _capacity) _currentIndex = 0;
|
|
||||||
|
|
||||||
if (Prescale.HasValue)
|
|
||||||
{
|
|
||||||
_bufferLeft[_currentIndex] = src[offset + i] / Prescale.Value;
|
|
||||||
_bufferRight[_currentIndex] = src[offset + i + 1] / Prescale.Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_bufferLeft[_currentIndex] = src[offset + i];
|
|
||||||
_bufferRight[_currentIndex] = src[offset + i + 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_bufferLeft[_currentIndex] = src[offset + i];
|
||||||
|
_bufferRight[_currentIndex] = src[offset + i + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyLeftInto(ref float[] data, int offset) => CopyLeftInto(ref data, offset, _capacity);
|
public void CopyLeftInto(ref float[] data, int offset) => CopyLeftInto(ref data, offset, Math.Min(data.Length, _capacity));
|
||||||
public void CopyLeftInto(ref float[] data, int offset, int count)
|
public void CopyLeftInto(ref float[] data, int offset, int count)
|
||||||
{
|
{
|
||||||
lock (_bufferLeft)
|
int bufferOffset = _capacity - count;
|
||||||
for (int i = _capacity - count; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
data[offset + i] = _bufferLeft[(_currentIndex + i) % _capacity];
|
data[offset + i] = _bufferLeft[(_currentIndex + (bufferOffset + i)) % _capacity];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyRightInto(ref float[] data, int offset) => CopyRightInto(ref data, offset, _capacity);
|
public void CopyRightInto(ref float[] data, int offset) => CopyRightInto(ref data, offset, Math.Min(data.Length, _capacity));
|
||||||
public void CopyRightInto(ref float[] data, int offset, int count)
|
public void CopyRightInto(ref float[] data, int offset, int count)
|
||||||
{
|
{
|
||||||
lock (_bufferRight)
|
int bufferOffset = _capacity - count;
|
||||||
for (int i = _capacity - count; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
data[offset + i] = _bufferRight[(_currentIndex + i) % _capacity];
|
data[offset + i] = _bufferRight[(_currentIndex + (bufferOffset + i)) % _capacity];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyMixInto(ref float[] data, int offset) => CopyMixInto(ref data, offset, _capacity);
|
public void CopyMixInto(ref float[] data, int offset) => CopyMixInto(ref data, offset, Math.Min(data.Length, _capacity));
|
||||||
public void CopyMixInto(ref float[] data, int offset, int count)
|
public void CopyMixInto(ref float[] data, int offset, int count)
|
||||||
{
|
{
|
||||||
lock (_bufferLeft)
|
int bufferOffset = _capacity - count;
|
||||||
lock (_bufferRight)
|
for (int i = 0; i < count; i++)
|
||||||
for (int i = _capacity - count; i < count; i++)
|
{
|
||||||
{
|
int index = (_currentIndex + (bufferOffset + i)) % _capacity;
|
||||||
int index = (_currentIndex + i) % _capacity;
|
data[offset + i] = (_bufferLeft[index] + _bufferRight[index]) / 2f;
|
||||||
data[offset + i] = (_bufferLeft[index] + _bufferRight[index]) / 2f;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -12,11 +12,10 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
|
|
||||||
private WasapiCapture _capture;
|
private WasapiCapture _capture;
|
||||||
private SoundInSource _soundInSource;
|
private SoundInSource _soundInSource;
|
||||||
|
private IWaveSource _source;
|
||||||
private SingleBlockNotificationStream _stream;
|
private SingleBlockNotificationStream _stream;
|
||||||
private AudioEndpointVolume _audioEndpointVolume;
|
private AudioEndpointVolume _audioEndpointVolume;
|
||||||
|
|
||||||
private readonly float[] _readBuffer = new float[2048];
|
|
||||||
|
|
||||||
public int SampleRate => _soundInSource?.WaveFormat?.SampleRate ?? -1;
|
public int SampleRate => _soundInSource?.WaveFormat?.SampleRate ?? -1;
|
||||||
public float MasterVolume => _audioEndpointVolume.MasterVolumeLevelScalar;
|
public float MasterVolume => _audioEndpointVolume.MasterVolumeLevelScalar;
|
||||||
|
|
||||||
@ -38,26 +37,28 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
|
|
||||||
//DarthAffe 07.02.2018: This is a really stupid workaround to (hopefully) finally fix the surround driver issues
|
//DarthAffe 07.02.2018: This is a really stupid workaround to (hopefully) finally fix the surround driver issues
|
||||||
for (int i = 1; i < 13; i++)
|
for (int i = 1; i < 13; i++)
|
||||||
{
|
try { _capture = new WasapiLoopbackCapture(100, new WaveFormat(deviceFormat.SampleRate, deviceFormat.BitsPerSample, i)); } catch { /* We're just trying ... */ }
|
||||||
try
|
|
||||||
{
|
|
||||||
_capture = new WasapiLoopbackCapture(100, new WaveFormat(deviceFormat.SampleRate, deviceFormat.BitsPerSample, i));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{ }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_capture == null)
|
if (_capture == null)
|
||||||
throw new NullReferenceException("Failed to initialize WasapiLoopbackCapture");
|
throw new NullReferenceException("Failed to initialize WasapiLoopbackCapture");
|
||||||
|
|
||||||
_capture.Initialize();
|
_capture.Initialize();
|
||||||
|
|
||||||
_soundInSource = new SoundInSource(_capture) { FillWithZeros = false };
|
_soundInSource = new SoundInSource(_capture) { FillWithZeros = false };
|
||||||
|
_source = _soundInSource.WaveFormat.SampleRate == 44100
|
||||||
|
? _soundInSource.ToStereo()
|
||||||
|
: _soundInSource.ChangeSampleRate(44100).ToStereo();
|
||||||
|
|
||||||
_stream = _soundInSource.WaveFormat.SampleRate == 44100
|
_stream = new SingleBlockNotificationStream(_source.ToSampleSource());
|
||||||
? new SingleBlockNotificationStream(_soundInSource.ToStereo().ToSampleSource())
|
_stream.SingleBlockRead += StreamOnSingleBlockRead;
|
||||||
: new SingleBlockNotificationStream(_soundInSource.ChangeSampleRate(44100).ToStereo().ToSampleSource());
|
|
||||||
|
|
||||||
_soundInSource.DataAvailable += OnSoundDataAvailable;
|
_source = _stream.ToWaveSource();
|
||||||
|
|
||||||
|
byte[] buffer = new byte[_source.WaveFormat.BytesPerSecond / 2];
|
||||||
|
_soundInSource.DataAvailable += (s, aEvent) =>
|
||||||
|
{
|
||||||
|
while ((_source.Read(buffer, 0, buffer.Length)) > 0) ;
|
||||||
|
};
|
||||||
|
|
||||||
_capture.Start();
|
_capture.Start();
|
||||||
}
|
}
|
||||||
@ -68,12 +69,8 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
_capture?.Dispose();
|
_capture?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSoundDataAvailable(object sender, DataAvailableEventArgs dataAvailableEventArgs)
|
private void StreamOnSingleBlockRead(object sender, SingleBlockReadEventArgs singleBlockReadEventArgs)
|
||||||
{
|
=> DataAvailable?.Invoke(singleBlockReadEventArgs.Left, singleBlockReadEventArgs.Right);
|
||||||
int readCount;
|
|
||||||
while ((readCount = _stream.Read(_readBuffer, 0, _readBuffer.Length)) > 0)
|
|
||||||
DataAvailable?.Invoke(_readBuffer, 0, readCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace KeyboardAudioVisualizer.AudioCapture
|
namespace KeyboardAudioVisualizer.AudioCapture
|
||||||
{
|
{
|
||||||
public delegate void AudioData(float[] data, int offset, int count);
|
public delegate void AudioData(float left, float right);
|
||||||
|
|
||||||
public interface IAudioInput : IDisposable
|
public interface IAudioInput : IDisposable
|
||||||
{
|
{
|
||||||
|
|||||||
@ -54,7 +54,7 @@ namespace KeyboardAudioVisualizer.AudioProcessing
|
|||||||
_audioInput.Initialize();
|
_audioInput.Initialize();
|
||||||
|
|
||||||
_audioBuffer = new AudioBuffer(4096); // Working with ~93ms -
|
_audioBuffer = new AudioBuffer(4096); // Working with ~93ms -
|
||||||
_audioInput.DataAvailable += (data, offset, count) => _audioBuffer.Put(data, offset, count);
|
_audioInput.DataAvailable += (left, right) => _audioBuffer.Put(left, right);
|
||||||
|
|
||||||
_processors.Add(new FourierSpectrumProvider(_audioBuffer));
|
_processors.Add(new FourierSpectrumProvider(_audioBuffer));
|
||||||
|
|
||||||
|
|||||||
@ -80,9 +80,9 @@ namespace KeyboardAudioVisualizer.AudioProcessing.VisualizationProvider
|
|||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
_sampleDataLeft = new float[_audioBuffer.Size];
|
_sampleDataLeft = new float[2048];
|
||||||
_sampleDataRight = new float[_audioBuffer.Size];
|
_sampleDataRight = new float[2048];
|
||||||
_sampleDataMix = new float[_audioBuffer.Size];
|
_sampleDataMix = new float[2048];
|
||||||
|
|
||||||
RecalculateConfigValues(null);
|
RecalculateConfigValues(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,10 +30,16 @@ namespace KeyboardAudioVisualizer.Configuration
|
|||||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||||
{
|
{
|
||||||
JObject jsonObject = JObject.Load(reader);
|
JObject jsonObject = JObject.Load(reader);
|
||||||
return new Color(jsonObject.Property("A").Value.ToObject<byte>(),
|
if (jsonObject.Property("A").Value.ToObject<double>() > 1.0) //DarthAffe 09.06.2019: Convert old Settings
|
||||||
jsonObject.Property("R").Value.ToObject<byte>(),
|
return new Color(jsonObject.Property("A").Value.ToObject<byte>(),
|
||||||
jsonObject.Property("G").Value.ToObject<byte>(),
|
jsonObject.Property("R").Value.ToObject<byte>(),
|
||||||
jsonObject.Property("B").Value.ToObject<byte>());
|
jsonObject.Property("G").Value.ToObject<byte>(),
|
||||||
|
jsonObject.Property("B").Value.ToObject<byte>());
|
||||||
|
else
|
||||||
|
return new Color(jsonObject.Property("A").Value.ToObject<double>(),
|
||||||
|
jsonObject.Property("R").Value.ToObject<double>(),
|
||||||
|
jsonObject.Property("G").Value.ToObject<double>(),
|
||||||
|
jsonObject.Property("B").Value.ToObject<double>());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -22,7 +22,9 @@ namespace KeyboardAudioVisualizer.Configuration
|
|||||||
public double UpdateRate { get; set; } = 40.0;
|
public double UpdateRate { get; set; } = 40.0;
|
||||||
|
|
||||||
public bool EnableAudioPrescale { get; set; } = false;
|
public bool EnableAudioPrescale { get; set; } = false;
|
||||||
|
|
||||||
|
public LinearGradient Background { get; set; }
|
||||||
|
|
||||||
public Dictionary<VisualizationIndex, VisualizationSettings> Visualizations { get; set; } = new Dictionary<VisualizationIndex, VisualizationSettings>();
|
public Dictionary<VisualizationIndex, VisualizationSettings> Visualizations { get; set; } = new Dictionary<VisualizationIndex, VisualizationSettings>();
|
||||||
|
|
||||||
public VisualizationSettings this[VisualizationIndex visualizationIndex]
|
public VisualizationSettings this[VisualizationIndex visualizationIndex]
|
||||||
@ -86,13 +88,13 @@ namespace KeyboardAudioVisualizer.Configuration
|
|||||||
{
|
{
|
||||||
case VisualizationIndex.Primary:
|
case VisualizationIndex.Primary:
|
||||||
SelectedVisualization = VisualizationType.FrequencyBars;
|
SelectedVisualization = VisualizationType.FrequencyBars;
|
||||||
Gradient = new LinearGradient(new GradientStop(0, Color.FromHSV(300, 1, 1)),
|
Gradient = new LinearGradient(new GradientStop(0, HSVColor.Create(300, 1, 1)),
|
||||||
new GradientStop(0.20, Color.FromHSV(225, 1, 1)),
|
new GradientStop(0.20, HSVColor.Create(225, 1, 1)),
|
||||||
new GradientStop(0.35, Color.FromHSV(180, 1, 1)),
|
new GradientStop(0.35, HSVColor.Create(180, 1, 1)),
|
||||||
new GradientStop(0.50, Color.FromHSV(135, 1, 1)),
|
new GradientStop(0.50, HSVColor.Create(135, 1, 1)),
|
||||||
new GradientStop(0.65, Color.FromHSV(90, 1, 1)),
|
new GradientStop(0.65, HSVColor.Create(90, 1, 1)),
|
||||||
new GradientStop(0.80, Color.FromHSV(45, 1, 1)),
|
new GradientStop(0.80, HSVColor.Create(45, 1, 1)),
|
||||||
new GradientStop(0.95, Color.FromHSV(0, 1, 1)));
|
new GradientStop(0.95, HSVColor.Create(0, 1, 1)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VisualizationIndex.Secondary:
|
case VisualizationIndex.Secondary:
|
||||||
|
|||||||
@ -320,7 +320,7 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
|
|
||||||
private void HSVChanged()
|
private void HSVChanged()
|
||||||
{
|
{
|
||||||
Color color = Color.FromHSV(_a, _hue, _saturation, _value);
|
Color color = HSVColor.Create(_a, _hue, _saturation, _value);
|
||||||
UpdateSelectedColor(color);
|
UpdateSelectedColor(color);
|
||||||
SetRGB(color);
|
SetRGB(color);
|
||||||
UpdateUIColors();
|
UpdateUIColors();
|
||||||
@ -331,7 +331,7 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
{
|
{
|
||||||
_ignorePropertyChanged = true;
|
_ignorePropertyChanged = true;
|
||||||
|
|
||||||
_a = color.A;
|
_a = color.GetA();
|
||||||
if (_sliderAlpha != null)
|
if (_sliderAlpha != null)
|
||||||
_sliderAlpha.Value = _a;
|
_sliderAlpha.Value = _a;
|
||||||
|
|
||||||
@ -342,15 +342,15 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
{
|
{
|
||||||
_ignorePropertyChanged = true;
|
_ignorePropertyChanged = true;
|
||||||
|
|
||||||
_r = color.R;
|
_r = color.GetR();
|
||||||
if (_sliderRed != null)
|
if (_sliderRed != null)
|
||||||
_sliderRed.Value = _r;
|
_sliderRed.Value = _r;
|
||||||
|
|
||||||
_g = color.G;
|
_g = color.GetG();
|
||||||
if (_sliderGreen != null)
|
if (_sliderGreen != null)
|
||||||
_sliderGreen.Value = _g;
|
_sliderGreen.Value = _g;
|
||||||
|
|
||||||
_b = color.B;
|
_b = color.GetB();
|
||||||
if (_sliderBlue != null)
|
if (_sliderBlue != null)
|
||||||
_sliderBlue.Value = _b;
|
_sliderBlue.Value = _b;
|
||||||
|
|
||||||
@ -361,15 +361,15 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
{
|
{
|
||||||
_ignorePropertyChanged = true;
|
_ignorePropertyChanged = true;
|
||||||
|
|
||||||
_hue = color.Hue;
|
_hue = color.GetHue();
|
||||||
if (_sliderHue != null)
|
if (_sliderHue != null)
|
||||||
_sliderHue.Value = _hue;
|
_sliderHue.Value = _hue;
|
||||||
|
|
||||||
_saturation = color.Saturation;
|
_saturation = color.GetSaturation();
|
||||||
if (_sliderSaturation != null)
|
if (_sliderSaturation != null)
|
||||||
_sliderSaturation.Value = _saturation;
|
_sliderSaturation.Value = _saturation;
|
||||||
|
|
||||||
_value = color.Value;
|
_value = color.GetValue();
|
||||||
if (_sliderValue != null)
|
if (_sliderValue != null)
|
||||||
_sliderValue.Value = _value;
|
_sliderValue.Value = _value;
|
||||||
|
|
||||||
@ -411,13 +411,13 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
|
|
||||||
private void UpdateUIColors()
|
private void UpdateUIColors()
|
||||||
{
|
{
|
||||||
Color hueColor = Color.FromHSV(_hue, 1, 1);
|
Color hueColor = HSVColor.Create(_hue, 1, 1);
|
||||||
|
|
||||||
if (_previewBrush != null)
|
if (_previewBrush != null)
|
||||||
_previewBrush.Color = WpfColor.FromArgb(_a, _r, _g, _b);
|
_previewBrush.Color = WpfColor.FromArgb(_a, _r, _g, _b);
|
||||||
|
|
||||||
if (_selectorBrush != null)
|
if (_selectorBrush != null)
|
||||||
_selectorBrush.Color = WpfColor.FromRgb(hueColor.R, hueColor.G, hueColor.B);
|
_selectorBrush.Color = WpfColor.FromRgb(hueColor.GetR(), hueColor.GetG(), hueColor.GetB());
|
||||||
|
|
||||||
if (_alphaBrush != null)
|
if (_alphaBrush != null)
|
||||||
{
|
{
|
||||||
@ -445,36 +445,36 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
|
|
||||||
if (_hueBrush != null)
|
if (_hueBrush != null)
|
||||||
{
|
{
|
||||||
Color referenceColor1 = Color.FromHSV(0, _saturation, _value);
|
Color referenceColor1 = HSVColor.Create(0, _saturation, _value);
|
||||||
Color referenceColor2 = Color.FromHSV(60, _saturation, _value);
|
Color referenceColor2 = HSVColor.Create(60, _saturation, _value);
|
||||||
Color referenceColor3 = Color.FromHSV(120, _saturation, _value);
|
Color referenceColor3 = HSVColor.Create(120, _saturation, _value);
|
||||||
Color referenceColor4 = Color.FromHSV(180, _saturation, _value);
|
Color referenceColor4 = HSVColor.Create(180, _saturation, _value);
|
||||||
Color referenceColor5 = Color.FromHSV(240, _saturation, _value);
|
Color referenceColor5 = HSVColor.Create(240, _saturation, _value);
|
||||||
Color referenceColor6 = Color.FromHSV(300, _saturation, _value);
|
Color referenceColor6 = HSVColor.Create(300, _saturation, _value);
|
||||||
|
|
||||||
_hueBrush.GradientStops[0].Color = WpfColor.FromArgb(_a, referenceColor1.R, referenceColor1.G, referenceColor1.B);
|
_hueBrush.GradientStops[0].Color = WpfColor.FromArgb(_a, referenceColor1.GetR(), referenceColor1.GetG(), referenceColor1.GetB());
|
||||||
_hueBrush.GradientStops[1].Color = WpfColor.FromArgb(_a, referenceColor2.R, referenceColor2.G, referenceColor2.B);
|
_hueBrush.GradientStops[1].Color = WpfColor.FromArgb(_a, referenceColor2.GetR(), referenceColor2.GetG(), referenceColor2.GetB());
|
||||||
_hueBrush.GradientStops[2].Color = WpfColor.FromArgb(_a, referenceColor3.R, referenceColor3.G, referenceColor3.B);
|
_hueBrush.GradientStops[2].Color = WpfColor.FromArgb(_a, referenceColor3.GetR(), referenceColor3.GetG(), referenceColor3.GetB());
|
||||||
_hueBrush.GradientStops[3].Color = WpfColor.FromArgb(_a, referenceColor4.R, referenceColor4.G, referenceColor4.B);
|
_hueBrush.GradientStops[3].Color = WpfColor.FromArgb(_a, referenceColor4.GetR(), referenceColor4.GetG(), referenceColor4.GetB());
|
||||||
_hueBrush.GradientStops[4].Color = WpfColor.FromArgb(_a, referenceColor5.R, referenceColor5.G, referenceColor5.B);
|
_hueBrush.GradientStops[4].Color = WpfColor.FromArgb(_a, referenceColor5.GetR(), referenceColor5.GetG(), referenceColor5.GetB());
|
||||||
_hueBrush.GradientStops[5].Color = WpfColor.FromArgb(_a, referenceColor6.R, referenceColor6.G, referenceColor6.B);
|
_hueBrush.GradientStops[5].Color = WpfColor.FromArgb(_a, referenceColor6.GetR(), referenceColor6.GetG(), referenceColor6.GetB());
|
||||||
_hueBrush.GradientStops[6].Color = WpfColor.FromArgb(_a, referenceColor1.R, referenceColor1.G, referenceColor1.B);
|
_hueBrush.GradientStops[6].Color = WpfColor.FromArgb(_a, referenceColor1.GetR(), referenceColor1.GetG(), referenceColor1.GetB());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturationBrush != null)
|
if (_saturationBrush != null)
|
||||||
{
|
{
|
||||||
Color referenceColor = Color.FromHSV(_hue, 1, _value);
|
Color referenceColor = HSVColor.Create(_hue, 1, _value);
|
||||||
|
|
||||||
_saturationBrush.GradientStops[0].Color = WpfColor.FromArgb(_a, 255, 255, 255);
|
_saturationBrush.GradientStops[0].Color = WpfColor.FromArgb(_a, 255, 255, 255);
|
||||||
_saturationBrush.GradientStops[1].Color = WpfColor.FromArgb(_a, referenceColor.R, referenceColor.G, referenceColor.B);
|
_saturationBrush.GradientStops[1].Color = WpfColor.FromArgb(_a, referenceColor.GetR(), referenceColor.GetG(), referenceColor.GetB());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_valueBrush != null)
|
if (_valueBrush != null)
|
||||||
{
|
{
|
||||||
Color referenceColor = Color.FromHSV(_hue, _saturation, 1);
|
Color referenceColor = HSVColor.Create(_hue, _saturation, 1);
|
||||||
|
|
||||||
_valueBrush.GradientStops[0].Color = WpfColor.FromArgb(_a, 0, 0, 0);
|
_valueBrush.GradientStops[0].Color = WpfColor.FromArgb(_a, 0, 0, 0);
|
||||||
_valueBrush.GradientStops[1].Color = WpfColor.FromArgb(_a, referenceColor.R, referenceColor.G, referenceColor.B);
|
_valueBrush.GradientStops[1].Color = WpfColor.FromArgb(_a, referenceColor.GetR(), referenceColor.GetG(), referenceColor.GetB());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -167,8 +167,8 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
private void UpdatePreviewRectangle(Rectangle rect, double referenceWidth, double referenceHeight, double from, double to,
|
private void UpdatePreviewRectangle(Rectangle rect, double referenceWidth, double referenceHeight, double from, double to,
|
||||||
RGB.NET.Core.Color startColor, RGB.NET.Core.Color endColor)
|
RGB.NET.Core.Color startColor, RGB.NET.Core.Color endColor)
|
||||||
{
|
{
|
||||||
rect.Fill = new LinearGradientBrush(Color.FromArgb(startColor.A, startColor.R, startColor.G, startColor.B),
|
rect.Fill = new LinearGradientBrush(Color.FromArgb(startColor.GetA(), startColor.GetR(), startColor.GetG(), startColor.GetB()),
|
||||||
Color.FromArgb(endColor.A, endColor.R, endColor.G, endColor.B),
|
Color.FromArgb(endColor.GetA(), endColor.GetR(), endColor.GetG(), endColor.GetB()),
|
||||||
new Point(0, 0.5), new Point(1, 0.5));
|
new Point(0, 0.5), new Point(1, 0.5));
|
||||||
|
|
||||||
//DarthAffe 09.02.2018: Forced rounding to prevent render issues on resize
|
//DarthAffe 09.02.2018: Forced rounding to prevent render issues on resize
|
||||||
@ -212,7 +212,7 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
|
|
||||||
private void UpdateGradientStop(ContentControl control, double referenceWidth, double referenceHeight, GradientStop stop)
|
private void UpdateGradientStop(ContentControl control, double referenceWidth, double referenceHeight, GradientStop stop)
|
||||||
{
|
{
|
||||||
control.Background = new SolidColorBrush(Color.FromArgb(stop.Color.A, stop.Color.R, stop.Color.G, stop.Color.B));
|
control.Background = new SolidColorBrush(Color.FromArgb(stop.Color.GetA(), stop.Color.GetR(), stop.Color.GetG(), stop.Color.GetB()));
|
||||||
|
|
||||||
Canvas.SetLeft(control, (referenceWidth * stop.Offset.Clamp(0, 1)) - (control.Width / 2.0));
|
Canvas.SetLeft(control, (referenceWidth * stop.Offset.Clamp(0, 1)) - (control.Width / 2.0));
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,6 @@ namespace KeyboardAudioVisualizer.Decorators
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Color ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, Color color) => color.SetAPercent(color.APercent * _visualizationProvider.VisualizationData[0]);
|
public Color ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, Color color) => color.SetA(color.A * _visualizationProvider.VisualizationData[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,57 +47,63 @@
|
|||||||
<Reference Include="Hardcodet.Wpf.TaskbarNotification, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Hardcodet.Wpf.TaskbarNotification, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll</HintPath>
|
<HintPath>..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net451\Hardcodet.Wpf.TaskbarNotification.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="HidSharp, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="HidSharp, Version=2.0.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\HidSharp.1.5\lib\net35\HidSharp.dll</HintPath>
|
<HintPath>..\packages\HidSharp.2.0.5\lib\net35\HidSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MathNet.Numerics, Version=3.20.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Interop.AuraServiceLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\MathNet.Numerics.3.20.2\lib\net40\MathNet.Numerics.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Asus.0.1.31\lib\net45\Interop.AuraServiceLib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="MathNet.Numerics, Version=4.7.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\MathNet.Numerics.4.7.0\lib\net461\MathNet.Numerics.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Brushes, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Brushes.0.0.1.35\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Core, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Brushes, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Core.0.0.1.35\lib\net45\RGB.NET.Core.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Brushes.0.1.31\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Decorators, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Core, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Decorators.0.0.1.35\lib\net45\RGB.NET.Decorators.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Core.0.1.31\lib\net45\RGB.NET.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Asus, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Decorators, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Asus.0.0.1.35\lib\net45\RGB.NET.Devices.Asus.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Decorators.0.1.31\lib\net45\RGB.NET.Decorators.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.CoolerMaster, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Asus, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\lib\net45\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Asus.0.1.31\lib\net45\RGB.NET.Devices.Asus.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Corsair, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.CoolerMaster, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.0.1.35\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.CoolerMaster.0.1.31\lib\net45\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Logitech, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Corsair, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Logitech.0.0.1.35\lib\net45\RGB.NET.Devices.Logitech.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.1.31\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Msi, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Logitech, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Msi.0.0.1.35\lib\net45\RGB.NET.Devices.Msi.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Logitech.0.1.31\lib\net45\RGB.NET.Devices.Logitech.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Novation, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Novation, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Novation.0.0.1.35\lib\net45\RGB.NET.Devices.Novation.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Novation.0.1.31\lib\net45\RGB.NET.Devices.Novation.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Razer, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Razer, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Razer.0.0.1.35\lib\net45\RGB.NET.Devices.Razer.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Razer.0.1.31\lib\net45\RGB.NET.Devices.Razer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Groups, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.SteelSeries, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Groups.0.0.1.35\lib\net45\RGB.NET.Groups.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.SteelSeries.0.1.31\lib\netstandard2.0\RGB.NET.Devices.SteelSeries.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Sanford.Multimedia.Midi, Version=6.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Groups, Version=0.1.31.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Sanford.Multimedia.Midi.6.5.0\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Groups.0.1.31\lib\net45\RGB.NET.Groups.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Sanford.Multimedia.Midi, Version=6.6.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Sanford.Multimedia.Midi.6.6.0\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
@ -328,21 +334,21 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets" Condition="Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Novation.0.1.0\build\RGB.NET.Resources.Novation.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Novation.0.1.0\build\RGB.NET.Resources.Novation.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Resources.CoolerMaster.0.2.0\build\RGB.NET.Resources.CoolerMaster.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.CoolerMaster.0.2.0\build\RGB.NET.Resources.CoolerMaster.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Logitech.0.3.0\build\RGB.NET.Resources.Logitech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Logitech.0.3.0\build\RGB.NET.Resources.Logitech.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Razer.0.3.2.4\build\RGB.NET.Resources.Razer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Razer.0.3.2.4\build\RGB.NET.Resources.Razer.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Asus.0.3.0\build\RGB.NET.Resources.Asus.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Asus.0.3.0\build\RGB.NET.Resources.Asus.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets" Condition="Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets')" />
|
<Import Project="..\packages\RGB.NET.Resources.Novation.0.1.0\build\RGB.NET.Resources.Novation.targets" Condition="Exists('..\packages\RGB.NET.Resources.Novation.0.1.0\build\RGB.NET.Resources.Novation.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets')" />
|
<Import Project="..\packages\RGB.NET.Resources.CoolerMaster.0.2.0\build\RGB.NET.Resources.CoolerMaster.targets" Condition="Exists('..\packages\RGB.NET.Resources.CoolerMaster.0.2.0\build\RGB.NET.Resources.CoolerMaster.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets')" />
|
<Import Project="..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets" Condition="Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets')" />
|
<Import Project="..\packages\RGB.NET.Resources.Logitech.0.3.0\build\RGB.NET.Resources.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Resources.Logitech.0.3.0\build\RGB.NET.Resources.Logitech.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets" Condition="Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets')" />
|
<Import Project="..\packages\RGB.NET.Resources.Razer.0.3.2.4\build\RGB.NET.Resources.Razer.targets" Condition="Exists('..\packages\RGB.NET.Resources.Razer.0.3.2.4\build\RGB.NET.Resources.Razer.targets')" />
|
||||||
|
<Import Project="..\packages\RGB.NET.Resources.Asus.0.3.0\build\RGB.NET.Resources.Asus.targets" Condition="Exists('..\packages\RGB.NET.Resources.Asus.0.3.0\build\RGB.NET.Resources.Asus.targets')" />
|
||||||
</Project>
|
</Project>
|
||||||
@ -16,13 +16,13 @@ namespace KeyboardAudioVisualizer.Legacy
|
|||||||
|
|
||||||
private static void UpdateTo1(Configuration.Settings settings)
|
private static void UpdateTo1(Configuration.Settings settings)
|
||||||
{
|
{
|
||||||
settings.Visualizations[VisualizationIndex.Primary].Gradient = new LinearGradient(new GradientStop(0, Color.FromHSV(300, 1, 1)),
|
settings.Visualizations[VisualizationIndex.Primary].Gradient = new LinearGradient(new GradientStop(0, HSVColor.Create(300, 1, 1)),
|
||||||
new GradientStop(0.20, Color.FromHSV(225, 1, 1)),
|
new GradientStop(0.20, HSVColor.Create(225, 1, 1)),
|
||||||
new GradientStop(0.35, Color.FromHSV(180, 1, 1)),
|
new GradientStop(0.35, HSVColor.Create(180, 1, 1)),
|
||||||
new GradientStop(0.50, Color.FromHSV(135, 1, 1)),
|
new GradientStop(0.50, HSVColor.Create(135, 1, 1)),
|
||||||
new GradientStop(0.65, Color.FromHSV(90, 1, 1)),
|
new GradientStop(0.65, HSVColor.Create(90, 1, 1)),
|
||||||
new GradientStop(0.80, Color.FromHSV(45, 1, 1)),
|
new GradientStop(0.80, HSVColor.Create(45, 1, 1)),
|
||||||
new GradientStop(0.95, Color.FromHSV(0, 1, 1)));
|
new GradientStop(0.95, HSVColor.Create(0, 1, 1)));
|
||||||
|
|
||||||
settings.Visualizations[VisualizationIndex.Secondary].Gradient = new LinearGradient(new GradientStop(0.5, new Color(255, 255, 255)));
|
settings.Visualizations[VisualizationIndex.Secondary].Gradient = new LinearGradient(new GradientStop(0.5, new Color(255, 255, 255)));
|
||||||
|
|
||||||
|
|||||||
@ -49,5 +49,5 @@ using System.Windows;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.1.0.0")]
|
[assembly: AssemblyVersion("1.3.1.1")]
|
||||||
[assembly: AssemblyFileVersion("1.1.0.0")]
|
[assembly: AssemblyFileVersion("1.3.1.1")]
|
||||||
|
|||||||
@ -15,12 +15,12 @@ namespace KeyboardAudioVisualizer.UI
|
|||||||
|
|
||||||
public double UpdateRate
|
public double UpdateRate
|
||||||
{
|
{
|
||||||
get => 1.0 / RGBSurface.Instance.UpdateFrequency;
|
get => 1.0 / ApplicationManager.Instance.UpdateTrigger.UpdateFrequency;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
double val = MathHelper.Clamp(value, 1, 60);
|
double val = MathHelper.Clamp(value, 1, 60);
|
||||||
ApplicationManager.Instance.Settings.UpdateRate = val;
|
ApplicationManager.Instance.Settings.UpdateRate = val;
|
||||||
RGBSurface.Instance.UpdateFrequency = 1.0 / val;
|
ApplicationManager.Instance.UpdateTrigger.UpdateFrequency = 1.0 / val;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -163,60 +163,70 @@
|
|||||||
|
|
||||||
<TabItem Header="Settings">
|
<TabItem Header="Settings">
|
||||||
<AdornerDecorator>
|
<AdornerDecorator>
|
||||||
<GroupBox VerticalAlignment="Top">
|
<DockPanel LastChildFill="False">
|
||||||
<StackPanel Orientation="Vertical">
|
<DockPanel.Resources>
|
||||||
<Grid>
|
<Style BasedOn="{StaticResource StyleLabelForm}" TargetType="Label" />
|
||||||
<Grid.Resources>
|
<Style BasedOn="{StaticResource StyleTextBlockForm}" TargetType="TextBlock" />
|
||||||
<Style BasedOn="{StaticResource StyleLabelForm}" TargetType="Label" />
|
<Style BasedOn="{StaticResource StyleListBoxForm}" TargetType="ListBox" />
|
||||||
<Style BasedOn="{StaticResource StyleTextBlockForm}" TargetType="TextBlock" />
|
</DockPanel.Resources>
|
||||||
<Style BasedOn="{StaticResource StyleListBoxForm}" TargetType="ListBox" />
|
|
||||||
</Grid.Resources>
|
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<GroupBox DockPanel.Dock="Top">
|
||||||
<ColumnDefinition Width="*" />
|
<controls:Form>
|
||||||
<ColumnDefinition Width="8" />
|
<Label controls:Form.IsLabel="True" Content="Version" />
|
||||||
<ColumnDefinition Width="*" />
|
<TextBlock Text="{Binding Version}" />
|
||||||
<ColumnDefinition Width="8" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<controls:Form Grid.Column="0">
|
<Label controls:Form.IsLabel="True" Content="Update-Rate" />
|
||||||
<Label controls:Form.IsLabel="True" Content="Version:" />
|
<Slider Minimum="1" Maximum="60" controls:Form.Fill="True" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight"
|
||||||
<TextBlock Text="{Binding Version}" />
|
Value="{Binding UpdateRate}"
|
||||||
|
attached:SliderValue.Unit="FPS"
|
||||||
|
ToolTip="Defines how fast the data is updated.
Low values can reduce CPU-usage but will cause stuttering.
Values above 40 will only affect the internal calculations and wont make the keyboard update faster.
It's not recommended to select a value > 40." />
|
||||||
|
|
||||||
<Label controls:Form.IsLabel="True" Content="Update-Rate" />
|
<Label controls:Form.IsLabel="True" Content="Fix Volume" />
|
||||||
<Slider Minimum="1" Maximum="60" controls:Form.Fill="True" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight"
|
<CheckBox VerticalAlignment="Center"
|
||||||
Value="{Binding UpdateRate}"
|
IsChecked="{Binding EnableAudioPrescale}"
|
||||||
attached:SliderValue.Unit="FPS"
|
ToolTip="Scales the audio signal inverse to the OS-master-volume.
This might (depending on the system) lead to decrased performance
 -> only activate it if you need it." />
|
||||||
ToolTip="Defines how fast the data is updated.
Low values can reduce CPU-usage but will cause stuttering.
Values above 40 will only affect the internal calculations and wont make the keyboard update faster.
It's not recommended to select a value > 40." />
|
|
||||||
|
|
||||||
<Label controls:Form.IsLabel="True" Content="Fix Volume" />
|
</controls:Form>
|
||||||
<CheckBox VerticalAlignment="Center"
|
</GroupBox>
|
||||||
IsChecked="{Binding EnableAudioPrescale}"
|
|
||||||
ToolTip="Scales the audio signal inverse to the OS-master-volume.
This might (depending on the system) lead to decrased performance
 -> only activate it if you need it." />
|
|
||||||
|
|
||||||
<Label controls:Form.LineBreaks="1" controls:Form.IsLabel="True" Content="Devices:" />
|
<GroupBox Margin="0,8,0,0" DockPanel.Dock="Top">
|
||||||
</controls:Form>
|
<StackPanel Orientation="Vertical">
|
||||||
</Grid>
|
<Border HorizontalAlignment="Left" Width="111">
|
||||||
|
<Label HorizontalAlignment="Right"
|
||||||
|
Content="Background" />
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- TODO DarthAffe 05.08.2017: Fix the formular to support that use-case -->
|
<controls:GradientEditor Margin="120,-18,0,0"
|
||||||
<ItemsControl VerticalAlignment="Top" HorizontalAlignment="Left" Margin="120,-22,0,0" ItemsSource="{Binding Source={x:Static core:RGBSurface.Instance}, Path=Devices}">
|
Gradient="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=Settings.Background}"
|
||||||
<ItemsControl.ItemTemplate>
|
ToolTip="Defines the gradient used as the background. Use transparency to create some kind of blur. Usage:
 Left click inside the preview to add a new stop.
 Left-click stop to change the color or move it.
 Right-click stop to remove it.
" />
|
||||||
<DataTemplate>
|
</StackPanel>
|
||||||
<TextBlock Style="{StaticResource StyleTextBlockForm}">
|
</GroupBox>
|
||||||
<TextBlock.Text>
|
|
||||||
<MultiBinding StringFormat="> {0} {1} ({2})">
|
<GroupBox Margin="0,8,0,0" DockPanel.Dock="Top">
|
||||||
<Binding Path="DeviceInfo.Manufacturer" />
|
<StackPanel Orientation="Vertical">
|
||||||
<Binding Path="DeviceInfo.Model" />
|
<Border HorizontalAlignment="Left" Width="111">
|
||||||
<Binding Path="DeviceInfo.DeviceType" />
|
<Label HorizontalAlignment="Right"
|
||||||
</MultiBinding>
|
Content="Devices" />
|
||||||
</TextBlock.Text>
|
</Border>
|
||||||
</TextBlock>
|
|
||||||
</DataTemplate>
|
<ItemsControl VerticalAlignment="Top" HorizontalAlignment="Left" Margin="120,-18,0,0" ItemsSource="{Binding Source={x:Static core:RGBSurface.Instance}, Path=Devices}">
|
||||||
</ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
<DataTemplate>
|
||||||
</StackPanel>
|
<TextBlock Style="{StaticResource StyleTextBlockForm}">
|
||||||
</GroupBox>
|
<TextBlock.Text>
|
||||||
|
<MultiBinding StringFormat="> {0} {1} ({2})">
|
||||||
|
<Binding Path="DeviceInfo.Manufacturer" />
|
||||||
|
<Binding Path="DeviceInfo.Model" />
|
||||||
|
<Binding Path="DeviceInfo.DeviceType" />
|
||||||
|
</MultiBinding>
|
||||||
|
</TextBlock.Text>
|
||||||
|
</TextBlock>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
</GroupBox>
|
||||||
|
</DockPanel>
|
||||||
</AdornerDecorator>
|
</AdornerDecorator>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|||||||
@ -116,7 +116,7 @@ namespace KeyboardAudioVisualizer.UI.Visualization
|
|||||||
|
|
||||||
GradientStopCollection gradientStops = new GradientStopCollection();
|
GradientStopCollection gradientStops = new GradientStopCollection();
|
||||||
foreach (RGB.NET.Brushes.Gradients.GradientStop stop in _gradient.GradientStops)
|
foreach (RGB.NET.Brushes.Gradients.GradientStop stop in _gradient.GradientStops)
|
||||||
gradientStops.Add(new System.Windows.Media.GradientStop(System.Windows.Media.Color.FromArgb(stop.Color.A, stop.Color.R, stop.Color.G, stop.Color.B), stop.Offset));
|
gradientStops.Add(new System.Windows.Media.GradientStop(System.Windows.Media.Color.FromArgb(stop.Color.GetA(), stop.Color.GetR(), stop.Color.GetG(), stop.Color.GetB()), stop.Offset));
|
||||||
|
|
||||||
Brush = new LinearGradientBrush(gradientStops, new System.Windows.Point(0, 0.5), new System.Windows.Point(1, 0.5));
|
Brush = new LinearGradientBrush(gradientStops, new System.Windows.Point(0, 0.5), new System.Windows.Point(1, 0.5));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,7 +151,7 @@ namespace KeyboardAudioVisualizer.UI.Visualization
|
|||||||
for (int i = 0; i < _bars.Length; i++)
|
for (int i = 0; i < _bars.Length; i++)
|
||||||
{
|
{
|
||||||
RGB.NET.Core.Color color = _gradient.GetColor((double)i / _bars.Length);
|
RGB.NET.Core.Color color = _gradient.GetColor((double)i / _bars.Length);
|
||||||
_bars[i].Fill = new SolidColorBrush(Color.FromRgb(color.R, color.G, color.B));
|
_bars[i].Fill = new SolidColorBrush(Color.FromRgb(color.GetR(), color.GetG(), color.GetB()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ namespace KeyboardAudioVisualizer.UI.Visualization
|
|||||||
|
|
||||||
GradientStopCollection gradientStops = new GradientStopCollection();
|
GradientStopCollection gradientStops = new GradientStopCollection();
|
||||||
foreach (GradientStop stop in _gradient.GradientStops)
|
foreach (GradientStop stop in _gradient.GradientStops)
|
||||||
gradientStops.Add(new System.Windows.Media.GradientStop(Color.FromArgb(stop.Color.A, stop.Color.R, stop.Color.G, stop.Color.B), stop.Offset));
|
gradientStops.Add(new System.Windows.Media.GradientStop(Color.FromArgb(stop.Color.GetA(), stop.Color.GetR(), stop.Color.GetG(), stop.Color.GetB()), stop.Offset));
|
||||||
|
|
||||||
BrushLeft = new LinearGradientBrush(gradientStops, new Point(1, 0.5), new Point(0, 0.5));
|
BrushLeft = new LinearGradientBrush(gradientStops, new Point(1, 0.5), new Point(0, 0.5));
|
||||||
BrushRight = new LinearGradientBrush(gradientStops, new Point(0, 0.5), new Point(1, 0.5));
|
BrushRight = new LinearGradientBrush(gradientStops, new Point(0, 0.5), new Point(1, 0.5));
|
||||||
|
|||||||
@ -2,23 +2,28 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="CSCore" version="1.2.1.2" targetFramework="net461" />
|
<package id="CSCore" version="1.2.1.2" targetFramework="net461" />
|
||||||
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net461" />
|
<package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net461" />
|
||||||
<package id="HidSharp" version="1.5" targetFramework="net461" />
|
<package id="HidSharp" version="2.0.5" targetFramework="net461" />
|
||||||
<package id="MathNet.Numerics" version="3.20.2" targetFramework="net461" />
|
<package id="MathNet.Numerics" version="4.7.0" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461" />
|
||||||
<package id="RGB.NET" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Brushes" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Brushes" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Core" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Core" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Decorators" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Decorators" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Asus" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.CoolerMaster" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Asus" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Corsair" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.CoolerMaster" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Logitech" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Corsair" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Novation" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Logitech" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Razer" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Msi" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Devices.SteelSeries" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Novation" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Groups" version="0.1.31" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Razer" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Resources.Asus" version="0.3.0" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Groups" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Resources.CoolerMaster" version="0.2.0" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Presets" version="0.0.1.35" targetFramework="net461" />
|
<package id="RGB.NET.Resources.Corsair" version="0.3.0.234" targetFramework="net461" />
|
||||||
<package id="Sanford.Multimedia.Midi" version="6.5.0" targetFramework="net461" />
|
<package id="RGB.NET.Resources.Logitech" version="0.3.0" targetFramework="net461" />
|
||||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
|
<package id="RGB.NET.Resources.Novation" version="0.1.0" targetFramework="net461" />
|
||||||
|
<package id="RGB.NET.Resources.Razer" version="0.3.2.4" targetFramework="net461" />
|
||||||
|
<package id="Sanford.Multimedia.Midi" version="6.6.0" targetFramework="net461" />
|
||||||
|
<package id="Sanford.Multimedia.Midi.Standard" version="6.6.0" targetFramework="net461" />
|
||||||
|
<package id="System.Management" version="4.5.0" targetFramework="net461" />
|
||||||
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
12
NuGet.Config
Normal file
12
NuGet.Config
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
|
||||||
|
<packageSources>
|
||||||
|
<add key="RGB.NET" value="http://nuget.arge.be/v3/index.json" />
|
||||||
|
</packageSources>
|
||||||
|
|
||||||
|
<activePackageSource>
|
||||||
|
<add key="All" value="(Aggregate source)" />
|
||||||
|
</activePackageSource>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
@ -1,3 +1,7 @@
|
|||||||
|
This software is no longer actively developed.
|
||||||
|
|
||||||
|
Consider checking out [Artemis](https://github.com/Artemis-RGB/Artemis) for a even more feature rich replacement.
|
||||||
|
|
||||||
# KeyboardAudioVisualizer
|
# KeyboardAudioVisualizer
|
||||||
It's colorful - I like it!
|
It's colorful - I like it!
|
||||||
|
|
||||||
@ -36,7 +40,7 @@ It's colorful - I like it!
|
|||||||
- **Gamma:** The correction value used for gamma-grouping (disabled if any other grouping is selected). High values lead to a stronger compression of high frequencies. _(default: 2)_
|
- **Gamma:** The correction value used for gamma-grouping (disabled if any other grouping is selected). High values lead to a stronger compression of high frequencies. _(default: 2)_
|
||||||
- **Reference:** The reference value used to calculate the power of each bar. Adjust this to your audio volume. Low volume -> low reference, high volume -> higher reference. _(default: 90)_
|
- **Reference:** The reference value used to calculate the power of each bar. Adjust this to your audio volume. Low volume -> low reference, high volume -> higher reference. _(default: 90)_
|
||||||
- **Smoothing:** Smooths the graph to prevent flickering. Low values will cause a hectic fast plot, high values a slow one without peaks. _(default: 3)_
|
- **Smoothing:** Smooths the graph to prevent flickering. Low values will cause a hectic fast plot, high values a slow one without peaks. _(default: 3)_
|
||||||
- **Emphasize:** Emphasizes peaks. The higher the value, the bigger the difference between a "loud-bar" and a "quite-bar". _(default: 0.5)_
|
- **Emphasize:** Emphasizes peaks. The higher the value, the bigger the difference between a "loud-bar" and a "quiet-bar". _(default: 0.5)_
|
||||||
|
|
||||||
**Equalizer**
|
**Equalizer**
|
||||||
Allows to finetune the graph by slective increasing/decresing the value.
|
Allows to finetune the graph by slective increasing/decresing the value.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user