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
Antwort Antwort
Abversoft

Registriert seit: 30. Aug 2010
6 Beiträge
 
#1

Scrolling Spectrum

  Alt 13. Feb 2014, 08:53
Hat Scroll Spectrum , sondern kann `t Arbeit ordnungsgemäß umzusetzen Daten.
Hilfe , es zu verstehen
Angehängte Dateien
Dateityp: zip mp3_9d.zip (234,7 KB, 21x aufgerufen)
  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.679 Beiträge
 
Delphi 2007 Enterprise
 
#2

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 09:20
I have no idea what language you translated that from, but it is gruesome. If you can speak English, please feel free to do so here. A lot of the people here will understand it better than what your translator garbles out. Even this short sentence is almost illegible, I don't want to know what happens if things need to be discussed in more detail .

From what I can tell, you have some problems with the component you attached. Please be A LOT more specific about what EXACTLY is the problem. A general question like "doesn't work, what to do?" just can't be answered. Especially since this seems not to be a component that is widely used and known.
"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)
  Mit Zitat antworten Zitat
Abversoft

Registriert seit: 30. Aug 2010
6 Beiträge
 
#3

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 09:44
Hat Scroll Spectrum , sondern kann `t Arbeit ordnungsgemäß umzusetzen Daten.
Hilfe , es zu verstehen
Did Scroll Spectrum, but I can not do the right job with the data.
Please help me in this
  Mit Zitat antworten Zitat
Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.540 Beiträge
 
Delphi 11 Alexandria
 
#4

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 09:56
There are several examples in this forum: Hier im Forum suchenScrolling Spectrum
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat
Abversoft

Registriert seit: 30. Aug 2010
6 Beiträge
 
#5

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 10:14
There are several examples in this forum: Hier im Forum suchenScrolling Spectrum
Seen, but it's not what I need
  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.679 Beiträge
 
Delphi 2007 Enterprise
 
#6

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 17:21
Then what do you need? We can do marvelous things here, but reading minds ain't one. Why do so many people have such problems simply stating what they want to do, and what happens instead? Escapes me entirely.
When in doubt, post code, mark the line where compiling fails or a runtime error appears, and copy&paste the error message(s) underneath. Even if it's just that output differs from expectation, at least SOME information about what you did would be greatly appreciated. And by that I, of course, mean code.
"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 17:24 Uhr)
  Mit Zitat antworten Zitat
Abversoft

Registriert seit: 30. Aug 2010
6 Beiträge
 
#7

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 18:46
Then what do you need? We can do marvelous things here, but reading minds ain't one. Why do so many people have such problems simply stating what they want to do, and what happens instead? Escapes me entirely.
When in doubt, post code, mark the line where compiling fails or a runtime error appears, and copy&paste the error message(s) underneath. Even if it's just that output differs from expectation, at least SOME information about what you did would be greatly appreciated. And by that I, of course, mean code.
Below is a code that allows you to create motion Spectrum. The problem is that it is wrong to count the data. As a result, Spectrum does not look believable.


var
Form1 : TForm1;
Mp3Len : Cardinal;
XPos : Integer = 0;
aLevel : Cardinal;
aLeft, aRight: single;
WaveOscil : TWaveData;
wavebufL, wavebufR: array of smallint;
ArrWaveL, ArrWaveR: array of array of Integer;

procedure DrawLine(Canvas: TCanvas; X, Y, X2, Y2: Integer);
begin
Canvas.MoveTo(X, Y);
Canvas.LineTo(X2, Y2);
end;

{Draw waveforms}

procedure TForm1.Draw;
var
i, j, y : integer;
WvWig : integer;
L, R, aL, aR : SmallInt;
VisBuff : Tbitmap;
Sample : Smallint;
begin
VisBuff := CreateBmp32(PaintBox2.Width, PaintBox2.Height);
y := (PaintBox2.height - 2) div 2;
WvWig := Round(PaintBox2.Width / WvSpeed);

VisBuff.Canvas.Brush.Color := 0;
VisBuff.Canvas.Pen.Color := $00E6C62D;
VisBuff.Canvas.FillRect(VisBuff.Canvas.ClipRect);
for j := 0 to WvSpeed do
begin

Sample := MulDiv(128, Smallint(LOWORD(WaveOscil[j])), 32768);
if Sample < Low(ShortInt) then
Sample := Low(ShortInt)
else if Sample > High(ShortInt) then
Sample := High(ShortInt);
//-----------------------
L := SmallInt(Loword(WaveOscil[j]));
R := SmallInt(Hiword(WaveOscil[j]));
aL := (trunc(((L ) / (65535)) * y));
// aL := Abs(Trunc(L/32768*50));
aR := (trunc(((R) / (65535)) * y));
//----------------------------
ArrWaveL[j][0] := aL;
ArrWaveR[j][0] := aR;

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;

end;

for i := 0 to WvWig do
begin
for j := 0 to WvSpeed do
begin
DrawLine(VisBuff.Canvas,
i * WvSpeed + j, y div 2,
i * WvSpeed + j, (y div 2) + ArrWaveL[j][WvWig - i]);

DrawLine(VisBuff.Canvas,
i * WvSpeed + j, y div 2,
i * WvSpeed + j, (y div 2) - ArrWaveL[j][WvWig - i]);

DrawLine(VisBuff.Canvas,
i * WvSpeed + j, (VisBuff.height div 2) + (y div 2),
i * WvSpeed + j, (VisBuff.height div 2) + (y div 2) + ArrWaveR[j][WvWig -
i]);

DrawLine(VisBuff.Canvas,
i * WvSpeed + j, (VisBuff.height div 2) + (y div 2),
i * WvSpeed + j, (VisBuff.height div 2) + (y div 2) - ArrWaveR[j][WvWig -
i]);

end;
end;

BitBlt(PaintBox2.Canvas.Handle, 0, 0, VisBuff.Width, VisBuff.Height,
VisBuff.Canvas.Handle, 0, 0, srccopy);
VisBuff.Free;

end;

See the compiled example
Miniaturansicht angehängter Grafiken
screen1.jpg  
Angehängte Dateien
Dateityp: zip mp3_9d.zip (234,7 KB, 19x aufgerufen)

Geändert von Abversoft (13. Feb 2014 um 18:57 Uhr)
  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.679 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
Abversoft

Registriert seit: 30. Aug 2010
6 Beiträge
 
#9

AW: Scrolling Spectrum

  Alt 13. Feb 2014, 21:47
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.
I agree with you that this is not the spectrum .
ArrWaveX array initialized with the compiled example.

I should be grateful if you helped implement motion Wave In accordance music.
I need to get a result such as in the picture
Miniaturansicht angehängter Grafiken
1b.jpg   1a.jpg  
  Mit Zitat antworten Zitat
Abversoft

Registriert seit: 30. Aug 2010
6 Beiträge
 
#10

AW: Scrolling Spectrum

  Alt 15. Feb 2014, 09:22
looked examples http://www.delphipraxis.net/89231-%5...-spectrum.html.
These examples all pull Wave, then when the music played occur scrolling . Possible to do so when the music played only occurred scrolling spectrum
  Mit Zitat antworten Zitat
Antwort Antwort


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 01:15 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz