Shop OBEX P1 Docs P2 Docs Learn Events
Analyzer for (Guitar) Sound Effects P2 Project - Input Welcome — Parallax Forums

Analyzer for (Guitar) Sound Effects P2 Project - Input Welcome

Hi all,
as there seems to exist good chance now, that P2 will be available in a way, that can be used well in a project, I am brainstorming about a project, I have in mind. And as I know, there are many very gifted people here, I would appreciate your thoughts here!

Goal:
Provide a way, that makes visible important characteristics of sound effects like "overdrive", "distortion", "compressor",..., or just an amplifier. This shall help to understand, compare, discuss the very many types of such equipment.

Basic Idea:
For each measurement point a pure sine wave with known base frequency f1 and known amplitude is output from the analyzer as a test signal and fed into the audio effect. Its output is then sampled and as the analyzer knows f1, it can then calculate the amplitudes a.i of the frequency f1 and of its harmonics 2f1= f2, 3f1=f3, 4f4, 5f5=f5. (This can be done with the Goertzel maths.) The ratio a.2 / a.1 gives harmonic distortion of this 2nd harmonic and so on. Even harmonics sound very different than odd harmonics.

Example of a presentment (Tube screamer TS808):
The picture shows 3 subpictures. The first shows the base frequency response, the second the harmonic distortion in percent at 2f1, the third the harmonic distortion 3f1. In each subpicture the position is related to the input to the effect. The colour gives the result at this measurement point.
The fist subpicture shows, that TS808 emphasises a frequency region at about 500Hz. The second picture shows, that it produces almost no 2nd harmonics. The third shows, that it produces up to 30% 3rd harmonics mainly for low frequencies starting from -25dB related to Vrms=480mV = 0dB.

The second example "SobLead.." shows the result regarding a Jfet- based effect "Son of Ben", that simulates a tube amp. This is a quiet flexible circuit, that can give different sounds, here a "Lead" sound. You can see, that there is plenty of 2nd harmonics here, totally different from the Tube screamer.

Specific Benefits of P2 for this Project:

  • Split tasks to different cogs.
  • Use smart pin dac
  • Use smart pin adc to sample with high sample frequency and with controlled gain
  • Hardware multiply should help for speed of analysis

The pictures included have been done with the soundcard and Windows on a PC as a prove of concept. The disadvantages of this approach have been: Real amplitudes (in Volts) not known; Sample frequency 44,1kHz gives low resolution for analysis of 20 kHz signal. Timing between sound output and sampling not clear -> long measurement cycles. (P2 should be 5 times faster?)

Features:
(nice to have in brackets)
Range of base frequency: (10Hz) 40Hz...7kHz (20kHz)
Max sample frequency: 44,1kHz (200kHz)
Output Amplitude of the test signal: V= 3.3/2 V (10V with external amplifier)
Output impedance: <= 1k
Input impedance: >100k (1M)
Harmonic distortion of the output signal (<0,1%) <0,5% in the output amplitude range 1mV...1600mV
Harmonic distortion to measurement (<0,2%) <0,5% at input amplitudes 1mV...10V.
Measurement time for one test point <0,1sec at >80Hz (?)

Additional 2 channel oscilloscope mode
Additional 2 channel FFT mode

??? small touch screen 2,4' for stand alone control and display
??? Forth as a communication protocol from/to PC. Could be Taquoz.
??? Use FlexC, if Taquoz is not fast enough.
??? Graphics on PC with SciPy or scilab

One of my questions is: Do you think, that the adc and dac smart pin modes will be good enough to measure <0,5% distortion over the range of amplitudes, if the variable gain (1, 3.2, 10, 32, 100) is used?

576 x 864 - 57K
576 x 864 - 59K

Comments

  • Reserved

  • pik33pik33 Posts: 2,366

    Get a bigger screen, the device may be standalone (PC-less) - you have HDMI onboard, 960x540 available without any problems. The problem may be touch interface, I don't know if it is done somewhere.

    PC communication: UART/PropPlug. Flexprop is good for programiming anything more complex.

    Output: OK. These DACs are very good. A ~1 MHz analog notch filter (CLK/256) may be needed at the output. The sample frequencyat the output is CLK/256, so it is > 1 MHz

    Input: ADCs are much noisier than DACs but if using for one particular frequency at once, the SNR may be sufficient. You can always use more than one ADC at once to make SNR better. ADC sample rate will be also slower: using CLK/4096 gives about 70 kHz. You can experiment with sinc3 to make sample rate higher. The real accoustic band resolution available is ~11..12(?) bit because of noise.

    The conclusion: the project seems to be doable.

  • @pik33 said:
    Get a bigger screen, the device may be standalone (PC-less) - you have HDMI onboard, 960x540 available without any problems. The problem may be touch interface, I don't know if it is done somewhere.

    PC communication: UART/PropPlug. Flexprop is good for programiming anything more complex.

    Output: OK. These DACs are very good. A ~1 MHz analog notch filter (CLK/256) may be needed at the output. The sample frequencyat the output is CLK/256, so it is > 1 MHz

    Input: ADCs are much noisier than DACs but if using for one particular frequency at once, the SNR may be sufficient. You can always use more than one ADC at once to make SNR better. ADC sample rate will be also slower: using CLK/4096 gives about 70 kHz. You can experiment with sinc3 to make sample rate higher. The real accoustic band resolution available is ~11..12(?) bit because of noise.

    The conclusion: the project seems to be doable.

    Thanks for the comments, pik33!

    Yes, I am thinking about VGA or HDMI. I am not sure, because I need colour graphics and this seems to need a lot of RAM.

  • MicksterMickster Posts: 2,693
    edited 2021-08-02 00:20

    With the utmost respect; this is a lame idea :#

    These FX have been done-to-death and the "best" distortion pedal on the market has like $10 of passive components, is now open source, copied/improved by the Chinese ($30) but the purist idiots still pay thousands for a used original. It's called the Klon Centaur. Tell these morons that you have a P2 inside and they will instantly switch from "dude, that totally rocks" to "ah, yeah, sounds digital" :lol:

    A fool and his money are easily parted.

    What's really required?

    We already covered this:

    https://forums.parallax.com/discussion/171041/guitar-string-processor#latest

  • I think it has a TL072 or something

  • @Mickster said:
    With the utmost respect; this is a lame idea :#

    These FX have been done-to-death and the "best" distortion pedal on the market has like $10 of passive components, is now open source, copied/improved by the Chinese ($30) but the purist idiots still pay thousands for a used original. It's called the Klon Centaur. Tell these morons that you have a P2 inside and they will instantly switch from "dude, that totally rocks" to "ah, yeah, sounds digital" :lol:

    A fool and his money are easily parted.

    What's really required?

    We already covered this:

    https://forums.parallax.com/discussion/171041/guitar-string-processor#latest

    I'm not sure what production of FX pedals has to do with production of an analyser. Seems like this proposed device would be used to understand what the FX pedals (including the Klon Centaur and clones) are doing in a visual sense.

  • evanhevanh Posts: 15,915
    edited 2021-08-02 04:56

    That's a tad harsh comments there. It just needs a title change to Effects Visualiser rather than Analyser. The idea is sensible enough.

  • Oops, my apologies to @"Christof Eb." :smile:

    I read the post too quickly and when I saw "Tube Screamer", I thought it was about yet another FX pedal.

  • @Mickster said:
    I think it has a TL072 or something

    As evanh and AJL already pointed out, I am speaking about a tool to understand things better.

    "TL072" is a good example, it is a dual operational amplifier with very high impedance jfet inputs and relatively high slew rate, that is used quiet often. As this has a pin layout that is used often, you can easily switch this item to a different opamp. And (for me) it is quiet astonishing, that in a typical circuit with asymmetric soft clipping the different opamps can sound different! This is one of the topics often discussed, but not not well understood. Some times this leads to very strange believings of especially good old NOS parts. My personal believing is at this moment, that the sound differences come from the input bias of the opamp depending on the input transistor type jfet, npn, pnp.
    Some people like to try to understand the circuits: https://www.electrosmash.com/klon-centaur-analysis
    So in this case, as it uses symmetric hard clipping, according to my theory, swapping of opamps will not lead to different sound....

    I do use digital sound effects (Zoom) and find them good sometimes/often. On the other hand, it is really "elating" for me, that you can get "just the right sound" (!!!!) with a supersimple analogue circuit, that has 3 (!!!!) active elements and a hand full of passive parts. https://el34world.com/charts/Schematics/files/fender/Fender_champ_5f1_schem.pdf You can totally understand the function of each part in this cicuit. And you can try to get the same sound with 1.000.000 transistors with very good software.

    I do think, that your idea is interesting too. To be able to compete with existing products, you will need low noise 24bit Adcs (due to the high dynamic range and high gain) and a sample rate of or higher than 44kHz.
    If you want to do sound processing I would like to recommend this page: http://www.spinsemi.com/knowledge_base/effects.html
    While delay or reverb can be done nicely as I have learned myself, good sounding overdrive can be done much more easily with analogue jfet circuits.

  • MicksterMickster Posts: 2,693
    edited 2021-08-02 15:29

    Fossils like me, normally stick with a famous American guitar, a famous amp and a range of stomp boxes but I find this to be too limiting/boring.
    I got in to amp/FX modeling when I discovered the Johnson J-Station (early 2000s) and moved on from there. I still believe that the best modeler ever made is the discontinued Digitech GNX4. I own seven of these units although one appears to be on permanent loan. Presets/patches with FX that can be modulated and blended in real-time is the only way to go for me. I don’t want to be bending down and twiddling knobs, etc.

    I am also a fan of Roger Linn and I have a couple of his "Adrenalinn III" units.

    It takes a lot of work to master this techology but the vast majority of guitarists don’t have the patience; they just want to plug-in and emulate some old/dead rock star.

    I found it quite amusing that; when "Premier Guitar Rig-Rundown" featured John Mayer’s live rig, I counted at least three Adrenalinn machines but the presenters went totally silent and skipped over them. Of course they went into great detail about the same old "vintage" rubbish. :lol:

  • https://www.rogerlinndesign.com/adrenalinn
    Modeled guitar amps: Fender Bassman, Fender Deluxe Reverb, Fender Twin Reverb, Fender Tweed Deluxe, Fender Champ, Marshall JTM-45, Marshall Plexi Super Lead 100, Marshall JCM800, Marshall JCM2000, Vox AC30, Vox AC15, Roland Jazz Chorus, Hiwatt DR103, Mesa Boogie Mark II, Mesa Boogie Dual Rectifier, Soldano SLO-100, Bogner Uberschall, Deizel VH4, ENGL Powerball, Peavey 5150 MkII, Bogner Ecstasy, Budda Twinmaster, Matchless Chieftain, 10 custom Roger Linn Design amp models,
    Modeled bass amps: Acoustic 360, Ampget SVT, Gallien-Krueger 800RB, SWR SM-500
    Modeled distortion pedals: Fuzz Tone, Octave Fuzz
    Plus clean tube preamp.

    ... So AdrenaLinn too tries to emulate all the "old rubbish" of "old/dead" Guys.
    You seem to like some harsh language...

    No problem with digital emulations. You could use the idea, that I tried to describe, to analyse what is happening there.
    I did this with my Zoom G11, I do not own many analogue effects. Computers can be very flexible :-)

  • Didn’t mean to come across as harsh :D it's the sort of humour that I share with others who have been there, done that and now understand that the industry is all about hype.

    I get a kick out of showing-up at an open-mic with a cheap no-name guitar and demonstrating that one doesn't need a $2,000 guitar plus a $2,000 "hand-wired" amp to be a real guitarist, while those guys are struggling to get a full barre chord to ring out. :D

    And with all due respect, the important analysis is performed with the ears.

  • @"Christof Eb." said: To be able to compete with existing products, you will need low noise 24bit Adcs (due to the high dynamic range and high gain) and a sample rate of or higher than 44kHz.

    I could be very wrong here but the way I understand it; all we require is the frequency and amplitude of each vibrating string. We don't care about the tone of the actual guitar because the processor decides what this is going to be.

    For example: E-string, 5th fret should be an A note but finger pressure causes this to go sharp. The processor reads this frequency and realises that it needs to output the perfect A note. The processor then modifies the signal to give it certain characteristics. The Peavey AT-200 samples each string @8KHz which is fine considering the maximum frequency of a vibrating guitar string is <3KHz.

  • Why not use a decent audio interface? These support 96 or 192KHz easily, with purpose build ADC/DAC. And the software is simpler to write on a PC.

  • @deets said:
    Why not use a decent audio interface? These support 96 or 192KHz easily, with purpose build ADC/DAC. And the software is simpler to write on a PC.

    I have derailed the thread (sorry) but digitizing the output of the guitar is not the issue, this is established technology.

    The single best thing to happen to the guitar, was around for a few years, wasn’t really marketed and then the one developer at Antares retired and the whole thing died.

    A competent Luthier can take a high quality instrument and calibrate it to the hilt but it will never achieve perfect intonation. The EADGBE open strings should be EADGBE at the 12th fret (octave higher) but they never are.
    Furthermore, unlike a keyboard, the pressure of the finger, when fretting a note, makes that note sharp.

    "Autotune" on a cheap, poorly set-up guitar, makes every single note perfect .

    In effect, the player's hands become finger-controlled-oscilators where the frequencies are merely references. The natural tone of the instrument is unimportant because this is generated by the MCU.

    The low-grade, solid-body, Peavey guitar that the Antares system utilized, can emulate acoustic, 12-string, Stratocaster, Telecaster, Les Paul, etc., etc.

    Live performance:

    -Guitarist never needs to touch the tuners
    -Can switch between acoustic, 12-string, electric, seamlessly in the same song
    -Many famous songs are tuned flat by a half-step to suit the vocalist so that EADGBE becomes Eb, Ab, Db, Gb, Bb, Eb. This happens instantly (no boring stories while the guitarist re-tunes or switches guitars)
    -Rolling Stones songs are popular but Keith Richards uses open-G tuning (Brown Sugar, Honky-Tonk, Start-me-up). Instantly switched.
    -Song mainly requires standard tuning but the solo requires a slide? Instantly switch to an open tuning for the solo and then back to standard.
    -Need a couple of the strings to emulate a bass guitar while the rest are standard guitar? Instant.
    -Many songs require a capo placed on a particular fret so that the player can use open chords in other keys. Not necessary here because the MCU has "virtual capo"

    Studio recording:
    This can be a nightmare for guitarists who solo over the entire fingerboard and who don't rely on FX to mask the intonation errors. Every note, no matter where, is perfect...even if using a $100 "Chibson" :D

  • @Mickster , I'm your big fan.

    I know nothing about guitars or any other musical instrument so this was an interesting read.
    Basically what I understand from it goes somewhat along these lines: I know I need a hammer for a job and what you are telling me is that I need the right hammer for that job. So simple, so obvious, so natural, so true.
    Yet it only sometimes becomes so clear. I must be really mostly dumb :).
    Keep posting !

  • @Maciek said:
    @Mickster , I'm your big fan.

    I know nothing about guitars or any other musical instrument so this was an interesting read.
    Basically what I understand from it goes somewhat along these lines: I know I need a hammer for a job and what you are telling me is that I need the right hammer for that job. So simple, so obvious, so natural, so true.
    Yet it only sometimes becomes so clear. I must be really mostly dumb :).
    Keep posting !

    Appreciate it buddy but I'm feeling a bit crappy about hijacking the thread...I do this all too often.
    I first proposed this when the question was asked "what can the P2 be used for?".

    There are not many opportunities to turn a huge industry on it's head but this is one of them. I believe P2 has the horsepower and I know for a fact that we have resident wizards who could make it a reality. I am merely an "imagineer" BUT I was astute enough to purchase three of these things and they will never be available for sale.

    Until we have a P2 version.

    The key is to come up with a solution that can be adapted to every single guitar out there....the numbers are mind boggling.

    A part of me doesn't care because my secret will be exposed and the ladies might stop throwing their underwear at me but hey-ho :D:D

  • @Mickster said:
    A part of me doesn't care because my secret will be exposed and the ladies might stop throwing their underwear at me but hey-ho :D:D

    Man, THAT was a Diet-Coke-backwards-thru-the-nose moment, right there! 🤣

  • Christof Eb.Christof Eb. Posts: 1,197
    edited 2021-08-04 14:46

    Hi Mickster,
    in the second paper, page 17 figure 5 there are 2 AK5384VF adc chips 24 bit. https://www.digikey.com/en/htmldatasheets/production/755143/0/0/1/ak5384.html
    Says 100dB signal to noise. I have not yet found someone, who answered my question, what could be achieved with P2. Certainly not this quality.
    On page 15 about 50kHz sample frequency is named.
    So, sorry, this quality will not be possible to achieve with P2 smart pins.
    The 56724 is highly specialised for signal processing. 500 Million 24bit signed multiplications with add per second and can be operated with a battery. P2 cordic can achieve perhaps 180Million if loaded with all cogs multiplications and for short code but this is unsigned. "with all due respect" This is a different world.

    So I would appreciate if the discussion about your interesting project would continue in its own thread.

  • Boy am I red-faced....NOT! :)

    I always think out of the box and I believe that I know what's really important, regarding the concept.

    But I will respect your wish and make way for the flood of enthusiasm for your analyzer ;)

Sign In or Register to comment.