BASS.dll - Klangeffekte

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

gero
Posts: 168
Joined: 02 Oct 2013, 05:36

BASS.dll - Klangeffekte

09 Aug 2020, 13:44

Hallo zusammen
Habe mir einen Web-Radio-Player mit der Bass.dll zusammengebastelt ... funktioniert auch ganz prima.
Nun würde ich gern noch einen Klangeffekt (vorzugsweise "Compressor") da irgendwie einbauen ... nur fehlt mir dafür einfach ALLES.
http://www.un4seen.com/doc/#bass/BASS_ChannelSetFX.html
Vielleicht hat ja einer diesen CodeSchnippsel parat.

Hier ein lauffähiges Extrakt meines Codes ... das Label "Effekte" ist mein Problem.
Die Bass.dll sollte im Script-Verzeichnis liegen.

gruss
gero

Code: Select all

#SingleInstance force
SetWorkingDir %A_ScriptDir%
SenderAdresse:="http://sc-blues.1.fm:8030/"  ; Swiss Jazz Radio
Gui,Add,Button,x10 y10 w80 gPlay,play
Gui,Add,Button,x+10 yp wp gEFFEKT,Effekt
Gui,Add,Button,x+10 wp gSTOP,stop
Gui,Add,Button,x+10 wp gEXIT,exit
Gui,show,,Web-Radio
return

EFFEKT:
;????????????????
DllCall("bass.dll\BASS_ChannelSetFX", hStream,BASS_FX_DX8_COMPRESSOR,0 )
return

PLAY:
BASS_DLLCALL := DllCall("LoadLibrary", "Str", A_ScriptDir . "\bass.dll")
IF (DllCall("bass.dll\BASS_Init", "Int", -1, "UInt", 44100, "UInt", 0, "Ptr", A_ScriptHwnd, "Ptr", 0))
    {
    hStream := DllCall("bass.dll\BASS_StreamCreateURL", "Str", SenderAdresse, "UInt", 0, "UInt", A_IsUnicode ? BASS_UNICODE := 0x80000000 : 0, "Ptr", 0, "Ptr", 0, "UInt")
    DllCall("bass.dll\BASS_ChannelPlay", "UInt", hStream, "Int", 1)
    }
return

STOP:
DllCall("bass.dll\BASS_Stop")
DllCall("bass.dll\BASS_Free")
return

EXIT:
GuiClose:
DllCall("bass.dll\BASS_Free")
exitapp
Last edited by gero on 12 Feb 2024, 02:49, edited 1 time in total.
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: BASS.dll - Klangeffekte

10 Aug 2020, 04:23

Moin gero,

schau mal da: Creating sound effects using bass.dll. So ähnlich sollte das für alle Effekte funktionieren. Benutzt Du AHK32 oder AHK64?
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: BASS.dll - Klangeffekte

10 Aug 2020, 04:32

@toralf, warst Du da nicht auch mal dran?
gero
Posts: 168
Joined: 02 Oct 2013, 05:36

Re: BASS.dll - Klangeffekte

10 Aug 2020, 04:49

Ich nutze Win7 mit 32bit also auch die passende Bass.dll
Danke für den Link ... vielleicht bekomme ich's ja damit selber hin ...

gruss
gero
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: BASS.dll - Klangeffekte

10 Aug 2020, 05:37

Gut, wenn noch Fragen aufkommen, stelle sie.

Willst Du einen eigenen Compressor mit eigenen Einstellungen erzeugen?
gero
Posts: 168
Joined: 02 Oct 2013, 05:36

Re: BASS.dll - Klangeffekte

10 Aug 2020, 06:58

@just me ... alles Böhmische Dörfer da ... Standard solle mir fürs erste reichen ...
Dachte bei "Standard" brauche ich keine "typedef struct" ... Syntax absolut verwirrend ... :(
Ich gebs ja zu - ich habe null Ahnung wie ich das einbauen soll ... ;)

gruss
gero
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: BASS.dll - Klangeffekte

10 Aug 2020, 08:47

Probier das mal:

Code: Select all

EFFEKT:
FX := DllCall("bass.dll\BASS_ChannelSetFX", "Ptr", hStream, "UInt", 1, "Int", 0, "UPtr") ; BASS_FX_DX8_COMPRESSOR = 1
MsgBox, %FX%
Return
Im Fehlerfall wird Dir eine 0 angezeigt. Ich weiß aber nicht, ob sich das überhaupt bemerkbar macht. Möglicherweise musst Du die Wiedergabe vorher stoppen.
gero
Posts: 168
Joined: 02 Oct 2013, 05:36

Re: BASS.dll - Klangeffekte

10 Aug 2020, 10:07

Habe deinen Code eingebaut ... bekomme auch einen Rückgabewert für FX > also passiert da auch was ... aber einen hörbaren Unterschied kann ich nicht feststellen ... hatte mir da mehr versprochen ... liegt ja vielleicht auch an den Standardwerten für den Compressor ...

Aber trotzdem DICKES DANKE für deine prompte Hilfe

gruss
gero
toralf
Posts: 868
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: BASS.dll - Klangeffekte

15 Aug 2020, 08:18

just me wrote:
10 Aug 2020, 04:32
@toralf, warst Du da nicht auch mal dran?
Hallo @just me , du hast ein gutes Gedächtnis. Das ist aber schon 13 Jahre her. Und soweit bin ich nie gekommen. Daher kann ich hier nicht weiterhelfen. Sorry.
ciao
toralf
gero
Posts: 168
Joined: 02 Oct 2013, 05:36

Re: BASS.dll - Klangeffekte

16 Aug 2020, 06:03

... und sie geht dahin ... meine letzte Hoffnung auf Hilfe ... ;)

gruss
gero
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: BASS.dll - Klangeffekte

22 Mar 2021, 13:56

JFTR: http://www.bass.radio42.com/help/html/4c663bda-2751-c2c3-eaf2-770b846b6652.htm (vll. irgendwann, irgendwie brauchbar. HTH). ...
BASS.NET is a .Net wrapper for the BASS audio library and all it's Add-Ons - available at www.un4seen.com. It can be used with the .Net Framework and with any managed language, like C#, VB.Net, JScript, F# or managed C++.

http://www.bass.radio42.com/index.html

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 23 guests