Advertisement
Guest User

Untitled

a guest
Mar 29th, 2018
694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. // ==PREPROCESSOR==
  2. // @import "%fb2k_profile_path%marc2003\common8.js"
  3. // @name "Spectrogram Seekbar"
  4. // @author "marc2003"
  5. // ==/PREPROCESSOR==
  6.  
  7. /*
  8. This script requires SoX and ffmpeg to analyse your files. A full guide including
  9. download links can be found on this page:
  10.  
  11. http://marc2003.x10host.com/spectrogram-seekbar
  12. */
  13.  
  14. var sox_exe = fb.ProfilePath + "sox\\sox.exe";
  15. var ffmpeg_exe = fb.ProfilePath + "sox\\ffmpeg.exe";
  16. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  17. var p = new panel("Spectrogram Seekbar", ["custom_background"]);
  18. var s = new seekbar("spectrogram", 0, 0, 0, 0);
  19.  
  20. function on_size() {
  21. p.size();
  22. s.w = p.w;
  23. s.h = p.h;
  24. }
  25.  
  26. function on_paint(gr) {
  27. p.draw_background(gr);
  28. s.draw(gr);
  29. }
  30.  
  31. function on_playback_new_track() {
  32. s.playback_new_track();
  33. }
  34.  
  35. function on_playback_seek() {
  36. s.playback_seek();
  37. }
  38.  
  39. function on_playback_stop() {
  40. s.playback_stop();
  41. }
  42.  
  43. function on_mouse_wheel(step) {
  44. s.wheel(step);
  45. }
  46.  
  47. function on_mouse_move(x, y) {
  48. p.move(x, y);
  49. s.move(x, y);
  50. }
  51.  
  52. function on_mouse_lbtn_down(x, y) {
  53. s.lbtn_down(x, y);
  54. }
  55.  
  56. function on_mouse_lbtn_up(x, y) {
  57. s.lbtn_up(x, y);
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement