BrettF Posted January 16, 2010 Author Posted January 16, 2010 UPDATEDBass library has been updated to Version 9.Changelog:/> Fixed _BassRecordGetInputName (updated production versions) +> Added Memory Examples of Bass (Thanks ProgAndy and UEZ) +> Added BassVST (Not 100% complete) +> Added BassFX Examples showing use of most functions: Pitch.au3 Reverse.au3 Tempo.au3 /> Fixed error with calling _BASS_ErrorGetCode in BASSCD.au3 /> Fixed startup functions return the wrong value (Thanks ProgAndy!) +> Added helper functions _BASS_ChannelSetVolume, _BASS_ChannelGetVolume (Thanks ProgAndy)Please see the first post for download link. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
BrettF Posted January 21, 2010 Author Posted January 21, 2010 I've started work on creating a real help file for it. Go me! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
ludocus Posted January 25, 2010 Posted January 25, 2010 Hey.. I really like you're bass udf! I'm now trying to integrate it into my media player. There's one question. If you use _BASS_GetChannelPos($song, $BASS_POS_BYTE) (or Length) you get some big number for what the position is. It's easy to use although I can't figure out how to convert the POS_BYTE's to (mili)seconds.. It would be really helpful if someone could show me how. Thanks in advance..
ProgAndy Posted January 25, 2010 Posted January 25, 2010 If you use _BASS_GetChannelPos($song, $BASS_POS_BYTE) (or Length) you get some big number for what the position is.It's easy to use although I can't figure out how to convert the POS_BYTE's to (mili)seconds..Try to use _BASS_ChannelBytes2Seconds *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
nobbe Posted January 25, 2010 Posted January 25, 2010 i created a media player sample code for this - see previous scripts of me
ludocus Posted January 25, 2010 Posted January 25, 2010 @progandy Thnx, This will help a lot! @nobbe Thnx, but what previous script? could you give a link?
nobbe Posted January 26, 2010 Posted January 26, 2010 (edited) "this page 9" , somewhere in the middle is my complete source for the player sample http://www.autoitscript.com/forum/index.php?showtopic=83481&st=160 @Brettf: maybe you could integrate it in your Code sample archive of the Bass module? Edited January 26, 2010 by nobbe
BrettF Posted January 26, 2010 Author Posted January 26, 2010 In the process of creating examples for EVERY function of the Bass library. Be patient now Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
oriolgs58 Posted January 28, 2010 Posted January 28, 2010 Um well I use _BassPosBytes2seconds, or something like that... It's in the help file. Convert it to $bass_pos_byte first, though. like $byte=_BassChannelGetPos($chan,$bass_pos_byte) then covnert that to seconds _bass_channel_bytes2seconds($byte)
ludocus Posted February 17, 2010 Posted February 17, 2010 Thnx! It helped alot! I'm almost done. There's just one last thing: Speed. How can I change song speed with BASS?
BrettF Posted February 17, 2010 Author Posted February 17, 2010 BassFX - Tempo. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
ludocus Posted February 18, 2010 Posted February 18, 2010 Hmm.. I don't realy like the sound of 'tempo'. When I looked in the: _BASS_ChannelSetAtribute Function I saw the variable $BASS_..._SPEED, something with speed. It sais: speed 1 to 255. So I tried it. But I can't get it to work.. Could somebody help me out? Thnx!
BrettF Posted February 18, 2010 Author Posted February 18, 2010 Tempo is generally measured in BPM. The faster the temp is, the more beats per minute- basically the faster the song goes. I will try work up an example for you. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
ProgAndy Posted February 18, 2010 Posted February 18, 2010 BASS_ATTRIB_MUSIC_SPEED does only work for .MOD-files. For anything else you have to use BassFX (BASS_FX_TempoCreate) *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
VAG Posted February 19, 2010 Posted February 19, 2010 Hi, I am using your Bass UDF to on some line-in measurement project. I would like to read the channel level value in form of "dB". So far I have write up the script to use _Bass_ChannelGetLevel(). How may I do the conversion on the return value to read as "db" instead? Thanks #include "Bass.au3" #include "BassConstants.au3" #Include <WinAPI.au3> ;Configure Bass Audio Library ;---------------------------- Global Const $bass_dll = _BASS_Startup(@ScriptDir & "\bass.dll") If @error = -1 Then MsgBox(16, "ERROR!", "Could not load BASS.dll" & @CR & "Terminating... ") Exit EndIf _BASS_SetConfig($BASS_CONFIG_REC_BUFFER, 1000) _BASS_RecordInit(-1) $Cnt = 0 $Name = _BASS_RecordGetInputName(0) While $Name <> "" $Input = _BASS_RecordGetInput($Cnt) If BitAND($Input[0], $BASS_INPUT_TYPE_WAVE) Then _BASS_RecordSetInput($Cnt, $BASS_INPUT_TYPE_WAVE, 1) $Cnt += 1 $Name = _BASS_RecordGetInputName($Cnt) WEnd If @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_2008" Then _BASS_RecordSetInput(0, $BASS_INPUT_TYPE_WAVE, 1) $RecHandle = _BASS_RecordStart(44100, 2, _WinAPI_MakeLong(0, 10)) While 1 ;Read Audio Level $levels = _BASS_ChannelGetLevel($RecHandle) $LevelLeftCh = _WinAPI_LoWord($levels) $LevelRightCh = _WinAPI_HiWord($levels) ToolTip("Left Ch = " & $LevelLeftCh & " Right Ch = " & $LevelRightCh, 100, 100) Sleep(50) WEnd
BrettF Posted February 19, 2010 Author Posted February 19, 2010 I'm just going to say impossible due to lots of inaccuracy... I'd say there would be no way to measure it unless you had a way to calibrate the level of input compared to the actual and so on. Way too complicated IMO. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
VAG Posted February 19, 2010 Posted February 19, 2010 I'm just going to say impossible due to lots of inaccuracy... I'd say there would be no way to measure it unless you had a way to calibrate the level of input compared to the actual and so on. Way too complicated IMO. Thanks for the advise. I came across some code from UEZ some time back, he did some calculation on your UDF to return the values smaller:http://www.4shared.com/file/91735747/7afe6e92/Visualizer_Analog_Meter.html $levels = _BASS_ChannelGetLevel($bass_dll, $RecHandle) $LevelLeftCh = _WinAPI_LoWord($levels) $LevelRightCh = _WinAPI_HiWord($levels) $LeftChLvl = $LevelLeftCh * 135 / 0x1500 $RightChLvl = $LevelRightCh * 135 / 0x1500 So if let say I have equipment like AP to do the input calibration, what's your advise on the reduction of values? My goal may not be absolute accuracy but some form of representation on the readings.
BrettF Posted February 22, 2010 Author Posted February 22, 2010 You'd probably have to do some of your own testing. Such as generating a XdB tone and then see what value bass "see's". Personally I wouldn't bother. For what its worth its too complicated and too inaccurate. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Randolph Posted March 17, 2010 Posted March 17, 2010 Is it possible to compare 2 sounds using BASS? Basically, my idea is to detect whether a beep from the soundcard matches a pre-recorded beep. Any thoughts? Thanks for all the help.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now