hätte jemand lust/zeit mir einen equalizer zu schreiben bzw mir zu erklären wie das geht?
mit eq meine ich sowas in der Art:
http://fc03.deviantart.net/fs26/f/2008/03…by_dmbmansd.jpg
eq
-
- [ offen ]
-
JuraX -
24. Januar 2010 um 19:23 -
Geschlossen -
Erledigt
-
-
Also mit AutoIt glaub ich wird das sehr viel Code.
Machs doch mit Adobe After Effects -
wenn du mir ne lizens gibst sofort!
-
Wenn du das für einen eigenen MP3-Player willst, kannst du z.B. die Bss.dll verwenden. Das was du meinst, ist aber eher ein Spektrumanalyzer
So ungefähr geht das: http://www.delphipraxis.net/post400663.html#400663
PS: Das Bild ist viel zu groß und braucht ewig zum laden. Das hätte doch gereicht, mit Link zum großen Bild: [Blockierte Grafik: http://th03.deviantart.net/fs26/300W/i/2008/038/2/2/The_Great_Equalizer_by_dmbmansd.jpg] -
ja sowas meine ich nun kann ich mit speedpascal nur nicht viel anfangen
kan mir das jemand in Autoit übersetzten?
(P.s. Die bass funktionen verwende ich schon) -
ja sowas meine ich nun kann ich mit speedpascal nur nicht viel anfangen
kan mir das jemand in Autoit übersetzten?grundsätzlich möglich isses in autoit sicherlich. aber es wäre ein ziemlich großes und komplexes projekt.
das wäre mit flash oder so schon schöner zu lösen.PS: ne lizenz findeste doch sicher irgendwo oder? also für AAE
-
PS: ne lizenz findeste doch sicher irgendwo oder? also für AAEIch bin schockiert :D.
Was spricht gegen eine 30-Tage-Trial?
-
Was spricht gegen eine 30-Tage-Trial?
ja genau das meinte ich ja
-
das ich die schon verpulvert habe
in der schule ham wirs zwar da habe ich aber immoment keine zeit -
es ist nicht grad uez online der kennt sich doch so mit gdi+ aus
-
Hi
bei meinem Audio-Recorder hab ich sowas eingebaut:
http://www.autoitscript.com/forum/index.php?showtopic=86639&view=findpost&p=621195du mußt halt nur dir grafische Darstellung etwas "optimieren"
-
Hii, ich habe sowas doch tatsächlich gefunden... nur leider weiß ich nichtmehr wo ich das her habe (irgendwo von autoitscript.com )
Have fun
p.s. Dort wird das über die Bass.dll und bassflac.dll umgesetzt (beide enthalten)
-
eukalyptus danke könntest du mir den code von der visualisierung geben?
-
Ich hatte mal vor langer Zeit ein Visualizer gebastelt, allerding nur für die 2 Kanäle (links/rechts)!
Schau' mal rein, vielleicht kannst du das noch erweitern!
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Run_After=upx.exe --ultra-brute "%out%"
#AutoIt3Wrapper_Run_After=del /f /q "Visualizer_Obfuscated.au3"#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GDIplus.au3>
#include <WindowsConstants.au3>
#include "Bass.au3"Global Const $bass_dll = _BASS_STARTUP(@ScriptDir & "\BASS.dll")
[/autoit] [autoit][/autoit] [autoit]
Global Const $width = 200
Global Const $height = 230
Global $title = "GDI+ Visualization by UEZ"
$file = FileOpenDialog("Open...", "", "MP3 Files (*.mp3)");
If @error Then
MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error)
Exit
EndIf
_BASS_Init($BASS_DEVICE_CPSPEAKERS)
$MusicHandle = _BASS_StreamCreateFile(False, $file, 0, 0, 0)
_BASS_ChannelPlay($MusicHandle, 1)Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
$hwnd = GUICreate($title, $width, $height, -1, -1, Default, $WS_EX_TOOLWINDOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
GUISetState()_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
$graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd)
$bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics)
$backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
_GDIPlus_GraphicsClear($backbuffer)
$pen1_size = 4
$pen1 = _GDIPlus_PenCreate(0, $pen1_size)
$pen2_size = 4
$pen2 = _GDIPlus_PenCreate(0, $pen2_size)$c = 1
[/autoit] [autoit][/autoit] [autoit]
$equalizer_width = 30
$max_l = 0
$max_r = 0
$fall_speed = 5
$fire_up = 15
Do
$levels = _BASS_ChannelGetLevel($MusicHandle)
$LeftChLvl = Round(_HiWord($levels) / $height * 1.5, 0)
$RightChLvl = Round(_LoWord($levels) / $height * 1.5, 0)If $max_l <= $LeftChLvl Then ;fire up higest line
[/autoit] [autoit][/autoit] [autoit]
$max_l = $LeftChLvl + $fire_up
$fall_speed_l_threshold = 20
Else
If $fall_speed_l_threshold <= 0 Then ;increase fall speed of highest line faster until threshold is <= 0 (second fall part)
If $max_l > $LeftChLvl + $pen2_size * 2 Then $max_l -= $fall_speed
Else
$fall_speed_l_threshold -= 1 ;increase fall speed of highest line by slower until threshold is <= 0 (first fall part)
If $max_l > $LeftChLvl + $pen2_size * 2 Then $max_l -= $fall_speed / 3
EndIf
EndIfIf $max_r <= $RightChLvl Then
[/autoit] [autoit][/autoit] [autoit]
$max_r = $RightChLvl + $fire_up
$fall_speed_r_threshold = 20
Else
If $fall_speed_r_threshold <= 0 Then
If $max_r > $RightChLvl + $pen2_size * 2 Then $max_r -= $fall_speed
Else
$fall_speed_r_threshold -= 1
If $max_r > $RightChLvl + $pen2_size * 2 Then $max_r -= $fall_speed / 3
EndIf
EndIf_GDIPlus_GraphicsClear($backbuffer, 0x9F000000)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_PenSetColor($pen2, 0xFF7F7F7F)
For $l = -$pen1_size - 2 To $leftChLvl Step $pen1_size * 2
$r = $l / ($height) * 256
$g = 256 - $r
$b = 0
_GDIPlus_PenSetColor($pen1, "0xEF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
_GDIPlus_GraphicsDrawLine($backbuffer, $width / 5, $height - $l, $width / 5 + $equalizer_width, $height - $l, $pen1)
Next
For $l = 0 To $RightChLvl
$r = (-(Cos(1.7 * $l / 2^7) + 1) / 2) * 256
$g = ((Cos(4 * $l / 2^8) + 1) / 2) * 256
$b = 0
_GDIPlus_PenSetColor($pen1, "0xEF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
_GDIPlus_GraphicsDrawLine($backbuffer, 3 * $width / 5, $height - $l, 3 * $width / 5 + $equalizer_width, $height - $l, $pen1)
Next
_GDIPlus_GraphicsDrawLine($backbuffer, $width / 5, $height - $max_l, $width / 5 + $equalizer_width, $height - $max_l, $pen2)
_GDIPlus_GraphicsDrawLine($backbuffer, 3 * $width / 5, $height - $max_r, 3 * $width / 5 + $equalizer_width, $height - $max_r, $pen2)
_GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height)
$c += 1
Sleep(15)
Until FalseFunc close()
[/autoit]
_BASS_Stop()
_BASS_Free()
DllClose(@ScriptDir & "\BASS.dll")
_GDIPlus_PenDispose($pen1)
_GDIPlus_PenDispose($pen2)
_GDIPlus_BitmapDispose($bitmap)
_GDIPlus_GraphicsDispose($graphics)
_GDIPlus_GraphicsDispose($backbuffer)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>closeIm Anhang sind die benötigten Dateien!
Gruß,
UEZ -
gut soweit sogut weiß getzt jemand wie man die balken auf frquenzen trimmt?
ich hab ne kleine änderung vorgenommen
Spoiler anzeigen
[autoit]#AutoIt3Wrapper_Run_Obfuscator=y
[/autoit] [autoit][/autoit] [autoit]
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Run_After=upx.exe --ultra-brute "%out%"
#AutoIt3Wrapper_Run_After=del /f /q "Visualizer_Obfuscated.au3"#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GDIplus.au3>
#include <WindowsConstants.au3>
#include "Bass.au3"Global Const $bass_dll = _BASS_STARTUP(@ScriptDir & "\BASS.dll")
[/autoit] [autoit][/autoit] [autoit]
Global Const $width = 200
Global Const $height = 230
Global $title = "GDI+ Visualization by UEZ"
$file = FileOpenDialog("Open...", "", "MP3 Files (*.mp3)");
If @error Then
MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error)
Exit
EndIf
_BASS_Init($BASS_DEVICE_CPSPEAKERS)
$MusicHandle = _BASS_StreamCreateFile(False, $file, 0, 0, 0)
_BASS_ChannelPlay($MusicHandle, 1)Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
$hwnd = GUICreate($title, $width, $height, -1, -1, Default, $WS_EX_TOOLWINDOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
GUISetState()_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
$graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd)
$bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics)
$backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
_GDIPlus_GraphicsClear($backbuffer)
$pen1_size = 4
$pen1 = _GDIPlus_PenCreate(0, $pen1_size)
$pen2_size = 4
$pen2 = _GDIPlus_PenCreate(0, $pen2_size)$c = 1
[/autoit] [autoit][/autoit] [autoit]
$equalizer_width = 30
$max_l = 0
$max_r = 0
$fall_speed = 5
$fire_up = 15
Do
$levels = _BASS_ChannelGetLevel($MusicHandle)
$LeftChLvl = Round(_HiWord($levels) / $height * 1.5, 0)
$RightChLvl = Round(_LoWord($levels) / $height * 1.5, 0)If $max_l <= $LeftChLvl Then ;fire up higest line
[/autoit] [autoit][/autoit] [autoit]
$max_l = $LeftChLvl + $fire_up
$fall_speed_l_threshold = 20
Else
If $fall_speed_l_threshold <= 0 Then ;increase fall speed of highest line faster until threshold is <= 0 (second fall part)
If $max_l > $LeftChLvl + $pen2_size * 2 Then $max_l -= $fall_speed
Else
$fall_speed_l_threshold -= 1 ;increase fall speed of highest line by slower until threshold is <= 0 (first fall part)
If $max_l > $LeftChLvl + $pen2_size * 2 Then $max_l -= $fall_speed / 3
EndIf
EndIfIf $max_r <= $RightChLvl Then
[/autoit] [autoit][/autoit] [autoit]
$max_r = $RightChLvl + $fire_up
$fall_speed_r_threshold = 20
Else
If $fall_speed_r_threshold <= 0 Then
If $max_r > $RightChLvl + $pen2_size * 2 Then $max_r -= $fall_speed
Else
$fall_speed_r_threshold -= 1
If $max_r > $RightChLvl + $pen2_size * 2 Then $max_r -= $fall_speed / 3
EndIf
EndIf_GDIPlus_GraphicsClear($backbuffer, 0x9F000000)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_PenSetColor($pen2, 0xFF7F7F7F)
For $l = -$pen1_size - 2 To $leftChLvl Step $pen1_size * 2
$r = $l / ($height) * 256
$g = 256 - $r
$b = 0
_GDIPlus_PenSetColor($pen1, "0xEF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
_GDIPlus_GraphicsDrawLine($backbuffer, $width / 5, $height - $l, $width / 5 + $equalizer_width, $height - $l, $pen1)
Next
For $l = -$pen1_size - 2 To $RightChLvl Step $pen1_size * 2
$r = (-(Cos(1.7 * $l / 2^7) + 1) / 2) * 256
$g = ((Cos(4 * $l / 2^8) + 1) / 2) * 256
$b = 0
_GDIPlus_PenSetColor($pen1, "0xEF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
_GDIPlus_GraphicsDrawLine($backbuffer, 3 * $width / 5, $height - $l, 3 * $width / 5 + $equalizer_width, $height - $l, $pen1)
Next
_GDIPlus_GraphicsDrawLine($backbuffer, $width / 5, $height - $max_l, $width / 5 + $equalizer_width, $height - $max_l, $pen2)
_GDIPlus_GraphicsDrawLine($backbuffer, 3 * $width / 5, $height - $max_r, 3 * $width / 5 + $equalizer_width, $height - $max_r, $pen2)
_GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height)
$c += 1
Sleep(15)
Until FalseFunc close()
[/autoit]
_BASS_Stop()
_BASS_Free()
DllClose(@ScriptDir & "\BASS.dll")
_GDIPlus_PenDispose($pen1)
_GDIPlus_PenDispose($pen2)
_GDIPlus_BitmapDispose($bitmap)
_GDIPlus_GraphicsDispose($graphics)
_GDIPlus_GraphicsDispose($backbuffer)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>close