Initial commit
This commit is contained in:
60
Config.cs
Normal file
60
Config.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace VirtualDJ_MidiDeviceBridge
|
||||
{
|
||||
internal class MidiConfig
|
||||
{
|
||||
[JsonInclude]
|
||||
public int ShiftNoteId = 0;
|
||||
|
||||
[JsonInclude]
|
||||
public bool ToggleShift = true;
|
||||
|
||||
[JsonInclude]
|
||||
public Dictionary<string, string> MidiInCommands = new Dictionary<string, string>();
|
||||
|
||||
[JsonInclude]
|
||||
public List<string> MidiOutCommandsSysEx = new List<string>();
|
||||
|
||||
[JsonInclude]
|
||||
public Dictionary<string, string> MidiInShiftCommands = new Dictionary<string, string>();
|
||||
|
||||
[JsonInclude]
|
||||
public List<string> MidiOutShiftCommandsSysEx = new List<string>();
|
||||
|
||||
public static MidiConfig GetDefaultConfig()
|
||||
{
|
||||
MidiConfig conf = new MidiConfig();
|
||||
conf.MidiInCommands.Add("NOTEON_0", "play");
|
||||
conf.MidiInCommands.Add("NOTEOFF_0", "pause");
|
||||
conf.MidiInCommands.Add("CONTROL_0", "set_gain %val%");
|
||||
|
||||
conf.MidiOutCommandsSysEx.Add("deck 1 play ? get_text '0x90,0x20,0x01' : get_text '0x90,0x20,0x00'");
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetActiveMidiInCommands(bool shift)
|
||||
{
|
||||
if (shift)
|
||||
return MidiInShiftCommands;
|
||||
|
||||
return MidiInCommands;
|
||||
}
|
||||
|
||||
public List<string> GetActiveMidiOutShiftCommandsSysEx(bool shift)
|
||||
{
|
||||
if (shift)
|
||||
return MidiOutShiftCommandsSysEx;
|
||||
|
||||
return MidiOutCommandsSysEx;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user