basically, that formula is tuning the pitches and samples that you can found even in audacity at maximal zoom. So, you can make a simple float-generator that will write a raw wave file. You can take any language you refer: simple forth, modern python, C# for unity3D in-game music without file writing, C++ if your dirty fantasies are strange enough.