Tucsky / SignificantTrades

better than 1 min chart
https://aggr.trade
GNU General Public License v3.0
623 stars 211 forks source link

Modifying Audio #17

Open ghost opened 6 years ago

ghost commented 6 years ago

Firstly, very impressive work. I think the significant trades audio implementation is incredible - particularly when you look at commercial products in financial markets which do something similar (only much, much worse).

I've set up two different instances so I can watch other cryptos and I'm trying to work out a way to have different audio.

I've read up a little bit about the tunajs library but was wondering if I could have some further pointers?

I've tried different sound effects (wahwah, tremolo) but everything sounds pretty much the same and I've tried something called 'cabinet' and passing through an impulse wav but then it just stops working.

e.g.

this.output = new tuna.Cabinet({ makeupGain: 1, //0 to 20 impulsePath: "Impulse.wav", //path to your speaker impulse bypass: 0 });

instead of


        this.output = new tuna.PingPongDelay({
            wetLevel: 0.5, //0 to 1
            feedback: 0.01, //0 to 1
            delayTimeLeft: 175, //1 to 10000 (milliseconds)
            delayTimeRight: 100 //1 to 10000 (milliseconds)
        });

Any tips?

If not, any chance of having different sound options implemented in another version so that one can run significant trades for multiple products?

technicalhype commented 6 years ago

great points.

Tucsky commented 6 years ago

You could try pitching the frequency up or down based on the pair, so with little time hearing them you should be able to recognize which pair match the sound you hear. Haven't tried myself but could implement if its works out.

Never been a big fan of the generated sounds tho, spent hours trying to get something that sounds good but result is always différents depending on the browser, OS, device or headphone... And the performance arent great when generating sounds on the fly. Particulaty when window is not visible on the screen, chrome allocate less memory for the app and it just sounds bad! I think we should get best result by uploading custom WAV sounds (or any kind already synthesized sounds, idk, im not expert)

rclai commented 5 years ago

It might be worth it to try this library: https://tonejs.github.io/