Introducing the DiSH: A Digitally-Controlled Sample/Hold

Started by Ripthorn, May 03, 2020, 05:24:37 PM

Previous topic - Next topic

Ripthorn

I have always had an odd fascination with sample/hold effects. I thought about building one, but there are a lot of stories of the difficulties around the Maestro FSH-1 DIY builds. I saw the Subdecay Proteus and thought that was cool, but I wasn't going to drop that much on a pedal I may not use too much. Fast forward to a little over a year ago when I mangled my hand in a weightlifting accident and I couldn't play or be in the woodshop, I decided to dive into microcontrollers. I realized quickly that using a microcontroller in the control-voltage portion of the FSH-1 would do basically everything the Proteus does. I decided to change a couple things, such as no envelope-controlled filter (I wouldn't use it) and the addition of a pattern setting where I could set the pattern in the code to be whatever I wanted for interesting rhythmic effects. After a few board spins to fix dumb stuff, I proudly present the DiSH (Digital Sample/Hold).

I have more details, build documentation, schematics, code, etc. located here: https://scientificguitarist.wixsite.com/home/the-dish, free for anyone to use or play around with. This is not for commercial use, though. Have fun!

Video Demo:

Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

aron

Sounds great! I have the Oberheim VCF which is basically the same as the Maestro I think. Great job!!

soggybag

Nice work. I'm fascinated with S&H myself. Looks the right knob is the filter depth. The left looks like a rotary encoder with tap tempo? does turning it divide the rate? What's the left switch for?

I've built a couple never made one that I thought was perfect. I built the Maestro clone from Tone Pad and worked pretty but had a couple issues. I built the Mad Bean version but it didn't at all I'm still not sure why. I built another with Atiny MC. I used the ATiny to generate random voltages and used the color sound inductorless wah as filter. It worked okay but didn't get a great range.

Ripthorn

Quote from: soggybag on May 03, 2020, 10:32:24 PM
Nice work. I'm fascinated with S&H myself. Looks the right knob is the filter depth. The left looks like a rotary encoder with tap tempo? does turning it divide the rate? What's the left switch for?

I've built a couple never made one that I thought was perfect. I built the Maestro clone from Tone Pad and worked pretty but had a couple issues. I built the Mad Bean version but it didn't at all I'm still not sure why. I built another with Atiny MC. I used the ATiny to generate random voltages and used the color sound inductorless wah as filter. It worked okay but didn't get a great range.

The right knob is the same as the "sensitivity" control on the Maestro, so yeah, filter depth. The left is a rotary encoder (couldn't find matching knobs where one had no indicator). The switch on the rotary encoder changes the tempo divisions: base tempo, double speed, quadruple speed, and pattern. The left switch is the tap tempo switch.

I'm rather pleased with how quiet the noise floor is on this. Even without playing, it's only very faint noise that can be heard. I'm not sure if there is such a thing as a perfect sample/hold, but I am really digging this one!
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

soggybag

Great work. What did you use for the filter? Is it OTA or op-amp? Or is it all digital?

Kevin Mitchell

#5
He said it's an FSH-1 with a microcontroller supplying CV. So it's very likely a LM13700.

Edit; found the build doc. It's my take on the filter, revised from nocentelli's schematic/idea. (using the OTA's buffers ommiting the JFETs). I wont link my Mini Sample Hold project here but it's obviously the same filter design - just a bit more feedback available.

Cool. If you're going to rip someone else's idea here at least give them a shout out (nocentelli really).

Great work though. Impressive and way better than the classic analog SH

-KM
  • SUPPORTER

Ripthorn

I actually had no idea that you or Nocentelli had done the work on this. I primarily referenced the schematic in the madbean build documents for the analog section. I thank you for your work and for pointing this out to me. I will update the build documentation accordingly.
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

ElectricDruid

Nice work, Ripthorn.

I'm also a fan of uP-controlled-filter gizmos, and of S&H effects in particular. I love the way as soon as you get a uP controlling something, the final result becomes very open-ended. You can start off doing S&H or something, and then change it around and design ten other different waveforms instead, or set it up as a sequencer or whatever.

https://electricdruid.net/filterfx-lp-bp-hp-lfo-filter/

My version used a vactrol-based SVF filter instead of a LM13700, but is otherwise pretty similar in concept. I didn't implement the tempo divisions you've done on mine though. That's a nice touch. You did well to get it so quiet too. The LM13700 isn't a famously quiet chip.


Ripthorn

Thanks! I admit that my coding skills are still not the best. I have 15 years of living and breathing Matlab, so moving to a "real" language I have had to relearn certain approaches. Regardless, I agree that there are so many possibilities that open up. I have already reused the tap tempo section for another project I am working on. It will probably get used more :)
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Yazoo

Could you just confirm what frequency the ATTiny85's clock should be set to when I program it please?

Mark Hammer

I'll put in a plug for the "droop" function that I stumbled onto.  Normally, there is a low-leakage cap, isolated by JFETs, that stores the randomly-generated voltage from the noise source.  I found that by putting a medium-high resistor to drain off the cap - not too fast and not too slow -the stored voltage "droops", yielding a kind of micro-sweep for each filter step.  The result sounds like a raygun "pyoo-pyoo-pyoo".  Naturally, the droop rate (drain-off speed) needs to be optimized for the sample rate.  Can't be too slow for fast sample/step rates, and can't be too fast for slow step rates.  Not better than S&H, just different and interesting in its own way.

Digital Larry

I'm fond of S/H and also as Mark H. suggests, a lowpass on the control voltage makes for interesting possibilities.  Here's one I did in DSP, two filters jumping around.  I think that they might be using the same post S/H voltage, maybe with different polarity and scaling and some smoothing on the control signal prior to the SVF's frequency input.

https://soundclick.com/r/s7rlnp

And for the pinnacle (at least so far that I've heard) of application of S/H filter to guitar performance, I'll hand that off to my old friend Frank.

https://www.youtube.com/watch?v=SFTJ8V2T0nM
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Ripthorn

Quote from: Yazoo on May 10, 2020, 07:49:36 AM
Could you just confirm what frequency the ATTiny85's clock should be set to when I program it please?

It should be just the stock 1 MHz click rate, I believe. I will check and correct if needed.
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Ripthorn

Quote from: Mark Hammer on May 10, 2020, 08:48:56 AM
I'll put in a plug for the "droop" function that I stumbled onto.  Normally, there is a low-leakage cap, isolated by JFETs, that stores the randomly-generated voltage from the noise source.  I found that by putting a medium-high resistor to drain off the cap - not too fast and not too slow -the stored voltage "droops", yielding a kind of micro-sweep for each filter step.  The result sounds like a raygun "pyoo-pyoo-pyoo".  Naturally, the droop rate (drain-off speed) needs to be optimized for the sample rate.  Can't be too slow for fast sample/step rates, and can't be too fast for slow step rates.  Not better than S&H, just different and interesting in its own way.

Now that's a really cool idea. If I were to use an mcu with more GPIO,I could use a digi pot or similar so that the droop is always a percentage of the speed, and that percentage could be configurable. Neat idea!
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Mark Hammer

Quote from: Digital Larry on May 10, 2020, 10:01:10 AM
I'm fond of S/H and also as Mark H. suggests, a lowpass on the control voltage makes for interesting possibilities.  Here's one I did in DSP, two filters jumping around.  I think that they might be using the same post S/H voltage, maybe with different polarity and scaling and some smoothing on the control signal prior to the SVF's frequency input.

https://soundclick.com/r/s7rlnp
That's a terrific sound, Larry.  Does one of the filters have some glissando/glide?

Yazoo

Did you get the chance to check the clock rate for the ATTiny please? I'm debugging my build now and if I can rule that out, it would be useful. I can then check to see what I've mucked up.

Thanks.

Yazoo

I spent the day debugging my build and the ATTiny85 does work with the internal clock set to 1Mhz. I converted your layout because I wanted to etch a single-sided board. In the process I missed the 5 volt connections to the encoder. Once I had tacked on two jumper wires, it all worked. Definitely not one of my tidiest builds, but once it's in a box nobody will know and I won't tell! ;)

Ripthorn

Glad it worked for you! Sorry I didn't swing back around earlier!
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

Yazoo

Honestly, no problem, and thanks for making this project available.

AlexK

Brian, I love this project, you did a great job!  I just finished building and it went very smoothly.

A couple comments on your BOM:
1. 5x 100k resistors were missing
2. 2x 100nF caps were missing
3. Encoder part number is 858-EN11-HSM1AF15 (listed one is vertical mounted)

The one thing I want to change is to not reset the multiplier or pattern if the tempo is updated.  I've made the code changes but still need to verify.  Let me know if you have any suggestions on that (just in case my changes don't work).

Thanks a lot!