Jump to content

BASS Function Library (Sound and Music Functions)


BrettF
 Share

Recommended Posts

Link to comment
Share on other sites

I found a very weird error.

If the output on stereo mix is to high, it will output the negative values showing the output has a 0/100 value.

Do you mean the same problem as I posted at post #136?

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

  • 2 months later...

Is it just me or is _BASS_StreamCreateURL function giving anyone else an error?

i'm using it like this ->

$Bass_handle = _BASS_StreamCreateURL($BASS_DLL, "http://...../....mp3", '', $BASS_STREAM_AUTOFREE)

and it gives me this error:

Line 2362 (file "...Bass.au3"):

$dcProc = DllCallBackRegister ($proc, "ptr", "ptr;dword;ptw;")

Error: Badly formatted "Func" statement.

edit: i also downloaded your BASSCB and it giving me the same error

edit2: as a temporary fix i commented out line 2363 and edited the next line:

$BASS_ret_ = DllCall($bass_dll, "dword", "BASS_StreamCreateURL", "ptr", DllStructGetPtr($dsURL), "DWORD", $offset, "DWORD", $flags, "ptr", "", "ptr", "")

Edited by darthneo
Link to comment
Share on other sites

  • 1 month later...

Hi BrettF, I would like to made use of your BASS UDF to do FFT Spectrum Analysis in AutoIT. I am new to your BASS UDF but I tried to read up all your examples in Zip and Help Doc. Posted Image

I am quite confussed with how to implement the BASS_ChannelGetData() on a stereo line-in audio source. I would like to read out in realtime the Left and Right channel frequency value of a constant Sine Tone which I will pump in from an external audio source.

How may I deal with the returns from this UDF so as to display them in term of Hz?Posted Image

My FFT settings are:

Sampling Rate: 22.050KHz

FFT size: 4096

Time Window: Hamming

Channel: Stereo

Link to comment
Share on other sites

Sorry for the late reply, I was probably in Rome at the time. Just got back from 3 weeks touring around Europe... :)

Check out what monoceres did with his visualizations and Bass.dll.

The link if memory serves me correctly should be in the initial post.

Cheers,

Brett

Link to comment
Share on other sites

I want to mention that BASS.AU3 is not working properly with latest v3.3.1.3 beta anymore.

E.g:

>Running:(3.3.1.3):C:\Program Files\AutoIt3\beta\autoit3.exe "D:\Coding\AU3\Music\Visualizer_Analog Meter.au3"

D:\Coding\AU3\Music\Bass.au3 (4015) : ==> Subscript used with non-Array variable.:

Return SetError(0, "", $BASS_ret_[0])

Return SetError(0, "", $BASS_ret_^ ERROR

->13:11:46 AutoIT3.exe ended.rc:1

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Link to comment
Share on other sites

@UEZ: since this DLL is 32bit... Did you really use 32bit AutoIt or did you run the x64-version? Then it can't load the DLL and there are errors :) At least for me the GDI+-Visualization works, i only had to change _GDIPlus_BrushDefCreate to __GDIPlus_BrushDefCreate and the same for the DefDispose.

Additionally i created a version of the BASS-library with a LoadDLL-Function (_BASS_Startup), optimized error checking, and fixed found some broken functions too :) (the BassConstants.au3 remains the same, so i did not attach it)

//Edit: ah, i see. BrettF, you are using udword in some functions instead of UINT64. It seems that this type was removed from AutoIt, since it has no real use (dword is unsigned so "unsigned dword" is pointless) Ths is an error i already corrected in the attached file :P

Bass.au3

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

@UEZ: since this DLL is 32bit... Did you really use 32bit AutoIt or did you run the x64-version? Then it can't load the DLL and there are errors :) At least for me the GDI+-Visualization works, i only had to change _GDIPlus_BrushDefCreate to __GDIPlus_BrushDefCreate and the same for the DefDispose.

Additionally i created a version of the BASS-library with a LoadDLL-Function (_BASS_Startup), optimized error checking, and fixed found some broken functions too :) (the BassConstants.au3 remains the same, so i did not attach it)

//Edit: ah, i see. BrettF, you are using udword in some functions instead of UINT64. It seems that this type was removed from AutoIt, since it has no real use (dword is unsigned so "unsigned dword" is pointless) Ths is an error i already corrected in the attached file :P

I tested it on Vista x32 (x64 not tested right now):

Here again the complete output from SciTE:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "D:\Coding\AU3\Music\Visualizer_Analog Meter.au3" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams   
+>15:14:24 Starting AutoIt3Wrapper v.2.0.0.1    Environment(Language:0407 Keyboard:00000407 OS:WIN_VISTA/Service Pack 2 CPU:X64 OS:X86)
>Running AU3Check (1.54.17.0) from:C:\Program Files\AutoIt3\beta
+>15:14:24 AU3Check ended.rc:0
>Running:(3.3.1.3):C:\Program Files\AutoIt3\beta\autoit3.exe "D:\Coding\AU3\Music\Visualizer_Analog Meter.au3"  
D:\Coding\AU3\Music\Bass.au3 (3936) : ==> Subscript used with non-Array variable.:
Return SetError(0, "", $BASS_ret_[0])
Return SetError(0, "", $BASS_ret_^ ERROR
->15:14:28 AutoIT3.exe ended.rc:1
+>15:14:29 AutoIt3Wrapper Finished
>Exit code: 1   Time: 5.960

In beta _GDIPlus_BrushSetSolidColor() is already added to GDI+ include. I commented out that function to run it via beta!

I will check your modified Bass.au3 later more detailed. Currently I'm getting a lot of em with it!

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I modified the code from Visualizer_Analog Meter.au3 to run if with modified version of bass.au3 from ProgAndy and it is working properly with AutoIt v3.3.1.3 beta now!

Thanks a lot ProgAndy!

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

@UEZ: since this DLL is 32bit... Did you really use 32bit AutoIt or did you run the x64-version? Then it can't load the DLL and there are errors :) At least for me the GDI+-Visualization works, i only had to change _GDIPlus_BrushDefCreate to __GDIPlus_BrushDefCreate and the same for the DefDispose.

Additionally i created a version of the BASS-library with a LoadDLL-Function (_BASS_Startup), optimized error checking, and fixed found some broken functions too :P (the BassConstants.au3 remains the same, so i did not attach it)

//Edit: ah, i see. BrettF, you are using udword in some functions instead of UINT64. It seems that this type was removed from AutoIt, since it has no real use (dword is unsigned so "unsigned dword" is pointless) Ths is an error i already corrected in the attached file :idea:

Thanks! :)

Link to comment
Share on other sites

  • 1 month later...

Doesn't work means nothing. What exactly isn't working? What OS (and include x64,x86?)? Then post your code. If its too long or if you can't post your code create something that replicates your problem, then post so I can test it.

Cheers,

Brett

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...