sinusoidal wavefolder

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Joe., luketeaford, lisa, Kent

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Sun Jul 02, 2017 9:37 am

synthcube should have a DIY "module" coming out soon. it will be just the core of the wavefolder in a 14p wide-DIP format. i have yet to get all the dcumentation finalized, but with a few opamps it can be built into a simple module.

there is also a eurorack module in the works, that would have been done by now except for some other things that came up. so it got back burnered.
openmusiclabs.com

Permette
Common Wiggler
Posts: 132
Joined: Wed Apr 22, 2015 4:57 am

Post by Permette » Sun Jul 02, 2017 9:58 am

Wonderful Guest !
Many thanks for that.

Cheers !

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Fri Jul 07, 2017 9:21 pm

ive been filling out the documentation for it. got the basics up, a few more schematics will follow.

http://wiki.openmusiclabs.com/wiki/SineCore
openmusiclabs.com

trip
Wiggling with Experience
Posts: 274
Joined: Tue Jun 30, 2015 8:15 pm
Location: United Kingdom

Post by trip » Sat Jul 08, 2017 8:34 am

Great! Thank you for sharing. Can't wait to try this out, the demos sound incredible.

homeless_peep
Common Wiggler
Posts: 72
Joined: Thu Nov 17, 2016 7:55 am
Location: greece

Post by homeless_peep » Sun Jul 30, 2017 8:34 am

That looks neat! I based my triangle to sinewave converter on that paper of yours,and even designed a (non optimised) version using the lm3046 bjt array. I experimented with folding using opamps and diode clipping (not a sinewave shape) on a guitar pedal and the sound is very distinct. distorted but in a very "original" way, almost like adding a weird reverb effect to it. the noise was terrible though and i never got down to revisiting that again.
folding can be used to implement real time, non linear frequency multiplication- might be a good start for an additive vco thing...

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Sun Jul 30, 2017 5:50 pm

thanks for reporting your experience, its great to hear someone built it up. the overdrive on it is pretty good. did you use 2 x LM3046?
openmusiclabs.com

trip
Wiggling with Experience
Posts: 274
Joined: Tue Jun 30, 2015 8:15 pm
Location: United Kingdom

Post by trip » Mon Jul 31, 2017 4:16 am

I quickly threw together a messy layout of the differential schematic on the wiki that should fit in 4hp - boards are untested / still on their way. Will report back when they arrive. If anyone's interested in the files I'll upload them somewhere.

homeless_peep
Common Wiggler
Posts: 72
Joined: Thu Nov 17, 2016 7:55 am
Location: greece

Post by homeless_peep » Mon Jul 31, 2017 6:20 am

guest wrote:thanks for reporting your experience, its great to hear someone built it up. the overdrive on it is pretty good. did you use 2 x LM3046?
no. 3 of the trannies make up he non linear stage and he other two make a voltage adder. i then used a differential opamp stage to convert the output to single ended. never got down to constructing the circuit because I only have smd lm3046 available, but he simulations look good. i can upload the schematics and simulations when i get back home later today.
it was designed as part of a chapter on my thesis, demonstrating how your saturation-cusp canceling method can be implemented with discrete differential pairs. the circuit i actually used is based on your OTA one, with some slight changes (can also share later).

attachments show the sinewave and sawtooth waves, derived from the triangle output of my vco. i have more measurements as well, that go way beyond the audio range (100khz+), the sinewave is satisfactory up to 10-15khz.
You do not have the required permissions to view the files attached to this post.

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Tue Aug 01, 2017 12:33 am

the OTA one looks like its working well. the transistor one sounds like a discrete OTA version and not the barrie gilbert implementation?
openmusiclabs.com

homeless_peep
Common Wiggler
Posts: 72
Joined: Thu Nov 17, 2016 7:55 am
Location: greece

Post by homeless_peep » Tue Aug 01, 2017 7:52 pm

guest wrote:the OTA one looks like its working well. the transistor one sounds like a discrete OTA version and not the barrie gilbert implementation?
exactly. It implements the exact same functions as the OTA circuit, but skips the whole current mirror part (inside the IC, in order to obtain a current output).
It is more complicated in terms of external components and value calculation (I tuned most of it by guestimating and trial-error), but might prove to be slightly cheaper to some extend (especially if you use some of the super tiny transistor arrays available nowdays).
Temperature stabilisation might be a desirable thing here. Using two LM3046 you can have both differential pairs in two different ovens (one for each IC), yielding a more consistent result. To be honest, I'm not sure how important that is in our field. I could hardly notice 1% distortion at those frequencies (3Khz+), so that's close to good enough for me, but I could certainly hear the harmonics in doepfer's "standard VCO", so it surely is a big improvement.
All in all, I think the OTA circuit was a very good idea. I don't see why I would look for anything different/better for generating a high quality audio sinewave from a triangle. (unless OTA's eventually become obsolete).

homeless_peep
Common Wiggler
Posts: 72
Joined: Thu Nov 17, 2016 7:55 am
Location: greece

Post by homeless_peep » Tue Aug 01, 2017 7:54 pm

I actually forgot to upload the transistor version. Here it is, along with the simulation result and a true sinewave of comparable amplitude, as a reference.
You do not have the required permissions to view the files attached to this post.

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Tue Aug 01, 2017 9:40 pm

looks good. you could probably do away with the second transistor diff amp summing stage, and just sum with opamp diff amp. i think there is a good example of a buchla vco using that method, although i cant remember offhand. that would definitely make it cheaper than an OTA, although the total price difference is pretty small if youre using both halves of an LM13700.
openmusiclabs.com

homeless_peep
Common Wiggler
Posts: 72
Joined: Thu Nov 17, 2016 7:55 am
Location: greece

Post by homeless_peep » Wed Aug 02, 2017 4:08 am

the second D. pair is available in the package anyway, so I just went on and used it. However, you're right, and it can serve as the thermal oven for the saturating part instead.

trip
Wiggling with Experience
Posts: 274
Joined: Tue Jun 30, 2015 8:15 pm
Location: United Kingdom

Post by trip » Thu Aug 31, 2017 6:49 am

I was really excited by the demos of this, so threw together a board of the differential schematic... it sounds amaaazing! Needs a dual vca paired with the inputs to get the most out of it, but I like that it can fit in 4hp on a single board. I made a stupid error on the schematic for the mod pot, but otherwise it seems to be working fine - the offset pot has a fairly large deadzone either side of the centre of the turn, I've yet to measure it out.

ImageImage

ps. I don't really know all that much about best practices for board layout, any advice much appreciated![/img]

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Thu Aug 31, 2017 11:50 am

the offset has a really wide range, and maybe too large. you can increase the 150K resistor at its wiper to reduce that. right now it goes from into saturation on either side, so that an input signal can pull it out.

the build looks good.
openmusiclabs.com

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Thu Aug 31, 2017 8:45 pm

i may have selected the 150k assuming a 5V supply, which means a 300k would be more appropriate for 12V supply. i have a few different designs on this right now, and i may have gotten that value confused with another.
openmusiclabs.com

trip
Wiggling with Experience
Posts: 274
Joined: Tue Jun 30, 2015 8:15 pm
Location: United Kingdom

Post by trip » Fri Sep 01, 2017 3:55 am

Grand thanks, I'll try swapping it out later.

trip
Wiggling with Experience
Posts: 274
Joined: Tue Jun 30, 2015 8:15 pm
Location: United Kingdom

Post by trip » Fri Sep 15, 2017 10:49 am

Had a bit of time to play around some more with this - I swapped out the offset wiper resistor to 300k and got more range on the pot. Increasing the input amplitude seems to clip the sine function into a square wave really early though, and the folding has a bit more of a pwm characteristic than a wavefolder. Scope shot of the amplitude sweep is here:

[video][/video]

Could this be some more passives related to the voltage rails need changing?

You can see there's a fair bit of noise on the output as well, nothing too noticeable when it's mixed with a signal.

Here's the schema I made the board from:

Image

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Fri Sep 15, 2017 12:03 pm

looks like youre getting the right number of folds, so its just a matter of amplitude of the input signal if you want to avoid clipping.
openmusiclabs.com

slow_riot
Super Deluxe Wiggler
Posts: 4002
Joined: Tue Jun 30, 2009 8:58 pm
Location: uk

Post by slow_riot » Tue Oct 03, 2017 5:11 pm

have been looking for a waveform modifier circuit and this is just fantastic, thanks for posting!

if someone can PM me this PDF I will be eternally grateful :)

B. Gilbert, "A monolithic microsystem for analog synthesis of trigonometric functions and their inverses,"

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Wed Oct 04, 2017 12:11 am

i put it up on the oml site

/files/trig.pdf
openmusiclabs.com

slow_riot
Super Deluxe Wiggler
Posts: 4002
Joined: Tue Jun 30, 2009 8:58 pm
Location: uk

Post by slow_riot » Wed Oct 04, 2017 12:42 am

Amazing thanks, the biasing part isn't immediately obvious and there is quite a big change from the first Gilbert iteration to the second.

I've been playing around with an OTA version as I have a bunch of them sitting around, but I might use your drop in part.

Have to agree that this circuit is really interesting.

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Wed Oct 04, 2017 1:46 pm

in the original paper from 77 there is a third configuration that uses transistors of different emitter areas to do biasing.

ill ping synthcube to see how the drop in boards are coming along.

i built up a 14 transistor version, and it sounds really good, but i think thats the limit of how many folds you can do without putting the transistors into reverse conduction.
openmusiclabs.com

User avatar
hexinverter
the nettles make me think happy times
Posts: 2979
Joined: Thu Aug 25, 2011 8:48 pm
Location: Montreal, Canada

Post by hexinverter » Sat Oct 07, 2017 11:50 am

What a fascinating circuit! The vast majority of the mathematical derivations in Gilbert's paper are well above my head, but the theory of operation is pretty neat. The paper from '82 features a glimpse into the IC implementation which presumably made its way into the AD639. That was cool to check out.

I've been playing around with the different configurations that Barrie proposed in his papers in simulation. Pretty cool to observe the levels change around the network while varying the network base voltage, Ex. I then built a couple practical circuits on the breadboard, including the SineCore implementation. Getting some rad sounding vowel tones out of this! Phase modulating with a ramp wave as source is pretty fun.

I figure I'll share my little experiments with the circuit here as well!


The circuit in test in the following screengrabs is the SineCore configuration, running off of +/-12V power. The source signal is a 10Vpp triangle wave, with amplitude adjusted manually through a potentiometer. The current sources are set to ~103uA (~6V bias, 750ohm network resistors), just as in the SineCore "basic connections - differential" configuration.

Image

I seem to be getting some high frequency oscillations during transitions on the output differential amplifier. Adding some capacitance in the feedback path of the opamp seems to have quelled this. 100pF is what worked best for my messy breadboard, but your mileage my vary. [EDIT for clarity to anyone skimming the thread: Guest corrected me, 47pF is probably better, thereby keeping the cutoff above 20kHz. Also, impedance matching the diff amp nodes by placing a second 47pF over R9 in my schematic below, is a good idea]


Image

Image

During folding, the output levels approached around 20Vpp (as in the previous 'scope shot). This resulted in the output opamp clipping a bit. I used a TL0xx which isn't rail-to-rail, so clipping occurs somewhere just a bit more than 20Vpp when on 12V rails. Altering the tail current through the NPN diff pairs ('Bias current control' in the SineCore documentation) made the output amplitude closer to 10Vpp. Increasing the resistor R17 in my schematic to 200k (from 100k) brought the current down to ~120uA, from ~240uA. [EDIT: the SineCore schematic is revised to have what is the +12V node in this schematic below changed to GND. In effect this will solve the overdrive issue, and there's no need to change R17 if your current mirror is connected to GND instead of +12V!]

Image

Image

Peaks no longer clippy! :cloud:

All in all this makes a nice sounding little wavefolder! And in a minimal configuration makes a nice sine waveshaper. I was researching low distortion sine waveshapers and that's how I stumbled upon your OTA-based waveshaper improvement paper, Guest. Thanks for sharing your discoveries! And cool to see that Synthcube will be making some handy SMT boards available for everyone to play with. :nana:
Last edited by hexinverter on Sun Oct 08, 2017 1:02 pm, edited 2 times in total.
Hexinverter Électronique
em: stacy[at]hexinverter.net

User avatar
guest
Super Deluxe Wiggler
Posts: 4487
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Sat Oct 07, 2017 2:30 pm

great work! ive been digging into the circuit a bunch more lately, as im working on a complete module version. i settled on 47pF in the feedback path, just to keep the frequencies up to 20kHz. i also used a capacitor across R9 in your schematic, to keep the impedances matched.

also, thanks for pointing out the excessively high drive. the 100k to +12V is incorrect, and was meant to go to ground.
openmusiclabs.com

Post Reply

Return to “Music Tech DIY”