• Welcome to Theos PowerBasic Museum 2017.

BassBox

Started by Patrice Terrier, October 08, 2007, 10:57:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Charles Pegge

#285
Further mods: Please see later posting of Vulcan.zip

Here is an update for the Vulcan Plugin, with textured point sprite stars, as suggested by Patrice. I am experimenting with synthetic textures. The stars use a 16 pixel texture with one pixel set in the middle. Three quarters of the texture is then used to make a 3x3 texture mapping. Can't get much simpler than that. Notice the shape of the large star which emerges from behind the planet.
This is how a single pixel is enlarged by GL_LINEAR.

The atmosphere has also been compiled into a glList to improve efficiency.

PS The Impulse plugin looks very good Patrice. I like the exceptional clarity of the FFT.

Kent Sarikaya

The new song really makes Impulse dance nicely that is for sure.

The new vulcan looks great too. I didn't see the problem that Patrice captured in the screenshot. But that was listening to one song. I will play more songs tomorrow and see if I can get the same sort of problem.

Charles Pegge

That is an intriguing problem Patrice. The planet appears to have lost most of its surface and gained a a corona! But I see you are using Vista. Do you get the same problem under XP? I've had mine running for many hours. All the objects are compiled into gLists so there are very few state changes between frames.

Patrice Terrier

--Charles

On XP i have another problem: No STARRY BACKGOUND

I will check for the latest OpenGL driver for the ATI Radeon being used and see if it solves it.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

Point sprites would be a problem on pre-Opengl 2 drivers. It would also affect Encounter etc.

At first site the planet's loss of surfaces looks like some form of back-face culling gone wrong. - do you a least get a hemisphere?

Patrice Terrier

#290
--Charles

I have installed the latest ATI drivers on my XP computer (from november 17, 2007), an that solved two problems:

1 - The STARRY BACKGROUND is working fine now.
2 - My XP's mouse cursor doesn't flicker or disapear anymore when hover the OpenGL viewport.

Conclusion:
Always make sure to use the latest drivers when doing 3D graphics!

Note: Encounter point was working fine even without the update ?!?
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

#291
Patrice, I've been able to reproduce the problem by compiling the planet into a glList,(it was dynamically generated before) on a new plugin. Amazing to watch it doing its own thing!

I think the star plane is cutting into the planet causing a Z-order alpha void. So I'll move it.

Patrice Terrier

New plugin "Pop Star"

see attached zip file

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge


Something green anyway.

Let's see how it does in Vista. Might turn into cabbage.

Kent Sarikaya

Thanks guys nice new plugins to start the day!!

I noticed one thing today. I went to maximized window and realized the bottom of the BassBox window falls behind the taskbar. I am using XP if that makes a difference.

Other than that, thanks guys!!

Charles Pegge

This is a tamer version of Vulcan, which should behave itself better in Vista etc. The star has been moved further away and rescaled. The planet is now compiled so it further reduces demands on the system. I had the planet wizzing around with no signs of disintegration.

Patrice Terrier

--Charles

This one seems to have solved the culling problem on both XP and VISTA.

Thank you.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

The whole project has been updated, see first post.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

Is there a way of playing CDs through BassBox - having the right registry keys etc?

Another idea is to concentrate the plugins so that each one provides a theme of visualisations, which could be changed with the space bar or automatically over time. Otherwise the number of DLL plugins could become very large.




Patrice Terrier

#299
QuoteIs there a way of playing CDs through BassBox

This is the BassBox 1.00e version with full CD-Audio support.

It comprises advanced features to detect device arrival or remove as well as WM_QUERYCANCELAUTOPLAY to get rid of the OS message notification when adding/removing external device or CD-ROM:

WM_QUERYCANCELAUTOPLAY = RegisterWindowMessage("QueryCancelAutoplay")


    CASE WM_QUERYCANCELAUTOPLAY
         FUNCTION = 1: EXIT FUNCTION '// To get rid of the OS autoplay message notification

    CASE %WM_DEVICECHANGE
         LOCAL DevHDR AS DEV_BROADCAST_HDR PTR
         LOCAL DevVOL AS DEV_BROADCAST_VOLUME PTR
         LOCAL DriveType AS LONG
         IF wParam = %DBT_DEVICEREMOVECOMPLETE OR wParam = %DBT_DEVICEARRIVAL THEN
            IF lParam THEN
               DevHDR = lParam
               IF @DevHDR.dbch_devicetype = %DBT_DEVTYP_VOLUME THEN
                  DevVOL = lParam
                  '/IF (@DevVOL.dbcv_flags AND %DBTF_MEDIA) THEN ' For digital camera detection

                  Dsk$ = CHR$(91 - INSTR(BIN$(@DevVOL.dbcv_unitmask, 26), "1")) + ":"
                  szFileName = Dsk$ + $Anti
                  DriveType = GetDriveType(szFileName)
                  hList = zGetMainItem(%ID_PlayList)
                 
                  IF wParam = %DBT_DEVICEREMOVECOMPLETE THEN
                     IF DriveType = %DRIVE_CDROM THEN
                        '// If we are already playing a cd-rom then stop Bass audio
                        IF gnAudioChannel AND gnMediaType = %CDAUDIO THEN
                           CALL BassChannelStop()
                           CALL BassFree()

                           '// Clear caption
                           CALL ShowWindow(zGetMainItem(%ID_TAG_TITLE), %SW_HIDE)
                           CALL ShowWindow(zGetMainItem(%ID_TAG_ALBUM), %SW_HIDE)
                           CALL ShowWindow(zGetMainItem(%ID_TAG_ARTIST), %SW_HIDE)
                           CALL ShowWindow(zGetMainItem(%ID_TAG_TYPE), %SW_HIDE)
                           CALL ShowWindow(zGetMainItem(%ID_TAG_EMPTY), %SW_HIDE)
                       
                           '// Restore audio default
                           CALL BassSetDefaultAudio()
                           CALL ListDeleteAll(hList)
                           CALL ListAdd(hList, gzAudioFile)
                           CALL ListSelectPlus(hList, 1)
                           gnPlayMode = %FORWARD
                           CALL EnableWindow(zGetMainItem(%ID_LEFTBUTTON), %FALSE)
                           CALL EnableWindow(zGetMainItem(%ID_RIGHTBUTTON), %FALSE)
                       
                           CALL ShowWindow(zGetMainItem(%ID_BTN_PAUSE), %SW_HIDE): CALL zSetZorder(zGetMainItem(%ID_BTN_PAUSE), %HWND_BOTTOM)
                           CALL ShowWindow(zGetMainItem(%ID_BTN_PLAY), %SW_SHOW): CALL zSetZorder(zGetMainItem(%ID_BTN_PLAY), %HWND_TOP)
                           gnAudioPause = %FALSE


                        END IF
                     END IF
                  ELSEIF wParam& = %DBT_DEVICEARRIVAL THEN

                     IF DriveType = %DRIVE_CDROM THEN

                        '// Perform media detection
                        nCount = 0
                        CALL ListDeleteAll(hList)
                        nCheck = BassCheckExtension(szFileName)
                        IF nCheck = 1 THEN
                           IF ListAdd(hList, szFileName) > -1 THEN INCR nCount
                        ELSEIF nCheck = 2 THEN '// ".bbp" BassBox Playlist
                           nCheck = 0: zPlayList = szFileName
                           DO WHILE nCheck = 0
                              szFileName = LTRIM$(zsBufin(zPlayList, nCheck))
                              IF LEN(szFileName) THEN
                                 IF ListAdd(hList, szFileName) > -1 THEN INCR nCount
                              END IF
                           LOOP
                           nCheck = 0
                        ELSE '// Browse for folders
                           nCount = nCount + RecursiveSearch(szFileName, hList)
                        END IF
                        IF nCount THEN CALL PlayListPlay(hList, nCount)

                     END IF
                  END IF
                 
               END IF           
            END IF
         END IF


Note: When you insert a CD-ROM, BassBox stops the OS message notification and checks the media looking for audio files and if it founds audio, then it starts playing them in sequence.

When you remove CD-ROM, BassBox performs HOT detection to stop playing if it was already in CD-AUDIO mode, then it switches back to the default audio (same than when you start BassBox first time).

QuoteSUB BassSetDefaultAudio()
    gzAudioFile = zsExePath() + "BassBox.mp3"
    IF zsExist(gzAudioFile) = 0 THEN gzAudioFile = zsExePath() + "BassBox.mod"
END SUB

See the first post of this thread to download the latest version 1.00e from december 15, 2007

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com