fhunleth
I’ve been playing around with libfluidsynth which is a software MIDI synthesizer. The nice part (for me at least) is that it can play notes without any additional hardware and the software setup is simple once you get libfluidsynth and a soundfont installed.
I’m finding that I don’t have time to do justice to a music library in Elixir and I don’t think that I have the musical background to do it anyway. It has been a lot of fun, though, so I packaged up the raw MIDI interface and posted it at midi_synth | Hex.
The library doesn’t have a sequencer. You just give it MIDI commands and it immediately runs them. Thanks to Elixir’s binary syntax, this is actually not too bad to work with. There is some example code to get you started. Please read the README.md for getting libfluidsynth and a soundfont file.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
sym_num
Hello.
I wrote a code that generate music of Takeuchi function.
Thank you for good library.
fhunleth
This is great! Thank you for posting.
You have motivated me to clean up and improve the source code for the library. I will publish updates soon.
Frank
fhunleth
I just released midi_synth v0.3.0 which is a substantial update to the library. Unfortunately, it is completely backwards incompatible with v0.2.0, but on the plus side, it fixes quite a few big mistakes I made a couple years ago.
The main module,
MIDISynth, only handles low level MIDI commands now. I moved the helper functions for playing simple songs and for encoding MIDI commands to other modules. My hope is that other libraries can build upon the flexibility of being able to send nearly any MIDI command tomidi_synthand not be constrained the library. See the docs for examples. I think that the changes that need to be made to existing code are self-explanatory since the API was pretty small anyway.Besides the name changes and API functions moving around, you now need to start a software MIDI synth yourself. You can do that by calling
MIDISynth.start_link/1manually or by including it in one of your supervision trees.Other improvements include:
MIDISynth.start_link/1. I removed the one use of the application environment, so you can now start up multiple synthesizers with different sound fonts if you want._build. This sounds small, but it prevents a number of issues especially if anyone ever starts cross-compilingmidi_synthfor Nerves.I’ve tested this on OSX and Linux, and it seems to work. Of course, it’s audio, so Linux friends, please help if there are settings that you need tweaked or need to be exposed as user-configurable.