A lonely LM358

Hey Party People--
So I'm designing the VCO for WTPA2 and I might end up with an extra section of an LM358 on the board.
--Besides a distortion unit --
What do you think I should/could do with it? You can use any passives you want in the design, and discrete NPN transistors.

Winner gets a coffee mug ;-)

xo
TB

Comments

  • edited June 2010
    Is it the full LM358 or just the half?

    With a half, I'd go with a sallen-key LPF. With the two halves I'd hack something like the VCF section of the gristleizer.
    Another useful thing: some simple tone control/bass boost.
  • Just the half.
    I thought a filter at first, but then I was like, Olivier already HAS a filter :-)
  • I like the idea of a simple high and/or low pass filter, for some simple sound-shaping. At what stage of the signal are you thinking of implementing this, Todd? Pre- or post- recording?

    Here are some pragmatic applications of the LM358: http://en.wikipedia.org/wiki/Operational_amplifier_applications
  • edited June 2010
    lin->log converter to scale standard modular CV for 1v/oct pitch control? I'd love to house one of these in my modular... Tho i'm not sure, given the rest of the design, whether that's already implemented, and how much additional circuitry it would require to shoehorn that in... Todd, do you have a current VCO schemo you could share?
  • edited June 2010
    I had another idea: an envelope follower on the audio input, that could be used either as modulation source for effects, to control an external device via a CV out, or maybe for flashing/blingy/pulsating LED effects.

    Op-amp+diodes for the half-wave rectifier and a passive RC low-pass (at the risk of pouring crap into the ground?)? Or something like this for the rectification http://archive.electronicdesign.com/files/29/6379/figure_01.gif

    with the output sent to an active low-pass.
  • Hmm... IIRC Todd's only using the one channel of ADC for audio input so muxing is not necessary... It would be interesting (but strange) to see what this would do if fed into the CV control for the clock though! You might also be able to press that circuit into service to drive an LED input level indicator? I don't know how that's usually done.
  • Hey all --
    The notes for how the VCO is coming along are on the blog. It should be just fine (there's more still that I haven't posted).
    The simple filter sounds useful but you'll have to sell me on it more, since I never really use one much.

    W/r/t to the active rectifier, you could do that in software too, since you're looking at all the samples coming in. Since the level-related voltage would have to get into the MCU to control effects anyway, it seems like the way to do it would be to compare sample magnitudes. You could do this all the time (even when not sampling) since the new design only uses the ADC to look at the audio input.

    A proper exponential converter is annoying, but hell, I'll take a look at putting one in. It means more transistors, and it means thermal drift (which WTPA is kickass about now) but but I'll eyeball it.

    Honestly, I think I want to make a weird distortion unit with it. I'll let you know when I get a schematic up.
    xo
    TB
  • edited June 2010
    The only drawback in doing the envelope tracking in software is:
    - the extra CPU cost
    - getting an integration time of around 10ms (which is the smallest integration time I would use to track smoothly an envelope - I usually use 20ms in all my echonesty audio analysis stuff) is too costly with digital FIRs, while trivial with a capacitor and a resistor. Let mother physics do the integration for you. In digital-land, you'll have to go IIR, which means potential instabilities if you do everything with 8-bits precision.

    envelope = ((256 - alpha) * enveloppe + alpha * (sample < 0 ? -sample : sample)) >> 8 could certainly work ; but it's a dozen of cycles you'll have to pay for every sample.
  • That's the classy way to do it in software :-)
    I just wrote a set of filters (two IIRs and an FIR) to analyze some touchsensor data (for work) but that was on a 32-bit 66MHz 68k, but...
    On an AVR with other stuff to worry about I'd probably just check every sample against the last to see if it was bigger, and keep the biggest positive excursion. Every (n) samples I'd subtract (x) from the value and pin it to zero if necessary. With a signed char and a decay amount of 1 it'd look something like this:

    #define DECAY_AMOUNT 1
    #define TIME_CONSTANT blah

    signed char
    theEnvelope;

    unsigned char
    decayCounter;

    void sampleHandler()
    {
    if(theSample>theEnvelope)
    {
    theEnvelope=theSample;
    }
    decayCounter--
    if(decayCounter==0)
    {
    decayCounter=TIME_CONSTANT;
    if(theEnvelope)
    {
    theEnvelope-=DECAY_AMOUNT; // No need to zero check with DECAY == 1
    }
    }

    ...blah blah rest of stuff...
    }

    She ain't purty but that's about as fast of an analysis as I can think of off the top of my head.
    And I'd rather have it sloppy than include more hardware UNLESS this were a really fundamental part of the instrument -- then mother physics all the way :-)

    The interesting question to me is what would you do with this data? Analog OR digital? I suppose you could say, alter bit depth dependent on sample amplitude or something.
    What were you all thinking would be cool to do with this envelope info?

    Best,
    TB
  • modulating digital clock rate in realtime mode would probably sound the most interesting... or adjusting jitter amount or a small-ish window size/location on a loop. If this were done in software It would make sense to make the decay modifiable of course... Those are the first (digital) things that come to my mind. Is an analog output from the digital follower even in the realm of the possible, considering your design?
  • To me, the envelope follower was something happening in the analog world, for the benefits of the analog world (sampling it by the main ADC would complicate things and would just not feel right). It would be more something for those using the WTPA as an effect (the biscuit thread). Bring in some audio, process it, and get as an extra something that can be used to process it further with other tools.

    What I would do if there was an envelope follower in the digital domain would be an option to trigger a sample or a cycle of samples on every note onset in the audio input. Sample something, then plug-in a mic and trigger each slice of a sample everytime a note comes in.
  • @pichenettes--
    Word. That sounds right on to me.
    Using the extra opamp JUST to give an envelope out and then passing it out for something else to use is a good idea.

    W/r/t digital domain stuff:
    There was a discussion of "level triggered sampling" before with WTPA, which would be simpler yet in code. And probably ought to get done.

    @smrl
    There could also be a frequency counter on the analog input which sets the sample clock rate too. That might be dope.

    Thanks y'all!
    TB
Sign In or Register to comment.