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 » Developers' Corner
AWG
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [6 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Grumble



Joined: Nov 23, 2015
Posts: 1182
Location: Netherlands
Audio files: 29

PostPosted: Fri Jul 14, 2017 12:18 pm    Post subject: AWG
Subject description: Arbitrary Waveform Generator
Reply with quote  Mark this post and the followings unread

With this module I'm trying to create wave forms by adding sinusoidal waves of different frequency and amplitude, chosing the odd, even or all full harmonic frequencies.

The heart of the Arbitrary Waveform Generator I have build is a 256 words of 9 bits FIFO, I choose this fifo because I have some in my box of chips and my original thoughts was write to the fifo and at the same time read the fifo and convert it to an analog signal.
This proved to be impossible, but I could fill the fifo and read the output repeatedly, creating a melodic signal.

The read part of the FIFO (an AMD AM7201) is clocked using an Analog Devices AD9833 and the digital output of the FIFO is converted using an Analog Devices AD9760 10 bits parallel DAC with the lowest bit tied to GND level.
The output of the AD9833 DDS is both used as the read clock for the AM7201 FIFO as well for the write puls of the AD9760 DAC, so by changing the frequency of the AD9833 the output signal of this module changes.
Luckely the output of the FIFO becomes valid after the leading edge of the clock signal, while the DAC samples the input at the trailing edge of the clock signal.
If one sinus fills the FIFO, I need a clock signal 256x the desired frequency but still it is possible to generate a sine-wave well above hearing frequencies
I had some troubles to fill the FIFO properly, because the FIFO first has to be reset when I want to fill it with a new digital signal of 256 words of 9 bits.
Resetting must be done by asserting the reset input LOW while Read and Write are both high, where the Read signal is coming from the (running) AD9833 DDS. So what I did was lowering (temporarily) lower the frequency of the AD9833, wait for the Read signal to go LOW, and when it goes HIGH again, LOW the Reset signal and the AM7201 resets.
After this I can fill the FIFO with new data.

This data consists of:
1- a Sine wave, with added a number of harmonics (odd, even or all) with different amplitudes.
2- 20 predefined waves, used with permission taken from the VCDO1 from Electric Druid which I converted to 9 bits signals.

HERE a short video of this module.


SCH_Morphius.pdf
 Description:
updated schematics

Download
 Filename:  SCH_Morphius.pdf
 Filesize:  169.67 KB
 Downloaded:  408 Time(s)


_________________
my synth

Last edited by Grumble on Sat Jul 15, 2017 10:17 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 23395
Location: The Netherlands, Enschede
Audio files: 261
G2 patch files: 320

PostPosted: Fri Jul 14, 2017 1:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sounds good - I then thought oh wow .. complicated thing .. until I realized it was four times the same schematic in the pdf. Laughing well it still is not very simple of course Rolling Eyes

Anyway interesting this can be done with just 256 steps and 9 bits .. also interesting that the readout speed is being varied to tune the thing .. thus avoiding all issues with aliasing (and turning imperfections into harmonics that just will become inaudible instead of folding back).

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1182
Location: Netherlands
Audio files: 29

PostPosted: Fri Jul 14, 2017 2:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Oops, hahaha, didn't notice the quadruple pdf drawing.
Have corrected this 😖

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Electric Druid



Joined: Mar 13, 2012
Posts: 43
Location: UK

PostPosted: Mon Jul 17, 2017 1:48 am    Post subject: Reply with quote  Mark this post and the followings unread

The nice thing about doing it like this is definitely the variable sample rate. That gives you the same quality at any frequency you can produce, more or less. Certainly you avoid the "nasty aliasing on high notes" you get with the typical naive fixed sample rate oscillator (like my VCDO).

I've sometimes wondered about doing something similar, but using the DDS as the PIC's master clock, so I could do some clever stuff in the software, but still have the genuine variable rate.

This is good work, anyway. Congratulations.

Tom

_________________
Electric Druid Synth and Pedal DIY website
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 23395
Location: The Netherlands, Enschede
Audio files: 261
G2 patch files: 320

PostPosted: Mon Jul 17, 2017 2:42 am    Post subject: Reply with quote  Mark this post and the followings unread

Processors are cheap enough to have one do dedicated sound generation with a variable clock rate I'd say ... it's something worthwhile to try IMO.

They may still be fast enough to do some basic IO as well .. but stuff like MIDI would become a nightmare.

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1182
Location: Netherlands
Audio files: 29

PostPosted: Tue Jul 18, 2017 12:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't think it is even remotely possible to get the same acuricy with a dedicated processor compared to the dds I use.
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [6 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 » Developers' Corner
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