MIDI Synthesizer with FluidSynth

Collaborate on tools, libraries, and applications beyond the IDE

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
prometheus
Posts: 6
Joined: Sun Dec 13, 2015 6:05 pm

MIDI Synthesizer with FluidSynth

Post by prometheus » Fri Oct 30, 2020 12:54 am

LCB lib to wrap FLuidSynth (already working)




Repo: https://github.com/Ferruslogic/lcb_fluidSynth

sphere
Posts: 1097
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: MIDI Synthesizer with FluidSynth

Post by sphere » Tue Nov 03, 2020 7:30 pm

Nice!
Going to check it out.

Thanks a lot.

PaulDaMacMan
Posts: 324
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: MIDI Synthesizer with FluidSynth

Post by PaulDaMacMan » Thu Nov 12, 2020 9:36 pm

I forked that repo on GitHub and started adding to the wrapper. https://github.com/PaulMcClernan/lcb_fluidSynth
I got the macOS version of libFluidSynth working (at least it works on macOS 10.12.6 on my laptop).
I added binding for more stuff like PitchBend and MIDI File Playback.
I trimmed the SoundFont SF2 folder down to just a few smaller files including a 1.2MB General MIDI Sound set. That means 128 different sounds to play with, plus drum kits, from just a 1.2MB file. There are very larger, high quality SoundFonts around on the internet, but figured it would be good to keep to small files in the GitHub repo. I also added the "HyperCard" sounds SoundFonts because I wanted to, they're 1980s tiny, just a few KB.
Also added a few MIDI song files to test playback with.
My LCB Repos: https://github.com/PaulMcClernan/

PaulDaMacMan
Posts: 324
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: MIDI Synthesizer with FluidSynth

Post by PaulDaMacMan » Thu Nov 12, 2020 9:49 pm

Also, your read me page points to the version 1.3 of my Piano Widget. There was a mistake in that version where "lock to scale/mode" doesn't accept "3H","WH", or "HW" for 3 half-steps in the scale/mode formula so some scales (Blues Scale) don't get set properly in that format (if you set it with Note-Names instead of the formula format, that works). The version in my GitHub repo fixes the problem.
https://github.com/PaulMcClernan/LCB_PianoWidget
My LCB Repos: https://github.com/PaulMcClernan/

PaulDaMacMan
Posts: 324
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: MIDI Synthesizer with FluidSynth

Post by PaulDaMacMan » Mon Nov 16, 2020 11:14 pm

I just got back to work and tested. The macOS build in my GitHub repo has now been tested on 10.14.6 (non-admin account without any Homebrew/MacPorts packages installed), another (my son's Mac) 10.14.6, and two other mac's running 10.12.6 and 10.10.5. Everything seems to work so far except for loading DLS (DownLoadable Soundbank) format files, I haven't tried SF3 ( Vorbis compressed SoundFonts). I did compiled the Mac version of libinstrumpatch that is require for DLS but FluidSynth doesn't seem to be linking to it. They're both newer Soundbank formats that aren't as common as SF2 anyway (although the macOS built-in Roland GM Soundbank is in DLS format).

At any rate, I've only built the macOS version so that I can work on the wrapper without booting into Windoze (I'm not a fan), if you're building something for macOS (10.7+) or iOS (8+) that needs to play music via SF2 or DLS sound banks ( As well as Logic/GarageBand EXS and straight raw sound files), then I recommend using my other Apple specific LCB Wrappers instead of FluidSynth:
https://github.com/PaulMcClernan/LCB_Ap ... dioSampler
If you just need basic MIDI/SoundFont playback functionality then use:
https://github.com/PaulMcClernan/LCB_AppleAVMidiPlayer
Or if you're adventurous, you could try this one that can load ANY AudioUnit Software Synth Music Instrument plug-ins
*** Warning this is a bit unstable / work in progress *** :
https://github.com/PaulMcClernan/LCB_Ap ... Instrument
My LCB Repos: https://github.com/PaulMcClernan/

PaulDaMacMan
Posts: 324
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: MIDI Synthesizer with FluidSynth

Post by PaulDaMacMan » Wed Nov 25, 2020 1:37 am

prometheus wrote:
Fri Oct 30, 2020 12:54 am
MIDI Synthesizer with FluidSynthQuote prometheus
by prometheus » Thu Oct 29, 2020 7:54 pm
LCB lib to wrap FLuidSynth (already working)
I've pushed this a bit further in my repo:
https://github.com/PaulMcClernan/lcb_fluidSynth

I Made a video of the progress I've made!
NOTE: That the hard crash at the end is related to the Piano Widget and the Script Engine Widget<->to LC<->LCB message queuing error (Bug in LC?), the FluidSynth wrapper itself seems to work OK with the stack/graphic object version of the on-screen piano pretty well (although I have had a couple of random crashes with that as well, but it's much more stable than trying to animate the MIDI-input with the widget version.
Also note that I was just figuring out "Another One Bites the Dust" on my bass guitar and was trying to figure it out on the piano keys, by no means is this to be considered a performance, LOL.
Viddy this:
https://www.youtube.com/watch?v=psR1dJ0PiNA
My LCB Repos: https://github.com/PaulMcClernan/

Post Reply

Return to “Community Projects”