Edit default configurations

- Better documentation of settings
- Default settings work on Windows and Linux
- Move all configurations other than
  default to example_configs directory
- Modify main.c to handle config updates
This commit is contained in:
Sam Ellicott 2022-10-21 22:51:41 -04:00
parent b349438aa7
commit 66a577ef82
28 changed files with 176 additions and 191 deletions

View file

@ -8,76 +8,79 @@
cpu_autolimit = 1
#General GUI properties.
title = PA Test
title = ColorChord Default Configuration (Vornoi)
set_screenx = 720
set_screeny = 480
#Sound properties.
#######################################
# ColorChord audio driver properties. #
#######################################
# Colorchord now automatically picks most of the important audio driver settings automatically
# and will default to PULSE with ALSA as a fallback on Linux,
# On Windows it will default to WASAPI with winmm (WIN) as a fallback
# To force a specific driver use the "sound_source" property, the following values are valid
# sound_source:
# Linux: PULSE, ALSA
# Windows: WASAPI, WIN
# Android: ANDROID
# sound_source =
# The "devplay" property sets the playback device for CNFA (what speakers to go to) most uses for
# colorchord don't use audio output so this can be almost universally ignored
# devplay =
# The "devrecord" Sets the device to get audio from. This will default to monitoring your speaker
# output. For WASAPI, "default" searches for a mic, and "defaultRender" searches for your loopback.
# For PulseAudio @DEFAULT_SOURCE@ selects the default input (typically a microphone) and
# @DEFAULT_MONITOR@ selects the default loopback device.
# devrecord =
# For Linux you can use the following command to find valid devices to read from:
# pactl list | grep pci- | grep monitor
#-1 indicates left and right, 0 left, 1 right.
sample_channel = -1
# Other properties
buffer = 384
play = 0
rec = 1
channels = 2
samplerate = 44100
wininput = -1
#Compiled version will default to PULSE (or ALSA) on Linux, WASAPI (winmm) [or WIN for winmm] on Windows and ANDROID on Android
# sound_source = ALSA
# sound_source = WASAPI
#-1 indicates left and right, 0 left, 1 right.
sample_channel = -1
# Sets the playback device for CNFA (what speakers to go to)
devplay = default
# Sets the device to get audio from, for WASAPI, "default" searches for a mic, and "defaultRender" searches for your loopback.
devrecord = defaultRender
# On linux for PulseAudio @DEFAULT_SOURCE@ selects the default input (typically a microphone)
# @DEFAULT_MONITOR@ selects the default loopback device
# devrecord = @DEFAULT_MONITOR@
#Render
# For Linux mostly use the following command to find valid devices to read from:
# pactl list | grep pci- | grep monitor
# alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
# alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
# alsa_output.pci-0000_00_1f.3.analog-stereo.monitor << New laptop
##################################
# General ColorChord properties. #
##################################
# How much to amplify the incoming signal.
amplify = 2.0
amplify = 10
# What is the base note? I.e. the lowest note.
# Note that it won't have very much impact until an octave up though!
base_hz = 55
# This is only used when dealing with the slow decompose (now defunct)
# decompose_iterations = 1000
# default_sigma = 1.4000
# DFT properties for the DFT up top.
# DFT properties for the DFT when Extra Debug is being shown.
dft_iir = 0.6
dft_q = 20.0000
dft_q = 60.0000
dft_speedup = 1000.0000
octaves = 5
octaves = 6
# Should we use a progressive DFT?
# What DFT method should we use?
# 0 = DFT Quick
# 1 = DFT Progressive
# 2 = DFT Progressive Integer
# 3 = DFT Progressive Integer Skippy
# 4 = Integer, 32-Bit, Progressive, Skippy.
do_progressive_dft = 4
filter_iter = 2
filter_strength = .5
do_progressive_dft = 0
# How many bins per octave to use?
freqbins = 24
freqbins = 64
# DFT Output IIR filter (Probably don't change these)
filter_iter = 2
filter_strength = .5
# For the final note information... How much to slack everything?
note_attach_amp_iir = 0.3500
@ -91,31 +94,16 @@ note_jumpability = 1.8000
note_minimum_new_distribution_value = 0.0200
note_out_chop = 0.05000
#compress_coefficient = 4.0
#compress_exponent = .5
#=======================================================================
#Outputs
##########################################
# Colorchord Display and Output Settings #
##########################################
# This is a vornoi thing:
outdrivers = OutputVoronoi, DisplayArray
lightx = 64
lighty = 32
lightx = 128
lighty = 64
fromsides = 1
shape_cutoff = 0.03
satamp = 5.000
amppow = 2.510
distpow = 1.500
#This is a linear or pie thing
# outdrivers = DisplayArray, OutputLinear
# outdrivers = DisplayPie, OutputLinear
leds = 64
pie_min = 0.18
pie_max = 0.3

View file

@ -21,8 +21,6 @@ amplify=.4
compress_coefficient = 4.0
compress_exponent = .5
sourcename = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
fliprg = 1
skittlequantity = 24
timebased = 1

View file

@ -8,13 +8,7 @@ led_floor = .1 #Turn to .25 for more uniformity, .1 for less.
steady_bright = 0
rgby = 1
sourcename = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#sourcename = default
#alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 0
firstval = 0
port = 7777

View file

@ -21,8 +21,6 @@ amplify=.5
lightx = 20
lighty = 20
sourcename = #alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
fliprg = 1
skittlequantity = 24

View file

@ -33,12 +33,6 @@ amplify=.35
lightx = 20
lighty = 20
sourcename =
# alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#alsa_input.pci-0000_00_1f.3.analog-stereo
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
fliprg = 1
skittlequantity = 24

View file

@ -13,10 +13,6 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = default
# alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 0
firstval = 0
port = 7000

View file

@ -16,9 +16,6 @@ lighty=1
ledoutamp = 1
sourcename = alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
bank1_size = 40
bank1_id = 8
bank2_size = 27

View file

@ -15,9 +15,6 @@ light_siding = 1.9
samplerate = 11025
buffer = 64
#sourcename = default
sourcename = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#default
do_write_method = 2
amplify = 2.5

View file

@ -0,0 +1,4 @@
do_progressive_dft = 3
samplerate = 8000
buffer = 64

View file

@ -15,19 +15,6 @@ set_screeny = 480
in_amplitude = 1.0
sample_channel = -1
sourcename = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#bluez_sink.40_EF_4C_CA_A4_5D.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
## alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2.monitor (On desktop)
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#default
# alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor << New laptop
#use pactl list | grep pci- | grep monitor
#How many bins a note can jump from frame to frame to be considered a slide.
#this is used to prevent notes from popping in and out a lot.

View file

@ -32,12 +32,6 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_0a_00.1.hdmi-stereo.monitor
#alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 3
firstval = 0
flipgb = 1

View file

@ -26,12 +26,6 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = alsa_output.pci-0000_0a_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_0a_00.1.hdmi-stereo.monitor
#alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 3
firstval = 0
flipgb = 1

View file

@ -13,9 +13,6 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename =
#alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
# home: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
skipfirst = 1
firstval = 0
port = 7777

View file

@ -12,9 +12,6 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 1
firstval = 0
port = 7777

View file

@ -12,11 +12,6 @@ steady_bright = 0
#dft_q = 20.0000
#dft_speedup = 1000.0000
sourcename = alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#sourcename = alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
skipfirst = 1
firstval = 1
port = 7777

View file

@ -7,7 +7,6 @@ lightx = 2
lighty = 1
light_siding = 1.6
note_attach_amp_iir = .3000
note_attach_amp_iir2 = .1500
note_attach_freq_iir = 0.3000

View file

@ -13,9 +13,6 @@ distpow = 1.500
samplerate = 11025
buffer = 64
sourcename = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#default
amplify = 2.5
note_attach_amp_iir = 0.9000
note_attach_amp_iir2 = 0.550

View file

@ -0,0 +1,100 @@
# This is the configuration file for colorchord.
# Most values are already defaulted in the software.
# This file is constantly checked for new versions.
# \r, and ; are used as terminators, so you can put
# multiple entries on the same line.
#Whether to limit the control loop to ~60ish FPS.
cpu_autolimit = 1
#General GUI properties.
title = ColorChord RadialPole Output
set_screenx = 480
set_screeny = 480
#Sound properties.
buffer = 1024
play = 0
rec = 1
channels = 2
samplerate = 44100
#######################################
# ColorChord audio driver properties. #
#######################################
# Colorchord now automatically picks most of the important audio driver settings automatically
# and will default to PULSE with ALSA as a fallback on Linux,
# On Windows it will default to WASAPI with winmm (WIN) as a fallback
# To force a specific driver use the "sound_source" property, the following values are valid
# sound_source:
# Linux: PULSE, ALSA
# Windows: WASAPI, WIN
# Android: ANDROID
# sound_source =
# The "devplay" property sets the playback device for CNFA (what speakers to go to) most uses for
# colorchord don't use audio output so this can be almost universally ignored
# devplay =
# The "devrecord" Sets the device to get audio from. This will default to monitoring your speaker
# output. For WASAPI, "default" searches for a mic, and "defaultRender" searches for your loopback.
# For PulseAudio @DEFAULT_SOURCE@ selects the default input (typically a microphone) and
# @DEFAULT_MONITOR@ selects the default loopback device.
# devrecord =
#-1 indicates left and right, 0 left, 1 right.
sample_channel = -1
##################################
# General ColorChord properties. #
##################################
# How much to amplify the incoming signal.
amplify = 2
#amplify = 10
# What is the base note? I.e. the lowest note.
# Note that it won't have very much impact until an octave up though!
base_hz = 55
# DFT properties for the DFT up top.
dft_iir = 0.6
dft_q = 60.0000
dft_speedup = 1000.0000
octaves = 6
# Should we use a progressive DFT?
# 0 = DFT Quick
# 1 = DFT Progressive
# 2 = DFT Progressive Integer
# 3 = DFT Progressive Integer Skippy
# 4 = Integer, 32-Bit, Progressive, Skippy.
do_progressive_dft = 0
filter_iter = 2
filter_strength = .5
# How many bins per octave to use?
freqbins = 64
# For the final note information... How much to slack everything?
note_attach_amp_iir = 0.3500
note_attach_amp_iir2 = 0.250
note_attach_freq_iir = 0.3000
#How many bins a note can jump from frame to frame to be considered a slide.
#this is used to prevent notes from popping in and out a lot.
note_combine_distance = 0.5000
note_jumpability = 1.8000
note_minimum_new_distribution_value = 0.0200
note_out_chop = 0.05000
##########################################
# Colorchord Display and Output Settings #
##########################################
# RadialPole Output driver
outdrivers = DisplayRadialPoles
radialscale = 2000
radialmode = 1

View file

@ -8,19 +8,6 @@ set_screeny = 480
in_amplitude = 3.0
sample_channel = -1
devrecord = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#sourcename = bluez_sink.40_EF_4C_CA_A4_5D.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
## alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
# alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2.monitor (On desktop)
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#default
# alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor << New laptop
#use pactl list | grep pci- | grep monitor
#How many bins a note can jump from frame to frame to be considered a slide.
#this is used to prevent notes from popping in and out a lot.

View file

@ -9,9 +9,6 @@ amppow = 3.5
distpow = 1.500
ledoutamp = 1
sourcename = alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
note_attach_amp_iir = .3000
note_attach_amp_iir2 = .1500
note_attach_freq_iir = 0.3000

View file

@ -9,13 +9,12 @@ satamp = 1.600
is_loop=0
led_floor = .18
steady_bright = 0
devplay = default
fliprg=0
slope=.5
amplify=1
base_hz = 51.5000
#WLED Integration stuff
# WLED Integration stuff
wled_realtime=1 #Enable WLED Interfacing params
port = 19446 #Default port for UDP Realtime
address = 192.168.0.24 #WLED Node IP

View file

@ -1,5 +0,0 @@
do_progressive_dft = 3
samplerate = 8000
buffer = 64
sourcename = alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

View file

@ -8,6 +8,11 @@
#ifndef strdup
#define strdup _strdup
#endif
// define convenient macro to detect windows
#define IS_WINDOWS 1
#else
// this isn't windows
#define IS_WINDOWS 0
#endif
#include "color.h"
@ -313,7 +318,14 @@ void RegisterConstructorFunctions()
REGISTERDisplayNetwork();
REGISTERDisplayOutDriver();
REGISTERDisplayPie();
// REGISTERDisplaySHM();
REGISTERDisplayRadialPoles();
// block trying to load linux specific displays
#if not IS_WINDOWS
REGISTERDisplayDMX();
REGISTERDisplayFileWrite();
REGISTERDisplaySHM();
REGISTERDisplayUSB2812();
#endif
// Output stuff
// REGISTERDisplayUSB2812();
@ -402,11 +414,17 @@ int main( int argc, char **argv )
do {
#if IS_WINDOWS
const char *record_dev_name = "defaultRender";
#else
const char *record_dev_name = "@DEFAULT_MONITOR@";
#endif
// Initialize Sound
sd = CNFAInit( sound_source, "colorchord", &SoundCB, GetParameterI( "samplerate", 44100 ),
GetParameterI( "samplerate", 44100 ), GetParameterI( "channels", 2 ),
GetParameterI( "channels", 2 ), GetParameterI( "buffer", 1024 ),
GetParameterS( "devplay", 0 ), GetParameterS( "devrecord", 0 ), NULL );
GetParameterS( "devplay", "default" ), GetParameterS( "devrecord", record_dev_name ),
NULL );
if ( sd ) break;

View file

@ -1,37 +0,0 @@
# This is the configuration file for colorchord.
# Most values are already defaulted in the software.
# This file is constantly checked for new versions.
# \r, and ; are used as terminators, so you can put
# multiple entries on the same line.
#Whether to limit the control loop to ~60ish FPS.
cpu_autolimit = 1
#General GUI properties.
title = PA Test
set_screenx = 1280
set_screeny = 720
#Sound properties.
buffer = 384
play = 0
rec = 1
channels = 2
samplerate = 44100
wininput = -1
#Compiled version will default to PULSE (or ALSA) on Linux, WASAPI (winmm) [or WIN for winmm] on Windows and ANDROID on Android
# sound_source = ALSA
# sound_source = WASAPI
#-1 indicates left and right, 0 left, 1 right.
sample_channel = -1
# Sets the playback device for CNFA (what speakers to go to)
devplay = default
# Sets the device to get audio from, for WASAPI, "default" searches for a mic, and "defaultRender" searches for your loopback.
devrecord = alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
outdrivers = DisplayRadialPoles
radialscale = 3000
radialmode = 1