String pluck detector??

Started by markusw, March 07, 2007, 06:15:54 AM

Previous topic - Next topic

markusw

Quote from: slacker on March 18, 2007, 09:48:30 AM
Yours looks interesting, probably overkill for what I need though.

I needed a pluck detector that works as reliable as possible. To me it also looks a bit like overkill, considering it's complexity compared to the PLL per se. I just didn't find an easier way with the same performance..

QuoteCool stuff, I've been looking into pluck detectors recently to use with a ADSR controlled filter experiment.

Quote from: MR COFFEE on March 18, 2007, 11:34:31 AM
I presume you are planning to feed this into some kind of synthy gizmo with an ADSR or at least A-R controlling a filter and envelope?

Adding an ADSR (in combination with a VCA to add some envelope to the PLL signal) will be the next project.  ;) I'm not sure whether I'll also add an envelope filter because basically I could use my Meatball clone with it's send/return loop. On the other hand, having it all in one box (rack enclosure?) would be cool too.

For the moment I'm still planning to feed the PLL signal as a carrier into a 2-xfmr/4 -diode ring modulator, actually kind of a "harmonic ring modulator".
Next steps will be to add the divider circuits from the EMM synth on breadboard. It will just be slightly modified to divide by twice the values of the EMM synth. This gives me a factor 16 over the 3rd octave up to allow the use of an shift register for sine generation. Probably square wave is better for the ring modulator anyway but I just wan't to check out whether it might be an option to add.

QuoteLots of real world sounds have a glitch on the attack that gives it character. Synthesists used to put a little short burst of noise or other quasi-harmonically-related something on the start of Sax patches to simulate the way a real saxaphone attack sounds. Fed through the filter, it sounded pretty convincing - at least for the days before samplers came along. I think your glitch will do admirably. Could sound like a micromoog.

Your pluck detector can do double duty triggering the ADSR generator for the synth modules. Got any old SSM or CEM chips laying around? Or you can do discrete if you don't mind all the components. Could be a really cool and unique gizmo

Thanks a lot for your explanations!! Makes we want to get started with planning the next project  ;)

QuoteThe VCO tracking is much better than I had anticipated - especially with the bass input.

Sorry to dissapoint you.  :icon_redface:
This was just a cheap Strat copy, maybe with highs turned down. For bass the pluck detector as well as the PLL would need some cap adjustments. I think Craig Anderton did quite some tweaking to get the thing working with this performance. Probably just C4 (referring to the AMS-100 schem in Device) needs some tweaking to reduce ripple with bass a bit. What do you think?
I will give it a try with bass but I fear the glitch will still be very noticeable. At least too much to sound cool with the ring modulator.

QuoteThe sample sounds cool, the glitch at the start of the notes is fine by me

QuoteKeep up the good work and keep us posted.

Thanks for your motivation!  :)

Markus


markusw

I just gave it a try with bass. Basically, increasing C4 to 470n in the AMS-100 schem was sufficient to give a good performance for the  pluck detector.
Besides that I just had to increase the VCO timing cap and unfortunately the sampling time. So for faster runs the PLL doesn't lock in quick enough. For slower runs it works quite OK but the glitch is more noticeable than with guitar.  For some slow attack synth sounds I think it should work fine with bass too.

BTW, I tried to measure the sample time necessary with guitar for reproduceable lock-in by feeding the NE555 pluse into my sound card scope. It was around 120 ms. 
So playing 16th's at 120 bpm should be possible.  ;)

Markus


Processaurus

Quote from: markusw on March 18, 2007, 12:36:27 PM
For the moment I'm still planning to feed the PLL signal as a carrier into a 2-xfmr/4 -diode ring modulator, actually kind of a "harmonic ring modulator".

Hats off to you, this was something I've wanted to do for a long time.  A tracking ring modulator.  Very smart, because it makes the ring modulator useful for more than weird robot sounds (no offense, robots).  How about a footswitch for an option that makes the sample and hold simply hold its note indefinitely, so then you could have it sample a note, get the frequency, but then switch it to hold that note and play other notes in that scale for the different types of nutso (but still harmonic) harmonies with the ring modulator?

Not much to aid your valiant efforts, but its exciting to hear about, and your PLL synth seems to work surprisingly well.  You're in a position to throw in a killer tracking octave down if you wanted, since you've done the hard part already of extracting the fundamental (and even if it isn't the fundamental it would still sound more natural than something jumping around).  Though a combination of settings on the ring mod could probably deliver something along those lines, I like octave downs for the ring modiness anyway, not because bass players haven't been invented yet.

PS I like the glitch.  I haven't messed with PLL's yet but with the basics I'm guessing something could be worked out by adding a second PLL and just using the VCO, and drive that from the first PLL, but lowpass filter the CV so that the glitching and sharp transition between notes is a glide, kind of a portamento sound. 

Also here was an interesting post that came up today that could probably be of interest if you wanted to use your PLL but wanted a sine wave carrier.

markusw

QuoteHow about a footswitch for an option that makes the sample and hold simply hold its note indefinitely, so then you could have it sample a note, get the frequency, but then switch it to hold that note and play other notes in that scale for the different types of nutso (but still harmonic) harmonies with the ring modulator?

I planned to include a "hold" stomp switch.  ;) The LF398 with the 1µ cap and the 2000 ohm resistor should hold the frequency for some time. Reminds me that I want to check the droop rate of the LF398....

QuoteYou're in a position to throw in a killer tracking octave down if you wanted, since you've done the hard part already of extracting the fundamental (and even if it isn't the fundamental it would still sound more natural than something jumping around).

It's also planned to be included in the final version  ;) Basically, selecting the carrier will be similar to the EMM synth: -2, -1, 0, +1, +2 +3 octaves as well as 3rd and 5th.
Feeding a flip-flop-divider octave down as a carrier into the ring modulator already sounds pretty cool .

QuotePS I like the glitch.  I haven't messed with PLL's yet but with the basics I'm guessing something could be worked out by adding a second PLL and just using the VCO, and drive that from the first PLL, but lowpass filter the CV so that the glitching and sharp transition between notes is a glide, kind of a portamento sound.

Cool idea!  8) I think we're heading towards a rack unit.....or at least a pretty large box ;) Actually one opamp buffer followed by a low pass filter should be sufficient to drive the second PLL. Will just require some fine tuning to adjust the frequency of the second PLL.  What do you think?

QuoteAlso here was an interesting post that came up today that could probably be of interest if you wanted to use your PLL but wanted a sine wave carrier.

Quote from: markusw on March 18, 2007, 12:36:27 PM

Next steps will be to add the divider circuits from the EMM synth on breadboard. It will just be slightly modified to divide by twice the values of the EMM synth. This gives me a factor 16 over the 3rd octave up to allow the use of an shift register for sine generation. Probably square wave is better for the ring modulator anyway but I just wan't to check out whether it might be an option to add.


;)

Markus

gez

Quote from: Processaurus on March 19, 2007, 05:42:10 AM
  How about a footswitch for an option that makes the sample and hold simply hold its note indefinitely, so then you could have it sample a note, get the frequency, but then switch it to hold that note and play other notes in that scale for the different types of nutso (but still harmonic) harmonies with the ring modulator?

One of the problems I had when I did that was that the note tends to detune over time when it's held for any length of time.  Even using low-leakage switches.  Not significantly, but enough to cause tuning problems.  Also, with stringed instruments it's easy to play the note slightly sharp as you 'capture' it (slight bend/bit of vibrato without thinking) and that's what you're stuck with!  Not to deter anyone from doing this, just that the approach has limitations.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

Quote from: gez on March 19, 2007, 09:45:25 AM
One of the problems I had when I did that was that the note tends to detune over time when it's held for any length of time.  Even using low-leakage switches.  Not significantly, but enough to cause tuning problems.  Also, with stringed instruments it's easy to play the note slightly sharp as you 'capture' it (slight bend/bit of vibrato without thinking) and that's what you're stuck with!  Not to deter anyone from doing this, just that the approach has limitations.

Hey Gez,

thanks a lot for sharing your observations!!  :)
In order to reduce the droop rate I'm using a LF398 with a 1 µ hold cap and an additional 2k resistor between the Chold pin and the hold cap. If my calculations are correct, droop rate should be in the range of 5 µV/sec. Probably still too much. Will check this evening with a frequency counter.
What kind of sample/hold circuit did you use in your experiments?

Regards,

Markus


John Lyons

Way out of my thinking and knowledge but I just wanted to drop a quick note to say that I like what I've heard so far.
The ability to trck the pitch with a rimg mod makes it very usable.
Thanks for all the work on this. It's looking...er..sounding nice!

John

Basic Audio Pedals
www.basicaudio.net/

gez

#67
Quote from: markusw on March 19, 2007, 10:22:43 AM
Quote from: gez on March 19, 2007, 09:45:25 AM
One of the problems I had when I did that was that the note tends to detune over time when it's held for any length of time.  Even using low-leakage switches.  Not significantly, but enough to cause tuning problems.  Also, with stringed instruments it's easy to play the note slightly sharp as you 'capture' it (slight bend/bit of vibrato without thinking) and that's what you're stuck with!  Not to deter anyone from doing this, just that the approach has limitations.

Hey Gez,

thanks a lot for sharing your observations!!  :)
In order to reduce the droop rate I'm using a LF398 with a 1 µ hold cap and an additional 2k resistor between the Chold pin and the hold cap. If my calculations are correct, droop rate should be in the range of 5 µV/sec. Probably still too much. Will check this evening with a frequency counter.
What kind of sample/hold circuit did you use in your experiments?

Regards,

Markus



OK, I've finally got round to looking at your circuit in detail and refreshing my memory as to what it is you're trying to do (and actually doing by the sound of things).  Because your schematic is a little disjointed it's not easy to follow (for me at any rate), but from my understing based on your notes, the PLL is already sustaining indefinitely and will only change frequency when another 'note event' occurs.  Yes?  If that's the case, all you have to do is disable the 'pluck detector' (break the signal to it with your switch) so that it can't change anything.

You're already using a 4066 for the sample and hold, which has 'infinite' impedance when closed, so providing you don't use an electrolytic for the 1u cap (my preference would be for a larger resistor and smaller cap as they tend to be lower leakage) it should keep pitch for a reasonable amount of time.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

swt

i've built the ams 100 in perfboard, the whole project, and the triggered was too slow. Can you tell me what did you change to get fast response?. The filter is really good, and the vca/ring too. Has problems with the lfo square wave though (ticks, assymetry).

markusw

Quote from: gez on March 19, 2007, 01:22:23 PM

OK, I've finally got round to looking at your circuit in detail and refreshing my memory as to what it is you're trying to do (and actually doing by the sound of things).  Because your schematic is a little disjointed it's not easy to follow (for me at any rate), but from my understing based on your notes, the PLL is already sustaining indefinitely and will only change frequency when another 'note event' occurs.  Yes?  If that's the case, all you have to do is disable the 'pluck detector' (break the signal to it with your switch) so that it can't change anything.

You're already using a 4066 for the sample and hold, which has 'infinite' impedance when closed, so providing you don't use an electrolytic for the 1u cap (my preference would be for a larger resistor and smaller cap as they tend to be lower leakage) it should keep pitch for a reasonable amount of time.

Hey Gez,

thanks for your help!  :)
Regarding the hold switch I thought of connecting CV1 to gnd for the manual hold (maybe with a 1k resistor between the output of the NE555 and CV1). Bad idea??

I also tried to just use the 4046 loop filter's cap for the sample/hold but voltage was dropping too fast. Probably this ist just a breadboard artifact, don't know. The LF398 keeps the voltage better but still droop rate is higher than calculated. Maybe it will improve on PCB? Any ideas?

Quote from: swt on March 19, 2007, 01:57:52 PM
i've built the ams 100 in perfboard, the whole project, and the triggered was too slow. Can you tell me what did you change to get fast response?. The filter is really good, and the vca/ring too. Has problems with the lfo square wave though (ticks, assymetry).

Hey swt,

basically I breadboarded the AMS-100 pluck detector as in the schem. It was just adapted to a single 12V supply.
Referring to the original schem in "Device":

* R2, R11 and R14 were replaced by a 20k pot with pins 1 and 3 connected to V+ and gnd
* The 20k pot was then adjusted to give Vref at pin 13 of IC1B
* Pins 9 of IC1B and IC3C were connected to Vref
* R12 is 8.2k and R27 is 20k (I didn't have any 10k trim pot left)
* R40 was connected to Vref instead of gnd
* R18 was connected to Vref instead of gnd
* D5 was connected to Vref instead of gnd
* R10 was connected to Vref instead of gnd
* There is a bug in the schem: IC4A pins 1 and 2 should be labelled the other way round
*Vref is done with a 2x 10k voltage divider and an opamp buffer


The output of IC4B was fed into another comparator (see my schem). R14 and R15 (in my schem) actually is a 20k pot. The pot was set to bias the non-inverting input of U6 slightly higher than the output of the opamp in front of it (without a signal).


Otherwise, I followed Craig Anderton's advices on using accurate components for the critical parts and on adjustment of the thing.

Hope this helps  :)

Regards,

Markus


gez

#70
Quote from: markusw on March 20, 2007, 03:40:29 AM
Regarding the hold switch I thought of connecting CV1 to gnd for the manual hold (maybe with a 1k resistor between the output of the NE555 and CV1). Bad idea??

A 1k resistor on the output of the 555 is going to waste a lot of current.

If it were me, I'd connect a resistor (100k shouldn't present a problem - famous last words!) between the output of 555 to input of 1st inverter and take that input as being the C1 ref point.  Then, if you connect a smaller resistor from that point to ground with a momentary , it'll form a divider with the larger resistor and pull the switch's control gate down.

Even better (the low current option and less delay) would be to use two gate logic instead of those inverters, so that the gate functions as an inverter with one input high, but when pulled to ground with a momentary switch the device's output switches everything as you want it.  Too early in the morning to tell you what to use, so I recommend a scan thru Don Lancaster...

   
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

Quote from: gez on March 20, 2007, 04:46:48 AM

A 1k resistor on the output of the 555 is going to waste a lot of current.

If it were me, I'd connect a resistor (100k shouldn't present a problem - famous last words!) between the output of 555 to input of 1st inverter and take that input as being the C1 ref point.  Then, if you connect a smaller resistor from that point to ground with a momentary , it'll form a divider with the larger resistor and pull the switch's control gate down.

Even better (the low current option and less delay) would be to use two gate logic instead of those inverters, so that the gate functions as an inverter with one input high, but when pulled to ground with a momentary switch the device's output switches everything as you want it.  Too early in the morning to tell you what to use, so I recommend a scan thru Don Lancaster...

   

Thanks a lot!
Didn't realise that a 1k would draw too much current. The "two gate logic" variant sounds far more elegant.
Will have a look at Lancaster.....

Markus


gez

#72
Quote from: markusw on March 20, 2007, 05:03:51 AM

Didn't realise that a 1k would draw too much current. The "two gate logic" variant sounds far more elegant.


The draw won't be constant, you'll get 9mA spikes (assuming a 9V supply: can't remember what you're using) everytime a note event occurs for as long as the switch is depressed.

You shouldn't need anything more that a NOR or NAND gate (can't remember which would be best).
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

#73
Marcus, I'm probably missing something, but I'm wondering why you have the 555 there at all.

If you look at the section on 'half monostables' in Lancaster's CMOS Cookbook you'll see that C6 and R23 are enough to do the job of providing a pulse of the duration you require (though you'll probably need to tweak values).

If you use those components in conjunction with a dual-input logic gate you'll be able to ditch the 555 and have the ability to disable the pulses to the switches so that the sample and hold is always 'locked'.  Plus you'll be able to debounce the switch easily.

PS  Whenever you have an arrangement such as C6 and R23 it's always best to wire a resistor between the junction of those two components and the input of the logic device you're using, to protect said device.  Although you obviously haven't damaged your 555 as it's working, I have damaged a few logic chips in my time by being lazy/forgetful and not using this protection.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

gez

Quote from: gez on March 20, 2007, 04:46:48 AM
Even better (the low current option and less delay) would be to use two gate logic instead of those inverters,

That should have read 'two input logic'
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

markusw

Quote from: gez on March 20, 2007, 05:39:51 AM
Marcus, I'm probably missing something, but I'm wondering why you have the 555 there at all.

If you look at the section on 'half monostables' in Lancaster's CMOS Cookbook you'll see that C6 and R23 are enough to do the job of providing a pulse of the duration you require (though you'll probably need to tweak values).

If you use those components in conjunction with dual-gate logic you'll be able to ditch the 555 and have the ability to disable the pulses to the switches so that the sample and hold is always 'locked'.  Plus you'll be able to debounce the switch easily.

PS  Whenever you have an arrangement such as C6 and R23 it's always best to wire a resistor between the junction of those two components and the input of the logic device you're using, to protect said device.  Although you obviously haven't damaged your 555 as it's working, I have damaged a few logic chips in my time by being lazy/forgetful and not using this protection.


Thanks a lot!

Didn't think about this way of pulse stretching. I used the 555 because it provides an easy way of adjusting the sample time. So if one would just use C6 and R23 for determining the sample time one would simply replace R23 with a pot so that sampling time can be tweaked??

Thanks also for warning me about the missing protection resistor at the input of the 555. Think I should read the Lancaster book  ;)

BTW, from the 4070 to the input of the 4046 there is also a resistor I forgot to add to schem. IIRC it's a 10k. Without the resistor the PLL doesn't work that great. Any ideas why?

QuoteThat should have read 'two input logic'

OK, thanks!  :)

Markus


gez

Quote from: markusw on March 20, 2007, 06:12:46 AM
So if one would just use C6 and R23 for determining the sample time one would simply replace R23 with a pot so that sampling time can be tweaked??

Sure, or you could calculate the value needed.  Whatever is easiest.


QuoteBTW, from the 4070 to the input of the 4046 there is also a resistor I forgot to add to schem. IIRC it's a 10k. Without the resistor the PLL doesn't work that great. Any ideas why?

I'd have to look at the 4046 schematic (and your schematic) in detail.  What value is the resistor?  Off the top of my head though, no I can't think why that would be.

If you've got a 4093 (think you said you had one) it could replace the 4070 and your two inverters, plus you've now got your 2 input logic gate for disabling the pluses to the sample and hold circuitry.
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

slacker

#77
Or if you haven't got a 4093 you could use a 40106 and some diodes and a resistor to make a 2 input gate. That would also give you 6 inverters in total, which might be able to replace other things as well.
You probably already know all about diode logic but if not have a look here.
http://www.musicfromouterspace.com/analogsynth/mmlogic.html


markusw

QuoteIf you've got a 4093 (think you said you had one) it could replace the 4070 and your two inverters, plus you've now got your 2 input logic gate for disabling the pluses to the sample and hold circuitry.

Thanks!  :) Sounds great. Will check it out for sure. Would be cool to reduce the number of chips!

QuoteOr if you haven't got a 4093 you could use a 40106 and some diodes and a resistor to make a 2 input gate. That would also give you 6 inverters in total, which might be able to replace other things as well.
You probably already know all about diode logic but if not have a look here.
http://www.musicfromouterspace.com/analogsynth/mmlogic.html

I have a 4093. Nevertheless, thanks!
"Know" about mm logic is probably not correct, "heard of", yes  ;) Will check it out more thoroughly now... Thanks for the link!

Markus

markusw

Just had a brief look at the 4093 data sheet. It includes the calcs for exactly what you suggested. A 1µ cap plus a 100k to 1 Meg pot should be fine to tweak the sample time.
Also it would be retriggerable which I prefer anyway. So incase you would play faster than the "sample time" it would extend the sample time (if I understood it correctly  ;) ).

Markus