Merge pull request 'patch-1' (#1) from patch-1 into main

Reviewed-on: http://192.168.1.133:3002/DocRock3r/Deej_Mixer/pulls/1
This commit is contained in:
2025-01-11 19:32:25 +00:00
7 changed files with 79 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

27
config.yaml Normal file
View File

@@ -0,0 +1,27 @@
# process names are case-insensitive
# you can use 'master' to indicate the master channel, or a list of process names to create a group
# you can use 'mic' to control your mic input level (uses the default recording device)
# you can use 'deej.unmapped' to control all apps that aren't bound to any slider (this ignores master, system, mic and device-targeting sessions)
# windows only - you can use 'deej.current' to control the currently active app (whether full-screen or not)
# windows only - you can use a device's full name, i.e. "Speakers (Realtek High Definition Audio)", to bind it. this works for both output and input devices
# windows only - you can use 'system' to control the "system sounds" volume
# important: slider indexes start at 0, regardless of which analog pins you're using!
slider_mapping:
0: master
1: chrome.exe
2: spotify.exe
3:
- pathofexile_x64.exe
- rocketleague.exe
4: discord.exe
# set this to true if you want the controls inverted (i.e. top is 0%, bottom is 100%)
invert_sliders: false
# settings for connecting to the arduino board
com_port: COM4
baud_rate: 9600
# adjust the amount of signal noise reduction depending on your hardware quality
# supported values are "low" (excellent hardware), "default" (regular hardware) or "high" (bad, noisy hardware)
noise_reduction: default

View File

@@ -0,0 +1,52 @@
const int NUM_SLIDERS = 5;
const int analogInputs[NUM_SLIDERS] = {A0, A1, A2, A3, A4};
int analogSliderValues[NUM_SLIDERS];
void setup() {
for (int i = 0; i < NUM_SLIDERS; i++) {
pinMode(analogInputs[i], INPUT);
}
Serial.begin(9600);
}
void loop() {
updateSliderValues();
sendSliderValues(); // Actually send data (all the time)
// printSliderValues(); // For debug
delay(10);
}
void updateSliderValues() {
for (int i = 0; i < NUM_SLIDERS; i++) {
analogSliderValues[i] = analogRead(analogInputs[i]);
}
}
void sendSliderValues() {
String builtString = String("");
for (int i = 0; i < NUM_SLIDERS; i++) {
builtString += String((int)analogSliderValues[i]);
if (i < NUM_SLIDERS - 1) {
builtString += String("|");
}
}
Serial.println(builtString);
}
void printSliderValues() {
for (int i = 0; i < NUM_SLIDERS; i++) {
String printedString = String("Slider #") + String(i + 1) + String(": ") + String(analogSliderValues[i]) + String(" mV");
Serial.write(printedString.c_str());
if (i < NUM_SLIDERS - 1) {
Serial.write(" | ");
} else {
Serial.write("\n");
}
}
}

BIN
deej.exe Normal file

Binary file not shown.

BIN
schematic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB