electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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
SINE wave from CMOS?
Post new topic   Reply to topic Moderators: mosc
Page 1 of 2 [42 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
aerogramma



Joined: Feb 27, 2008
Posts: 150
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Thu Oct 09, 2008 12:31 am    Post subject: SINE wave from CMOS?
Subject description: any advice on how to get one?
Reply with quote  Mark this post and the followings unread

Hello!
i've been building my first CMOS based devices in the last weeks and had a lot of fun... and probably avoided to go bankrupt too Smile

I really like the rawness that comes out but I'm also an indestructable SINE wave lover

Is there a simple way to get a sine wave from a CMOS IC?

thanks and all the best from here

aero

Wink
Back to top
View user's profile Send private message Visit poster's website
Uncle Krunkus
Moderator


Joined: Jul 11, 2005
Posts: 4759
Location: Sydney, Australia
Audio files: 52
G2 patch files: 1

PostPosted: Thu Oct 09, 2008 7:32 am    Post subject: Reply with quote  Mark this post and the followings unread

CMOS are inherently digital, and sine waves sound like they do because they are not. A very steep low pass filter would reduce a square wave to mostly just it's fundamental harmonic, which would be close to a sine wave, but it wouldn't be spot on. Almost certain to contain higher harmonics to some degree. And even then, it would have to be re-adjusted for every note.
Maybe you can waveshape a sine from a square, but I think they tend to use saw or triangle because it's a lot easier.
Sorry.

_________________
What makes a space ours, is what we put there, and what we do there.
Back to top
View user's profile Send private message Visit poster's website
jnuaury



Joined: Feb 28, 2008
Posts: 162
Location: chicago
Audio files: 9

PostPosted: Thu Oct 09, 2008 8:46 am    Post subject: Reply with quote  Mark this post and the followings unread

theres two ways to do this
one follows the concept of bit depth and the other is similar to sampling rates


"bit depth" method
you use a divider and make a "dac" with resistors after a square wave to get a sine wave essentially with a bit depth of however many divisions you use

also youll need to clock the square wave at a muh higher frequency than the pitch you want to be the sine-ish wave

link
http://www.robthefiddler.com/electronics-audio-diy/circuit-experiments/big-johnson-signal-generator/


"sampling rate" method
use a counter after the square and then run the separate count outs through resistors (or pots) set up as voltage dividers... its more or less a really fast sequencer and once again you need your square to be much higher than the sine-ish wave

link
http://www.milkcrate.com.au/_other/sea-moss/#8a

_________________
az/gde
Flickr
YouTube
Back to top
View user's profile Send private message AIM Address
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Thu Oct 09, 2008 10:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Not quite simple, but lookup Walsh functions. You don't need a DAC.
Back to top
View user's profile Send private message
Pehr



Joined: Aug 14, 2005
Posts: 1307
Location: Björkvik, Sweden
Audio files: 2

PostPosted: Thu Oct 09, 2008 10:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Check out this thread:
http://electro-music.com/forum/topic-23878.html

The first post from para includes a sine/tri cmos oscillator.

brgds

_________________
YouTube channel
flickr photostream
http://loxodrom.blogspot.com
http://www.garageband.com/artist/loxodrom
http://soundcloud.com/loxodrom
Back to top
View user's profile Send private message
jnuaury



Joined: Feb 28, 2008
Posts: 162
Location: chicago
Audio files: 9

PostPosted: Thu Oct 09, 2008 11:40 am    Post subject: Reply with quote  Mark this post and the followings unread

urbanscallywag wrote:
Not quite simple, but lookup Walsh functions. You don't need a DAC.


i hope i didnt overcomplicate things by relating dividers/counters to bit depth/sample rate...

the dac i was talking about is just a resistor ladder

Image:R2R.png

you route the square wave to a divider (i like the 4040) and then you take different divisions and wire them to the bit inputs on the diagram
different resistor values and different divisions will give you different waveforms...

using a 4017 clocked 10 times above the frequency you want the output to be can done with less trial and error as you can map 10 points onto one period of a sine wave and use that to pick resistor values for each output or just use (trim)pots to tune it in a similar manner to the ian fritz double deka vco

_________________
az/gde
Flickr
YouTube
Back to top
View user's profile Send private message AIM Address
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Thu Oct 09, 2008 2:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

No I don't think you are over complicating things, its just bizarre that the Walsh generators don't need a DAC. Shocked
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20622
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Thu Oct 09, 2008 3:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

urbanscallywag wrote:
its just bizarre that the Walsh generators don't need a DAC. Shocked


Laughing math = fun.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
aerogramma



Joined: Feb 27, 2008
Posts: 150
Location: Roma, Italy - London, UK
Audio files: 13

PostPosted: Thu Oct 09, 2008 3:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:


Laughing math = fun.



...if you can really handle it... which i'm not sure i can LOL

thanks to anyone who's repling!

Wink

aero
Back to top
View user's profile Send private message Visit poster's website
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Thu Oct 09, 2008 5:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
urbanscallywag wrote:
its just bizarre that the Walsh generators don't need a DAC. Shocked


Laughing math = fun.


Is that why it makes my head hurt? Laughing

I just wanted to add that I'm sure there are cheaper and better ways to generate a sinusoid using CMOS, Walsh functions are just fresh in my head.
Back to top
View user's profile Send private message
andrewF



Joined: Dec 29, 2006
Posts: 1174
Location: australia
Audio files: 4

PostPosted: Thu Oct 09, 2008 6:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

haven't tried these, sin_0001 looks the more interesting of the two -


sin_0001.jpg
 Description:
 Filesize:  49.76 KB
 Viewed:  198 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sin_0001.jpg



sin_0002.jpg
 Description:
 Filesize:  53.24 KB
 Viewed:  199 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

sin_0002.jpg


Back to top
View user's profile Send private message Visit poster's website
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Thu Oct 09, 2008 9:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

The problem with these circuits is making them tunable (let alone voltage controlled) right?
Back to top
View user's profile Send private message
jnuaury



Joined: Feb 28, 2008
Posts: 162
Location: chicago
Audio files: 9

PostPosted: Thu Oct 09, 2008 9:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

urbanscallywag wrote:
The problem with these circuits is making them tunable (let alone voltage controlled) right?


well the second one andrew posted does appear to be voltage controlled already.... the pot (im assuming it controls frequency) is wired as a voltage divider supply the circuit 0-15V depending on its position....

_________________
az/gde
Flickr
YouTube
Back to top
View user's profile Send private message AIM Address
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Thu Oct 09, 2008 10:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

I guess both of them have pots, but they just aren't included in the equation. Oops!
Back to top
View user's profile Send private message
jnuaury



Joined: Feb 28, 2008
Posts: 162
Location: chicago
Audio files: 9

PostPosted: Thu Oct 09, 2008 10:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

well the first circuit has the pots wired as variable resistors (rheostats)
but the second one the pot actually divides the voltage meaning you could remove the pot and toss a cv in where the wiper was connected (pin 14)
theoretically at least

_________________
az/gde
Flickr
YouTube
Back to top
View user's profile Send private message AIM Address
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Thu Oct 09, 2008 10:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I see that. But when I looked at the equations I didn't think they were tunable even though I did see the pots.
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20622
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Fri Oct 10, 2008 1:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

The first one seems to be a drum osc, where the sine fades out at a rate controlled by the variable resistor.
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Fri Oct 10, 2008 1:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

I saw the trigger input and thought it was like a bootstrap to get the thing oscillating.
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20622
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Fri Oct 10, 2008 1:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

That's about the same thing ... when it can be set to oscillate forever.
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Fri Oct 10, 2008 1:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

I see, the pot is decay control, and with the suggested 22k resistor it should oscillate with continuous amplitude?
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20622
Location: The Netherlands, Enschede
Audio files: 150
G2 patch files: 318

PostPosted: Fri Oct 10, 2008 1:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

When its really a drum osc, but I'm < 100% sure, it would likely decay to zero with 22k. So basically I don't know Wink
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Fri Oct 10, 2008 2:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

Laughing OK if LTSpice has the appropriate components I will try it.
Back to top
View user's profile Send private message
loss1234



Joined: Jul 24, 2007
Posts: 1535
Location: nyc
Audio files: 41

PostPosted: Fri Oct 10, 2008 10:35 pm    Post subject: walsh dac? Reply with quote  Mark this post and the followings unread

OK..i am no expert. BUT i thought that walsh functions at least as outlined in the Electronotes supplement s-008 definitely DO need a DAC.

I quote from the heading "Digital to Analog Conversion" from supplement s-008 (which is a great read by the way)


"it is of course necessary to combine the various walsh functions in proportion and in the proper sense to get the proper waveform for the calculated walsh coeffecients. Four possible methods are shown below"


one of the methods the show is just a simple opamp summer but even that if used with a resistor for each walsh function is summing the separate functions into one analog waveform...

or at least that is how i understood it. (since all wash functions..like squarewaves are just a combination of high and low, or on and off/1 and 0, and if you can get a sine out of that there has to be a D to A process somewhere.

really not that much different than the Counter method with the resistor ladder someone already mentioned. except walsh functions (i think) could end up a lot more complicated if you want to build the whole first 31 functions. you need a lot of xors and flip flops. and then they still recommend filtering the result.



i find these walsh things really interesting and hope to build a working generator soon.


but really, SO MANY circuits use a simple DAC that i think the term DAC sounds much scarier than it is.

there is a great article free to the public on useful walsh stuff... and it has examples of getting SINES from just a few functions at

http://www.wiseguysynth.com/larry/schematics/walsh/walsh.pdf


great topic! thanks andrew for putting up those cool schematics! are they from the cmos sourcebook?

_________________
-------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle
Back to top
View user's profile Send private message
urbanscallywag



Joined: Nov 30, 2007
Posts: 317
Location: sometimes

PostPosted: Fri Oct 10, 2008 11:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah I started looking into Walsh functions after you asked on SDIY (I asked if anyone had samples). I built/simulated the 31 function generator in software. It doesn't need a DAC. Its bonkers. Laughing
Back to top
View user's profile Send private message
loss1234



Joined: Jul 24, 2007
Posts: 1535
Location: nyc
Audio files: 41

PostPosted: Sat Oct 11, 2008 6:20 am    Post subject: Reply with quote  Mark this post and the followings unread

i am very confused. so you mean in software it doesnt need a DAC? what software did you use? i would love to hear some samples!! is it worth getting into?

thanks

_________________
-------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle
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 2 [42 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
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
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


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