Author Topic: Is there a SMALLER digital LFO chip than the TAPLFO?  (Read 24633 times)

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #40 on: September 18, 2015, 05:26:55 AM »
Thanks for the clarification Ian.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

garcho

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #41 on: November 24, 2015, 10:12:34 PM »
zombie thread alert...

what happened with this, and CAN I BUY SOME?! cheers
"...and weird on top!"

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #42 on: November 25, 2015, 03:18:23 AM »
The code that both Ian (slacker) and myself have posted works. I have tweaked mine a little more and am currently building it as part of a tremolo / vibe*

I don't know about Ian, but while I would be happy to put a few chips in the post to UK members to get some feedback, I have no desire to sell programmed chips. This is especially the case seeing as the 8 pin PICs give limited control options, so it makes sense to customise the code for each application - waveshape selection OR phase difference between 2 LFOS OR tap tempo OR etc.
If you have a pickit 3 or equivalent then you can burn your own chip and I am happy to provide hex code if that helps. The PIC12F1612 is pretty cheap too**.

I appreciate that most people don't have the kit/know-how/desire to program chips, so I guess it would be good to find an alternative option.  I would be happy for Aron to sell programmed chips in the store (assuming he can burn them himeself), as he does with the Taptation. However, much of my code is borrowed from Ian, which in turn is borrowed in part from Tom (ElectricDruid), so I would want their blessing first.

*see here: http://www.diystompboxes.com/smfforum/index.php?topic=111802.0

**e.g. http://eu.mouser.com/Semiconductors/Embedded-Processors-Controllers/Microcontrollers-MCU/8-bit-Microcontrollers-MCU/_/N-a85ik?P=1z0z7v3&Keyword=pic12f1612&FS=True
http://uk.farnell.com/microchip/pic12f1612-i-p/mcu-8bit-pic12f-32mhz-dip-8/dp/2406552
« Last Edit: November 25, 2015, 03:31:35 AM by samhay »
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ElectricDruid

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #43 on: November 27, 2015, 04:51:15 PM »
The code that both Ian (slacker) and myself have posted works. I have tweaked mine a little more and am currently building it as part of a tremolo / vibe*

I don't know about Ian, but while I would be happy to put a few chips in the post to UK members to get some feedback, I have no desire to sell programmed chips. This is especially the case seeing as the 8 pin PICs give limited control options, so it makes sense to customise the code for each application - waveshape selection OR phase difference between 2 LFOS OR tap tempo OR etc.
If you have a pickit 3 or equivalent then you can burn your own chip and I am happy to provide hex code if that helps. The PIC12F1612 is pretty cheap too**.

I appreciate that most people don't have the kit/know-how/desire to program chips, so I guess it would be good to find an alternative option.  I would be happy for Aron to sell programmed chips in the store (assuming he can burn them himeself), as he does with the Taptation. However, much of my code is borrowed from Ian, which in turn is borrowed in part from Tom (ElectricDruid), so I would want their blessing first.

*see here: http://www.diystompboxes.com/smfforum/index.php?topic=111802.0

**e.g. http://eu.mouser.com/Semiconductors/Embedded-Processors-Controllers/Microcontrollers-MCU/8-bit-Microcontrollers-MCU/_/N-a85ik?P=1z0z7v3&Keyword=pic12f1612&FS=True
http://uk.farnell.com/microchip/pic12f1612-i-p/mcu-8bit-pic12f-32mhz-dip-8/dp/2406552

If there's a desire to see 8-pin PIC LFOs out there in world, I'd be happy to have some in the Druid shop, now I've got it set up properly (took a while...). What's the favourite set of features? Or what's the top applications?

Dual LFOs with a phase difference seems to be one - what waveshapes? Other options?
Tap tempo in a small chip seems to be another? How many of the bells and whistles from the TAPLFO does it need? Multipliers? Many waveshapes? Wave distortion?

I'm open to ideas or suggestions about how best to do this, if it's worth it - do you guys have code that's good already? Do I need to program some Druid chips that do something similar? How should we make sure that no-one ever builds a boring op-amp LFO ever again?!?

Thanks,
Tom


dbp512

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #44 on: November 27, 2015, 09:51:27 PM »
Tom, I'm new to building effects in general, and I still haven't gotten around to using any digital chips. That being said, I do plan on changing that once I have some more experience. I have some ideas, but I'm not sure how useful they'd be, or if they'd even be possible to implement. But hey, it doesn't hurt to brainstorm, does it? Well, maybe a bit of embarrassment as you realize how little I know, but I'll live.

Having each waveform is nice, but it seems like some people want a more analog waveform manipulator. I like samhay's method of morphing from a sine to square. Chase bliss uses a pair of toggle switches to select each side of the wave from sine, ramp, and square, so you end up with some cool nonstandard shapes. Similar to this, what about starts with a triangle, but slowly puffing out the sides to shift into sine, then eventually square. Maybe one waveform is enough, and just use a symmetry adjustment like your taplfo chip. A triangle has two sawtooth patterns, and maybe a sine could be manipulated to make sweep/lump at the extremes.
 
Another option, as you touched upon, would be generating multiple waves. I see samhay working with 180, although I thought an inverting buffer could do the same thing. What about 3 waveforms, 120 out of phase with each other? Again my lack of knowledge is showing clearly here, but I don't recall seeing any easy way to make 3 waveforms like this. I saw one method, but it used RC filters so it was calibrated to a single frequency. I'm basing this idea off your BBD clock chips, in which you could synchronize multiple of them and offset their phases. Unless there's already a way to do something similar, I feel like that might be more useful than 180, but then again what would I know? It might not be possible to even squeeze 3 lfo's in a chip (wouldn't that leave a single pin free for any and all controls?).
 
As was pointed out earlier, since 8 pin chips have fewer controls, it makes sense to make them specialized for each application. While that certainly won't make things easier for the majority of us who can't flash our own chips, maybe you could boil things down to a small number of chips with different applications in mind. Such as a single waveform with controls for wave shape and symmetry, or dual waveforms with a single control to morph between 2-3 preset waveforms. 
 
I remember reading something (I believe by Mark Hammer about the hypertriangle chorus flanger) that the lfo in a chorus doesn't require much depth, so you can get away using a triangle, while flangers' wider depths really benefit from a sweep shape. If thats the case, then perhaps a morph control would be enough for a chorus/flanger based lfo chip. I think that would work well with multiple waveforms, as you'd have fewer pins available for controls. 
 
I'd be happy to help you however I could, but I don't have much experience programming pic chips (I did take a robotics course where I programmed an arduino-like robot in pbasic). That being said, I'm a quick study and good at programming. I'm not sure how much help I could be, but if you could benefit from your own whipping boy (tayda does have nate after all) I'm around. I'd benefit by learning to implement these chips in effects, instead of just building whatever other people determined works.
Dave's not here, man

On some nights I still believe that a car with the gas needle on empty can run about fifty more miles if you have the right music very loud on the radio
 - Hunter S. Thompson

garcho

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #45 on: November 28, 2015, 03:15:21 PM »
wow, y'all are amazing! some thoughts...

what i would like to see in a 8 pin dual LFO IC

1- A waveform
2- A rate
3- B waveform
4- B rate multiplier, synced to 'A rate' (could this be programmed so that turning a pot counterclockwise from noon would move through sync stages for B rate to be synced to A rate? like 1:1, 1:2, 1:3 etc? and then turning the pot clockwise from noon would move through non-synced rate times?)
5- B phase (in 15 segments? that way key phase like 180 or 90 would be easy to dial in exactly)

what i would like to see in a 8 pin single LFO IC
1- waveform
2- rate
3- distort a la TAPLFO
4- tap tempo/ext. sync
5- multiplier (for sync)

what i would like to see in a 14 pin dual LFO IC
1- waveform A
2- rate A
3- distort A
4- waveform B
5- rate B
6- distort B
7- sync/rate (sync 'B rate' to 'A rate' by set ratios, all the way counterclockwise being 'no sync')
8- B phase (in 15 segments)
9- tap tempo/ext. sync for 'A rate'
10- multiplier for 'A rate'
"...and weird on top!"

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #46 on: November 28, 2015, 03:45:39 PM »
Thanks Tom.

The code I posted earlier works ok, but needs a little refinement - mainly the speed control is too wide/twitchy, so could do with a new table and it might be nice to use a log wavetable for the depth control to make it less twitchy at lower settings (there isn't much program memory left though).
Other than that, it might benefit from some polishing by somebody that does this sort of work in a slightly more professional context than I do.
From my brief play with Ian's code, it seemed to work ok, but again might benefit from a few tweaks to the control tables.

Gary -
The only 8 pin PIC I could find to do a decent job of a dual LFO has room for 3 control pots. If you get rid of one LFO, you can get 4 pots. The other pins are Vdd (e.g. +5V), Vss (ground), 2 LFO outputs (or 1 + 4th pot) and the MCLR pin, which you can't use as an analog input (a pot), but can be a on/off switch.

However, you can do some neat stuff that isn't feasible in the analogue realm. With the dual LFO code I have settled on for the stereo vibe, I originally used the MCLR switch to select between a sine and square wave. However, I freed up the switch by setting up the depth pot differently - from CCW the depth increases and you have a sine wave (actually a hypersine). At noon, you get max depth and then at 12:01 you get max depth of a square(ish) wave. Turning the pot further gives you less depth (square wave) until you get to no depth at CW. You could also do this the other way round with no depth at noon and increasing depth of 2 waveforms turning up or down from there.

dbp512 -

>I like samhay's method of morphing from a sine to square.
That's a good idea, but it's Ian's (slacker) idea/code.

I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

garcho

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #47 on: November 28, 2015, 07:04:57 PM »
duh! i guess you need both PWM outs  :icon_redface:

in that case:

what i would like to see in a 8 pin dual LFO IC
1- A/B waveform
2- A rate
3- B rate multiplier, synced to 'A rate' (could this be programmed so that turning a pot counterclockwise from noon would move through sync stages for B rate to be synced to A rate? like 1:1, 1:2, 1:3 etc? and then turning the pot clockwise from noon would move through non-synced rate times?)
4- switch for whether or not B is 180 out of sync from A or not.

what i would like to see in a 8 pin single LFO IC
1- waveform
2- rate
3- distort a la TAPLFO
4- tap tempo/ext. sync
5- switch for whether to not output is 180 out of phase with sync signal

what i would like to see in a 14 pin dual LFO IC
1- waveform A
2- rate A
3- distort A
4- waveform B
5- rate B
6- distort B
7- sync/rate (sync 'B rate' to 'A rate' by set ratios, all the way counterclockwise being 'no sync')
8- B phase (in 15 segments)
9- tap tempo/ext. sync for 'A rate'
"...and weird on top!"

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #48 on: November 30, 2015, 05:09:18 PM »
You don't have depth in any of these options.
This is probably ok for some/ a few designs, but not for others, and certainly wouldn't be a drop-in replacement for other designs that use the TAPLFO.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

garcho

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #49 on: December 01, 2015, 01:00:00 AM »
i was thinking there would be a way to add depth control later, say, after the filter (or LED/LDR)? like a CV in?
"...and weird on top!"

ElectricDruid

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #50 on: December 02, 2015, 08:42:45 AM »
i was thinking there would be a way to add depth control later, say, after the filter (or LED/LDR)? like a CV in?

I agree, I think. I'd thought how to reduce the pin count, and reckon the Depth pot is the obvious one to drop. In many situations, adding a depth control after the LFO isn't too difficult. Still, it's a pity...but you can't have everything, I guess. Or not on an 8-pin chip, anyway.

It's really excellent to see these ideas. Helps no end.

Thanks,
Tom

midwayfair

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #51 on: December 02, 2015, 09:00:04 AM »
i was thinking there would be a way to add depth control later, say, after the filter (or LED/LDR)? like a CV in?

I agree, I think. I'd thought how to reduce the pin count, and reckon the Depth pot is the obvious one to drop. In many situations, adding a depth control after the LFO isn't too difficult. Still, it's a pity...but you can't have everything, I guess. Or not on an 8-pin chip, anyway.

It's really excellent to see these ideas. Helps no end.

Thanks,
Tom

It's also "easy" to invert the phase of the signal so you have two out-of-phase PWMs as long as you're willing to add more parts. Leaving off the depth means that you have to add at least one more active component, a transistor at the very minimum (which will result in a kind of lousy depth control) and better two transistors or an op amp. Even if you add a transistor, between the three pins on the transistor itself and the couple of resistors to make it work, you're back up to as much space and PCB connections as the TAPLFO's 14-pin chip.

Not that this is "my" project or thread, but my whole reason for asking in the first place was to see if there was something that could do better waveform outputs in a package as small as a regular dual op amp so the chip would be more useful for small projects, and suddenly we're talking about adding tap tempo and multiplier steps and dropping the depth control for them! That's silly from a design standpoint. If you have space for a second footswitch, you certainly have space to use a 14-pin DIL.
My band, Midway Fair: www.midwayfair.org. Myself's music and things I make: www.jonpattonmusic.com. DIY pedal demos: www.youtube.com/jonspatton. PCBs of my Bearhug Compressor and Cardinal Harmonic Tremolo are available from http://www.1776Effects.com!

free electron

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #52 on: December 02, 2015, 09:19:06 AM »
Another advantage of external Depth control is it doesn't reduce the bit depth of the PWM generated waveform, which is happening if the waveform is scaled down in the software.

garcho

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #53 on: December 02, 2015, 01:15:54 PM »
Quote
...and suddenly we're talking about adding tap tempo and multiplier steps and dropping the depth control for them! That's silly from a design standpoint. If you have space for a second footswitch, you certainly have space to use a 14-pin DIL.

Suddenly? The title of your post, from over a year ago, says "smaller LFO chip". Sorry if I didn't respect that the thread was about the smaller chip that specifically you want.

For me, the point of having tap tempo and multiplier is to have an easy way to sync the LFO with another control source via 1/4" jack, not to add a tap tempo foot switch, which personally, I don't use, for a number of reasons. Without that, how would you control the rate externally? Certainly not "silly".

Quote
Leaving off the depth means that you have to add at least one more active component, a transistor at the very minimum (which will result in a kind of lousy depth control) and better two transistors or an op amp.
That's certainly not always true. Do you use CV? Or only LED/LDR opto stuff? Either way, good l' passive potentiometers work as depth controls all the time, easy. The textbook "tremulus lune" LFO is made from an 8 pin IC that does a lot (minus real sine and random, which is maybe exactly what you want, i get it), and has a passive potentiometer for depth control and is the opto style that I've seen you use frequently. What it doesn't do is sync.

Quote
If there's a desire to see 8-pin PIC LFOs out there in world, I'd be happy to have some in the Druid shop, now I've got it set up properly (took a while...). What's the favourite set of features? Or what's the top applications?

why wouldn't i respond to the man that brought us the TAPLFO? i've used that chip, and other LFOs many times before, and that's what came to mind. Tom and Slacker both mentioned external depth as well, so maybe it's not "silly"?

Quote
It's really excellent to see these ideas. Helps no end.

glad my points weren't just aggravating and OT, even if they're bad ideas.  ;)

EDIT:
I didn't want this to come off defensive or snarky, but it probably did. sorry y'all
« Last Edit: December 02, 2015, 02:57:08 PM by garcho »
"...and weird on top!"

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #54 on: December 02, 2015, 04:35:08 PM »
>It's also "easy" to invert the phase of the signal...

I never managed to get this to work very well using a PNP transistor. It worked, but the response was not completely inverse to the LED driven with a PNP.

Also, I haven't been buffering the LEDs with these newer chips and with modest LED resistors it seems to work fine - keeps the parts count down further.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #55 on: December 02, 2015, 04:40:44 PM »
>Another advantage of external Depth control is it doesn't reduce the bit depth of the PWM generated waveform, which is happening if the waveform is scaled down in the software.

True, but I have been using an 8 bit unsigned wave table and the sweep has sounded pretty smooth. It's also a trade off against how much resolution you need out of the depth pot and there is not much program memory on the 12F1612, so something may have to go if you want a much higher resolution wavetable(s).
If it's a real concern then I can revisit this.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #56 on: December 02, 2015, 04:53:50 PM »
>my whole reason for asking in the first place was to see if there was something that could do better waveform outputs in a package as small as a regular dual op amp so the chip would be more useful for small projects

This is definitely one thing that would be worth implementing properly.
I would keep depth, speed and waveform controls. We could have 2 outputs that are 2 different degree out of phase (or not, selected via a switch). Alternatively, if you only want 1 output, we have room for another pot and some form of switch. Any thoughts?

>and suddenly we're talking about adding tap tempo and multiplier steps and dropping the depth control for them! That's silly from a design standpoint. If you have space for a second footswitch, you certainly have space to use a 14-pin DIL.

Mission creep. There are good 14 pin chips that could be used to do most/all of the requests, so I don't see there being much point compromising on e.g. a depth control to fit everything into an 8 pin package for a 'product' that is intended to be a 1-size-fits-all chip.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ElectricDruid

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #57 on: December 02, 2015, 04:58:44 PM »
>Another advantage of external Depth control is it doesn't reduce the bit depth of the PWM generated waveform, which is happening if the waveform is scaled down in the software.

True, but I have been using an 8 bit unsigned wave table and the sweep has sounded pretty smooth. It's also a trade off against how much resolution you need out of the depth pot and there is not much program memory on the 12F1612, so something may have to go if you want a much higher resolution wavetable(s).
If it's a real concern then I can revisit this.

The reduction in bit depth when you use a software depth control is a concern, certainly. It's a trade-off, as ever - in this case, simplicity against resolution. For some designs, I've wondered about using MCP4922 DACs, which (a) are 12-bit, which is an improvement over the PIC's PWM*, (b) are proper DACS, so don't need such extreme filters, and (c) are multiplying DACs, so you can feed a "Depth CV" into the Vref input on the DAC and you get full resolution at any level. It's certainly appealing, but it makes it into two chips, etc etc.

If the program memory is a concern on the 12F1612, could you not interpolate between the table points a bit? I've sometimes saved memory by (say) reducing a 256 entry table to 128 or 64 entries, and then using a (very simple) two bit interpolation to put the missing entries back again. For many things, no-one notices. It's a useful trick to know.

Finally - Mission Creep. Hohoho! Yep, we know that one! Most of my missions have got more creep than Radiohead!

HTH,
Tom

*Some of the recent PICs have a 16-bit PWM module, but I haven't looked into it yet, and I seriously doubt it would give 16-bit resolution at a frequency useful to act as a DAC. I may be wrong. In fact, I'd *love* to be wrong.

samhay

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #58 on: December 02, 2015, 05:15:13 PM »
I figured I would reduce the size of the array if I had to - haven't quite got stuck yet, but some of the arrays now use Char instead of Int, which helps with the crap optimisation in the free xc8 compiler.
Linear interpolation is certainly easy (and cheap) enough to do.

I haven't seen any PICs that can do a 16-bit PWM with a frequency above the audio range. I don't look too closely at those that are not available through hole though.

This doesn't directly help those that can't program chips, but perhaps it would be good to start a microcontroller code library.
 
If Mr X wants a chip with X features that doesn't exist, they post a request.
Mr Y writes then writes some code and posts it.
So far this is pretty familiar, as it is how the popular vero layout sites work. I would imagine there are enough Mr (or Mrs, or Dr or whatever) Y's that will do this with no expectation of enumeration.

Now, this only works for Mr X if Mr Y or Mr Z (who preferably is in Mr X's neighbourhood) then program a chip for Mr X and pop it in the post.
Someone is going to have to pay for the chips and postage, so this part gets more tricky and there isn't much in it for Mr Z unless this is runs as a business.
« Last Edit: December 02, 2015, 05:20:06 PM by samhay »
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

ElectricDruid

Re: Is there a SMALLER digital LFO chip than the TAPLFO?
« Reply #59 on: December 03, 2015, 07:10:19 AM »
If Mr X wants a chip with X features that doesn't exist, they post a request.
Mr Y writes then writes some code and posts it.
So far this is pretty familiar, as it is how the popular vero layout sites work. I would imagine there are enough Mr (or Mrs, or Dr or whatever) Y's that will do this with no expectation of enumeration.

Now, this only works for Mr X if Mr Y or Mr Z (who preferably is in Mr X's neighbourhood) then program a chip for Mr X and pop it in the post.
Someone is going to have to pay for the chips and postage, so this part gets more tricky and there isn't much in it for Mr Z unless this is runs as a business.

It might be possible to offer the required code blocks for people to download and program onto a chip themselves. It might even be possible to offer a webpage that could *generate* your own semi-custom code by selecting different prewritten routines and waveform tables, and then once you'd selected what you want, you download it and program it. I like the idea, and I might give it a try. But I'm not offering to do the programming for you - too tedious and time-consuming, especially for lots of one-offs. As you say, this gets tricky. I can sell chips as a business (and I do, as of recently), but I need designs that I can order in quantities of several hundred, otherwise it isn't really worthwhile.