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 » Developers' Corner
Everything you always wanted to know about wavetables
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [8 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: 1294
Location: Netherlands
Audio files: 30

PostPosted: Mon Sep 16, 2019 10:47 pm    Post subject: Everything you always wanted to know about wavetables
Subject description: but were afraid to ask...
Reply with quote  Mark this post and the followings unread

http://synthtech.com/waveedit/

A very nice website where you can download (free) the program WAVEedit.exe to get acquainted with wavetables, how they sound and look like.
You can even save them as a .wav files

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

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



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Tue Sep 17, 2019 7:15 am    Post subject: Reply with quote  Mark this post and the followings unread

hmm I just saw a video yesterday about a module or synth with wavetables that could be edited and there was some software for it
to create them, listen and store (I believe it was also free). Could have been the same thing but let me see if I can find it again.


edit: found it.
The module is the Tabula Rasa which is an arduino/ATmega328 based DIY wavetable oscillator.
Wavetable editing software can be found here: https://github.com/surgesg/tabulaRasa/tree/master/tabularasa_src/software/tabulaRasa_Processing

I haven't tested it but I don't think it can save as wav, could still be useful though. Here's the video I saw it in: https://www.youtube.com/watch?v=

There's also a muffwiggler thread about it here: https://www.muffwiggler.com/forum/topic-27829.html

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
ixtern



Joined: Jun 25, 2018
Posts: 145
Location: Poland

PostPosted: Wed Sep 18, 2019 8:50 am    Post subject: Reply with quote  Mark this post and the followings unread

My Arduino-controlled wavetable double VCO (DCO rather?). Overcomplicated, but I had to use buffers to avoid glitches (race condition artifacts). Project suspended over a year as I change my direction to analog VCOs.
74HC4040 counters were used in the last version instead of 4040.


wavetable_vco_v1.pdf
 Description:

Download
 Filename:  wavetable_vco_v1.pdf
 Filesize:  193.82 KB
 Downloaded:  435 Time(s)

Back to top
View user's profile Send private message
ixtern



Joined: Jun 25, 2018
Posts: 145
Location: Poland

PostPosted: Thu Sep 19, 2019 12:44 am    Post subject: Reply with quote  Mark this post and the followings unread

And here are the AD9833 hex programming codes for MIDI range tempered musical scale x 256 (as 8-bit wavetable VCO needs clock frequency 256 times greater than synthesized waveform). Processed with Excel.
"freq diff" column is the difference between nominal frequency ("Frequency" column) and VCO output frequency ("AD9833 freq out" column/256).


conversion2.pdf
 Description:

Download
 Filename:  conversion2.pdf
 Filesize:  127.53 KB
 Downloaded:  428 Time(s)

Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Sep 19, 2019 1:47 am    Post subject: Reply with quote  Mark this post and the followings unread

It's offtopic, but this is how I program the AD9833:

Code:

/* name AD9833 calculation macros */
#define AD_F_MCLK 16000000 // Clock speed of the ad9833 reference clock
#define AD_2POW28 268435456 // Used in calculating output freq
/* Macro that calculates the value for a ad9833 frequency register from a frequency */
#define AD_FREQ_CALC(calc_freq) (float)(((double)AD_2POW28/(double)AD_F_MCLK*calc_freq)*4)
frequency_word = AD_FREQ_CALC(frequency_AD9833);
high = uint16_t (AD_FREQ0 | (0x3FFF&(uint16_t)(frequency_word>>16)));//HIGH word for DDS
low = uint16_t (AD_FREQ0 | (0x3FFF&(uint16_t)(frequency_word>>2 )));//LOW word for DDS
/*
 wave shapes are:
 AD_SINE, AD_SQUARE or AD_TRI
 remember: AD_SQUARE puts out a square of 0 - 5volt, while AD_TRI and
 AD_SINE puts out 0 - 0.65 volt
*/   
ad9833_send(AD_SINE);// set waveform shape
ad9833_send(low);//low word
ad9833_send(high);//high word

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



Joined: Jun 25, 2018
Posts: 145
Location: Poland

PostPosted: Thu Sep 19, 2019 2:16 am    Post subject: Reply with quote  Mark this post and the followings unread

And this is how I am doing it:
Code:

// -------------------------------------------------------------------------
// Set frequency of the first AD9833 unit using global variables
// -------------------------------------------------------------------------
void SetAD9833_1(void)
{
    // With 8000000 clock sometimes problems happens (corrupted data)
    SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE2));
     
    //WriteRegisterAD9833_1(0x2000);  // no reset bit NOT WORKING
    WriteRegisterAD9833_1(0x2100);  // reset bit set
    WriteRegisterAD9833_1(AD9833_1_256_LSB);
    WriteRegisterAD9833_1(AD9833_1_256_MSB);
    WriteRegisterAD9833_1(0x2028); // set square wave, reset bit cleared 

    SPI.endTransaction();       
}

Thread starts to be half-Arduino now Smile
Back to top
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Sep 19, 2019 2:43 am    Post subject: Reply with quote  Mark this post and the followings unread

Difference is that you get your register data from a lookup table and I calculate the register data from a given frequency.
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
ixtern



Joined: Jun 25, 2018
Posts: 145
Location: Poland

PostPosted: Thu Sep 19, 2019 3:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Grumble wrote:
Difference is that you get your register data from a lookup table and I calculate the register data from a given frequency.

Yes, I wanted to do it faster because I've planned to control 8 VCOs from one Arduino with many additional functionalities.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [8 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