index.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>wavesurfer.js | Spectrogram plugin</title>
  6. <link href="data:image/gif;" rel="icon" type="image/x-icon" />
  7. <!-- Bootstrap -->
  8. <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
  9. <link rel="stylesheet" href="../css/style.css" />
  10. <link rel="stylesheet" href="../css/ribbon.css" />
  11. <!-- wavesurfer.js -->
  12. <script src="../../dist/wavesurfer.js"></script>
  13. <!-- spectrogram format renderer -->
  14. <script src="../../dist/plugin/wavesurfer.spectrogram.js"></script>
  15. <!-- App -->
  16. <script src="app.js"></script>
  17. <script src="../trivia.js"></script>
  18. </head>
  19. <body itemscope itemtype="http://schema.org/WebApplication">
  20. <div class="container">
  21. <div class="header">
  22. <noindex>
  23. <ul class="nav nav-pills pull-right">
  24. <li><a href="?fill">Fill</a></li>
  25. <li><a href="?scroll">Scroll</a></li>
  26. </ul>
  27. </noindex>
  28. <h1 itemprop="name"><a href="http://wavesurfer-js.org">wavesurfer.js</a><noindex> + Spectrogram</noindex></h1>
  29. </div>
  30. <div id="demo">
  31. <div id="waveform">
  32. <div class="progress progress-striped active" id="progress-bar">
  33. <div class="progress-bar progress-bar-info"></div>
  34. </div>
  35. <!-- Here be waveform -->
  36. </div>
  37. <div id="wave-spectrogram"></div>
  38. <div class="controls">
  39. <button class="btn btn-primary" data-action="play">
  40. <i class="glyphicon glyphicon-play"></i>
  41. Play
  42. /
  43. <i class="glyphicon glyphicon-pause"></i>
  44. Pause
  45. </button>
  46. </div>
  47. </div>
  48. <div class="row marketing">
  49. <div class="col-lg-4">
  50. <h4>wavesurfer.js Spectrogram Plugin</h4>
  51. <p itemprop="about">Adds a simple spectrogram to your <strong>wavesurfer.js</strong> instances.</p>
  52. <h4>Installation</h4>
  53. <p>
  54. <ol>
  55. <li>add the Spectrogram plugin script tag</li>
  56. <li>create a <code>WaveSurfer</code> instance</li>
  57. <li>add a container HTML element for the spectrogram</li>
  58. <li>create a Spectrogram instance in the <code>WaveSurfer</code>'s <code>"ready"</code> event callback</li>
  59. </ol>
  60. </p>
  61. <p>
  62. <a class="btn btn-large btn-success" href="../../plugin/wavesurfer.spectrogram.js" itemprop="downloadUrl" download>Download <strong>the plugin</strong> (5 KB)</a>
  63. </p>
  64. </div>
  65. <div class="col-lg-8">
  66. <h4>Quick Start</h4>
  67. <noindex><p>
  68. <pre><code>var wavesurfer = WaveSurfer.create({
  69. // your options here
  70. plugins: [
  71. WaveSurfer.spectrogram.create{
  72. wavesurfer: wavesurfer,
  73. container: "#wave-spectrogram"
  74. })
  75. ]
  76. });
  77. wavesurfer.load('example/media/demo.wav');</code></pre>
  78. </p></noindex>
  79. <br />
  80. <h4>Options</h4>
  81. <ul class="markdown-body">
  82. <li><code>wavesurfer</code> - <em>required</em> - a WaveSurfer instance.</li>
  83. <li><code>container</code> - <em>required</em> - the element in which to place the spectrogram, or a CSS selector to find it.</li>
  84. <li><code>fftSamples</code> - number of FFT samples (<code>512</code> by default). Number of spectral lines and height of the spectrogram will be a half of this parameter.</li>
  85. <li><code>frequenciesDataUrl</code> - URL to load spectral data from.</li>
  86. </ul>
  87. </div>
  88. </div>
  89. <div class="footer row">
  90. <div class="col-sm-12">
  91. <a rel="license" href="https://opensource.org/licenses/BSD-3-Clause"><img alt="BSD-3-Clause License" style="border-width:0" src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg" /></a>
  92. </div>
  93. <div class="col-sm-12">
  94. <span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">wavesurfer.js</span> by <a href="https://github.com/katspaugh/wavesurfer.js">katspaugh</a> is licensed under a <a rel="license" href="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause License</a>.
  95. </div>
  96. </div>
  97. </div>
  98. <div class="github-fork-ribbon-wrapper right">
  99. <div class="github-fork-ribbon">
  100. <a itemprop="isBasedOnUrl" href="https://github.com/katspaugh/wavesurfer.js">Fork me on GitHub</a>
  101. </div>
  102. </div>
  103. <script>
  104. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  105. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  106. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  107. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  108. ga('create', 'UA-50026819-1', 'wavesurfer.fm');
  109. ga('send', 'pageview');
  110. </script>
  111. </body>
  112. </html>