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

Guitar string processor?

Hex pickup (one sensor per string).

Sampling: 8KHz

I need to sample the frequency, modify it and output the modified signal with minimal latency.

Would the P2 be up to this?

«13

Comments

  • PublisonPublison Posts: 12,366
    edited 2020-01-07 19:32
    Looking to do a MIDI interface?
    https://www.roland.com/us/products/gk-3/
    I had a Godin with that kind of pickup, but I hated the 13 pin interface.
  • I once suffered a $150 parking ticket because I lost track of time while in the [then] Carvin store in Hollywood trying one of the guitars with MIDI output -- very cool. I have been watching the P2 and wth the arrival of my demo board will start working with it; specifically for audio-oriented projects.
  • JonnyMac wrote: »
    I once suffered a $150 parking ticket because I lost track of time while in the [then] Carvin store in Hollywood trying one of the guitars with MIDI output -- very cool. I have been watching the P2 and wth the arrival of my demo board will start working with it; specifically for audio-oriented projects.

    Jon,
    What MIDI connector was Cavin using? 5 or 13 pin.
    I just sold my Casio MG-510 recently that had the only 5 pin standard MIDI connector that I know of.
    https://www.ebay.com/itm/352887871058

  • PublisonPublison Posts: 12,366
    edited 2020-01-07 19:34
    Mickster, I hope we are keeping on topic. It all relates I believe. I think with the smart pins, it is a reality.
  • Ahle2Ahle2 Posts: 1,179
    > @Mickster said:
    > Would the P2 be up to this?

    Without a doubt... 6 strings @ 8 kHz and realtime MIDI out shouldn't make the P2 sweet using a single cog in PASM . Goertzel, asynchronous UART, and ADC on every pin is available in hardware. This would actually be a very good demonstration of what the P2 can do using a single cog. I think you could go a lot higher than 8 kHz for better precision.
  • Ahle2Ahle2 Posts: 1,179
    Did you mean a "common" guitar processor with 6 induvidual channels? Yes that sound be doable as well. I think quite advanced processing at hifi frequencies in a single cog should be possible.
  • Publison wrote: »
    JonnyMac wrote: »
    I once suffered a $150 parking ticket because I lost track of time while in the [then] Carvin store in Hollywood trying one of the guitars with MIDI output -- very cool. I have been watching the P2 and wth the arrival of my demo board will start working with it; specifically for audio-oriented projects.

    Jon,
    What MIDI connector was Cavin using? 5 or 13 pin.
    I just sold my Casio MG-510 recently that had the only 5 pin standard MIDI connector that I know of.
    https://www.ebay.com/itm/352887871058

    As I recall, 13. I don't think Kiesel Guitars makes those anymore.

  • Nothing to do with MIDI.

    That horrible Auto tune that we hear on every new pop song? Well the big name is Antares.

    Well they did the same for guitar. I have 3 of these things and absolutely love them.

    The problem is that the one developer retired and so they killed the product.

    The strings might be perfectly tuned but any pressure on the fret and the note goes slightly sharp. The processor figures what the frequency is supposed to be and corrects it.

    I can also strum all strings open, followed by a button press and the processor compensates for any out-of-tune strings.

    The possibilities are endless; one can be playing in standard tuning and part way through the song, switch to an open tuning and kick-in with the slide.

    I didn't think for a minute that I had a critical ear for this stuff but it's almost painful to go back to a regular guitar because perfect intonation is next to impossible to achieve at any price.

    So, analog in, analog out.
  • Ahle2Ahle2 Posts: 1,179
    But you would need 44100 Hz or better. 8 kHz is telephone quality. Depending on the type of pitchbend technique, I would say it's possible. The easiest way would be a ring buffer with independant read and write pointers using a phase accumulator design. You would have to handle cases where the read or write pointer "drives past" the other in some way, to get rid of the clicks. There are different ways to do this without too much CPU load.
  • Maybe this theoretical paper is for interest.
    I download it years ago.
    Must research the source.
  • cgraceycgracey Posts: 14,151
    I used to make pitch benders. You just need an ADC, a DAC, and some memory and a bit of processing power. Flanging works like pitch bending, with the buffer head moving at a constant rate, while the buffer tail follows at variable rate, with some mixing of the tail data into the head data.
  • Ahle2 wrote: »
    But you would need 44100 Hz or better. 8 kHz is telephone quality. Depending on the type of pitchbend technique, I would say it's possible. The easiest way would be a ring buffer with independant read and write pointers using a phase accumulator design. You would have to handle cases where the read or write pointer "drives past" the other in some way, to get rid of the clicks. There are different ways to do this without too much CPU load.

    The 8KHz was a starting point because this is the sampling rate of the Antares.

    But if I understand correctly, 44.1KHz is required to cover the full range of human hearing but a guitar? Aren't we talking more like 1.2KHz and therefore a Nyquist of ~2.5KHz?
  • potatoheadpotatohead Posts: 10,261
    edited 2020-01-08 01:27
    There are too many harmonics. The important ones peak at 8 to 10khz.

    For acoustic, 12 to 16khz minimums, for that "open sound", scrapes, touches, knocks on the body and strings.

    Just the range of fundamental sounds can hit 2khz, fwiw.

    Frequency, not sample rates.
  • Ahle2Ahle2 Posts: 1,179
    edited 2020-01-08 12:16
    Well, you will get quite severe audible aliasing distortion at a sample rate of 8 kHz. An analog bandwith of 8 kHz is something totally different. You would have to have an almost perfect [s]bandstop[/s] brickwall filter at half the sample rate (4 kHz) on the analog input and output, to be able to get rid of the aliasing. Then you would end up with an analog bandwidth of 4 kHz. But that would sound very muffled. A guitar is full of overtones, even beyond human hearing.
  • Maybe the idea is to capture the fundamental frequency, and feed it into Karplus-Strong?
  • Maybe the idea is to capture the fundamental frequency, and feed it into Karplus-Strong?

    Isn't that more for synthetic reproduction of string plucking (I had to go read-up) :lol:

    This is the Peavey guitar with the integrated Antares Auto-tune.
  • Wasn't there a "closed loop" tuning system some time ago? I mean with servos attached to the string tension screws?
  • ManAtWork wrote: »
    Wasn't there a "closed loop" tuning system some time ago? I mean with servos attached to the string tension screws?

    Yeah, Tronical. I might stick one on my Telecaster. Not as good as Auto-tune though because you can't switch on-the-fly during a song and it does nothing for bad intonation or correct for finger pressure making the notes sharp. Nor does it do the other cool stuff like virtual-capo, string doubling, pickup emulation, etc.

  • "Daisy is an embedded platform for music. It features everything you need for creating high fidelity audio hardware devices. Just plug in a USB cable and start making sound! No soldering required.

    Daisy features two channels of line level audio IO on-board, thanks to its high fidelity stereo audio codec(AKM) with up to 24-bit, 192kHz. Adding additional channels of audio is easy using standard digital audio protocols such as TDM, I2S, PDM, and S/PDIF which are broken out to the pin headers.

    There is full support for USB MIDI IN and OUT through its onboard micro USB port and the USB pins on the header bank. It also features UART pins for connecting MIDI through 5 pin DIN, or TRS cables.

    USB and Connectivity
    With full OTG-support as host and device on the built-in micro USB port, along with additional pins for a second port, the Daisy can become any USB device your heart desires. Build an audio interface, MIDI controller, or sample player! On top of that, the built-in micro USB can also be used for powering, programming and debugging the Daisy.

    There are 32 total GPIO pins which can be configured as standard GPIO or one of several alternate functions including 16-bit Analog to Digital Converters(x12), 12-bit Digital to Analog Converters(x2), SD Card interfaces, PWM outputs, and various serial protocols for connecting to external sensors and devices including SPI, UART, I2S, and I2C.

    In addition to being powered through the onboard micro USB port, Daisy can be powered through a dedicated VIN pin on the header bank. It has an extremely wide input range of 4V to 17V and current consumption is low enough that you can even power it from a battery!"



    https://www.kickstarter.com/projects/electro-smith/daisy-an-embedded-platform-for-music/description

    How many features of this Daisy module can the P2 do? It has a C++ library

    If the P2 can't do it you can also just interface a p2 to a Daisy

  • @"Bob Lawrence (VE1RLL)"

    I'll check it out, always interested in digital audio. I have lots of this stuff and in fact I liked one particular processor so much that I now have six identical units.

    But this is not what I'm Prop-osing :smile:

    Guitar players are constantly having to re-tune the instrument....it can be a pain during a performance. Furthermore, not all tunes are played in standard tuning. If I want to sound like Keith Richards when playing Brown Sugar, for example, I need to tune to "open G" tuning.
    Many performers carry multiple guitars for this reason.

    The horrible Auto-tune that we hear way too much of on modern music vocals? Well the big name is Antares. Antares got together with Peavey and built a guitar using similar technology. There is a piezo pick up for each string. The string tension (tuning) can be way off but the MCU compensates for this and outputs the corrected frequency. This is not pitch-to-MIDI conversion.

    This also means that I can instantly switch to an alternate tuning.

    The developer retired and so the product was discontinued....very few guitarists were even aware of its existence.
  • Hi,
    This a very interesting project. I think the P2 can shine here, because it should be possible to connect 6 independent 24bit adcs.
    I think, that the pitch shifting is not the most difficult part. It could be done using different sample rates for writing and reading of a short buffer together with some interpolation.
    Finding the 6channel piezo hardware, doing a really good tuner to find the deviation will be more difficult.
    The most difficult part will be to get a real fine magnetic pickup sound from the corrected piezo signal. Together with the frequency response there is completely different dynamic behavior. I had to learn, that the pickup is the really important part to make the specific sound of a guitar. (forget "tone wood")
    Are there single string magnetic pickups somewhere?
  • Mickster wrote: »

    On the pickup subject... I would point out that Chip's 'Fun with Goertzel' looks like it runs at a 1 khz sample rate, and that appears to be randomly chosen. I have done no math on this, and it is still half-baked.. but the sample rate can probably run MUCH faster... The strings are metal, why not try to do a pickup that can be etched on a PC board? Maybe even end up with something superior... You would only need 1/2 of the demo per string.

  • cgraceycgracey Posts: 14,151
    The HDMI spectrum program samples at 30.5KHz, or 250MHz/8192. The 8192 is from the 14-bit SINC2 filtering.
  • Mickster wrote: »

    The tech docs show a connection from a summing board to one output. I guess you could pull a signal from each pickup since they show 6 wires.
  • Hmmm, Maybe I need to find time to try this...
  • Welcome to the forum, RichardB!
  • RichardB wrote: »
    Hmmm, Maybe I need to find time to try this...

    Welcome to the forum!
  • I'd like to play but $200 for the LR Baggs T-bridge would cut into my P2 playing hardware. :) Not sure it would fit on my Ibanez Mikro anyway. (Last of my 13 guitars). :(
  • MicksterMickster Posts: 2,693
    edited 2020-03-09 21:05
    The easy way in would be to purchase a Peavey AT-200 on eBay.

    There are quite a few available from Japan for ridiculous money but occasionally, they come up locally.

    Simply remove the existing controller board and replace it with the P2 development unit.
    If the project is a non-starter, replace the original board and it can be re-sold.

    Here's what happened: The base model has limited firmware and the guitar itself is nothing fancy (Peavey Predator).

    Included with the base firmware

    Auto-tune (for me, this alone is worth the cost).

    Another cool feature is "solid tune", meaning that any note played anywhere on the fretboard is perfect. This is impossible to achieve with standard guitars, no matter the price. Even with the best intonation calibration, the fact that one exerts pressure on the string/fret, causes the note to go sharp. Not with this system.

    Some of the more common alternate tunings (open-G, open-D, Drop-D, DADGAD and more)

    Optional firmware expansion packs

    Acoustic emulation
    12-string emulation
    Various pick up emulation
    Virtual capo up (no capo required)
    Virtual capo down (impossible on conventional guitar)
    Any tuning whatsoever

    ..... And many other possibilities.

    Unfortunately the expansion packs were pretty pricey when at the end of the day, the physical guitar is only a cheap Peavey Raptor or Predator or something.
    This wasn't received too well.

    https://www.ebay.com/itm/Peavey-AT-200-Auto-Tune-Guitar-Auto-Tune-Standard-Alternate-Tuning/164111033080?hash=item2635c7a2f8:g:dZIAAOSwnm1eYEw1

    Edit: Note: To avoid confusion; this guitar is also equipped with regular humbucker pick ups. The piezos are part of the bridge. Therefore it can be used as a conventional electric, albeit without Auto-tune.

    Another possibility is the Line6 Variax.
    These also have the built-in piezo sensors and their own electronics. The Variax processor is more about emulating other guitars and does a very good job but doesn't do Auto-tune.

    The Variax 300 should be available on ebay for a couple of hundred.
Sign In or Register to comment.