Hey @jed, Marc here (the other developer). Thanks for asking!
We didn't find the perfect solution for that yet, but one that is at least quite sufficient. We "normalize" all transaction values on a scale and then play the corresponding sound.
Basically it's this piece of code: https://github.com/lightningboss/stellar-wind/blob/master/app/stellar/index.js#L46.
Here's a small example: Imagine having the following transaction values: 500, 1000, 400.
Now we normalize them, which means that all values should be in the same interval in order to be able to compare them against each other. Initially we chose that they should be between 0 and 100. What now happens is what you might now from generating a random number in an interval.
The first transaction value is 500. We save the 500 as the currently highest value. So the first normalized value is 100. The second transaction value is 1000, so our highest value is now 1000 as well and again, the normalized value is 100. Now the next transaction value is 400, which does not get saved as the highest one (we still have the 1000) and it's normalized value is 40.
One thing we built in to make Stellar Wind sound a bit more interesting is to filter out duplicate transaction values and to play a random note when the normalized value is 1 (this seems to happen quite a lot).
Now we basically translate this number into an index and use it to play the note.
I think that this is one of the things Stellar Wind can improve at. For me it's a very primitive approach, but it works fine so far. If anyone has a good idea on how to improve this, I'd be glad to try it out! 😃 I'd be glad about other feedback as well!