-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
miunau edited this page Aug 8, 2021
·
8 revisions
You can configure your WhateverDSP project using a config.ini
in your root. If you do not provide one, the default one will be used:
# This sections contains optional modules to include in the build.
# Setting modules you don't need to false saves on RAM and CPU time.
[modules]
# Whether or not to include the USB module.
# Needed for USB audio and MIDI.
usb = true
# Whether or not to include the MIDI module.
# Needed for both standard and USB MIDI.
midi = true
# This section is for setting up general audio settings
[audio]
# The main sample rate used internally and by the ADCs/DACs in Hz.
# Available options are 44100, 45000, 48000 and 50000
sample_rate = 48000
# Number of audio channels.
# Right now this options doesn't really do anything. Leave it at 2.
channels = 2
# Memory buffer size used for the ADCs and DACs.
# Smaller values give a lower latency, bigger values help against dropouts
# when the CPU has to deal with long computations.
buffer_size = 16
# Size of audio blocks that are processed at a time.
# This needs to evenly divide into the buffer_size.
# Smaller values prevent the CPU from stalling which is important for USB audio
# while larger values are slightly more efficient.
block_size = 8
# Wether or not to use USB audio.
# Only works with the USB module enabled.
usb = true
# General USB settings
# Only applies if the USB module is enabled
[usb]
# The USB vendor and product ID. These need to get assigned to you by the USB-IF.
# Please don't distribute devices with random vendor and product IDs and make a mess.
# Or do. We're not the USB police.
vid = 0xDEAD
pid = 0xC0DE
# Device version that get's reported to the operating system. Not really useful.
device_version = 0x0100
# Name of the device and it's manufacturer.
# You can put anything you want here as long as it's less than 64 characters.
# Have fun!
vendor_name = "NLS"
product_name = "WhateverDSP Dev Board"
# Settings for the USB audio module
# Only applies if both the USB module and USB audio is enabled
[audio_usb]
# Name for the audio interface that gets reported to the operating system.
# Not all systems show this. Limited to 64 characters.
interface_name = "USB Audio Interface"
# Samples format used by the USB audio interface.
# s24 and s16 are supported by most systems.
# f32 has the best quality but support is limited.
# Available options are f32, s24 and s16
sample_format = s24
# Number of channels. Using anything but 2 is kinda untested right now and
# it's mostly here for future proofing.
channels = 2
# Whether or not to enable USB audio input into the device.
# If you only want to send audio to the computer you can turn this to false.
input = true
# Whether or not the enable USB audio output from the device.
# If you only want to receive audio from your computer you can turn this off.
output = true
# These settings determine where in the audio stream the USB input/output is located.
# Setting this to pre means the audio is sent/received from the computer before
# it is processed. Setting it to post sends/receives the audio after processing.
in_pos = pre
out_pos = post
# MIDI settings
# Only applies if the MIDI module is enabled
[midi]
# Whether or not to enable the serial midi module.
# That's just normal MIDI via the two TRS jacks.
uart = true
# Whether or not to enable the USB MIDI interface.
# Also needs the
usb = true
# USB MIDI settings
# Only applies if both the MIDI and USB modules are enabled
[midi_usb]
# Name of the interface reported to the operating system.
# Not used or shown by every OS. 64 characters max.
interface_name = "USB MIDI Interface"
You can change any or all of the variables. The .ini file will get turned into a config.h
header file when you compile.