123 lines
6.2 KiB
YAML
123 lines
6.2 KiB
YAML
# Rename this from example_config.yml to config.yml to use with the main application.
|
|
# This configuration file is hot-reloaded when changes are made so you can make updates and test
|
|
# this live while Automidically is running.
|
|
|
|
# midiDevicename determines which MIDI device Automidically will listen to for signal changes.
|
|
# This only supports one device at the moment with no current plans to support multiple devices.
|
|
# This is case insensitve and only needs to partially match to work.
|
|
midiDevicename: nanoKONTROL2
|
|
|
|
# mapping will assign the signals to different effects. Volume changes (mixer) is one, and terminal actions (shell)
|
|
# is the other. They've got different parameters so read below to understand a bit more about how they work.
|
|
mapping:
|
|
# mixer assigns a MIDI signal to a volume mixer change.
|
|
# Parameters include:
|
|
# * cc - (int) The control channel the device is sending the signal on.
|
|
# * hardwareMin - (int) The minimum value the fader/input will be allowed to send.
|
|
# If set higher than actual, the value will be clamped. Default 0.
|
|
# * hardwareMax - (int) Just like min, except at the top instead bottom. Also clamped to lowest value. Default 127.
|
|
# The hardwareMax needs to be greater than or equal to hardwareMin.
|
|
# * volumeMin - (float) The hardwareMin/Max will be mapped to the range [volMin, volMax]. Default value 0.
|
|
# * volumeMax - (float) The hardwareMin/Max will be mapped to the range [volMin, volMax]. Devault value 1.
|
|
# If volumeMin > volumeMax then this is reverse mapping and will in effect reverse the
|
|
# direction of which minimum or maximum is attained.
|
|
# * filename - (string/array of strings) When a change is detected this will attempt to change the volume
|
|
# of any application whose filename matches this. It's case insensitive but needs to match exactly.
|
|
# * device - (string/array of strings) The device option is a way of changing a specifically named input/output
|
|
# device. This needs to match the name + description as reported by the pulse audio.
|
|
# * title - (string/array of strings) When a change is detected this will attempt to change the volume
|
|
# of any application whose title matches this. It's case insensitive but needs to match exactly.
|
|
# * special - (string/array of strings) The special options include a few useful shortcuts for common actions.
|
|
# * input - The system default input device
|
|
# * output - The system default output device
|
|
# * log-filename - Outputs the pluse-audio detected filenames to logs.
|
|
# * log-devices - Outputs the pluse-audio detected devices to logs.
|
|
# * log-titles - Outputs the pluse-audio detected window titles to logs.
|
|
mixer:
|
|
|
|
# Example mapping control channel 0 to the process with the filename of 'game'
|
|
# Even if the fader can output less than 32 or more than 64, it will be clamped to those values.
|
|
# E.g. a value of 24 from hardware will be sent as 32, and a value of 127 will be sent as a value of 64.
|
|
# After the clamping the value will be mapped to the range [volumeMin, volumeMax]. In this example
|
|
# the mapping will look like [32, 64] -> [0, 1]
|
|
- cc: 0
|
|
filename: game
|
|
hardwareMin: 32
|
|
hardwareMax: 64
|
|
|
|
# Example mapping control channel 1 to the process with the filename of 'game2'
|
|
# In this case the volume mapping is reversed by swapping the volumeMin & volumeMax.
|
|
- cc: 1
|
|
filename: game2
|
|
hardwareMin: 32
|
|
hardwareMax: 64
|
|
volumeMin: 1
|
|
volumeMax: 0
|
|
|
|
# Duplicate control channels are okay, and it allows you to tie
|
|
# different min/max or reverse behavior to the same slider. Maybe you can
|
|
# use this to toggle the mix where you can fade one app to min while bringing
|
|
# another application to the max?
|
|
- cc: 2
|
|
filename: game3
|
|
|
|
- cc: 2
|
|
filename: music
|
|
volumeMin: 1
|
|
volumeMax: 0
|
|
|
|
# Multiple applications controlled by one slider.
|
|
- cc: 3
|
|
filename:
|
|
- chrome
|
|
- firefox
|
|
|
|
# Multiple types controlled by one slider.
|
|
- cc: 4
|
|
filename: mstsc
|
|
device:
|
|
- Output1
|
|
- Output2
|
|
|
|
# Change the system default output device.
|
|
# Limit the maximum volume to 50%.
|
|
- cc: 5
|
|
special: output
|
|
volumeMax: 0.5
|
|
|
|
# device allows you to pick the exact name of an audio device to manage even if it's not the default.
|
|
- cc: 7
|
|
device: alsa_output.pci-0000_0a_00.4.iec958-stereo
|
|
|
|
# Log all of the common attributes for other parameters above.
|
|
- cc: 71
|
|
special:
|
|
- log-filenames
|
|
- log-devices
|
|
- log-titles
|
|
|
|
# shell will execute an action in the terminal based on receiving a MIDI message.
|
|
# This should probably really only be used on buttons and not faders or other high
|
|
# throughput channels since this could cause some really bad behavior. Be advised!
|
|
# Parameters include:
|
|
# * cc - (int) The control channel the device is sending the signal on.
|
|
# * command - (string/array of strings) The command that will be ran in the terminal.
|
|
# * logOutput - (boolean) By default the output of the command will not be logged but you can change that if desired.
|
|
# * suppressErrors - (boolean) By default errors will pop-up in the log but can be suppressed if desired.
|
|
# * template - (boolean) Treat the command as a go template, this means you'll be able to inject the following values
|
|
# and use common template language into the command you've specified.
|
|
# * CC (int) - Control Channel
|
|
# * Value (int) - The value sent by the MIDI device.
|
|
shell:
|
|
- cc: 71
|
|
template: true
|
|
command: |
|
|
{{ if eq .Value 127 }}
|
|
echo "On" > test.output
|
|
{{else}}
|
|
echo "Off" > test.output
|
|
{{end}}
|
|
echo "{{ .Value }}" >> test.output
|
|
|
|
# For debugging/testing purposes you can turn this to true and the log file will contain all of the MIDI events captured.
|
|
echoMIDIEvents: false
|