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
An 8 Operator FM Synthesizer Implementation (FPGA)
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [21 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Fri Mar 12, 2010 4:18 pm    Post subject: An 8 Operator FM Synthesizer Implementation (FPGA) Reply with quote  Mark this post and the followings unread

http://home1.gte.net/res0658s/FPGA_synth/8opFM16voice.html
_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sat Mar 20, 2010 6:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Progress!

Today I finally got sound. Seems like the ADSRs and NCAs are working, as well as the NCOs (mostly) and polyphony also seems to work. Gotta work out the bug that is causing the pitch to be the same regardless of the note-on message sent...

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Dan Lavin



Joined: Nov 09, 2006
Posts: 649
Location: Spring Lake, Mi, USA
Audio files: 21

PostPosted: Sun Mar 21, 2010 10:18 am    Post subject: Reply with quote  Mark this post and the followings unread

That is good news. I'd be happy with a 4-voice 8-op FM synth! Good luck Scott!
_________________
Synth DIY since 1977!
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Mar 28, 2010 12:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Some progress - finally.

For some reason yet to be determined, many of the RAMs that I tried to infer were being optimized away as "identical". I could see no reason for this to happen in the source code, so as a troubleshooting step, I rewrote them as forced instantiations of RAMs. All of a sudden, the freaky behavior ended and I'm getting sound now.

More testing reveals other problems, but I believe these are just "oops - why did I do that?" kind of stuff.

Once I get it working fully and correctly, I will post some sounds.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Mar 28, 2010 4:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Looks like the chaining is working. I've been playing with 3 operator sounds so far. Lots of fun screwing around with different settings. Lots of different sounds available.

Once I'm satisfied that everything is working, I think I'll just turn Audacity on and play with the patch editor and post that.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Mar 28, 2010 4:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's a couple of 3-op samples. More later.


8op_001.mp3
 Description:
A short sample using the synth in 3 operator mode

Download
 Filename:  8op_001.mp3
 Filesize:  487.01 KB
 Downloaded:  1253 Time(s)


8op_002.mp3
 Description:
a sort of Krell music thing here...

Download
 Filename:  8op_002.mp3
 Filesize:  454.76 KB
 Downloaded:  1278 Time(s)


_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


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

PostPosted: Mon Mar 29, 2010 10:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Aha! So that's where you've been Laughing

Sounds like erm .. FM Shocked some powerful sounds!

_________________
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
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Mon Mar 29, 2010 11:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
Aha! So that's where you've been Laughing

uh-oh - I've been found out! cyclops
Blue Hell wrote:
Sounds like erm .. FM Shocked some powerful sounds!

I still need to do more testing, I haven't yet even tried 4 operators (except to get some rather un-useful noise). It seems to be basically working. I can create multiple sound generators within an 8 operator chain, I've tried four 2 operator chains and it sounds correct, so the feed-to-next-operator logic is working.

Now I need to get the operator zero self feedback working (this is a DX7 feature). This is a special case, so it will take some more thinking (and banging and swearing).

I want to, but haven't approached other sorts of odd operator connections, such as 2 operator outputs fed to an adder, the sum output modulating another operator.

And then there's the UI... Nothing about FM is intuitive, so making the UI intuitive or even just not obfuscatively confusing will be a challenge as well. cyclops

So far, this much logic is using only 55% of the slices in a Spartan-3A 400K equivalent gate FPGA. There are also 11 multipliers unused in the design, so there's more that can be done in parallel if necessary. The state machine part that computes the voices can actually be 2 clocks longer than I currently have it, so there's yet more room. The target FPGA is the smallest and least expensive one I have. The board that this is running on costs $50.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Thu Apr 01, 2010 7:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Yesterday I finished the operator zero feedback path. I have never heard a DX7, at least not that I know of, I'm sure some commercial pieces of music have used them, but I am not aware of any good examples - especially examples which use this DX7 feature. So I am at a disadvantage in determining what it should do and what it should sound like.

What I hear while testing is not what I expected, and I'm not sure of my expectations. For the settings of feedback amount that I've played with, I hear what I can best describe as portamento on very low notes and almost no effect on high notes with stronger portamento as I play lower and lower - to the point where it sounds rather silly.

After cogitating about the circuit, I can see why the effect might be more intense at lower frequencies - this is because the amount of feedback is not scaled by the "base" frequency setting of the operator. This reminds me of trying to use a linear pitch CV with pitch modulation where the bass notes have a wild effect and the treble notes have little to no effect.

Does anyone here know if the DX7 scaled the feedback amount to track the note's base frequency?

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Tue May 11, 2010 4:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well, I've done a lot of work on this to troubleshoot a set of problems. The detuning of low notes turned out to be a shortcut I tried to take that didn't work as I thought it should. I found this by simplifying the design such that each voice was a single self feedback operator.

I want to play with other algorithms to create the feedback path for this, currently the synth can do morphs between near-sawtooth and sine wave with simple feedback. This is probably going to evolve into a new synth design.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed May 12, 2010 1:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

This little experiment seems to be sprouting the beginnings of a new synth, I added some ADSRs to control amplitude and modulation and I can get some interesting sounds. "Brass" would be my description.

Still haven't experimented with other feedback algorithms, that's next. I wanted to first determine if it was worth my time at all.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Wed May 12, 2010 3:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
This little experiment seems to be sprouting the beginnings of a new synth, I added some ADSRs to control amplitude and modulation and I can get some interesting sounds. "Brass" would be my description.

Still haven't experimented with other feedback algorithms, that's next. I wanted to first determine if it was worth my time at all.


Whhhhaaat?? I can't hear anything! Wink Wink
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed May 12, 2010 5:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok, here's a small sample of the patch I'm messing with right now.

This synth has only an oscillator and waveshaper with EG per voice. There is no filter in this design.


Feedback_FM_Brass_Sound_001.mp3
 Description:
Feedback FM Brassy Sound

Download
 Filename:  Feedback_FM_Brass_Sound_001.mp3
 Filesize:  309.88 KB
 Downloaded:  1197 Time(s)


_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Wed May 12, 2010 6:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
Ok, here's a small sample of the patch I'm messing with right now.

This synth has only an oscillator and waveshaper with EG per voice. There is no filter in this design.


Surprised Whoa. By chance - have you any higher octaves available for play? That, having been created from your mind - wow. Surprised
If coming - I can't wait to hear more'n 1 oscillator doing it. Surprised Smile
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed May 12, 2010 6:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Higher octaves - yes, I used only the lower two because they sounded more brassy on this patch...

Further development will depend on whether I can come up with other feedback algorithms that sound different.

Even a fairly small FPGA could probably do 16 voices with 4 of these oscillator feedback FM things per voice, so yeah, probably really fat brass is possible.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Thu May 13, 2010 10:37 am    Post subject: Reply with quote  Mark this post and the followings unread

EDITING: This post has been edited.

I should note that this technique doesn't produce confoundingly new sounds. This project started as a troubleshooting device which thankfully worked. It will, however allow high polyphony and/or multiple oscillators per voice even in a small FPGA (400K equivalent gates).

I've added one additional feedback algorithm to the design. I can select "linear feedback" which is the original, simple feedback system and "squared feedback" which is the linear feedback squared before applying to modulate the phase increment.

Here is a sample with notes through 5 octaves, first a run of notes with linear feedback and then a similar run of notes with squared feedback. (Note that the synth is capable of more than 5 octaves, but that's as wide as my keyboard is).

The difference is more than subtle, so I will try some other things too. The linear feedback results in a near sawtooth wave (at max modulation) and the squared feedback results in what looks like a lowpass filtered square wave.


Feedback_FM_002.mp3
 Description:
Feedback FM Sample with Linear and Squared Feedback

Download
 Filename:  Feedback_FM_002.mp3
 Filesize:  699.65 KB
 Downloaded:  1142 Time(s)


_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
ian-s



Joined: Apr 01, 2004
Posts: 2669
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626

PostPosted: Thu May 13, 2010 12:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
The difference is more than subtle, so I will try some other things too. The linear feedback results in a near sawtooth wave (at max modulation) and the squared feedback results in what looks like a lowpass filtered square wave.


If you square the modulator, you get a sine with twice the frequency (and a dc offset and half the level). So you are effectively changing the MC Ratio to 2:1.

Nice feature.
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Thu May 13, 2010 1:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I was just thinking sine squared identity too, and it seems that the technique bolsters the second harmonic.

I've now thought that since I have sawtooth, triangle and square waves readily available, there's no reason I couldn't try substituting those waveforms for the modulation signal. The audio output would still be taken from the sine table, but modulation could come from any of saw, tri and square or summed combos of more than one waveform. Whatever the modulation waveform, the system will always allow morphing to a sine wave which gives an effect similar to a lowpass filter.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Thu May 13, 2010 2:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
The difference is more than subtle, so I will try some other things too. The linear feedback results in a near sawtooth wave (at max modulation) and the squared feedback results in what looks like a lowpass filtered square wave.


It took me a while to ply my ears up off of the floor, for BOTH patches! I know part of it's the envelope over time in the structure of the tonality, but both of them especially in the higher pitches were BEAUTIFUL sounding patches! Surprised
The 2nd one especially caught me ears as it almost immediately reminded me of the ancient Kawai K1 (additive) synth patch 'Jazz Harp' which to this day is STILL, one of my most favourite synth sounds, ever. Very percussive and beautifully melodic. The only mild difference with your 2nd patch, is just a tad longer time in Release. Otherwise very close in sounding ... very beautiful.

Wow! Hail the Master
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Thu May 13, 2010 3:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Why thank you Rich. Heh, I'm cheating a little because this thing is polyphonic and I like to set the ADSRs to let it ring out - and the ADSRs I use now all have selectable linear or exponentially decaying release.

I just tested the new modulation waveforms. Mixed results... Triangle modulation sounds similar to sine modulation, nice sound. Sawtooth modulation is raucus sounding until set to very low modulation level, square is "buzzy". Phase will make a difference here I think. If I allow changing the phase relationship between the output sine function and the modulator function... I am imagining modulating with a square wave pi/2 out of phase with the sine function.

And another sample, some fiddling using sawtooth modulation, you will likely note the modulation effects...


Feedback_FM_saw_modulation_003.mp3
 Description:
sawtooth modulation sample

Download
 Filename:  Feedback_FM_saw_modulation_003.mp3
 Filesize:  1.76 MB
 Downloaded:  1094 Time(s)


_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Thu May 13, 2010 6:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

JovianPyx wrote:
Why thank you Rich. Heh, I'm cheating a little because this thing is polyphonic and I like to set the ADSRs to let it ring out - and the ADSRs I use now all have selectable linear or exponentially decaying release.


Cheating or not - I were dang well impressed! Surprised

Quote:

I just tested the new modulation waveforms. Mixed results... Triangle modulation sounds similar to sine modulation, nice sound. Sawtooth modulation is raucus sounding until set to very low modulation level, square is "buzzy". Phase will make a difference here I think. If I allow changing the phase relationship between the output sine function and the modulator function... I am imagining modulating with a square wave pi/2 out of phase with the sine function.


Uh oh ... stepping out beyond my 4 basic functions of math (having forgotten almost everything else, from almost 30 yrs. ago. Surprised )

Quote:

And another sample, some fiddling using sawtooth modulation, you will likely note the modulation effects...


Jaw dropping! Some wondeful melodies themselves coming from what almost appeared to be, something close to a Harpsichord (my most favourite instrument, period, since 1981) with extra release time, through a mild phase shifter.
All together a wonderful combination! Surprised Providing a wonderful almost 'warmth' to the digital world. Surprised Smile Very Happy
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [21 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