As a means of learning Erlang, I have created a module that implements gen_statem controlling access to a port opened for a FluidSynth command.
If anyone would be so kind as to review the module and give any feedback, such as things I am doing the hard way, etc., it would be much appreciated.
I have written up a Gist here:
https://gist.github.com/EarthCitizen/b24efc85e815d77bd81ae51f677ede8f
Comment here or in the Gist. Either way is OK for me.
Thank you!