6

Im looking for a library that can synthesize sounds from soundfonts / sound banks

Preferably in C#, but other programming languages are fine too

Maybe a video game library can do this? Need suggestions

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
Amy
  • 107
  • 4

1 Answers1

2

The NAudio library will read and play sound fonts in .NET. Check it out on codeplex here.

James Kolpack
  • 9,331
  • 2
  • 44
  • 59
  • As an aside - I owned a Sound Blaster AWE32 back in the day with fully upgraded memory for the purpose of playing midi files with large soundfonts. Ah, the good old days, now all of that can be done 10x better with virtual instruments and software samplers. – James Kolpack Feb 26 '10 at 22:23
  • As far as I see it, it's not true. Can you show me a way of how to play MIDI thru a SoundFont synthesizer? – Shimmy Weitzhandler May 19 '13 at 11:23
  • 1
    NAudio has the ability to read a SoundFont library and access all the sample data (`NAudio.SoundFont`). It also has the ability to play audio data (`NAudio.Wave`). This fulfills the original question. NAudio also has the ability to read a MIDI (`NAudio.Midi`) file providing access to all the event data. It does not provide a MIDI player, but it should be possible to load the MIDI event data, assign specific channels to SoundFont instruments, and then play the sample data at the correct time while looping through the events. This would be a bit of work, but it is certainly do-able. – James Kolpack May 19 '13 at 17:47
  • Currently I have project with the same requirements in my plans. It's a pity that NAudio actually has no MIDI player and author wrote that he has no [plans to do it](http://naudio.codeplex.com/discussions/431255) Since programming audio is not in my expertise list, I want to build something based on existing libraries. Here's an idea came to my mind: VideoLAN VLC player uses 3rd party MIDI codec [FluidSynth](http://fluidsynth.sourceforge.net/). May be it is possible to use NAudio for MIDI file generation and use fluidsynth to play it. – Denis The Menace Mar 01 '14 at 18:42
  • *UPDATE* I've found [.NET wrapper](http://fluidsynthwrapper.codeplex.com/) for fluidsynth – Denis The Menace Mar 01 '14 at 18:45