# Code Review Request (about gen\_statem controlling access to a port opened for a FluidSynth)

**URL:** <https://erlangforums.com/t/code-review-request-about-gen-statem-controlling-access-to-a-port-opened-for-a-fluidsynth/4080>\
**Category:** Questions / Help\
**Tags:** learning-erlang\
**Created:** [October 15, 2024, 6:45am UTC](https://erlangforums.com/t/code-review-request-about-gen-statem-controlling-access-to-a-port-opened-for-a-fluidsynth/4080 "2024-10-15T06:45:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EarthCitizen](https://erlangforums.com/user_avatar/erlangforums.com/earthcitizen/32/2608_2.png) [@EarthCitizen](https://erlangforums.com/u/EarthCitizen)\
**Post date:** [October 15, 2024, 6:45am UTC](https://erlangforums.com/t/code-review-request-about-gen-statem-controlling-access-to-a-port-opened-for-a-fluidsynth/4080/1 "2024-10-15T06:45:02Z")

</div>

As a means of learning Erlang, I have created a module that implements **gen\_statem** controlling access to a port opened for a [FluidSynth](https://www.fluidsynth.org) 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](https://gist.github.com/EarthCitizen/b24efc85e815d77bd81ae51f677ede8f)

Comment here or in the Gist. Either way is OK for me.

Thank you!

---

<div class="post-metadata">

**Author:** ![filmor](https://erlangforums.com/user_avatar/erlangforums.com/filmor/32/988_2.png) [@filmor](https://erlangforums.com/u/filmor)\
**Post date:** [October 16, 2024, 12:01pm UTC](https://erlangforums.com/t/code-review-request-about-gen-statem-controlling-access-to-a-port-opened-for-a-fluidsynth/4080/2 "2024-10-16T12:01:43Z")

</div>

I added a bunch of notes: [gen\_statem Wrapper for FluidSynth MIDI Software Synth · GitHub](https://gist.github.com/EarthCitizen/b24efc85e815d77bd81ae51f677ede8f?permalink_comment_id=5236550#gistcomment-5236550)

---

<div class="post-metadata">

**Author:** ![juhlig](https://erlangforums.com/user_avatar/erlangforums.com/juhlig/32/837_2.png) [@juhlig](https://erlangforums.com/u/juhlig)\
**Post date:** [October 16, 2024, 5:30pm UTC](https://erlangforums.com/t/code-review-request-about-gen-statem-controlling-access-to-a-port-opened-for-a-fluidsynth/4080/3 "2024-10-16T17:30:23Z")

</div>

I commented on your comments 😄
