Pianno effect

Discussion in 'Homework Help' started by ghebaur, Jul 22, 2014.

  1. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    Hello again!

    I'm looking to build a piano effect but i don't know any theory and can't find any solid documentation. I used some information from the internet but i'm not sure if it's correct what i'm doing.


    What i need to do is to boost the sound +60dB and then filter out frequencies < 125Hz and >1000Hz.

    Need to build a stereo to mono mixer before the filters so i don't build two HP and LP filters. I tried using this schematics but i only got some low volume noise. I believe i need to boost the volume...

    I built the HP filter and it works fine (the schematics is in the attachment). I calculated the R and C values for the 125 cutoff frequency using this formula f=1/(2*pi*R*C).

    I am going to build the LP filter too but i saw somewhere on the internet that it's going to interfere with the HP filter. In the attachment is the schematic of the HP + LP filter i am thinking to build.

    LE: This idea came up when i added and Equalizer effect in Audacity +60dB for 125 to 1000Hz and filter out the other frequencies. I got some distortion guitar sound using a piano recording. You can see the results in the attachment. And i want to make the same thing using circuitry.
     
    Last edited: Jul 22, 2014
  2. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
    Yes the filters will interfere with each other, unless you put a buffer between them. An opamp buffer would take care of that. However, your circuits are single-pole filters which have a gradual 6dB/octave rolloff. I'd bet the filter you used in Audacity was at least 2 poles (12dB/octave).

    What's the purpose of the 60dB amplification? Just distortion? There are specific distortion circuits all over the internet, some of them are pretty simple.

    Look into inverting opamp summer circuits to get your stereo-to-mono mixer. You can get gain as well as mixing.
     
    ghebaur likes this.
  3. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    Yeah, the 60dB amplification is for the distortion and I don't know if i'll get the same sound with those distortion circuits.

    What is this buffer thing?
     
  4. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
    The buffer in this case isolates the impedances of the two filter circuits from each other, so that the second one doesn't load the first, but doesn't have any effect on the signal. See the first image on this page:

    http://www.allaboutcircuits.com/vol_3/chpt_8/4.html

    Stick one of those between the two filters. Or better yet, use 2-pole filter design such as a Sallen-Key, which will give you better rolloff and uses an opamp already, providing a low enough output impedance that you won't need to buffer it.
     
    ghebaur likes this.
  5. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    I think i'm starting to understand but i need to take my time and learn more about differential amplifiers.

    So the Buffering is made by the opamp, i this case i'll go for the Sallen-key filter. That means i can use a opamp for HP filter and next to it another one for LP filter. Should i add another one for the +60dB gain or should i use the first two opamps to amplify? And how do i calculate and make the opamp to amplify with exactly 60dB?
     
  6. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    OK. i found a LM324n on an old board. Is it ok to use that?
     
  7. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
    LM324 would be fine, but if it's soldered into a board I'd suggest just getting some new opamps. They're cheap for general, audio-frequency types.

    I don't think you really need 60dB of gain, and it really doesn't need to be exact to any degree. The gain you applied just resulted in hard clipping, so what you need is a similar effect in hardware. The amount of gain you need depends on the level of the audio signal and the operating voltages of the circuit. 60dB is a gain of 1000 [dB=20*log(gain)], but you should be able to get the signal to clip at lower gains.

    To create a similar kind of hard clipping, you can probably just abuse an opamp, overdriving it so the output hits the rails. First you should figure out the voltage range of the audio signal. Then figure out the voltage supply you want to use. Say the audio signal peaks are around 0.5V-1.5V, generally. If you used a +/-9V circuit supply, at most you'd need a gain of 9/0.5 = 18 for the lowest input peaks to hit the rails at the output. In reality you'd need even less because most basic opamps will clip at a voltage lower than the supply.

    You might find it useful to make an amplifier with variable gain. Then you can adjust the gain to your liking, depending on the level of the incoming audio. You can use the filter amps to amplify, but the sound may differ between that method, and using a dedicated amplifier circuit. I don't know which would be better for your goal. I suggest you play around with both to see how they differ.
     
    ghebaur likes this.
  8. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    The thing is that i can't get my hands on new hardware that easy, that's the reason i'm using old stuff. I'll study more and when everything is ready i'll get some new hardware.

    What do you suggest to use for the amplifier? Some schematics.
     
  9. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
    This question isn't really homework, is it? It's posted in the Homework section.

    I got curious how this would sound compared to your software version, so I built it. The circuit goes like this:

    Mono summer --> 1kHz Low-pass --> 125Hz High-pass --> inverting amplifier (max gain 41dB).

    You can hear it here:

    http://www.veracohr.com/audio/distpiano.wav

    Pretty much what I expected: about the same, but no harsh digital clipping. If your question isn't actually homework, I'll just give you the schematic of what I built and explain it in further detail if you want to understand more.
     
  10. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    Yes, it's not homework. I'm not an electronics student but i'd still like to build this effect.

    I tried using various gain values myself and it worked well with +36dB. I can build the LP and HP filter now using the Sallen-key schematic. What i need now is a schematic and formulas for the amplifier.
     
  11. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
    OK, here's what I built. The component values were based on what I had on hand to get the frequency cutoffs you're after. I assumed 9V battery power, or other single-supply power source. If you have a bipolar supply, the biasing resistors and coupling caps can be removed. Also C8 can be smaller, I just didn't have anything smaller.
     
    ghebaur likes this.
  12. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,162
    You might want to review the attachment and design just the filter portion first.
     
    Last edited: Jul 25, 2014
    ghebaur likes this.
  13. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    Thx. I'l start calculating the components.

    Veracohr what SPICE software did you use for your schematics? I tried LTspice IV and i don't like it at all.
     
  14. Veracohr

    Well-Known Member

    Jan 3, 2011
    552
    76
    LTSpice is great for simulation, but I drew that schematic in a schematic program called ExpressSCH by the PCB manufacturer ExpressPCB.
     
  15. to3metalcan

    Member

    Jul 20, 2014
    228
    23
    Am I missing something, or does the second stage (the lowpass stage) have no DC bias with the schematic as shown?
     
  16. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    I tried ExpressPCB i liked Eagle better. :D

    What does that document mean when it says "± Supplies" or "Single Supply"? Is it Single Supply DC and ± Supplies AC?
    And sth else. In Figure 8 (LP filter) the supply ground is common with the audio signal ground?
     
    Last edited: Jul 25, 2014
  17. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,162
    Your not missing anything to3.

    I came up with different resistance values as well based on the specifications. Then after looking at it further, the component count could be reduced, and finally, this hodgepodge of circuitry the OP created needs to be reworked.

    --------------------------------
    To review the OP's criteria:

    What i need to do is to boost the sound +60dB and then filter out frequencies < 125Hz and >1000Hz.

    Need to build a stereo to mono mixer before the filters so i don't build two HP and LP filters.

    This idea came up when i added and Equalizer effect in Audacity +60dB for 125 to 1000Hz and filter out the other frequencies. I got some distortion guitar sound using a piano recording.
    --------------------------------

    Personally, I think the blocks should be, Mixer, HP filter, LP filter, 60 dB amplifier.

    I'd like the OP to explain where the load for this circuit? Is it going into an amplifier or a mixer?
     
  18. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1

    Well the output of the circuit goes either to an amplifier or to headphones.

    Just to be clear, after the 60dB amplification (for obtaining distortion) i need to attenuate the output signal back to the same level. I don't want to build an amplifier, i want to build a distortion effect.
     
  19. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,162
    +/- supplies are dual supplies. say +9V and -9V. Single supply is what you had drawn and requires the bias divider when working with AC.

    Yes, there are times when power supply ground and audio signal ground share a common point.

    What is the source of the left and right audio?

    What voltages do you want to use? Dual supply or Single supply?

    The circuit as drawn needs reworking ... Personally, I would want the bandpass filter before an amplifier and not after.

    If you need to make two filters, so be it. You need to determine if this circuit is going to feed the audio to a mono load or a stereo load.
     
  20. ghebaur

    Thread Starter Member

    Jun 17, 2014
    30
    1
    The source of the signal is an electronic keyboard. I'm gonna use as avoltage supply a battery or a DC power source. I'll go for stereo output, and i think that i'll need individual circuits for L and R channels.

    So it's gonna be L_in -> LP filter -> HP filter -> Amplification -> Attenuation -> L_out
    and R_in -> LP filter -> HP filter -> Amplification -> Attenuation -> R_out

    I still wanna test the mono summer just to see how it works :D

    Still don't get it. The ± supplies are batteries and DC sources?
     
Loading...