Making a music player in OCaml

I’m interested in making my own music player in OCaml so I wanted to know whether there were any existing ones and/or examples of how to make one.
Bear in mind, I am interested in the actual logic of how to read a music file (or a playlist) and listening to it, rather than the front-end part of a music player.
(My knowledge of OCaml is intermediate)
Thank you in advance

You want to check


Wow @PatJ I didn’t know about liquidsoap. I added it to ocamlverse. This is what we have for the audio page now, in case it’s helpful to the OP:


I experimented with several solutions in the playo project.
One of the possible solutions is to use ocaml-gstreamer.
If you find that the gstreamer framework is too annoying (which I can understand :-), you can use ocaml-ffmpeg. note however that, in the latest version of ocaml-ffmpeg, the audio device output no longer works. To overcome this drawback, you can use ocaml-portaudio.