www.96kHz.org
advanced audio recording
Spartan 3E organ project
   128
oscillators

88
voices

128
channels

Spartan 3E Virtual Analog Organ - V01
.
FPGA SYnthesizer with Spartan 3

A Spartan 3E FPGA board is used to build a virtual remake of my PLD-ORGAN project. Initially it was designed with Spartan 3, but the device was too small finally, so I moved it to the new Spartan 3E board available from Digilent. In this virtual approach all components are fully made the digital way which means, that they are completely virtually modeled. The PLD-organ component is basically the same as in the hardware version of 2001 - only the analog components like the triangle wave generator and the filters are replaced. Also the keyboard is virtually modeled and has been replaced by a simplified MIDI-box being capable to play up to theoretically 65535 music notes. However 4095 events are possible in this design.

Virtual Organ with Spartan 3


Music Box Engine

The Music Engine produces MIDI-like tone information, based on pre defined information which is kept in a local block ram memory in the FPGA. The notes are initially copied to the RAM during the synthesis process of the FPGA. 127 different MIDI notes are available theoretically. However, 60 keys (5 octaves) are used at this point of time. The data entry is done with the classical piano roll method using an Microsoft Excel sheet which automatically generates the code for the FPGA music player by finding start end endpoints of a note itself.

piano roll data entry for the virtual PLD organ

Music entry is easy this way because for an organ, there is only on/off information required. The length of the lines (= the cells covered) indicate the time which the sound has to be held. A second sheet analyzes the lines and eventually creates on off tags from out of it which are finally text-summarized in the last column.

 automatic code generation with excel for PLD organ
The code in the final column is used to feed a so called COE-file, basically a Xilinx specific RAM instantiation data file which will be converted to a MIF (memory instantiation file) and finally loaded into the Block-RAM of the Xilinx FPGA during the compilation process. The data format is TTTT.NN.II which means "point of time", "note number", "intensity" where 0 means "off". 


Sound Engine

The sound synthesizer takes the music notes and produces audio signals for each music channel using the virtual wave modules and synthesis modules described in the organ project 2001. 

automatic code generation with excel for PLD organ


Limitations

Because of the limited space in the little Spartan 3 FPGA, some restrictions do apply:

- only triangle or sine wave is possible the same time
- only two organ registers are implemented the same time
- only balanced tuning is available
- only the 7 main notes per octave (C,D,E,F,G,A,H) are present
- no "analog" distortion behavior by a "wrong" R2R is performed
- no low frequency analog filtering / de-BIAS-ing is done
- PDM output is used instead of S/PDIF
- no music keyboard control


Enhancements

- digital pre filtering is applied to emulate the former analog conversion circuit
- digital analog noise is introduced to smooth calculation and emulate analog noise
- analog boost is applied using amp modeling to emulate non linearity
- automatic music player with up to 4095 notes included to emulate keyboard
- simple stereo is applied by XY-like panning
- 4 switches are used to control organ sound, filter and stereo
- 4 buttons are used to control music speed and loudness


Download an example music file for S3E: mysong from the documentation site
Attention: The file works for the Digilent Spartan 3E hardware only.
If you do not have this hardware, you can listen to a 5-track-mix of "popcorn" done with the organ.


Click here for more Information about the DAW in S3E
 


 

 

© Jürgen Schuhmacher 2006