Skip to content

Commit

Permalink
Cleanup from latest commit (wpf build).
Browse files Browse the repository at this point in the history
  • Loading branch information
oddbear committed Feb 22, 2022
1 parent 8e76c29 commit e927f7d
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 127 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This way we can have **automations** and **plugins** for Stream Deck, Touch Port

## Progress

- API: Still early, but man features are implemented. Try the Windows App.
- API: Still early, but many features are implemented. Try the Windows App to see what is possible.
- Stream Deck plugin: Fat Channel Toggle, Routing, presets and headphone sources, with status.
- Touch Portal plugin: Volume control, Fat Channel Toggle, Routing, presets and headphone sources, with status.
- Loupedeck plugin: not started.
Expand Down
3 changes: 0 additions & 3 deletions Revelator.io24.Api/Configuration/ServiceProviderExtension.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Revelator.io24.Api.Models;
using Revelator.io24.Api.Models.Monitor;
using Revelator.io24.Api.Services;
using System;

namespace Revelator.io24.Api.Configuration
{
Expand All @@ -16,7 +14,6 @@ public static void AddRevelatorAPI(this IServiceCollection serviceCollection)
serviceCollection.AddSingleton<MonitorService>();

//Models:
serviceCollection.AddSingleton<MicrophoneModel>();
serviceCollection.AddSingleton<FatChannelMonitorModel>();
serviceCollection.AddSingleton<ValuesMonitorModel>();

Expand Down
8 changes: 8 additions & 0 deletions Revelator.io24.Api/Enums/MicrophoneChannel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Revelator.io24.Api.Enums
{
public enum MicrophoneChannel
{
Left,
Right
}
}
109 changes: 0 additions & 109 deletions Revelator.io24.Api/Models/MicrophoneModel.cs

This file was deleted.

7 changes: 7 additions & 0 deletions Revelator.io24.Api/Models/Outputs/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ public Main(RawService rawService)
{
//
}

[RouteValue("hardwareMute")]
public bool HardwareMute
{
get => GetBoolean();
//set => SetBoolean(value);
}
}
}
1 change: 0 additions & 1 deletion Revelator.io24.Api/RoutingTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ private void ValueStateUpdated(string route, float value)

if (route == routes.volume)
{
Console.WriteLine($"{route} : {value}");
VolumeUpdated?.Invoke(this, key);
return;
}
Expand Down
1 change: 0 additions & 1 deletion Revelator.io24.Api/Services/BroadcastService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ private void Listener()

var messageType = PackageHelper.GetMessageType(data);
Log.Debug("[{className}] {messageType}", nameof(BroadcastService), messageType);
//Console.WriteLine($"{DateTime.Now} [{nameof(BroadcastService)}]: {messageType}");

//DA is udp broadcast message from PreSonusHardwareAccessService.exe
//NO is udp broadcast message sent from the UC Surface App
Expand Down
3 changes: 3 additions & 0 deletions Revelator.io24.Api/Services/MonitorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ private void Analyze(byte[] data)
"FFFFFFFFFFFFFFFFFFFFF9FFFFFFFFFF0600010000040000020400040000040800040000000C000400040010000400070014000200",
"FFFFFFFFF9FFF9FFF9FFF9FFFFFFFFFF0600010000040000020400040000040800040000000C000400040010000400070014000200"
};

//This FF->something->FF changes a lot if I clip the output channels. Ex. playing music at 100% percent and run +10db on Input and Output
// WARNING: (be carefull on this test).
if (!prevValues.Contains(unknown4Val))
Log.Information("Something 3: {val1}", unknown4Val);

Expand Down
1 change: 1 addition & 0 deletions Revelator.io24.StreamDeck/Actions/PresetChangeAction.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Revelator.io24.Api;
using Revelator.io24.Api.Enums;
using Revelator.io24.Api.Models.Inputs;
using Revelator.io24.StreamDeck.Settings;
using SharpDeck;
Expand Down
2 changes: 1 addition & 1 deletion Revelator.io24.StreamDeck/Settings/PresetChangeSettings.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Revelator.io24.Api;
using Revelator.io24.Api.Enums;

namespace Revelator.io24.StreamDeck.Settings
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Revelator.io24.Api;
using Revelator.io24.Api.Enums;

namespace Revelator.io24.TouchPortal.Converters
{
Expand Down
57 changes: 53 additions & 4 deletions Revelator.io24.Wpf/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,20 @@
<Label Grid.Row="0" Grid.Column="0">Main Out</Label>
<Label Grid.Row="1" Grid.Column="0">Phones</Label>
<Label Grid.Row="2" Grid.Column="0">Blend</Label>
<Slider Grid.Row="0" Grid.Column="1" Value="{Binding Path=Device.Global.MainOutVolume, Mode=TwoWay}" Maximum="100" Width="100" />
<Slider Grid.Row="0" Grid.Column="1" Value="{Binding Path=Device.Global.MainOutVolume, Mode=TwoWay}" Maximum="100" Width="100">
<Slider.Style>
<Style TargetType="{x:Type Slider}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Device.Main.HardwareMute}" Value="False">
<Setter Property="Background" Value="LightGreen"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Device.Main.HardwareMute}" Value="True">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Slider.Style>
</Slider>
<Slider Grid.Row="1" Grid.Column="1" Value="{Binding Path=Device.Global.HeadphonesVolume, Mode=TwoWay}" Maximum="100" Width="100" />
<Slider Grid.Row="2" Grid.Column="1" Value="{Binding Path=Device.Global.MonitorBlend, Mode=TwoWay}" Maximum="1" Width="100" />
</Grid>
Expand Down Expand Up @@ -216,7 +229,19 @@
</StackPanel>
</GroupBox>

<GroupBox Header="Main" Width="90" Background="LightGray">
<GroupBox Header="{Binding Path=Device.Main.UserDefinedName}" Width="90">
<GroupBox.Style>
<Style TargetType="{x:Type GroupBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Device.Main.Clip}" Value="False">
<Setter Property="Background" Value="LightGreen"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Device.Main.Clip}" Value="True">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</GroupBox.Style>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Slider Orientation="Vertical" Margin="10" Maximum="100"
Value="{Binding Path=VolumeMap.Main_Mix}"/>
Expand All @@ -226,7 +251,19 @@
Value="{Binding Path=MonitorValues.Main_R, Converter={StaticResource decibelConverter}}" />
</StackPanel>
</GroupBox>
<GroupBox Header="Stream Mix 1" Width="90" Background="LightGray">
<GroupBox Header="{Binding Path=Device.StreamMixA.UserDefinedName}" Width="90">
<GroupBox.Style>
<Style TargetType="{x:Type GroupBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Device.StreamMixA.Clip}" Value="False">
<Setter Property="Background" Value="LightGreen"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Device.StreamMixA.Clip}" Value="True">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</GroupBox.Style>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Slider Orientation="Vertical" Margin="10" Maximum="100"
Value="{Binding Path=VolumeMap.MixA_Mix}"/>
Expand All @@ -236,7 +273,19 @@
Value="{Binding Path=MonitorValues.StreamMix1_R, Converter={StaticResource decibelConverter}}" />
</StackPanel>
</GroupBox>
<GroupBox Header="Stream Mix 2" Width="90" Background="LightGray">
<GroupBox Header="{Binding Path=Device.StreamMixB.UserDefinedName}" Width="90">
<GroupBox.Style>
<Style TargetType="{x:Type GroupBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Device.StreamMixB.Clip}" Value="False">
<Setter Property="Background" Value="LightGreen"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=Device.StreamMixB.Clip}" Value="True">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</GroupBox.Style>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Slider Orientation="Vertical" Margin="10" Maximum="100"
Value="{Binding Path=VolumeMap.MixB_Mix}"/>
Expand Down
6 changes: 0 additions & 6 deletions Revelator.io24.Wpf/Models/RoutingMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ public class RoutingMapper
{
private readonly RoutingTable _routingTable;

public Headphones HeadphonesSource
{
get => _routingTable.GetHeadphoneSource();
set => _routingTable.SetHeadphoneSource(value);
}

public bool Main_MicL
{
get => GetValue(Input.Mic_L, Output.Main);
Expand Down

0 comments on commit e927f7d

Please sign in to comment.