Author |
Message |
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Wed Apr 29, 2009 6:05 pm Post subject:
|
|
|
Scott, this is really sweet. I've been trying to set enough time aside to play with these on Spartan IIELC or Virtex 4 boards that I have around, as well as revive some old things I had been working on, and always thinking about Thanks for keeping that memory awake, and not too distant! |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun May 03, 2009 9:50 am Post subject:
|
|
|
The 16 voice test code is now working.
I need to more extensively test the test code to see if it's testy...
At 16 voices, the design uses less than 1/2 of the FPGA (Spartan-3E 500 K Equiv. Gate). _________________ 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
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Wed Jun 03, 2009 6:48 am Post subject:
|
|
|
The bell sounds are impressive. I am also impressed with the Gong sounds in the low registers. Nice work Scott.
Does each 2-OP FM generator have it own independant ADSR controlling modulation index AND output amplitude?
So now you have 16 voices. That means you have 16 vioces x 4 generators/voice for a total of 64 generators with two oscillators each generator for a total of 128 oscillators? Less than 1/2 utilization on the device !! Nice ....
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Jun 03, 2009 7:00 am Post subject:
|
|
|
Yes, there is an ADSR for modulation index and an ADSR for generator output amplitude for each 2-OP generator. So each voice is controlled by 8 independantly configurable ADSRs.
The low device usage is due to using RAMs to hold configuration values and shared hardware for implementation. _________________ 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
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Wed Jun 03, 2009 10:07 am Post subject:
|
|
|
Scott,
Is there a MIDI implimentation chart or MIDI map available for the 8 or 16 voice designs? Are the patches controlled via SYSEX messages and if so, are they documented anywhere?
Can you tell us more about your control setup? Are you using a PC Based sequencer, MIDI Keyboard?
Sounds like you might even have enough room in the Spartan 3E device to add patch "presets" and add program change messages to your MIDI front end processor for selection I figure that preset information could either be stored in the program memory space of the Picoblaze. If not there , maybe on the serial EEPROM on board.
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Jun 03, 2009 12:04 pm Post subject:
|
|
|
I can't remember if I mentioned that the DAC I used for this is the on-board 12 bit DAC...
State Machine wrote: | Scott,
Is there a MIDI implimentation chart or MIDI map available for the 8 or 16 voice designs? |
No, that would be too much like work... The synth is/was an experiment that turned out really well. By experiment, I mean that it's a proof of concept exercise that motivates a much bigger project. The implementation is pretty basic, running status and velocity are supported, but pitch wheel, channel pressure etc. are not included.
The "bigger project" is a more powerful FM synth that will be capable of most of the DX7 algorithms and will have 8 operators per voice to work with. The operators can be split up into "generators" so that, for example, a voice could be driven by two 4-op generators, or two 2-op and a 4-op, or two 3-op and one 2-op. As long as they add up to 8 maximum. In fact, it will also function as an 8 sinewave additive synth if desired. It will be 16 voice polyphonic and will allow much more in terms of modulation sources.
Quote: | Are the patches controlled via SYSEX messages and if so, are they documented anywhere? |
Yes, SYSEX messages are used to communicate patch configuration data to the synth's hardware registers. A VB.NET (express) program is used to send this data using a serial (COM) port. The same data may also be sent over MIDI. There is currently no documentation other than the VB.NET program and the address decoder in Verilog. (remember that this is an experiment and not a finished synth)
Quote: | Can you tell us more about your control setup? Are you using a PC Based sequencer, MIDI Keyboard? |
Although I have nice Korg keyboard, I suck at keyboard playing. That is, I'm no Rick Wakeman. I diddle fart around and stumble across things that sound cool. Then I move to a PC based sequencer and make real music that way using the diddle fart patterns as a start. As already mentioned, I wrote a VB.NET patch editor with sliders for a lot of the parameters (for easy visual compare). My sequencer is an old copy of CakeWalk that runs on a Win98-SE system which is dedicated to that purpose.
Quote: | Sounds like you might even have enough room in the Spartan 3E device to add patch "presets" and add program change messages to your MIDI front end processor for selection I figure that preset information could either be stored in the program memory space of the Picoblaze. If not there , maybe on the serial EEPROM on board. |
It might be possible to include presets - gotta think about that. The interface to the synth's registers is via the PicoBlaze instance, so PicoBlaze would certainly be involved. I'd be more inclined to use an additional block RAM as a ROM that PicoBlaze can read and transfer patch data from the ROM to the synth hardware registers on some sort of command. There is plenty of extra free space in the PicoBlaze ROM for such code. It implements MIDI and some LCD functions.
But again, this synthesizer was an experiment that turned out to be a nice sounding musical instrument. My focus is really more on the bigger 8-OP project. Unfortunately, that will probably not run on the Spartan-3E board. I have a board with a bigger device (Spartan-3A DSP 1800) that will accomodate the new bigger FM synth I've started. Oh and the bigger project will have at least one SVF per voice and will operate at a sample rate of 198 KHz through a 24 bit stereo DAC. _________________ 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
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Wed Jun 03, 2009 5:48 pm Post subject:
|
|
|
Scott,
OK, thanks for revealing your plans. This is really some great work your doing. Probably just better leaving the presets on the controlling computer end and send presets as SYSEX data like your already doing and just write a preset manager in VB.NET.
The MS VB.NET express edition is free I see. I suppose a JAVA applet would do just as well.
As far as being a so so KB player, that's OK. You see, most great keyboard players can't code up things in Verilog like you do ....
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Jun 05, 2009 11:05 am Post subject:
|
|
|
Leaving the presets as PC files sent by the patch editor/sender certainly works for my use. I do know, however, that having a PC at a gig makes a bad impression on many audiences. I don't gig anymore. However, the published code is there for someone to modify... And there is available Flash on the board.
I've included an image of the patch editor/sender. As an aside, I didn't find this synthesizer any harder to program than any other digital synth, probably because it allows FM generators no larger than 2 operators, so it's really more like an oscillator and a waveshaper.
Yes, the Express edition works well enough. The only weirdness I had to deal with was getting the COM port list and 8 bit serial communications at 115.2 Kbaud working correctly. From what I've seen of Java, I would think you'd have the same kind of thing going on. At the moment, the only thing bad about using the serial port is that any activity on the keyboard will interefere and corrupt the SYSEX transmission. So one musn't play notes during the short transmission of SYSEX data over TTY. The PicoBlaze code needs to be fixed to accomodate this.
It just now occurred to me that even the 16 voice version should fit in one of the little Avnet Spartan-3A boards. (my two were $39.00 each, I think they are now $49). I've tested the USB COM port with VB.NET and it works so the same patch editor/sender would work for both. I will have to try that.
Description: |
Patch editor/sender for 2-OP FM synth. It is currently set for a basic FM bell sound |
|
Filesize: |
142.9 KB |
Viewed: |
552 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
_________________ 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
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sat Jun 06, 2009 8:24 am Post subject:
|
|
|
I just finished the main work on porting the design from the Spartan-3E Starter Kit to the Avnet Spartan-3A 400 board.
The Spartan-3A FPGA (400K equiv. gates) on the Avnet board is a little smaller than the Spartan-3E (500K equiv. gates) on the starter kit.
This synth (16 voice version) works on the Avnet board using 64% of the device's slice resources.
EDIT ADD: The USB programming serial port (under Windows XP) shows up on my system as COM3 configured for 115.2 Kbaud and works nicely to send patch data to the Avnet board. _________________ 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
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
Dan Lavin
Joined: Nov 09, 2006 Posts: 649 Location: Spring Lake, Mi, USA
Audio files: 21
|
Posted: Wed Jun 10, 2009 6:10 pm Post subject:
|
|
|
Scott,
Excellent work, as usual. The timbres with 2 operators are quite impressive. I can't imagine when you get to 8....well I guess I can since I used to own a DX-7. It would be cool to have that power in a DIY format. I remember when the DX-7's were out for a while and people started to diss FM and I could never figure that out. I mean I owned mine for 6 years and never ran out of potential with it..and this was when I was both gigging and recording almost exclusively with it. Keep up the good work, I'm cheering for you!
-Dan |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Thu Jun 11, 2009 7:26 am Post subject:
|
|
|
Sounds great Scott !! Glad you adapted the patching option. The interface looks nice that you posted as well. I agree with Dan, this should sound fantastic using the 8 operator implimentation you planning.
I have a VST version of a DX7 like synthesizer called FM7 by Native Instruments and the sounds blow me away. I have used this synthesizer on several of my recordings.
This would be cool to have a powerful FM synthesizer on a DIY hardware platform.
I hope you dont mind a few questions Scott, I may have asked some of these before:
Concerning your NCO/Wavetable technical specifications:
In your current 2-Operator Design:
1) What is bit width of your Phase Accumulator?
2) What is the bit width of your Tune Word?
3) How many accumulator high order bits are you using to address your wavetable? (Wave Table Depth)
4) How many bits wide is your wavetable output data (sample resolution) ?
5) Are you implimenting a 1/4 Sine Wavetables (pi/2 radians)
6) NCO Sample Rate?
7) Output data format of your wavetable (Sign Magnitide, 2's Comp, Unsigned Binary ??)
I would assume question 7 would be dependant on the DAC type being used.
Sorry for all the questions. I am surveying other DIY NCO/Wavetable Synthesizer designs for comparison to my own ....
Great work Scott !
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu Jun 11, 2009 8:33 am Post subject:
|
|
|
Thanks State-Machine and AntMan for the kind remarks.
Quote: | 1) What is bit width of your Phase Accumulator? |
32 bits
Quote: | 2) What is the bit width of your Tune Word? |
17 bits. The tuning words represent the 12 lowest pitches that the synth can produce, they are binary left shifted by the octave amount to get the full phase increment value.
Quote: | 3) How many accumulator high order bits are you using to address your wavetable? (Wave Table Depth) |
12 bits - This is for the full wave sinewave generation system. The actual 1/4 wave ROM uses 10 address bits.
Quote: | 4) How many bits wide is your wavetable output data (sample resolution) ? |
18 bits signed
Quote: | 5) Are you implimenting a 1/4 Sine Wavetables (pi/2 radians) |
Yes. This extends the address range of the sine output system from 10 bits to 12 bits.
Quote: | 6) NCO Sample Rate? |
Everything that is sampled is sampled at the DAC sample rate of 65.1 KHz. The synthesizer hardware state machine is triggered by the DAC enable signal. DAC enable occurs once every 768 system clocks. System clock is 50 MHz.
Quote: | 7) Output data format of your wavetable (Sign Magnitide, 2's Comp, Unsigned Binary ??) |
It is unsigned as stored in the wavetable itself.
The logic that presents a full wave of the sine waveform from the 1/4 wave table generates a signed binary word.
The DAC I'm using accepts 24 bit wide signed binary data. So throughout the synth's computational logic, signed arithmetic is used.
I've also just yesterday changed the carrier:modulation ratio from 14 bits to 18 bits - giving better control over the tuning of harmonics produced and adds more available complexity to the sounds that can be produced. _________________ 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
Last edited by JovianPyx on Fri Jun 12, 2009 7:01 am; edited 1 time in total |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Thu Jun 11, 2009 6:15 pm Post subject:
|
|
|
Quote: | Everything that is sampled is sampled at the DAC sample rate of 65.1 KHz. The synthesizer hardware state machine is triggered by the DAC enable signal. DAC enable occurs once every 768 system clocks. System clock is 50 MHz.
|
Thanks Scott for taking the time to answer those questions.
One other question, what is the accumulator update rate? I should have specified the accumulator sample rate (F_clk to accumulator). I know that the above rate, 65.1 KHz, can't be the accumulator sample clock because using a 32 bit accumulator,, and the largest TUNE value (2^17-1), you would be barely hit 2 Hz. I will assume this 65.1 KHz will be the sample rate at which the DAC gets it's updates from the output of unsigned_binary-to-signed_binary logic that follows the waveform LUT.
Quote: | 12 bits - This is for the full wave sinewave generation system. The actual 1/4 wave ROM uses 10 address bits. |
OK, so you cycle through the 1/4 wave ROM 4 times then for each cycle (your first 10 bits of address) while the upper 2 bits are used for the "math" logic ... nice !
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Jun 12, 2009 6:38 am Post subject:
|
|
|
Ah, I see, you did the math...
I used a linear interpolated tuning system to allow for microtuning of any NCO.
Since a multiplier is required for linear interpolation, I decided to truncate the bit width of the tuning tables (there are two for interpolation) to 17 bits unsigned (or 18 bits signed where the sign bit is always zero) so that a single 18x18=36 hardware multiplier could be used to do the interpolation arithmetic. So there is left shifting going on that isn't so obvious having to do with the selection of bits from the multiplier's 36 bit wide output.
The phase accumulators really run at a 65.1 KHz sample rate.
I started using this technique with the original GateMan synth and since the tuning was quite good, I used the method in later synth designs based on the GateMan's structure. More significant bits than 17 could have been used (nontruncated wider tuning tables), but that would have forced the use of more than one hardware multiplier to perform the interpolation.
ALSO: I edited a previous response to say that the tuning ROM's 12 values represent the LOWEST 12 notes the synth can produce, left shifting allows for creation of the octaves above the lowest register.
EDIT ADD: Minutia: The MIDI controller takes in the MIDI note numbers and converts them to a base note number and an octave number using a simple divide by 12 routine. The note number is a 4 bit wide entity that expects to hold values from zero to 11. The octave entity is 4 bits wide as well. _________________ 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
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Sat Jun 13, 2009 6:14 pm Post subject:
|
|
|
Scott,
Wow, this is a very inspiring sample of this synthesizer and really shows off the polyphony ! The notes really jump out at you with that brassy, metallic sound ! Thanks ....
OK, wrapping my head around the LINEAR INTERPOLATION method.
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Jun 14, 2009 2:18 pm Post subject:
|
|
|
I think it sounds more complex than it really is. I have two tables of 12 locations each. In the "lo" table, I have (essentially) phase increment values for notes 1/4 tone (or 1/2 a semitone) below the standard pitch for that note. The "hi" table has the same kind of data, but for 1/4 tone above the standard pitch.
Given a note number integer N where 0 <= N <= 11
Given T is a fixed point tuning variable 0.0 <= T < 1.0. A value of 0.5 represents "concert pitch".
Diff = hi[N] - lo[N]
PhaseInc = Diff * T + lo[N]
That's it. You can use T for other things, like the pitchwheel or portamento. You can also use tuning tables with much wider separation. If the tables are 2 octaves apart, you can implement a +/- 12 semitone pitch wheel.
In this FM synth, all I'm currently using T for is to individually microtune any of the NCOs. This microtuning is one of the reasons the tones this synth can generate are animated. _________________ 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
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Sun Jun 14, 2009 6:20 pm Post subject:
|
|
|
Scott,
Quote: | I think it sounds more complex than it really is. I have two tables of 12 locations each. In the "lo" table, I have (essentially) phase increment values for notes 1/4 tone (or 1/2 a semitone) below the standard pitch for that note. The "hi" table has the same kind of data, but for 1/4 tone above the standard pitch. |
OK, I see. as you say, your MIDI controller takes in the MIDI NOTE number, converts it to a base note number and octave entity. The base note number then indexes these "Hi" and "Lo" phase increment tables that represent you 0.5 semitone offsets.
Quote: | Given a note number integer N where 0 <= N <= 11
Given T is a fixed point tuning variable 0.0 <= T < 1.0. A value of 0.5 represents "concert pitch".
Diff = hi[N] - lo[N]
PhaseInc = Diff * T + lo[N] |
OK, I see ... easy .. now I would assume the octave entity comes into play here to determine how many "left shifts", which is essentially a x2 multiply, to create the octave you need. Now you have your final note frequency adjustable by +/- 1 semitone. Nice Scott.
What is the resolution of "T", your tuning variable?
Oh, the second sound demo is really good Scott
Thanks
Bill |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Jun 14, 2009 7:00 pm Post subject:
|
|
|
I think you understand the interpolation.
T is 18 bits signed. It's currently driven by an interface that delivers a 14 bit value via sysex however.
And thanks for the sample compliment - I think I got it right now... _________________ 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
|
|
|
|