Project DescriptionA synthesizer made in C# that will allow midi functionality using only the compact framework for any .net device: (windows pc, xbox, or phone).
Project Goals
- To learn about synthesis and audio development.
- To provide fellow XNA developers with an alternative way to play music.
- At least provide basic midi playback for both windows and Xbox users.
- At most be an interactive alternative for the incorporation of music in games and other projects.
Contact InfoFor those of you who have questions/comments and don't have a codeplex account use:
- bandthreebuster(at)hotmail.com
UPDATE #14 March 13 2012
Version 1.1b BetaOver the break I decided to once again to start from scratch. I went through all the classes and made alot of changes adding features and increasing the performance in certain areas.
Changes1. Midis use less memory once loaded
2. Seeking is now supported by the sequencer
3. Pitch Bending is much more responsive now
4. More wave formats supported including 24bit
5. Banks can have mixed instruments
For the rest of my changes check out the readme
Download Link v1.1b
UPDATE #13 Feb 18 2012
Version 1.0b BetaThis is mainly a minor update with a few new features including a demo for non xna users using
direct sound through naudio. I have also fixed a few things and cleaned up the directories a bit.

UPDATE #12 Jan 27 2012
Version 1.0b Beta ReleaseYes I've changed the version because the library is no longer an XNA game library, but rather a regular .net library; However the library works just fine in Xna and can easily be converted back to an Xna library.
Also:
XnaSynthProject is now called CSharpSynthProjectThere are a lot of changes including real fm synthesis, or at least I tried to =)
Also there is a new Instrument Editor among other things, So check it out!
Download Link v1.0b
UPDATE #11 Dec 4 2011
Version 3.2 Beta ReleaseThis is a bug fix release.
I promise this is the last of my,(what may seemlike), weekly updates. I just wanted to
fix a few bugs like the inability to play certain midi's and some of the effect classes.
For a complete list of changes checkout the download page or in the readme included in the download.
Download Link v3.2
UPDATE #10 Nov 26 2011
Version 3.1 Beta ReleaseThis release brings this version to its beta build, as I have fixed more bugs and added some features.
Main things to note are:
- I have fixed the FM instruments from sounding too highly pitched
- There are now 2 synthesizers to choose from:
- XnaSynthesizer : handles the output using xna audio device
- StreamSynthesizer : doesn't handle audio output and provides you with access to the raw audio buffers
- A new multi-threaded demo that will show you how to use the new StreamSynthesizer class
For a complete list of changes checkout the download page or in the readme included in the download.
Download Link v3.1
UPDATE #9 Aug 1 2011
Version 3 Alpha ReleaseThe first release for this version with an abundance of changes.

For the list of changes checkout the download page.
Remember this is an
Alpha release so you can expect bugs.
Download Link v3
A Sneak Peek for v3
Currently I'm working on a totally new version of this project that I would like to have released sometime next month. I just wanted to let you know what to expect.
- More classes for flexibility. (for example the CompactWaveFramework has around 10 classes alone)
- Non-static Sound Banks. (so you can have more than one)
- More parameters for voices. (such as hold and decay)
- Proper sampling using Dsp techniques
- All timing based on sample counting. (no more precise timers and Cpu sleeping)
I have already made some progress as I am finished with everything except the Synthesizer and Sequencer, but these last 2 classes won't be so easy. I'm really hoping that the sample counting will pay off as I have never tried it, but I feel that it should be extremely accurate.
UPDATE #8 July 16 2011
This version is still v2.1, but contains some new things that I may or may not keep so I have named it v2.1.2.
- The BankFile format has been changed for sfz so as to keep samples separate from their respective sfz files and to enforce non duplication rules.
- I have removed the lock statements and reordered some of the synth's routines in order to gain performance. This may still be buggy.
- The sequencer will now try to stay on time by skipping or shortening Wait times.
- The user input "asdfgh" will now show up on the keyboard display.
- The demo app will now pause the synthesizer and sequencer whenever it loses focus.
Download Link v2.1.2
UPDATE #7 July 5 2011
Another update to version 2.1 is here!
- The InstrumentBank will now keep track of samples to prevent the loading and re-sampling of duplicate samples.
- This means lower memory costs and faster load times!!!
- The default SoundBank only loads around 500 of its 1000 samples and consumes only around 11 megs of memory.
- The current sound effect system has been redone and integrated into the synth via synth.AddEffect().
- The new abstract class BasicEffect allows you to create your own sound effects.
- A simple Echo effect has already been done and can be used in the demo.
Download Link v2.1
UPDATE #6 June 26 2011
Notice: I have updated the PC version on June 30th to keep up with the Xbox release.
You can expect the PC version to always be more recent than the Xbox release in the future.
Check it out now, its the first link on the download page.
Originally this project was supposed to be a Xbox compatible library
and I have tried hard to keep it that way, but I haven't had the time to get it tested.
Well today I have released an Xbox and PC friendly version (still version 2.1)
It contains some fixes that had to be done in order for it to compile as an Xbox project
such as using UTF8 for text and replacing the SortedList class. It also contains some
other minor fixes like the fmInstrument issue with notes changing pitch when left on.
I would really like to know how/if it runs on the Xbox 360 so post somewhere in the
Discussions tab or send me an email with the above address.
Download Link
UPDATE #5 June 12 2011
This brings us to the last major update for version 2.1 (I'm trying to keep the versions consistent now.)
Again it's not a total shift to another implementation, but brings many new features to the release.
- Upgraded status to "Stable" - (as far as I know, I haven't gotten any complaints)
- The midisequencer has been given a lot more functionality such as:
- better midi support.
- display playback time and ability to seek to different times
- can pause properly
- can loop
- can unload unused instruments
- The synth has been optimized a bit and given some attributes
- FmInstruments are back and supported in banks (see the demo source for this feature)
- Many more optimizations and features so check the download list for these!
UPDATE #4 June 2 2011
Notice: I updated the release on June 3rd with the fix for the "broken instruments" they should all work properly now.

This is a partial update that is not finished (Check back later this month for the complete release)
- The Demo and source are now separate projects
- This release includes a full 127 instrument bank with 9 different drums !
- Better midi support allowing pitchbends, pan, and volume changes
- A cool demo project with light-up piano keys !!
- Checkout the download page for a complete list of changes.
A Sneak Peek for June 2011
As summer begins I have been hard at work on the project and just wanted to let you know what to expect
in next month's update.
- A different demo that is an actual XNA project
- The project is now an XNA library <.dll> (I will provide the source for this as always)
- New instruments that may or may not replace the old ones. (I might only have 2 or 3 in the end)
- Instruments will have..
- The ability to store more parameters (volume, pitch correction, loop points, etc.)
- More efficient handling of samples (same sample will not be loaded more than once)
- Better formatting of instrument files will allow for comments and checks for compatibility
- Use the SFZ standard to load sfz instruments (this will make it so much easier to get samples)
- Up and Down sampling of instrument samples to match playback rate (currently I have linear sampling working)
- Better midi functionality there are still a lot of unsupported events (panning and volume control are on my list)
- If there is some time perhaps some simple post-effects like a reverb or echo for the synth.
I don't plan on messing with the other major classes unless I find some bugs or optimizations, so this shouldn't be a total conversion like the last update.
UPDATE #3 May 26 2011
This update (version 2.0) is a complete overhaul of the project that is built around XNA's DynamicSoundEffectInstance class.
- Multiple improvements simply making version 2 exponentially better than 1.0.
- New Features Include: better midi support, more instruments, unlimited voices, better performance, and much much more !
- Checkout the download page for a complete list of changes.
UPDATE #2 April 26 2011
This update (version 1.2) adds a few new features and fixes a lot of bugs and stability issues
- Added the ability to add your own samples and instruments (follow the Simple Bank example in bin)
- Mega cpu usage reduction by using less precise wait method
- A piano instrument (currently still testing for other instruments)
- Check the download page for a complete list of changes
UPDATE #1 March 27 2011
I have decided to scrap the original c#synth kit in favor of a more Xna friendly solution.
Check below v1.1
- This is the current release that uses a simple wave-table synthesis.
- It is listed as source, but is actually a runnable demo as well. (Later versions will be in library form - .dll)
- I hope this approach will be a step in the right direction for this project.
Help Wanted
- I will accept help from anyone who is willing to contribute.
- For the most part I still have some planning to do and am always open to ideas.
- There is still alot of unfinished, unimplemented portions of the project.