Checkpoint

This commit is contained in:
Robin E. R. Davies
2025-08-01 20:21:55 -04:00
parent aa13301b84
commit b1f80785a1
2 changed files with 25 additions and 17 deletions
+24 -16
View File
@@ -10,13 +10,15 @@ icon_float: right
### Q. Why is it so important to use a good USB audio adapter?
If you use a cheap consumer-level USB audio adapter, you will not get the best possible results from PiPedal. You will, in fact, get good results, possibly better results than anything you have used before. But not the best possible results, which, I am somewhat embarrassed to say, are astounding.
If you use a cheap consumer-level USB audio adapter, you will not get the best possible results from PiPedal. You will, in fact, get good results, possibly better results than anything you have used before. But not the best possible results, which, I am somewhat embarrassed to say, are astounding, particularly when using TooB Neural Amp Modeler amp models. The quality of Toob Neural Amp Modeler amp models is so good that it is actually possible to make a guitar effects box that sounds better than retail guitar effects boxes that cost thousands of dollars. But you can't get there without a good USB audio adapter.
Consumer-level USB audio adapters provide somewhere around 96dB of actual dynamic range between the loudest possible signal and the noise floor. And disturbingly, many consumer-level USB audio adapters have a noise floor that is much higher than -96dB. I, personally, have a USB adapter from a brand that most people would consider reputable, that only has a 60dB measured dynamic range. That would be 10 bits of actual audio data, and 14 bits of pure noise, all packed into 24-bit words, for those of you who are counting.
Consumer-level USB audio adapters provide somewhere around 96dB of actual dynamic range between the loudest possible signal and the noise floor. And disturbingly, many consumer-level USB audio adapters have a noise floors that are much worse. I, personally, have a USB adapter from a brand that most people would consider reputable, that only has a 60dB of measured dynamic range. That would be 10 bits of actual audio data, and 14 bits of pure noise, all packed into 24-bit words, for those of you who are counting.
Signal to noise ratio matters enormously. By the time you have run that -96dB noise signal through a heavily-overdrive Neural Amp Modeler amp model, you wil end up with a signal to noise ratio that could be somewhere around -12dB, or perhaps even less if you are into very heavy metal. It still sounds ok; but it doesn't sound nearly as good as it could.
Support for 24-bit audio is a marketing gimmick. The actual spec you should be interested in is the dynamic range of the device, which is the difference between the loudest possible signal and the noise floor.
Professional-level USB audio adapters, on the other hand, provide much higher signal to noise ratios. A good professional-level USB audio adapter will provide somewhere between 110dB and 120dB of of usable dynamic range. That difference sounds modest, but it makes a huge difference when using NAM amp models. It's like you were playing under a blanket before, and suddenly the blanket is gone, your eyes suddenly clear, and a light shines down from heaven. The emulations have clarity, and definition, and genuinely sound and feel like the real thing. As a point of reference, the current generation of Line6 Helix guitar effects boxes manage to provide 126dB of audio input dynamic range (120dB on output), which is admittedly impressive, and plays a very significant role in how good they do sound.
Dynamic range matters enormously. By the time you have run that -96dB noise signal through a heavily-overdrive Neural Amp Modeler amp model, you will end up with a dynamic range on output somewhere around -12dB, or perhaps even less if you are into very heavy metal. It still sounds ok; but it doesn't sound nearly as good as it could. Models tend to sound muddy, and indistinct, and there's an audible hiss in the background. Still good. But they could be so much better.
Professional-level USB audio adapters, on the other hand, provide much higher dynamic ranges. A good professional-level USB audio adapter will provide somewhere between 110dB and 120dB of of usable dynamic range. That difference sounds may modest, but it makes a huge difference when using NAM amp models. It's like you were playing under a blanket before, and suddenly the blanket is gone, your eyes suddenly clear, and a light shines down from heaven. The emulations have clarity, and definition, and genuinely sound and feel like the real thing. As a point of reference, the current generation of Line6 Helix guitar effects boxes manage to provide a126dB of audio input dynamic range (120dB on output), which is admittedly impressive, and plays a very significant role in how good they do sound. (Although to my ears, the Helix amp models feel cold, and are unforgiving to play, compared to NAM amp models).
It's perfectly OK to use consumer-level USB audio adapters with PiPedal when you are trying out the software. I think you will like the result. But I would like to encourage you in the strongest possible terms to invest an a decent professional-level USB audio adapter. They are not that expensive -- somewhere in the $100 to $200 range. You will not get the full experience of using PiPedal at its best without a good USB audio adapter. I promise you, you will not regret the investment. With a consumer-level USB audio adapter, you end up with a pretty good stomp box, frankly. It does sound good. But with a pro level adapter, you are going to get a guitar stomp box that provides significantly genuinely better sound quality with a quality that exceeds that of retail guitar effects boxes like Helix that cost thousands of dollars.
@@ -36,20 +38,28 @@ Devices that would make excellent choices:
Or other devices in that sort of class and price range.
The MOTU M2, and the Focusrite Scarlett 2i2 are relatively affordable.
#### Q. My Neural Amp Modeler amp models don't sound that great. Am I doing something wrong? the output signal not loud enough.
You probably are.
To get best results, you must make sure that analog input and output signal levels are trimmed correctly. If you have knobs and dials and buttons, make sure those knobs and dials and buttons are set correctly. If you don't have knobs and dials and buttons, see the previous question for instructions on how to trim input and output levels using `alsamixer`.
To get best results, you must make sure that analog input and output signal levels are trimmed correctly. If you have knobs and dials and buttons, make sure those knobs and dials and buttons are set correctly. If you don't have knobs and dials and buttons, see the following question for instructions on how to trim input and output levels using `alsamixer`.
The knobs and dials on your USB audio adapter (whether physical, or `alsamixer` controls) are used to set the analog signal levels being presented the Analog to Digital Converter (ADC). You want to set the input trim levels so that the digital audio signal that PiPedal gets is as close to 0dB as possible, without clipping (going into the red) at any point. If you set it too low, you will lose accuracy in the digital audio data, and your amp models will sound muddy and unpleasant. If you set it too high, you will cause clipping in the digital audio data, and which sounds extremely harsh and unpleasant. Avoid clipping at all costs.
If you click on the start node and end nodes of a Pipedal preset, you will see VU meters that measure the loudness of the digital audio coming into and going out of Pipedal. These meters are a good way to check that the analog trim levels of your input and output signals are correct. You should, in fact, NEVER use PiPedal's input and output trim controls to control the volume of your audio, unless you have a compelling reason to do so.
If you click on the start node and end nodes of a Pipedal preset, you will see VU meters that measure the loudness of the digital audio coming into and going out of Pipedal. These meters are a good way to check that the analog trim levels of your input and output signals are correct. You should, in fact, NEVER use PiPedal's input and output trim controls to control the volume of your audio, unless you have a compelling reason to do so. Use your knobs and dials (or `alsamixer` controls) to set the analog input and control voume of audio comping out of the audio output jacks.
The quality of your USB audio adapter is also important. See "Q. Why is it so important to use a good USB audio adapter?", above.
#### Q. The signal levels on my USB adapter are too low. The input signal is too quiet, or the output signal not loud enough.
A. This is a common problem with USB audio adapters, especially inexpensive ones. USB adapters are designed to work with a wide range of signal levels. Most USB audio devices have knobs and controls and buttons on the front panel that allow you to adjust the analog input and output levels. But some USB adapters don't have those controls. For these devices, you must use Linux commandline tools to adjust the signal levels. Unfortunately, the default levels that are set by the operating system for these devices are much too low; so if you have a device like this, you will run into a problem.
To fix this, you can use the `alsamixer` command to adjust the levels. Open a terminal window and type `alsamixer`. This will open a graphical mixer interface in the terminal. Use the arrow keys to navigate to the input and output channels, and use the up and down arrow keys to adjust the levels. Make sure to set the levels appropriately for both input and output channels.
Fortunately, settings made in `alsamixer` are persistent, and will remain in effect even if you reboot your system, so you will usually only have to do this procedure once.
#### Q. Dial control movements are too coarse. How do I make them finer?
@@ -57,6 +67,11 @@ A. If you are using a desktop browser, the Ctrl and Shift keys modify the behavi
If you press the Shift key while you are dragging the control, the values will change in 10x smaller increments.
If you press the Ctrl key while you are dragging the control, the values will change in 50x smaller increments.
If you are using
a touch interface, the dials will change in 10x smaller increments if you have two fingers touching the screen while you are dragging the control,
and 50x smaller increments if you have three fingers touching the screen while you are dragging the control. The three-finger touch gesture is a bit
awkward. I find the best way to do it is to touch the screen with your middle finger first, and then touch the screen with your index finger and your ring finger. The position of the first finger to touch the screen determines how controls change.
#### Q. What do the buffer size controls do? How do I choose good values?
A. When configuring your audio device, you must choose a buffer size, and how many buffers to use.
@@ -65,7 +80,8 @@ The simple answer is: use 32x4 if your hardware can handle it, and use larger si
The longer answer is complicated (but not too complicated).
The buffer size determines how much audio data is processed at once by PiPedal. Pipedal processes audio data in chunks, the buffer size sets how large those chunks are. For example, if the buffer size is set to 64 samples, PiPedal will process audio 64 samples at a time. There is a slight cost to processing each chunk of audio, in addition to the cost of processing each sample of audio. So smaller buffer sizes mean that more CPU overhead is incurred for processing the buffer. Larger buffer sizes mean more efficient use of CPU, at the const of increased latency .
The buffer size determines how much audio data is processed at once by PiPedal. Pipedal processes audio data in chunks, the buffer size sets how large those chunks are. For example, if the buffer size is set to 64 samples, PiPedal will process audio 64 samples at a time. There is a slight cost to processing each chunk of audio, in addition to the cost of processing each sample of audio. So smaller buffer sizes mean that more CPU overhead is incurred for processing the buffer. Larger buffer sizes mean more efficient use of CPU, at the const of increased latency. As a loose guideline, choosing a buffer size of 32 samples incurs a few percentage points of CPU overhead -- not enough to be a problem on most hardware; a buffer size of 16 samples incurs a few percentage points more (5 to 10% depending on the effects you are using); and a buffer size of 64 samples has almost neglibible CPU overhead. The actual overhead depends on the hardware you are using, and the effects you are using. If you are determined to squeeze every last ounce of performance out of your hardware, you may want to experiment to find absolutely optimal settings; but 32x4 gives
sufficiently good results for most users.
The number of buffers determines how large a queue of audio buffers Pipedal uses. The longer the queue, the less likely the hardware is going to run out of audio data to send or run out of space to store newly received audio data. For example, if the number of buffers is set to 4, Pipedal will use one of those buffers to process audio, and will do its best to keep the audio queue filled with 3 additional buffers that have already been processed, and are waiting to be sent to the hardware, one of which will be being actively processed by the drivers and/or hardware at any given time.
@@ -85,13 +101,5 @@ If you have to use larger buffers, there is absolutely nothing wrong with a 64x3
For what it's worth, hardware doesn't really care whether buffer settings are 64x3 or 32x6. The hardware actually just sees one big buffer, and chases reads and writes memory as fast as it can. The interesting difference between 64x3 and 32x6 is that the 32x6 configuration gives the hardware more queued data. In the 64x3 configuration, PiPedal uses one buffer, the hardware uses another buffer, and there is (hopefully) one queued 64-sample buffer waiting to be sent. In the 32x6 configuration, there is one buffer being used by PiPedal, one buffer being used by the hardware, and there are (hopefully) 4 queued 32-sample buffers waiting to be sent. So twice as much queued data when using a 32x6 configuration.
#### Q. The signal levels on my USB adapter are too low. The input signal is too quiet, or the output signal not loud enough.
A. This is a common problem with USB audio adapters, especially inexpensive ones. USB adapters are designed to work with a wide range of signal levels. Most USB audio devices have knobs and controls and buttons on the front panel that allow you to adjust the analog input and output levels. But some USB adapters don't have those controls. For these devices, you must use Linux commandline tools to adjust the signal levels. Unfortunately, the default levels that are set by the operating system are much too low; so if you have a device like this, you wil run into a problem.
To fix this, you can use the `alsamixer` command to adjust the levels. Open a terminal window and type `alsamixer`. This will open a graphical mixer interface in the terminal. Use the arrow keys to navigate to the input and output channels, and use the up and down arrow keys to adjust the levels. Make sure to set the levels appropriately for both input and output channels. See the following question for details on how to trim our `alsamixer` settings, and why trimming them properly is so important.
Fortunately, settings made in `alsamixer` are persistent, and will remain in effect even if you reboot your system, so you will usually only have to do this procedure once.
--------
[<< LV2 Plugins with MOD User Interfaces](ModUiSupport.md) | [Up](Documentation.md) | [BuildingPiPedal from Source >>](BuildingPiPedalFromSource.md)
+1 -1
View File
@@ -1428,7 +1428,7 @@ namespace pipedal
}
void recover_from_output_underrun(snd_pcm_t *capture_handle, snd_pcm_t *playback_handle, int err)
{
Lv2Log::error("XXX: Output underrun");
// Lv2Log::error("XXX: Output underrun");
validate_capture_handle();
try {