Bass Library Documentation
Bass Library Documentation
Hi all,
I have recently downloaded bass.dll for a project and then discovered there was an AHK library for it. I am looking for documention on what it can do and how to use it, but I can't find any, nor have I found a definitive download for it bass.ahk itself. I have found a couple versions, but I'm rather confused - not hard to do, I'm definitely new at this.
My objective with this project is to loop playback of a wav file and be able to change volume, pitch, and rate in real time based on inputs from other parts of the script.
Any help is much appreciated. Thanks.
I have recently downloaded bass.dll for a project and then discovered there was an AHK library for it. I am looking for documention on what it can do and how to use it, but I can't find any, nor have I found a definitive download for it bass.ahk itself. I have found a couple versions, but I'm rather confused - not hard to do, I'm definitely new at this.
My objective with this project is to loop playback of a wav file and be able to change volume, pitch, and rate in real time based on inputs from other parts of the script.
Any help is much appreciated. Thanks.
Re: Bass Library Documentation
Thanks, that at least helps with my confusion about what version I should have. Still need to get some documentation. I've seen it mentioned, but I've never found a link to anything.
Re: Bass Library Documentation
You have to google their forum.
http://www.un4seen.com/forum/?topic=16913.0
http://www.un4seen.com/forum/?topic=16913.0
Re: Bass Library Documentation
Got it (after searching the link that has been kindly provided by @malcev ) https://www.un4seen.com/doc/
Re: Bass Library Documentation
Thanks a lot. I appreciate it. Is there anything that talks about the AHK library for it? Haven't seen anything here or at un4seen.
Re: Bass Library Documentation
Alternatively, are there examples of of code using dll calls (instead of using the bass ahk library) to set attributes of a file as it plays?
Re: Bass Library Documentation
AFAICS, it‘s not that hard to find examples about that: Google > site:autohotkey.com bass.dll
Ie. https://autohotkey.com/board/topic/90556-solved-how-to-play-mp3-using-bassdll/
Ie. https://autohotkey.com/board/topic/90556-solved-how-to-play-mp3-using-bassdll/
Re: Bass Library Documentation
I have those, but to be honest I'm having a hard time interpreting that and applying it to something like setting BASS_ATTRIB_MUSIC_SPEED. So I was hoping to find something that showed more than just getting it to play a sound, but I've not had much luck.
Re: Bass Library Documentation
If You want to get help with errors in Your code, then post it.
If You want to get ready code then hire freelancer.
If You want to get ready code then hire freelancer.
Re: Bass Library Documentation
Neither of those is what I'm going for, the former because what I have right now is so wrong there is hardly any point, and the latter because I am asking for help figuring it out, not asking someone to do it for me. If there was an example parsed out showing a line and what various parts do, as is normal in most documentation I have seen, I could probably take it from there. I have looked for quite some time, just haven't found anything applicable to what I am trying to do.
But anyways, here is my horribly wrong line:
It is supposed to modify the playback speed of a wav file that is already playing, assumedly from 255 (normal speed?) down to something much slower.
But anyways, here is my horribly wrong line:
Code: Select all
BASS_ATTRIB_MUSIC_SPEED_SET :=DllCall(A_ScriptDir . "\bass.dll\BASS_ChannelSetAttribute", UInt, hMedia, BASS_ATTRIB_MUSIC_SPEED float, 5.0)
Last edited by gecko on 12 Feb 2021, 00:58, edited 1 time in total.
Re: Bass Library Documentation
1) You have to understand how to call dll calls. (RTFM)
2) Try just play mp3 with dllcall to bass.dll.
2) Try just play mp3 with dllcall to bass.dll.
Re: Bass Library Documentation
1. Check. Some stuff I am doing just fine with, but in this case I seem to have to specify which attribute in the dll function I am trying to modify, and that part isn't going well. And no, I don't understand everything I have read there - trying to bash my head against it until I do. But fact is my knowledge is obviously pretty basic.
2. Check. I've had that much working the whole time.
2. Check. I've had that much working the whole time.
Re: Bass Library Documentation
I dont see any code that plays wav with bass.dll from You.
Re: Bass Library Documentation
I didn't think that part was relevant, since I'm not having problems there, but here it is, plus the section I am trying to make work:
Code: Select all
BASS_DLLCALL := DllCall("LoadLibrary","str",A_ScriptDir "\bass.dll") ; load Bass.dll
BASS_Init := DllCall(A_ScriptDir . "\bass.dll\BASS_Init",Int,-1,UInt,44100,Int,0,UInt,0,UInt,0)
BASS_start := DllCall(A_ScriptDir . "\bass.dll\BASS_Start", int)
hMedia:= DllCall(A_ScriptDir "\bass.dll\BASS_StreamCreateFile", Int, 0, Astr, "Engine.wav", Uint, 0, Uint, 0, Uint, 0, Uint, 44100)
BASS_ChannelPlay := DllCall(A_ScriptDir . "\bass.dll\BASS_ChannelPlay", UInt,hMedia, Int,1)
a::
BASS_ATTRIB_MUSIC_SPEED_SET :=DllCall(A_ScriptDir . "\bass.dll\BASS_ChannelSetAttribute", UInt, hMedia, BASS_ATTRIB_MUSIC_SPEED float, 5.0)
Return
Re: Bass Library Documentation
1)
not right. should be
2)
You dont need this
3)
Not right, read manual how right to call it.
Code: Select all
BASS_Init := DllCall(A_ScriptDir . "\bass.dll\BASS_Init",Int,-1,UInt,44100,Int,0,UInt,0,UInt,0)
Code: Select all
BASS_Init := DllCall(A_ScriptDir . "\bass.dll\BASS_Init",Int,-1,UInt,44100,Int,0,"ptr",0,"ptr",0)
You dont need this
Code: Select all
BASS_start := DllCall(A_ScriptDir . "\bass.dll\BASS_Start", int)
Not right, read manual how right to call it.
Code: Select all
hMedia:= DllCall(A_ScriptDir "\bass.dll\BASS_StreamCreateFile", Int, 0, Astr, "Engine.wav", Uint, 0, Uint, 0, Uint, 0, Uint, 44100)
Re: Bass Library Documentation
1 and 3. They seem to work just fine, so I'm not sure what is wrong about them?
2. True enough, thanks.
At any rate, could you explain where you are going with this, because to my limited understanding this has nothing to do with my actual problem?
2. True enough, thanks.
At any rate, could you explain where you are going with this, because to my limited understanding this has nothing to do with my actual problem?
Re: Bass Library Documentation
Your actual problem is that You dont know how correctly call dll.
If You understand how to correct call them, then You will not get problem in future.
You have to look to what each dllcall returns and check this response is OK or not.
Also after each dllcal You have to look at errorlevel to see it is ok or not.
If You understand how to correct call them, then You will not get problem in future.
You have to look to what each dllcall returns and check this response is OK or not.
Also after each dllcal You have to look at errorlevel to see it is ok or not.
Re: Bass Library Documentation
Thanks, I see what you mean, kind of. Thanks for your time, I hope I have not wasted too much of it.
Re: Bass Library Documentation
It is OK.
When You understand how correctly call dll, then You have to read manual of dll that You called and make some conclusions.
http://www.un4seen.com/doc/#bass/BASS_ATTRIB_MUSIC_SPEED.html
When You understand how correctly call dll, then You have to read manual of dll that You called and make some conclusions.
http://www.un4seen.com/doc/#bass/BASS_ATTRIB_MUSIC_SPEED.html
Then You have to go to my link from 4th post, read it and make conclusion that You have to use one more dll to get what You want.Remarks
This attribute is a direct mapping of the MOD's speed, so the value can be changed via effects in the MOD itself.