Shop OBEX P1 Docs P2 Docs Learn Events
Guitar string processor? - Page 3 — Parallax Forums

Guitar string processor?

13»

Comments

  • @pik33 said:

    Well, I don't know. How did you measure these 100dB?

    I "measured" it using a 3-bit "sine wave" and my ears. I connected an Eval to a 2x200W amplifier, set the amplifier to the maximum volume and generated this 3-bit wave using 16-bit noise dac and PWM dac modes. The goal was to compare them.
    What I hear, was: sound - clear with PWM mode, not so clear with noise DAC (strange distortions added too in this mode) and a noise floor.
    While ear is not a good measurement tool, the SNR in this case was at least 30..40 dB. This means the overall SNR for a 16-bit signal is much over 100 dB. I was impressed a lot.

    Good idea, this hear test!
    (20*log(65536/2) = 90dB, so "much over 100dB" will not be possible due to quantisation.) But nevertheless, very much better than in my audio player, where you CAN hear the access to the display, the SD card (Ada had warned me) and the i2c access to the radio chip, while I try to have the audio signal always as big as possible. As this is used for speech, there are a lot of tiny pauses, where the noise will be alone..... You can also hear noise, when the Dac is not updated with new values. Nevertheless in my opinion for the intended purpose there, it is good enough.

    @Mickster You might want to read again my post #20, where we already had a discussion about the Auto-tune hardware in https://forums.parallax.com/discussion/173625/analyzer-for-guitar-sound-effects-p2-project-input-welcome You seem to underestimate this item. It has 24bit Adc with 50kHz sampling together with a powerful specialised dsp. A speaker for electric guitar typically has a frequency range up to 7kHz, so at least 14kHz sampling would be the very minimum. I don't want to spoil your idea but I think it is good to have a realistic picture, what would be needed for a device you would realy like to use.

  • pik33pik33 Posts: 2,384
    edited 2023-10-14 16:18

    "much over 100dB" will not be possible due to quantisation

    I wrote about noise background and not quantization noise. Of course quantization gives this -96 dB at 16 bit, but if the background noise is much quieter than this, and we have a high sample rate available, we can always use a noise shaper.
    A simple 2nd order noise shaper adds 15 dB to SNR for every octave of oversampling. We have such thing in a P1 audio drivers (I wrote one, or maybe even the first one that used this).
    Also, the 3-bit "sine" wave is not really sine, and then the sample rate was an integer multiply of the sound frequency. There is no quantiation noise in this case, or rather the quantization noise is harmonic.

  • @"Christof Eb." said:

    @pik33 said:

    Well, I don't know. How did you measure these 100dB?

    I "measured" it using a 3-bit "sine wave" and my ears. I connected an Eval to a 2x200W amplifier, set the amplifier to the maximum volume and generated this 3-bit wave using 16-bit noise dac and PWM dac modes. The goal was to compare them.
    What I hear, was: sound - clear with PWM mode, not so clear with noise DAC (strange distortions added too in this mode) and a noise floor.
    While ear is not a good measurement tool, the SNR in this case was at least 30..40 dB. This means the overall SNR for a 16-bit signal is much over 100 dB. I was impressed a lot.

    Good idea, this hear test!
    (20*log(65536/2) = 90dB, so "much over 100dB" will not be possible due to quantisation.) But nevertheless, very much better than in my audio player, where you CAN hear the access to the display, the SD card (Ada had warned me) and the i2c access to the radio chip, while I try to have the audio signal always as big as possible. As this is used for speech, there are a lot of tiny pauses, where the noise will be alone..... You can also hear noise, when the Dac is not updated with new values. Nevertheless in my opinion for the intended purpose there, it is good enough.

    I don't want to spoil your idea but I think it is good to have a realistic picture, what would be needed for a device you would realy like to use.

    Oh no, not at all, I'm playing devil's advocate. So often have I come across over-analyzing the problem.

    What I have a problem with is the fact that; on the AT-200, I can "virtual capo" at say fret eight. So my first position E is now identical to a barred C. I can still play right up to the neck pickup and of course, I am going way beyond what a normal guitar can. It's not a problem and this is sampling at 8KHz :|

    Craig

  • Christof Eb.Christof Eb. Posts: 1,213
    edited 2023-10-15 09:02

    @Mickster said:

    @"Christof Eb." said:

    @pik33 said:

    Well, I don't know. How did you measure these 100dB?

    I "measured" it using a 3-bit "sine wave" and my ears. I connected an Eval to a 2x200W amplifier, set the amplifier to the maximum volume and generated this 3-bit wave using 16-bit noise dac and PWM dac modes. The goal was to compare them.
    What I hear, was: sound - clear with PWM mode, not so clear with noise DAC (strange distortions added too in this mode) and a noise floor.
    While ear is not a good measurement tool, the SNR in this case was at least 30..40 dB. This means the overall SNR for a 16-bit signal is much over 100 dB. I was impressed a lot.

    Good idea, this hear test!
    (20*log(65536/2) = 90dB, so "much over 100dB" will not be possible due to quantisation.) But nevertheless, very much better than in my audio player, where you CAN hear the access to the display, the SD card (Ada had warned me) and the i2c access to the radio chip, while I try to have the audio signal always as big as possible. As this is used for speech, there are a lot of tiny pauses, where the noise will be alone..... You can also hear noise, when the Dac is not updated with new values. Nevertheless in my opinion for the intended purpose there, it is good enough.

    I don't want to spoil your idea but I think it is good to have a realistic picture, what would be needed for a device you would realy like to use.

    Oh no, not at all, I'm playing devil's advocate. So often have I come across over-analyzing the problem.

    What I have a problem with is the fact that; on the AT-200, I can "virtual capo" at say fret eight. So my first position E is now identical to a barred C. I can still play right up to the neck pickup and of course, I am going way beyond what a normal guitar can. It's not a problem and this is sampling at 8KHz :|

    Craig

    Where from do you have that information, that they are sampling at 8kHz???
    It was you, who provided that paper: https://forums.parallax.com/discussion/download/136310/74_ATG_Guitar_Feature_Packs_v3.32.pdf

    On page 15 it is written: "I often get the comment from ATG users there is no latency. Actually there is. There is about 50 samples of latency from the ADC and DAC converters. (That would be
    Analog to Digital and Digital to Analog Converters.) 50 samples is about 1 millisecond (.001 seconds)."

    Sample frequency: 50/(0,001s)= 50.000Hz!

  • Some comment, why for a signal at the Guitar top notch Audio quality is used as state of the art:
    This "Big Muff" is a "Fuzz" or overdrive circuit that is used quite commonly: http://www.bigmuffpage.com/images/schematics/KR_1973_V2_Violet_Schematic_2nd_version.jpg

    It would be placed after the auto-tune circuit, because you don't have one of these for each string.

    It consists of a preamp/buffer around Q4, two soft clipping stages Q3 and Q2 and after a tone circuit a final amplifier. Each of these Soft Clipping Stages have a gain of 27dB for small signals (like noise), while the diodes (D1....D4) limit the gain for larger signals. So, if we forget the gain of the input stage and also of the output stage and if we also forget, that the output stage is often used to additionally overdrive the following Guitar amp, this circuit alone "steals" 54dB of signal/noise ratio, for equipment that is used before the Big Muff.

    This is the reason, that in all digital equipment, that is meant to be used directly coupled to the Guitar pickup, regarding signal to noise only very fine audio is satisfactory.
    Only after (!!!) the signal has passed all that overdrive, "normal" audio quality, like FM radio will be good enough.

  • MicksterMickster Posts: 2,698
    edited 2023-10-15 18:37

    @"Christof Eb."

    Chapter 4 of the PDF

    I guess that means that it only looks for activity at that 8KHz, right?

    Craig

  • Yes, it is usual to handle audio data in blocks of samples for efficiency of task switching. 6 samples is a high rate. Teensy audio system for example takes 128 samples per block as standard at 44100Hz sample rate, as far as I remember.
    Here they must use overlapping blocks somehow to detect low tones pitch. Do something like autocorrelation with it.

  • @"Christof Eb." said:
    Some comment, why for a signal at the Guitar top notch Audio quality is used as state of the art:
    This "Big Muff" is a "Fuzz" or overdrive circuit that is used quite commonly: http://www.bigmuffpage.com/images/schematics/KR_1973_V2_Violet_Schematic_2nd_version.jpg

    It would be placed after the auto-tune circuit, because you don't have one of these for each string.

    It consists of a preamp/buffer around Q4, two soft clipping stages Q3 and Q2 and after a tone circuit a final amplifier. Each of these Soft Clipping Stages have a gain of 27dB for small signals (like noise), while the diodes (D1....D4) limit the gain for larger signals. So, if we forget the gain of the input stage and also of the output stage and if we also forget, that the output stage is often used to additionally overdrive the following Guitar amp, this circuit alone "steals" 54dB of signal/noise ratio, for equipment that is used before the Big Muff.

    This is the reason, that in all digital equipment, that is meant to be used directly coupled to the Guitar pickup, regarding signal to noise only very fine audio is satisfactory.
    Only after (!!!) the signal has passed all that overdrive, "normal" audio quality, like FM radio will be good enough.

    Yes, exactly. I don't play guitar and I'm not an audio expert, either. But from what I know you theoretically don't need very high quality audio for E-guitars. In fact, they intentionally add all those things you normally try to avoid at all cost in a HiFi audio amplifier: clipping, distortion, inter-modulation... It gives them the typical "aggressive" sound you need for heavy metal. Some PAs got famous in spite of - or actually BECAUSE of their really poor design where the 120Hz of the power supply was always modulated into the sound it produced. The audience likes it. And it sounds different in Europe because of the 50Hz vs. 60Hz power grid frequency.

    So I think 8bit resolution and 20kHz sampling rate would be totally enough to make a good E-guitar sound. There were synthisizers on the good old commodore C64 that were really good. BUT, and that is a big but, the digital world is totally different and has it's own pitfalls. While analogue distortion adds natural harmonics and sounds good to the human ear (or at least we are used to it) digital side effects like aliasing, quantisation noise, beat/mirror frequencies and interference from switch mode power supplies are non-harmonic and can sound quite awful.

    There is a reason why the Big Muff is powered from a 9V battery. It's the cgheapest way to get a clean DC voltage. This is much more difficult when you have a microprocessor on the board. The uC executing different instructions with different power draw in a loop alone can cause enough ripple on the supply so it can be heard as noise. That's the biggest problem. I think everything else can be smoothened out by clever software. For example background noise can be suppressed by simply muting the output when the signal level from the pickups are below a certain threshold.

  • So I think 8bit resolution and 20kHz sampling rate would be totally enough to make a good E-guitar sound.

    That depends very much, where in the chain this bottleneck is sitting. For the first after the pickup it is very wrong as explained.
    I have to admit, that I had believed in that kind of simplicity too some years ago. I than built a effect with P1 and its sigma delta adc. It had about 9bit resolution and the sound was just awful.
    There are very big differences in the type and quantity of wanted harmonic distortion. Sometimes you only want 0.5pc, sometimes it's 50pc. Sometimes you want even harmonics which sound smoother, sometimes you want uneven ones, which sound more aggressive. It's like the many registers of an organ.

  • The sigma delta ADCs of the P1 are just too noisy, I totally agree. But I think the ADCs and DACs of the P2 could be good enough if you use clever filtering and noise supression. But the common power supply of the digital and analogue domain are the biggest problem, as I said. External ADCs and DACs would make it easier to separate both. For example, a PCM1803A (24bit I2S stereo ADC) costs <$1 and is very easy to interface to a P2.

Sign In or Register to comment.