added a few commands to help with sound setup
This commit is contained in:
parent
0a498f0c64
commit
44274084d3
14
README.md
14
README.md
|
|
@ -73,11 +73,19 @@ cmake -DUSE_PULSEAUDIO=YES ..
|
||||||
```
|
```
|
||||||
## Bass Shaker Sound Devices
|
## Bass Shaker Sound Devices
|
||||||
|
|
||||||
When using pulseaudio it is necesarry to provide a devid in the configuration. You can find this with: (you need to look at the full output of pactl if you don't know which one you want)
|
When using pulseaudio it is necesarry to provide a devid in the configuration. This command should list available sound cards with the "Name" being the "devid" needed in the monocoque config.
|
||||||
```
|
```
|
||||||
pactl list sinks|grep -E -i 'index:|name:'
|
pactl list sinks | grep -E -i 'index:|name:' -A 4
|
||||||
```
|
```
|
||||||
analyze the output to determine the appropriate hardware to which you would like to output the effects. ( Need to research how to do this with pipewire. )
|
One can generate sample sine waves at specific frequency on a specific channel on a specific sound card with this command
|
||||||
|
```
|
||||||
|
ffmpeg -f lavfi -i "sine=f=440" -af "pan=7.1|c1=c0,surround=level_out=10" -f wav pipe:1 | paplay --no-remap --no-remix -d alsa_output.pci-0000_00_1b.0.analog-stereo -n "Monocoque" --stream-name="Haptic Test"
|
||||||
|
```
|
||||||
|
(the -n and --stream-name are optional but it helps you identify the stream in pavucontrol)
|
||||||
|
The channel map from the pactl command is the order of channels. Change c1 in this above command to the desired output channel.
|
||||||
|
|
||||||
|
The effects generated by monocoque should match the effects generated by this ffmpeg command. The frequency will differ slightly due to having to [fit in the buffer size](https://stackoverflow.com/questions/40078417/how-to-calculate-minimum-cycles-of-sine-wave-to-have-integer-n-cycles-in-a-buffe)
|
||||||
|
(monocoque lowers the target frequency until it fits in the audio buffer).
|
||||||
|
|
||||||
## Using Arduino Devices
|
## Using Arduino Devices
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue