AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Scrolling Spectrum

Ein Thema von Abversoft · begonnen am 13. Feb 2014 · letzter Beitrag vom 15. Feb 2014
 
Medium

Registriert seit: 23. Jan 2008
3.688 Beiträge
 
Delphi 2007 Enterprise
 
#8

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 21:18
Two things first:
1) This is not a spectrum. It is the waveform, which is the time-amplitude diagram of a sound. A spectrum would be a time-frequency diagram.
2) I do not understand so far, why your arrays "ArrWaveX" are two-dimensional. The following piece actually shows that it shouldn't be:
Delphi-Quellcode:
      for i := 0 to WvWig do
        begin
          ArrWaveL[j][WvWig - i] := ArrWaveL[j][WvWig - i - 1];
          ArrWaveR[j][WvWig - i] := ArrWaveR[j][WvWig - i - 1];
        end;
Here, you set all values of all dimensions (apparently "WvWig" many, where ever that value comes from) the same as their first. Why? You only need that first value. You also go ahead and paint all the dimensions, which could cost you a lot of performance, but does nothing to the output.

But your main issue seems not to be included in the code you have shown. Since you do properly start from 0 everywhere, it appears that the original waveform buffers ("wavebufX") were already filled only in their last half. It's a bit hard to tell, because a number of global variables come into play here, which are not explained anywhere.

More importantly: You seem to not initialize your arrays "ArrWaveX" anywhere. It's a small miracle this doesn't blow up at runtime, and might even be part of the problem. You even access a negative index in the snippet above, which also might cause you your troubles. I would try to fix these first, and see what the result is.
In the end, your waveform doesn't look bad at all. It's just that the first half seems to be missing, and of course it's a waveform. Not a spectrum.
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)

Geändert von Medium (13. Feb 2014 um 21:20 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:51 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz