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 » Microcontrollers and Programmable Logic
New Member Introduction - DIY FPGA Synths
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [17 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: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Tue Nov 20, 2007 8:14 am    Post subject: New Member Introduction - DIY FPGA Synths
Subject description: New Member Introduction - DIY FPGA Synths
Reply with quote  Mark this post and the followings unread

Hello all,

I found out about your forum from a friend I know from the Synth-DIY mailing list. I was told that there has been discussion regarding the use of FPGAs in DIY synthesizer equipment.

My background is one of self taught electronics, since I was a kid (I'm currently in the status of "old fart"). I built a PAiA FatMan synthesizer and went crazy with modifications.

Recently (within the last 2 years) I've begun working with FPGAs and sound synthesis. I have two "completed" MIDI synthesizer projects, one is called the GateMan (there are two versions, I and II) which was modeled loosely after the PAiA FatMan. The other is a physical model of a tight string (8 voice polyphonic). Both synths are MIDI controlled. I built these using the Xilinx Spartan-3E Starter Kit. The only additional hardware I used was a resistor - cap deal for the DAC output and a 6N138 for the MIDI input. Otherwise, these synths are self contained on the dev board.

Links to my projects and information articles are here:
Simple IIR filter:
http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.SingleStageIIRfilter
Digital State Variable Filter:
http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.SVF
GateMan I:
http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.GateManI
GateMan II:
http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.GateManII
PolyDaWG/8 (physical model synth):
http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.DigitalWaveguide

Projects include zip files with all Verilog source code.

There are also other little bits of info I've left there regarding my newbie problems spooling up in Verilog and the dev board.

So who else is working with FPGAs and what are you doing?
Back to top
View user's profile Send private message Visit poster's website
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Tue Nov 20, 2007 8:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Yeah FPGAs! I think you're the second person in the world I've met doing this (not that I've been looking). And I'm glad you are using Verilog instead of that other government language Smile

I've been working with FPGAs and ASICs for over 10 years, and finally had a few ideas that I really wanted, but don't think would run in anything other than and FPGA. I'll probably make them as part of a modular synth, though I could also really use a good stomp box right now for my bass and didjeridoo!

This, eventually, could become a subsection Smile Thanks for posting all your work, and above all,

welcome to e-m.com!
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Tue Nov 20, 2007 12:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

jksuperstar wrote:
Yeah FPGAs! I think you're the second person in the world I've met doing this (not that I've been looking). And I'm glad you are using Verilog instead of that other government language Smile

I've been working with FPGAs and ASICs for over 10 years, and finally had a few ideas that I really wanted, but don't think would run in anything other than and FPGA. I'll probably make them as part of a modular synth, though I could also really use a good stomp box right now for my bass and didjeridoo!

This, eventually, could become a subsection Smile Thanks for posting all your work, and above all,

welcome to e-m.com!


Heh heh, "government language"... Actually, it's preferred mainly by Europeans, tho I don't know why. I looked at both and to my eyes, VHDL looks messy. But then, I'm a C programmer and Verilog looks a lot like C. I can _read_ VHDL, well enough to transcribe it into Verilog for small modules.

I'm also thinking a bit about an FPGA guitar effect, but I have no concrete ideas at all.
Back to top
View user's profile Send private message Visit poster's website
frijitz



Joined: May 04, 2007
Posts: 1733
Location: NM USA
Audio files: 54

PostPosted: Tue Nov 20, 2007 1:16 pm    Post subject: Re: New Member Introduction - DIY FPGA Synths
Subject description: New Member Introduction - DIY FPGA Synths
Reply with quote  Mark this post and the followings unread

ScottG wrote:
Hello all,...


Hi Scott Exclamation Good to see you here.

Very Happy

Ian
Back to top
View user's profile Send private message
Frank Luchs



Joined: Mar 16, 2007
Posts: 18
Location: Munich

PostPosted: Tue Nov 20, 2007 2:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Scott,
that sounds promising, I like your waveguide system. Very Happy
Thank you for sharing this unique information about synths and FPGA.

How would you connect standard RAM to such a system?
That could be nice to build a hardware sampler.

From time to time I thought about 'programming' an FPGA synth,
but disliked the VHDL/Verilog syntax and had no references for an easy start.
That has changed now. Thank you again.

Frank

_________________
step-sequencer
music
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Tue Nov 20, 2007 2:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Frank Luchs wrote:
Scott,
that sounds promising, I like your waveguide system. Very Happy
Thank you for sharing this unique information about synths and FPGA.

How would you connect standard RAM to such a system?
That could be nice to build a hardware sampler.

From time to time I thought about 'programming' an FPGA synth,
but disliked the VHDL/Verilog syntax and had no references for an easy start.
That has changed now. Thank you again.

Frank


>>>How would you connect standard RAM to such a system?

A very good question and one that I am afraid I don't know the full answer to yet. On another forum, a gentleman named Rick Huang posted a design he calls a "wide bus recorder", which is essentially a 16 bit record and playback device (FPGA) which uses the onboard Spartan-3E Start Kit DDR SDRAM. I've been looking at his code and have learned how some of it works. You can find his design posted on the FPGA-Synth website somewhere in the wiki. The RAM is 64 megabytes, so is reasonably large. But there is also RAM inside the FPGA that can be used for smaller tasks. My physical model polysynth uses only internal FPGA RAM. 16K x 18 bits is used to form the waveguides for 8 string objects. There is still enough RAM left over to form storage for the MIDI contoller (runs in an embedded microcontroller called PicoBlaze). At this point in the development, my calculations say that using DDR SDRAM won't give me much more than I've already got unless I can crank the design up to 100 MHz, I've just been able to get WebPACK ISE to say it should function at 111 MHz, so that part is done. Now I need to figure out how to get that dang SDRAM connected and working. I'm guessing that I could probably get 16 voices out of it.

There are also other types of sound generating and sound processing that are quite well suited for FPGAs. The GateMan is a rather standard structured subtractive synth. Chris Strellis has an additive synth posted (8 sinewave oscillators). I would like to dabble in FM and Chaos as well. From what I can tell, most of these synth types have very low demands on RAM and could be built entirely inside the FPGA. I think that I could probably get 16 voices of polyphony out of a subtractive poly using only the FPGA internal RAM. Internal RAM is much easier to use than external DDR SDRAM due to timing complexity.
Back to top
View user's profile Send private message Visit poster's website
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Tue Nov 20, 2007 2:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you download the xilinx tools, then run the "coregen" tool, you can get some RAM interfaces via that. This generates a macro, a module that you include in your code, that then talks to the RAM. These are usually a few generations of memory behind the leading edge, which you tend to have to pay for those macros. DDR, I think, still needs to be paid for.

SRAM and SDRAM are much simpler than DDR. Not that any one of them couldn't be done with some good knowledge of that type of memory.

Also, go visit http://www.opencores.org for more source code/modules/code examples.
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Tue Nov 20, 2007 3:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

jksuperstar wrote:
If you download the xilinx tools, then run the "coregen" tool, you can get some RAM interfaces via that. This generates a macro, a module that you include in your code, that then talks to the RAM. These are usually a few generations of memory behind the leading edge, which you tend to have to pay for those macros. DDR, I think, still needs to be paid for.

SRAM and SDRAM are much simpler than DDR. Not that any one of them couldn't be done with some good knowledge of that type of memory.

Also, go visit http://www.opencores.org for more source code/modules/code examples.


Yeah, I know about coregen, however, it creates what I would call "mystery code". I prefer to be more in control, so I like to write it by hand. Going through the machinations of writing such things - and having success - indicates (to me) that I know how it works. Under those conditions it becomes easier to modify and extend. For the way I like to work, going through working code to learn how it works is more useful to me because then I end up with a better coding skill. Different strokes for different folks. I've been to opencores, that's a good resource for such things. Because this is a, um, hobby thing, I really don't desire to pay for that which I could write myself if I learned how. One thing that I have to deal with is the sharing of FPGA pins between the DAC and the SDRAM. I'm seriously considering either an external DAC or just adding a static RAM and ignoring the SDRAM. I still haven't made up my mind on that. I may play with coregen just to see what it farts out, but I don't have high hopes.

BTW, the RAM part on the starter kit board is DDR SDRAM (I just looked at the data sheet PDF for the part). The timing is "interesting" and a bit complex, not like a simple static RAM where all you do is present an address, wait the requisite amount of time and then read it's outputs.
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


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

PostPosted: Tue Nov 20, 2007 4:00 pm    Post subject: Re: New Member Introduction - DIY FPGA Synths
Subject description: New Member Introduction - DIY FPGA Synths
Reply with quote  Mark this post and the followings unread

ScottG wrote:
So who else is working with FPGAs and what are you doing?


Not me, but it's a very interesting subject to me - even more so after going through your website. Didn't look at the code, but you've got some nice sound samples up there, amazing that programmable hardware can do all of that.

Anyway, hope to see more of it Very Happy

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



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Tue Nov 20, 2007 4:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

ScottG wrote:
Yeah, I know about coregen, however, it creates what I would call "mystery code".... I may play with coregen just to see what it farts out, but I don't have high hopes.


I understand, but for things like external memory interfaces, Xilinx has hand-tweaked their cores to work for their customer's production devices. That's good for you & me, since it's generally difficult to do DDR memory. The timing is very tricky, and there's actual calibration steps to do as well upon initialization. It's the type of thing some people make a living at doing only that.

No, it's not worth paying for in a hobby situation, but you'd be surprised what is available for free Smile
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Tue Nov 20, 2007 5:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

jksuperstar wrote:
ScottG wrote:
Yeah, I know about coregen, however, it creates what I would call "mystery code".... I may play with coregen just to see what it farts out, but I don't have high hopes.


I understand, but for things like external memory interfaces, Xilinx has hand-tweaked their cores to work for their customer's production devices. That's good for you & me, since it's generally difficult to do DDR memory. The timing is very tricky, and there's actual calibration steps to do as well upon initialization. It's the type of thing some people make a living at doing only that.

No, it's not worth paying for in a hobby situation, but you'd be surprised what is available for free Smile


It sounds like it might be worth my time to see if something free makes a module I can use in my weird designs.
Back to top
View user's profile Send private message Visit poster's website
Scott Stites
Janitor
Janitor


Joined: Dec 23, 2005
Posts: 4127
Location: Mount Hope, KS USA
Audio files: 96

PostPosted: Tue Nov 20, 2007 7:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

welcome Scott!!

It's great to see you here!!! Did my erroneous email bring this on? Laughing If so, that was one of my more fortunate bonehead moves.

Hey, I'm too ignorant to know if there's any similarity to your current FPGA interests, but there's a CPLD version of the Thomas Henry Keyboard going on here:

http://electro-music.com/forum/topic-17815-125.html&postdays=0&postorder=asc&highlight=

State Machine and Antman are working on it.

Cheers,
Scott

_________________
My Site
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Wed Nov 21, 2007 8:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Scott Stites wrote:
:It's great to see you here!!! Did my erroneous email bring this on? Laughing If so, that was one of my more fortunate bonehead moves.


I'm sure you can take at least partial credit. I had just done a search for "fpga synth" just to see what's out there (not much BTW) and electro-music popped up. I remembered that you were here, so I thought "what the hell, give it a shot" and here I am.

CPLDs and FPGAs are similar in some repects in that they are programmable logic devices, but the FPGA is a larger and extended version based on SRAM. I believe that a CPLD does not have dedicated multipliers which would make the complex math functions done in a synthesizer difficult if possible at all. CPLDs make great logic based control devices which is what I imagine the TH project is. What I get from the thread sounds like a keyboard scanner with MIDI out ?? The CPLD's strength lies in it's nonvolatile basis, so once programmed, it retains the logic until reprogrammed even when powered off. Quite a challenge to do a MIDI controller in pure logic IMO. I did mine in an embedded RISC MCU in the FPGA, so I used assembly language to write it. I had thought about doing mine with logic instead of an MCU, but I just seemed too easy with PicoBlaze which is a very tiny free MCU core and quite well suited to this task. My code has a full featured MIDI controller as well as the LCD display driver and this uses only 1/2 the "ROM" space available.
Back to top
View user's profile Send private message Visit poster's website
Dan Lavin



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

PostPosted: Wed Nov 21, 2007 9:44 am    Post subject: Reply with quote  Mark this post and the followings unread

Scott G, good to see you here! I have seen some stuff on the net with your name before.

Your stuff posted above is pretty freakin' amazing. Don't know when I'll get a chance to explore it more. Too many projects!

Anyway, the Thomas Henry Kbd project Bill/State Machine and I are working on is basically Thomas's old monophonic CV-Gate-Trigger keyboard ported over to simpler, modern circuitry. It had like 18 logic chips and we wanted to simplify it for the forum here. Well Bill and I couldn't leave enough alone and decided to add Midi out to it. It just sends note on/off, with a 'fixed' velocity that can be dialed in with a pot. Oh, and midi channel selectable. So what we end up with is a monophonic midi controller that also outputs an analog kbd CV, gate and trigger.
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1970
Location: West Red Spot, Jupiter
Audio files: 222

PostPosted: Sun Nov 25, 2007 7:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks all, for the warm welcomes and kind words regarding my designs and the sounds they make.

There will be more stuff as time goes on.

I'm currently working on GateMan-III which is GateMan-II cleaned up some. GateMan-I and GateMan-II are flipflop heavy designs so GateMan-III is my attempt at replacing many flipflops with RAMs. Of course this breaks things, but yesterday, I got it making sound again - not exactly correct sound all of the time, but sound nonetheless. I can see that all of my waveforms work now, but something weird is happening during the release phase of the ADSR and I don't know which one is causing it yet.

Once the flipflop reduction is done, I will look into adding some stuff to GateMan-III. Ringmod is one thing I'll try since there are several free multipliers still available to me and it should be pretty easy.

Anyway - thanks and watch for GateMan-III and other stuff.
Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2806
Location: New York
Audio files: 24

PostPosted: Sun Nov 25, 2007 7:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi Scott,

Welcome. I am impressed by your work and I am also interested going in this direction with my synthesizer design work myself.

Quote:
CPLDs and FPGAs are similar in some repects in that they are programmable logic devices, but the FPGA is a larger and extended version based on SRAM. I believe that a CPLD does not have dedicated multipliers which would make the complex math functions done in a synthesizer difficult if possible at all.


Yes, 100% correct. Lots of FPGA's are now sporting 18 x 18 multipliers in plentiful quantities in order to build up the MAC's required for filtering and doing other complex math funtions. Very Happy Also, for really LARGE designs, the FPGA's are the way to go.


Quote:
CPLDs make great logic based control devices which is what I imagine the TH project is. What I get from the thread sounds like a keyboard scanner with MIDI out ?? The CPLD's strength lies in it's nonvolatile basis, so once programmed, it retains the logic until reprogrammed even when powered off. Quite a challenge to do a MIDI controller in pure logic IMO. I did mine in an embedded RISC MCU in the FPGA, so I used assembly language to write it. I had thought about doing mine with logic instead of an MCU, but I just seemed too easy with PicoBlaze which is a very tiny free MCU core and quite well suited to this task. My code has a full featured MIDI controller as well as the LCD display driver and this uses only 1/2 the "ROM" space available.


Yes, thats exactly what the keyboard project is. I could have easily based the entire project using an 18F or 16F PIC MCU and stuffed the MIDI interface in there as well but wanted to take a different approach this time. The actual hardware MIDI engine was easy as I just ganged two 16 bit registers together and wrapped some control logic around it and fed the appropriate data fields. I also created a nice little 31.25 KHz MIDI clock generator synchronous to the scanning logic for the keyboard controller block. The hard part is getting it to fit in this awfully small logic device with all the scan logic already in there. My solution was to simplify the clock generation logic that creates the MIDI and SCAN clocks from a 10 MHz feed on the chips global clock input.

The CPLD's though are getting more powerful. I have attached the product brief for the Coolrunner II series of CPLD's from Xilinx. IN fact, I can stuff the Picoblaze 8 bit MCU in there as well if I decided to add a small controller. They come with up to 512 macrocells, clock multipliers, multi I/O standards, etc ...... Cool stuff !

Thanks and welcome !
Bill


product_sheet.pdf
 Description:

Download
 Filename:  product_sheet.pdf
 Filesize:  342.16 KB
 Downloaded:  545 Time(s)

Back to top
View user's profile Send private message Send e-mail
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2806
Location: New York
Audio files: 24

PostPosted: Sun Nov 25, 2007 7:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
t's great to see you here!!! Did my erroneous email bring this on? Laughing If so, that was one of my more fortunate bonehead moves.

Hey, I'm too ignorant to know if there's any similarity to your current FPGA interests, but there's a CPLD version of the Thomas Henry Keyboard going on here:


Hi Scott, thanks for mentioning this !!!!! This has been a fun project for Dan and I and it's time now we finish it Very Happy As you can see from my latest post, I have got the MIDI output going and did not "break" the keyboard controller part in the process.

Now with ScottG here introducing his FPGA designs as applied to sound synthesis, the timing is perfect. Very Happy

Bill
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [17 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 » Microcontrollers and Programmable Logic
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