Hardware wavetable on an arduino

Please remember the terms of your membership agreement.

Moderators: valis, garyb

DigiSUN
Posts: 42
Joined: Thu May 01, 2003 4:00 pm

Re: Hardware wavetable on an arduino

Post by DigiSUN »

Beautiful work, Neutron!

I would suggest using numerical engineering tools, such as Matlab. High-level and very powerful. (There's also a free open-source numerical application called Octave. Personally, i never used Octave but it should do the job pretty well).
a few more very simple tips: Instead of clipping the values other than 0-255, you can simply normalize the waveform, then perform rounding.
Also, if you build the various wavefroms using trial & error, you can use logarithmic scales for the amplitude, so that different results will sound more different to the ear.

just my 2 cents... :)
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

thanks, i will try octave. especially if it can round corners for nice overdrive waves.

Square/Pulse ouput. just about the easiest thing ever! :)

PORTA = outputvalue1;
PORTC = outputvalue2;

That sends the values to output pins all at once and takes almost no time
if i use the most significant bit then i have a nice clean non sampled squarewave
then i can send the midi note number to a different port to control how fast to charge a capacitor. instant sawtooth and triangle wave which can easily be analog supersaw and supertriangle :) depending just mixing the wavetables the current way.

analog sine output would be a bit tougher, but im not going to bother with it, thats what filters are for :)

not only that but now i can get rid of the stupid PWM output and use the ports to drive parrallel DACs. for the digital oscs.
and the sound will be better. 2x 8 bit waves mixed together analog for much better resolution, instead of 2 x 8 bit waves mixed and crushed down to 8 bits (only 7 bits per wave)
User avatar
iSiStOy
Posts: 713
Joined: Mon Jun 20, 2005 4:00 pm

Re: Hardware wavetable on an arduino

Post by iSiStOy »

mixing osc waves in analog domain is an excellent idea, imho.
Isn't the evolver working so, with digital waveforms and then an analog path to the filter stage?
User avatar
HUROLURA
Posts: 1314
Joined: Tue Feb 21, 2006 4:00 pm
Location: FRANCE
Contact:

Re: Hardware wavetable on an arduino

Post by HUROLURA »

Yes, that is just the principle of the evolver...

Neutron will soon ground a company named Neutron Smith Instrument !!! :D

Nice project, Neutron.

What is the resolution needed for your project ? Is 8-bit enough ?

Do you have some special waveform in mind ?

CheerZ
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

The digital waveforms are each 8 bits, but mixed together in analog the equivalent bit depth would be more.

I think the evolver is a bit similar but the digitals oscs sound different for sure. it has analog ones as well, maybe i will have a look inside :)

the waveform i am looking for is the one when you put your finger on the end of a guitar jack when the amp is turned up loud :) (woody English mains hum, not tinny American stuff :D)
0-255 values at 8 bits
User avatar
iSiStOy
Posts: 713
Joined: Mon Jun 20, 2005 4:00 pm

Re: Hardware wavetable on an arduino

Post by iSiStOy »

No chance I can reproduce that sound... I don't have a guitar :lol:
User avatar
HUROLURA
Posts: 1314
Joined: Tue Feb 21, 2006 4:00 pm
Location: FRANCE
Contact:

Re: Hardware wavetable on an arduino

Post by HUROLURA »

No guitar available either ...
User avatar
iSiStOy
Posts: 713
Joined: Mon Jun 20, 2005 4:00 pm

Re: Hardware wavetable on an arduino

Post by iSiStOy »

Hey Neutron,
it has analog ones as well, maybe i will have a look inside
And maybe you can rip the oscillators off the evo and route them directly to your filter?

:wink:
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

iSiStOy wrote:Hey Neutron,
it has analog ones as well, maybe i will have a look inside
And maybe you can rip the oscillators off the evo and route them directly to your filter?

:wink:

that would be cheating. i want it to be reproducible for other electronics/music hobbyists without having to spend $$$ on an evolver.
User avatar
iSiStOy
Posts: 713
Joined: Mon Jun 20, 2005 4:00 pm

Re: Hardware wavetable on an arduino

Post by iSiStOy »

I'm joking.
This would not be fun anyway and surely quite a more expensive thing than DIY.
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

Oh :D i was hopin that was the case! this oscillator is much more fun than those boring static things anyways :)

Last night i got sync working which has enabled an entirely new range of sounds, not just ordinary syc, but subsync as well which is sync to every 2nd, 4th,8th, 16th etc cycle start. that means lower sounds can be synced to higher frequencies, and quite a few other possibilities.
User avatar
darkrezin
Posts: 2123
Joined: Fri Nov 02, 2001 4:00 pm
Location: crackney

Re: Hardware wavetable on an arduino

Post by darkrezin »

Nice project Neutron - didn't know Arduino could be used for such cool stuff.

BTW as far as I know the Evolver signal path can never be fully analog - I'm pretty sure even the analog oscs are converted to digital at some point in the signal chain for a lot of the routing/mixing/FX processing/feedback stuff.
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

A little update.
now the wave outputs are on separate parralel DACS and it sounds much better!
i have to completely rejig the envelope system though. probably with more DACs, but serial ones, since they dont have to be quite as fast.

i built a nice little power supply which powers the +- 15v stuff

started tweaking the SSM2044 filter, no envelope control yet, but getting some squelchy synth sounds :), i love the 1977 IC filter with the 2009 arduino :)
addingfilter.jpg
addingfilter.jpg (616.13 KiB) Viewed 1527 times
when this is all how i like it i am going to make a single circuitboard for everything and put it in a case. ill keep the arduino in there so i can do USB updates for adding wavetables and changing the program.
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

newest development, controlling the voltage reference of the DACs with an envelope also generated on the same arduino basically its an 8 bit voltage VCA working on the level of the 8 bit DAC = 16 bits resolution

x2 for 2 of the DACS = lots of bits and very smooth sounding

also x1x2x3x4 etc sync its great to get deep purple type 5th organ

can play very high notes without any jitter.

octave semitone, and detune for second and third osc (3rd working but it has no envelope) control

mainly though the ADSR is much better now, before the control would basically jump from slow to fast, so i made another wavetable with exponential values and use it for the scaling of the controls, now i can get super nice ADSR, and also (soon) use the other wavetables for sections of the envelope.

also now the envelope PWM is running at 31.25 khz instead of 500hz so there is no zipper noise, it happens at the same speed as the wave is generated. can use a much smaller timebase filter and it is super snappy.

I intend for anything wavetable based to be able to use any of the wavetables even if they were not designed for it, for instance LFO using envelope of 5th harmonic wavetable, main osc using exponential control wave, decay using noise etc. might be good to bring back some of the glitchy digital sounds at extreme settings.

I am getting more and more real synth sounds even without the filter (problems with my filter i took it out, when the q was high the level really dropped) ill fix it later , im concentrating on the oscillators.

it started as a fun experiment, now it is really maturing to a usable synth. next up will be making it do glides 303 style.

ill put a new video of the oscillator this weekend. much better sound!
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

http://www.youtube.com/watch?v=1rAw8MmHKtw

coming along very nice. i hope to make a arduino "shield" with the DACS and the filter, MIDI in and audio out.
although a non DSP micro controller like that is not really supposed to be a wave table oscillator it can be !

it does 3 now, besides what is in the video, now it has variable accent with its own AD envelope, it can tweak the filter, and also add a bit of osc 3 (which can be a seperate wavetable)

variable accent means, the accent does not happen at a fixed point like in a 303 or whatever, you can turn the knob and lower and lower velocities cause the accent to happen. its a great performance tool for baseline synths. also with different attacks i can get the "bwoow" drum and bass sound.

it would use MIDI in (i have started weaning it off its own internal controls) so you could build the dedicated controller or just use your sequencer or a MIDI controller to adjust the settings.

I am learning a lot of real world things about doing synthesis that will help me make the unimatrix zero really good.
User avatar
garyb
Moderator
Posts: 23246
Joined: Sun Apr 15, 2001 4:00 pm
Location: ghetto by the sea

Re: Hardware wavetable on an arduino

Post by garyb »

fine work.
User avatar
iSiStOy
Posts: 713
Joined: Mon Jun 20, 2005 4:00 pm

Re: Hardware wavetable on an arduino

Post by iSiStOy »

It's sounding good indeed! I find it close to a super bass station sound, but with more osc.
Thanks for sharing.
User avatar
HUROLURA
Posts: 1314
Joined: Tue Feb 21, 2006 4:00 pm
Location: FRANCE
Contact:

Re: Hardware wavetable on an arduino

Post by HUROLURA »

Nice work indeed.
Any cost info ?
User avatar
Neutron
Posts: 2274
Joined: Sun Apr 29, 2001 4:00 pm
Location: Great white north eh
Contact:

Re: Hardware wavetable on an arduino

Post by Neutron »

Well there have been some more changes, .

The main thing is i am using an old school ROM chip with the 64k of wavetables from an old and no longer avaliable project called "AVR-X" (i dont know where he got them but they are good wavetables, i have loaded a few in my program to see how they sound) i am putting them in a 256K ROM but first i will calculate 3 interpolated waves between each of the waves in that set. along with granular fading between those, i can get a nice smooth transition between the waves for a true wavetable sound.

wavetable will be modulateable by time(LFO), envelope or velocity

also (this also will go on the small board) i have accent which triggers at a certain velocity, which can be adjusted on the fly with a knob, its cool to adjust the accent threshold while its playing. accent triggers a seperate envelope generator which works on a seperate oscillator and filter (can be on a different wavetable)

as for the cost it can be as much or as little as you want, but it is not really practical since you can get so many cheap synths. this is a learning thing for me. so i can get in to the guts of things and see why they sound how they sound, maybe it will help me in the day when i have an xite and there is a scope 5 SDK.
User avatar
HUROLURA
Posts: 1314
Joined: Tue Feb 21, 2006 4:00 pm
Location: FRANCE
Contact:

Re: Hardware wavetable on an arduino

Post by HUROLURA »

Regarding the Rom chips, a flash would probably be easier to update.

For the wavetables, maybe this is something that has been built up for a MicroWave user set...

Regarding the cost, a monophonic version would already be quite interesting...
Post Reply