diff src/app/waveform/waveform.component.ts @ 129:161af71c80d4

Module for spectrogram stuff. Consume the WavesSpectrogramLayer in Waveform... of course.
author Lucas Thompson <dev@lucas.im>
date Thu, 16 Mar 2017 10:35:53 +0000
parents 3e19908d4c8b
children 38abcb4830f1
line wrap: on
line diff
--- a/src/app/waveform/waveform.component.ts	Thu Mar 16 10:34:38 2017 +0000
+++ b/src/app/waveform/waveform.component.ts	Thu Mar 16 10:35:53 2017 +0000
@@ -15,6 +15,7 @@
 import {toSeconds} from "piper";
 import {FeatureList, Feature} from "piper/Feature";
 import * as Hammer from 'hammerjs';
+import {WavesSpectrogramLayer} from "../spectrogram/Spectrogram";
 
 type Timeline = any; // TODO what type actually is it.. start a .d.ts for waves-ui?
 type Layer = any;
@@ -379,11 +380,11 @@
     const height: number = this.trackDiv.nativeElement.getBoundingClientRect().height / 2;
     const gridTrack = this.timeline.getTrackById('grid');
 
-    const spectrogramLayer = new wavesUI.helpers.SpectrogramLayer(buffer, {
+    const spectrogramLayer = new WavesSpectrogramLayer(buffer, {
       top: height * 0.05,
       height: height * 0.9,
       stepSize: 512,
-      fftSize: 1024,
+      blockSize: 1024,
       normalise: 'none',
       mapper: this.sunsetMapper()
     });