mirror of
https://github.com/eliasstepanik/VoicemeeterSliderControlJava.git
synced 2026-01-10 21:28:34 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b03ca29155
74
README.md
Normal file
74
README.md
Normal file
@ -0,0 +1,74 @@
|
||||
# Slider Volume Controll Voicemeeter
|
||||
|
||||
This project is based on deej and the Voicemeeter API.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
1.Use the Arduino IDE to upload this code to the Arduino.
|
||||
|
||||
```C
|
||||
const int NUM_SLIDERS = 8; //Edit based on the sliders you have.
|
||||
const int analogInputs[NUM_SLIDERS] = {A0, A1, A2, A3, A4, A5, A6, A7}; //Edit based on the sliders you have.
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
2. Download Autohotkey if you want to run the Project hidden.
|
||||
3. Put the release file in the startup folder. (Or other folders)
|
||||
|
||||
|
||||
### Contributing
|
||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
||||
|
||||
Please make sure to update tests as appropriate.
|
||||
|
||||
## License
|
||||
[MIT](https://choosealicense.com/licenses/mit/)
|
||||
Loading…
x
Reference in New Issue
Block a user