envelope/edge detection

Started by artifus, February 27, 2011, 02:14:14 PM

Previous topic - Next topic

artifus

looked at dr. q, nurse quacky, sea moon, dod 440, etc., found this and stumbled upon stuff like this and am playing with triggering led's/controlling ldr's, etc.

what's your simplest, dirtiest, most minimalist method of lighting an led from the initial attack of a guitar/bass/input? so far going down the passive (cap) hpf route but wondered if anyone had any pearls of wisdom/experience/advice to impart. once lit i thought a simple pot/cap for decay. what about further envelope manipulation? ie - initial attack triggers led as does simultaneously triggered (pitch related?) osc/pulse which subsequently effect led. hope that makes sense. any thoughts?

R.G.

Quote from: artifus on February 27, 2011, 02:14:14 PM
what's your simplest, dirtiest, most minimalist method of lighting an led from the initial attack of a guitar/bass/input? so far going down the passive (cap) hpf route but wondered if anyone had any pearls of wisdom/experience/advice to impart. once lit i thought a simple pot/cap for decay. what about further envelope manipulation? ie - initial attack triggers led as does simultaneously triggered (pitch related?) osc/pulse which subsequently effect led. hope that makes sense. any thoughts?
A passive guitar or bass does not have enough voltage or power from the pickups to drive an LED to light up in almost all cases. The most minimal way to do this is to amplify the pickup in some way to drive the LED. Transistors work, but an opamp circuit has the best chance of doing it with the simplest and smallest circuit.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

artifus

thanks r.g. i'm sorry i wasn't clear enough in my original post that i had taken that as a given. working with op amps and looking for the most efficient method of detecting the very edge of a plucked note/strummed chord to trigger the led without subsequent input interaction as the rest of the led's envelope would be dictated by c/r mentioned. thinking initial pick attack contains most hf hence hpf. maybe a timer (cap/555?) to delay retrigger. sorry. just thinking out loud - back to the books and breadboard. thanks for the reponse.

deadastronaut

do you mean sound to light?..initially.!..

a 386 with leds on the output works fine...lights up when plucked..

https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

artifus

i've played with led's and 386's a few times with mixed results. often work for a few seconds (if at all) and then fail over time.

Gurner

You requirements still aren't that clear - you want a guitar signal to trigger an LED, but you don;t want the fading guitar signal to turn the LED off....rather a 555 timer arrangement? (which on the face of it, sounds like a hammer to crack a nut)

So can you outline exactly when you'd like the LED to turn off in relation to the guitar pluck that turned the LED on?

artifus

yeah sorry, being a bit vague, rushing and trying to do too many things at once. ok. been playing with triggering led with guitar and notice sustain and bass keep led lit after initial attack of note/chord resulting in random jitter/flicker on fade and was thinking about taking just the edge of the signal to trigger the led, as per norm, but from that point on have a pot defined decay/fade and/or waveform take over. with a view to applying to wah/filter/whatever pot you wanna hack it into. hope that makes sense. need sleep. should sleep. thanks.

Gurner

#7
If you don't want to go to the LM386 route (which is somewhat blunt, but at least it's condensed!),  I've just knocked you up a rough 'n ready eagle schematic which IMHO  outlines the minimum for what you need....

(I've asumed you want to use a single 9V supply, so the VCC/2 means you need to connect all those points to about 4.5V )



The opamp amplifies your signal (R2 & R3 set the gain, make R3 smaller for more gain), the diode rectifies it (only positive cycles get through), R4 sets the attack (in conjunction with C2...larger means less attack...ie slower for your LED to light up after you've plucked a string), the comparator trimpot sets the level at which the LED actually lights.

How long the LED takes to extinguish is dictated by R6.....( release), the lower in value you make R6, the quicker the LED will go out after you muted your string...& vice versa.

R.G.

There's also the "note processing" article at GEO, which outlines something very much like what you mention Gurner.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

petemoore

  Perhaps some signal limiting via clipping diode's for the Env. Input to control the LED driver input voltage will also limit the output current...enough to work the goal and be reliable ? ..dunno, just thinking out loud...
  Another way might be to limit the PA current or voltage input to the 386, using the 386 itself and it's 'weak' power supply as 'current limiter' ? [you'd clip the 386 but it's not in the signal path, who knows what the LED'd make of it.
Convention creates following, following creates convention.

artifus

thanks for all the input everyone. lot's to read, think about and experiment with. let you know how i get on.

deadastronaut

#11
Quote from: Gurner on February 27, 2011, 05:00:34 PM
If you don't want to go to the LM386 route (which is somewhat blunt, but at least it's condensed!),  I've just knocked you up a rough 'n ready eagle schematic which IMHO  outlines the minimum for what you need....

(I've asumed you want to use a single 9V supply, so the VCC/2 means you need to connect all those points to about 4.5V )



The opamp amplifies your signal (R2 & R3 set the gain, make R3 smaller for more gain), the diode rectifies it (only positive cycles get through), R4 sets the attack (in conjunction with C2...larger means less attack...ie slower for your LED to light up after you've plucked a string), the comparator trimpot sets the level at which the LED actually lights.

How long the LED takes to extinguish is dictated by R6.....( release), the lower in value you make R6, the quicker the LED will go out after you muted your string...& vice versa.


old thread i know but i'll blow the dust off it... :)

@G: hi man, so this is an envelope detector then...if i rig this up to a wah filter led/ldr i have an envelope filter if i understand ya!...R4 could be an  attack  pot....?.........R5 trim sensitivity?...correcto!.. :)


erm....values to kick of with? ;)
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

IC1A amplifies the signal, D1, R4 (attack), C2 & R6 (release) for the evelope detect part ...the latter part is a comparator & I glued it on to the end because artifus's requirements we to light up an LED whe a signal level is met (so I wouldn't recommend using the bits to the right of R6).

Re values R4, would need to be lowish value (something about 220R-ish might be a reasonable start), C2 about 4.7uf to 10uf  (to start)& R6 something like 1k-2k (you'd need to experiment), what I would do if you want to use that voltage to control something is tag a voltage follower to the right of R6....that stops an follow on circuit loading down the control voltage that sits on C2.

deadastronaut

Cheers G:   like this?. (regardless of values)   i kept the numbering the same though for easy reference..



or should ther be a tranny on the end with the led?.
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

Sort of!

A couple of immediate obs...

All points on my circuit were at Vref (i.e. VCC/2 ....so no grounds involved)...therefore C2 & R6 goto Vref as does the cathode of the led.....tbh, the cathode should really go to Vref-fwd voltage of the led. So if your led is red with a fwd voltage of 2V, therefore the cathode should sit at vref -2V (the original cct I furnished was to either switch an led on or off, but what you probably seek is a nice smooth fade from max brightness to extinguished)...now that I can see what your ultimate goal is, it's probably not the way to approach.

The Vref should be low impedance (two resistors won't cut it), therefore feed the junction of R7 & R9 into a voltage follower....the output of that becomes your vref

there should be a resistor in series with the LED

deadastronaut

image above updated...probably wrong still though.. ;D

excuse my ignorance!.. :)
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

Quote from: deadastronaut on October 15, 2012, 08:49:16 AM
image above updated...probably wrong still though.. ;D

excuse my ignorance!.. :)

The diagram looks better now, but like I said earlier, the Vref (VCC/2) needs to be low impedance....so rather than connect everything back to the junction of R7 & R9, that junction should feed into a voltage follower & then everything connects to the output of the voltage follower.

R5 could probably be lower...it'll depend on the led & ldr you are driving.

R8 & R9 need to be 1M.

R2 should be about 10k (this would give a gain of about 10x)

deadastronaut

#17
hmmm....image updated,  don't laugh!.. ;D :icon_redface:


btw my internet is being a right b....d.......keeps cutting off.. ::)
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

#18
Quote from: deadastronaut on October 15, 2012, 09:26:56 AM
hmmm....image updated,  don't laugh!.. ;D :icon_redface:


btw my internet is being a right b....d.......keeps cutting off.. ::)

Looking better....R1 & R8 still need to be at least 1M though (assuming you are feeding a guitar straight into the circuit), then assuming that change C1 needs to be at least 10nf (but I'd shoot for 33nf or higher).

I'm still non too certain about the use of the circuit for your intended application...obviously this is only a simplae half wave envelope detect circuit so there'll be a fair degree of AC ripple present on the LED anode....whether that has any audible impact to the circuit you are driving would need to be ascertained.

A lot of components to tweak to suit ...if more gain needed increase R2, if less attack needed increase (slower response) increase R4, if a snappier release needed decrease R6 (though there's a limit how low you can really go here), if led too dim when guitar played R5 (or increase circuit gain by making R2 larger), etc, etc....so this is very much just to get you in the starting zone...also once you establish the best values (using swap & replace methods!) you could put pots in place for attack & release. 

deadastronaut

updated:

i'll give it a go and see if the led, 'ripples' ..flickers on the dying out...

so if i swap R4 and R6 for pots i should be able to adjust attack,release?...
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//