Post Go back to editing

ADAU1466:How can I retrigger GainEnvelope on every guitar pick attack?

Thread Summary

The user is working on an ADAU1466 SigmaStudio project to create a banjo-like decay for a hexaphonic guitar. The issue is that the GainEnvelope block does not retrigger on subsequent pick attacks while the string is still ringing. The solution involves using a Peak Envelope block, a Hamming differentiator, a comparator, and a OneShot to detect new attacks and retrigger the envelope. Adjusting the Peak Envelope hold time, comparator threshold, and OneShot duration helps mitigate false retriggers and ensures reliable attack detection, even with natural string amplitude fluctuations.
AI Generated Content
Category: Software
Software Version: SigmaStudio 4.7

Hello,

I am working on an ADAU1466 SigmaStudio project for a hexaphonic guitar.

My goal is to create a banjo-like decay characteristic, where the note decays much faster than a normal guitar while preserving the natural attack.

I am using a GainEnvelope block, but I have a problem:

The GainEnvelope starts correctly on the first pick attack. However, once triggered, it always completes its programmed cycle and cannot be retriggered by a new pick attack while the string is still ringing.
For example:

Pick a string
Let it decay to approximately -20 dB
Pick the same string again

Ideally, the second pick attack should restart the GainEnvelope from the beginning. Instead, the new note is affected by the remaining state of the previous envelope cycle, causing the second note to sound quieter than intended.

My question is:

What is the recommended SigmaStudio method for detecting every new guitar pick attack, including attacks that occur while the previous note is still sounding?

This is especially important for fast playing, where multiple notes may be picked before the previous note has fully decayed. The final goal is not note-on detection from silence, but reliable attack detection on an already ringing guitar string.

Is there a dedicated SigmaStudio block for this purpose, or is a custom transient/attack detector the recommended approach?

The platform is ADAU1466 running in SigmaStudio without an external MCU.

Any ADAU1466 / SigmaStudio specific suggestions would be greatly appreciated.

Thank you.

Thread Notes

Parents
  •      Hello,

         You've thought of an interesting and fun application!  To my knowledge there's no one block for this, yet SigmaStudio allows us to build complex functions with its basic blocks.  The project shown and attached below appears to work with its built-in test signal -- you'll need to test and perfect it with a guitar input.

         The Peak Envelope1 block finds the level of the incoming signal.  Next, the coefficient table inside filter FIR1 has been set up as a Hamming differentiator (Lyons, Understanding Digital Signal Processing, Third Edition, Section 7.1.2).  A rising signal produces a positive output, a decaying level causes its output to go negative.  Striking a guitar string produces a peak higher than the the level at the A input of comparator ABCD1, causing its output to go high.  This triggers OneShotR1, which produces a 1 millisecond pulse (set by Timer1).  SlewVol2 is set for a quick rise time and a slower fall time.  Adjust its fall setting for the desired "banjo" decay.  You'll find a table of rise and fall times corresponding to these settings at this link.

         The test signal has adjustable "strumming" rate and tone pitch.  It works over a reasonable range of these as well as with a range of input level.  Of course I'm curious about the results you get with a real-world input -- let us know!

    4137.Guitar-Banjo.dspproj

         Best regards,

         Bob

         

  • Dear Bob,

    Thank you very much for your professional help! I really appreciate it.

    I will definitely report back with the results.

    Please be patient with me, as this will probably take several weeks, or even a few months, before I can thoroughly test and evaluate everything.

Reply Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.