If you have a good, clean, high-quality audio recording of the whistle, then making a whistle for Trainz is relatively simple to do. There should be some tutorials floating around on the InterWebs that demonstrate how to make them. Heck, I'll make a whistle for anyone if they have a HQ recording, but I'm sure others would as well...
But, when you say you want to make them "from scratch", do you mean starting with an audio recording of an actual whistle or truly "making them from scratch" by somehow (auto-magically?) generating a waveform that sounds like a steam whistle?
PS: I have a couple of real steam whistles that were used on Virginian Ry. Mallets. If someone could send me a working steam boiler (or preferably, a working steam locomotive), I'll be glad to make a variety of audio recordings freely available to the Trainz community.