Mellotron simulator is an open source Terminal App for macOS X (Tested on High Sierra) written in C++.
It’s based on SFML Framework and RtMidi.

https://www.sfml-dev.org/
https://github.com/thestk/rtmidi

The app was intended to use https://sonicbloom.net/en/free-sb-mellotron-samples/ but you can use your own sounds with almost no tweaking.