electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Mixer and comparator for gating
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Sat May 15, 2010 4:00 pm    Post subject: Mixer and comparator for gating Reply with quote  Mark this post and the followings unread

We've had a discussion here:

http://electro-music.com/forum/post-295389.html#295389

Top Top wrote:
anyway, maybe this discussion in general belongs in a different thread...


Ok, here it is then.

Question: Is it possible to use a mix of multiple outputs from a 4093 to clock a 4040 (or in general as a clock signal) ?

Well, I don't know, but the discussion has led me this train of thought:

All CMOS inputs have a "window of opportunity" or voltage threshold for Hi and Low states.
The Schmitt Trigger feature as have for instance the 40106 or 4093 is suited to restore an analog signal (such as mixed oscillator outputs) .
A comparator is a Schmitt trigger with adjustable threshold.
Mixed oscillators could be treated by the comparator, and the output would be dependant on the threshold set at the comparator and the input level.

It seems like an interesting thing to try.

Some visuals to clarify...


mixer-comparator.jpg
 Description:
 Filesize:  296.6 KB
 Viewed:  525 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

mixer-comparator.jpg


Back to top
View user's profile Send private message
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Sat May 15, 2010 4:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Top Top wrote:
The 4040 will not clock a source from after a 100K resistor when running at 12V....


The supply voltage is not important as long as all CMOS have the same voltage. The threshold for Hi or Low is related to to supply voltage, but so is the the voltage of the CMOS outputs.
I suppose 100k is too large. According to Top Top 10k works, but...

Top Top wrote:
Edit: tried using 10K resistors - it would trigger the 4040 with just one osc through a 10K, but as soon as they were mixed with 10k's it no longer worked. Tried the same thing with 1K's same deal... Maybe need a buffer or something to pull the current through...


Maybe combining the outputs through 10k resistors shuts down the oscillators? So using 100k resistors and boost the signal with an opamp should eliminate the problem. A comparator can be made of a normal opamp.

So a dual opamp we can have one section to mix, one section to compare. I think maybe make a comparator with fixed threshold, and drive it with the mixer opamp gain.
Back to top
View user's profile Send private message
Top Top



Joined: Feb 02, 2010
Posts: 266
Location: California

PostPosted: Sat May 15, 2010 5:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

electri-fire wrote:




Maybe combining the outputs through 10k resistors shuts down the oscillators? So using 100k resistors and boost the signal with an opamp should eliminate the problem. A comparator can be made of a normal opamp.

So a dual opamp we can have one section to mix, one section to compare. I think maybe make a comparator with fixed threshold, and drive it with the mixer opamp gain.


Thanks for making the effort to put this in its own thread.

I am not sure if this it what you are saying, but I don't think the 10K resistors are causing a problem with the oscillators themselves (not shutting them down from working in general). I am able to mix audio signals between oscillators using 10k resistors (I've tried it) - so it is something for sure about the clock input of the 4040 and what it is expecting, vs the input of my amplifier or of the filter I made with a 4069 (which also accepted the resistor-mixed oscillators as an input source).

Honestly I am a little lost when it comes to the whole comparator part of your post.
Back to top
View user's profile Send private message Visit poster's website
DGTom



Joined: Dec 08, 2008
Posts: 211
Location: Adelaide
Audio files: 3
G2 patch files: 1

PostPosted: Sat May 15, 2010 7:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've used a comparator to process the outputs from 3 4093 gated oscs. These where being switched on & off by a 4021 shift register (which was being clocked by the 4th 4093)

After mixing the outputs of the 4093s together I ran them into a basic 358 comparator with a pot as voltage divider to provide the referance voltage. The output of the op-amp was then fed into the data input of the 4021, creating a kind of data loop where adjusting the comparator referance altered the density of data being fed into the shift register.

was a very cool little psuedo random melody maker with the shift register clocked slow & a great complex waveform gen with the clock at audio rates.

I don't know if this would create clean enough highs & lows to step a counter in the way its intended but its worth experimenting with Very Happy
Back to top
View user's profile Send private message
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Sun May 16, 2010 6:09 am    Post subject: Reply with quote  Mark this post and the followings unread

DGTom wrote:
I've used a comparator to process the outputs from 3 4093 gated oscs. These where being switched on & off by a 4021 shift register (which was being clocked by the 4th 4093)

After mixing the outputs of the 4093s together I ran them into a basic 358 comparator with a pot as voltage divider to provide the referance voltage. The output of the op-amp was then fed into the data input of the 4021, creating a kind of data loop where adjusting the comparator referance altered the density of data being fed into the shift register.

It was a very cool little psuedo random melody maker with the shift register clocked slow & a great complex waveform gen with the clock at audio rates


Nice! So that works then. I figured it should, but haven't tried yet.

DGTom wrote:
I don't know if this would create clean enough highs & lows to step a counter in the way its intended but its worth experimenting with Very Happy

If not clean enough, a Schmitt trigger buffer like an invertor stage (or two to retain polarity) from a 40106 , or a 4093 inserted should clean the signal to drive other CMOS from the comparator.
Back to top
View user's profile Send private message
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Sun May 16, 2010 6:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Top Top wrote:
I am able to mix audio signals between oscillators using 10k resistors (I've tried it)


I should have known that, as I have 10k resistors at my mixer opamp myself Laughing .
Top Top wrote:
- so it is something for sure about the clock input of the 4040 and what it is expecting.


Well, you have so much divers signals (two different sounds at each 4093 gate, then erm, 3 of those you had? That would be 9 oscillators mixed. Possibly the mixed output never reaches a proper Low? Try using just 2 4093 gates with one of the input just High, the other with an oscillator.
This mix is bound to have some more Low states available. I wouldn't know what else to try at this moment.

Top Top wrote:
Honestly I am a little lost when it comes to the whole comparator part of your post.

It's not very hard once you've had some time to study it. Feel free to ask more when needed. Considering DG Tom's experience it's nice to have a comparator in your Lunetta. As I illustrated with the squarewaves, and DG Tom mentioned, with lower threshold more Highs get through, higher threshold settings (or "reference voltage") gets you a less dense pattern of Highs.

The comparator could be of use to derive either Gate signals from external audio with low threshold, or "triggers" , by going High on just the attack portions with higher threshold. This way you could use a drummachine sound input and maybe have the Lunetta synchronised with external audio.

Also, but that would take some careful tweaking of the threshold, you could track the frequency of the external input. This would probably work best when sending it through a diode to pass just the positive portion (would be an octave down though) and use some lowpass filter to remove the harmonics.
Back to top
View user's profile Send private message
Top Top



Joined: Feb 02, 2010
Posts: 266
Location: California

PostPosted: Sun May 16, 2010 11:48 am    Post subject: Reply with quote  Mark this post and the followings unread

electri-fire wrote:

Well, you have so much divers signals (two different sounds at each 4093 gate, then erm, 3 of those you had? That would be 9 oscillators mixed. Possibly the mixed output never reaches a proper Low? Try using just 2 4093 gates with one of the input just High, the other with an oscillator.
This mix is bound to have some more Low states available. I wouldn't know what else to try at this moment.


Sorry maybe I wasn't clear on this... I tried it with just one oscillator (1/4 of the 4093 chip), then two oscillators. Worked with one, but as soon as I got to two, the 4040 stopped doing any clocking.

electri-fire wrote:

It's not very hard once you've had some time to study it. Feel free to ask more when needed. Considering DG Tom's experience it's nice to have a comparator in your Lunetta. As I illustrated with the squarewaves, and DG Tom mentioned, with lower threshold more Highs get through, higher threshold settings (or "reference voltage") gets you a less dense pattern of Highs.

The comparator could be of use to derive either Gate signals from external audio with low threshold, or "triggers" , by going High on just the attack portions with higher threshold. This way you could use a drummachine sound input and maybe have the Lunetta synchronised with external audio.

Also, but that would take some careful tweaking of the threshold, you could track the frequency of the external input. This would probably work best when sending it through a diode to pass just the positive portion (would be an octave down though) and use some lowpass filter to remove the harmonics.


If I understand, is the comparator sort of acting like a digital expander or compressor in a way? Bringing up high levels or shutting them down depending on how it is set?
Back to top
View user's profile Send private message Visit poster's website
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Sun May 16, 2010 2:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Top Top wrote:
If I understand, is the comparator sort of acting like a digital expander or compressor in a way? Bringing up high levels or shutting them down depending on how it is set?


Indeed. A compander works as an expander or noise gate of sorts. It may well be the thing you need to tackle your issue.

DG Tom, as you had one working in a Lunetta, might you provide us with a schematic?
Back to top
View user's profile Send private message
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Sun May 16, 2010 6:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

http://en.wikipedia.org/wiki/Schmitt_trigger#Devices_that_include_a_built-in_Schmitt_trigger

Top Top: I just read some CMOS listed here , including the 4040 already have Schmitt triggering on the inputs.

Hrmpff, there go all my carefully crafted theories. Sad
Back to top
View user's profile Send private message
DGTom



Joined: Dec 08, 2008
Posts: 211
Location: Adelaide
Audio files: 3
G2 patch files: 1

PostPosted: Sun May 16, 2010 7:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

electri-fire wrote:

DGTom wrote:
I don't know if this would create clean enough highs & lows to step a counter in the way its intended but its worth experimenting with Very Happy

If not clean enough, a Schmitt trigger buffer like an invertor stage (or two to retain polarity) from a 40106 , or a 4093 inserted should clean the signal to drive other CMOS from the comparator.


The problem is getting clear enough peaks & troughs for a comparator to be able to produce meaningfull data at its output. having the comparator after a mixer is a good idea in that respect - as you change the balance of what you hear the timing signal will alter, could provide a good interface for jamming.

Anyway, I think if you are looking to combine more than, say, 3 streams of clocks there are better ways to do it with CMOS rather than throwing op-amps at it Wink

(still waiting for mosc to come & bust up this party & tell us to GTFO of here will all this linear nonsense)

OK. Here are some basic starting points for digitizing analog voltages into the lunetta CMOS playground;

Posted Image, might have been reduced in size. Click Image to view fullscreen.

The bottom two are ideal for bringing the outside world in, you may need an amp with gain if you wanna input guitar & / or line level sources etc. but, these crunch everything into a nice stream of 1s & 0s for consumption by your squarewave bleep box.

Also great for hooking your lunetta up to drum machines, or even computer based sequencers, just get a short drum sound with a nice fast attack Idea

The top, 2 amp cct. is a little more interesting. I used it in these vids;

http://www.youtube.com/watch?v=0jEodYEdRdw

http://www.youtube.com/watch?v=KrzLgyoLK4U

... to get all the choppy, gating type sounds. Basically. Feed an audible clock into the In & a slower clock into CV & adjust the Threshold so that the slow clock gates the fast one... now... crank that slow clock up for buzzy, pwm action Twisted Evil

So, say you have 3 or 4 differant, asynchronous, clocks you want to combine & use to drive a counter with & the comparator just isn't cutting it? There are other ways to do it in CMOS.

This schematic is for a module I made for my regular modular so all the inputs & outputs are buffered, for lunetta use just ignore the op-amps & transistors;

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Replace the switches feeding B0 - B3 on the 4585 & you can compare 2 differant sets of 4 inputs. Its meant to compare binary numbers, but a mix of synchronous & asynchronous clocks is really interesting.
Back to top
View user's profile Send private message
electri-fire



Joined: Jul 26, 2006
Posts: 536
Location: Dordrecht NL
Audio files: 4
G2 patch files: 4

PostPosted: Mon May 17, 2010 4:33 am    Post subject: Reply with quote  Mark this post and the followings unread

electri-fire wrote:
DG Tom, as you had one working in a Lunetta, might you provide us with a schematic?


Wonderful! And nice demos Very Happy ! The second one is a nice illustration of the pulse density effects I expected to get by varying the threshold. Thank you for posting this.
Back to top
View user's profile Send private message
Top Top



Joined: Feb 02, 2010
Posts: 266
Location: California

PostPosted: Tue May 18, 2010 1:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for this info guys... I need to take a little time to digest all of this and will probably come back with some more questions.
Back to top
View user's profile Send private message Visit poster's website
DGTom



Joined: Dec 08, 2008
Posts: 211
Location: Adelaide
Audio files: 3
G2 patch files: 1

PostPosted: Tue May 18, 2010 2:16 am    Post subject: Reply with quote  Mark this post and the followings unread

electri-fire wrote:
The second one is a nice illustration of the pulse density effects I expected to get by varying the threshold.


The great thing about the VC Comparator is that you can really go to town on it with a lunetta, add extra CV inputs so you can feed in more gates - just more 100Ks & more pots, or, add a simple R/2R alongside the threshold pot. If you already have an R/2R CVing VCOs, use it to vary the threshold as well so you get pitch + pulsewidth relationships.

I am a huge fan of audio rate PWM.

electri-fire wrote:
Thank you for posting this.


No problems Very Happy


I forgot to post this the other day;

http://dl.dropbox.com/u/252415/4021_Resonator_Ver2.mp3

some audio of the 4093 / 4021 feedback loop. 3 gated oscs. mixed together & fed into a comparator which is "sampled" by the shift register. The audio is taken from the mixer output. A mixture of slow clocking the SR & audio rate.

I really like the range you get by altering the comparator threshold, from percussive noise to overlapping screech Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use