• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

BassBox 2011 (version 2.60)

Started by Patrice Terrier, January 07, 2009, 09:03:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

#15
VORTEX
is a new BBPlugin to work with BassBox 2.50.

It has been inspired by the thinBasic's script "Tornado" from Petr Schreiber.




This is the final VORTEX version:

There are now 5 textures, you can switch between them using either the left or right mouse button.
The one selected will remain active between sessions until you decide to change it.

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

Petr Schreiber

Very nice Patrice,

it might be inspired by my code, but it has completely new dimension with the reaction to sound played!


Petr
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

#17
Petr,

I have totaly reworked the VORTEX plugin, adding more effects, new textures, and better music sync.

The updated zip file is there.

By the way, you will have a hard time to figure that it originates from your Tornado, if you don't look closely at the code ;)

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

Petr Schreiber

It looks fantastic with music which has great differences in volume and tempo, very very good!
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

In the VORTEX Plugin, change the value for CASE 5, with the red one below.

SELECT CASE LONG UseTexture
CASE 2
     CALL glTranslatef(sV, sV, sV)
     CALL glRotatef(((PulseAngle * sV) + pulse) / 10, 1, 0, 1)
CASE 3
     CALL glTranslatef(0, sV, 0)
     CALL glRotatef(((PulseAngle * sV) + pulse) / 10, 0, 1, 1)
CASE 4
     CALL glTranslatef(0, sV, 0)
     CALL glRotatef(((PulseAngle * sV) + pulse) / 10, 1, 1, 1)
CASE 5
     CALL glTranslatef(sV, sV, sV)

     CALL glRotatef(((PulseAngle * sV) + pulse) / 10, -10, 10, -10)
CASE ELSE
     CALL glTranslatef(sV, sV*1.5, sV)
     CALL glRotatef(((PulseAngle * sV) + pulse) / 10, .25, -1, .25)
END SELECT
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

Hi Patrice,

your Fantasy has no Limits!


I like your Vortex Plugin very much!!

The way you twist the Textures, the Colors and the handling of Signals with the SQR fft() array.

I think yuo hit the right Balance of these Values!! Nice work..

And it Works well on my Computer!!    :)

..
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

#21
why don't you put everything into the same png texture.
1024*512 or 1024*256
or even simple 32*224 = 7168*32 (working like an ImageList)

Or you could also create the font from a customized TrueType

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

Patrice Terrier

Are you interested to play M4A audio files (mp4 audio) in BassBox ?

.M4A File Extension
Audio file compressed with the Apple Lossless Encoder (ALE); uses the Apple Lossless Audio Codec (ALAC), which provides lossless compression; saved in the MPEG-4 container format.

M4A files are similar to .MP4 video files, but do not contain a video track; MPEG-4 audio files that include copyright protection, such as those sold through the iTunes Store, typically have an .M4P extension.

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

Jürgen Huhn

#23
Patrice,

my last Post is a long Time ago..

Think it's good to give you Information about the Work on the new Matrix_Fall.
I found enough Time this Weekend to costumize it as BBPlugin.
It`s running really fast with much more effects on the Letters, better Colours and short SourceCode!
But the SourceCode is not ready to post it Today. I wll clean it up and test the Plugin a while.

I have some Screenshots here...

 ...
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

Jürgen,

Thank you for the screenshots, they are looking promising.

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

Petr Schreiber

Patrice,

I installed latest version, and while it seems targeted on users (no source code), there is still one BAS file extracted by setup.
In BBPlugin it is Vortex.bas.

Is the source code version still available?


Petr
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

BassBox 2009 has been updated to version 2.52.

- AAC audio support: .m4a, .mp4, .m4p, .m4b.
- Audio stream soundmap (oscillo background).
- Bass.dll 2.4.3.1.

Setup.zip is attached to the first post of this thread.

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

Patrice Terrier

Anyone here using BassBox with Windows 7 ?

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

Patrice Terrier

A problem with WMA files has been fixed:
The "offset" and "length" parameters were improperly declared as DWORD instead of QUAD.

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

Patrice Terrier

#29
Petr,

Change this in the source code:
DECLARE FUNCTION BASS_WMA_StreamCreateFile LIB "basswma.dll" ALIAS "BASS_WMA_StreamCreateFile" (BYVAL mem AS LONG, file AS ASCIIZ, BYVAL offset AS QUAD, BYVAL length AS QUAD, BYVAL flags AS DWORD) AS LONG
DECLARE FUNCTION BASS_WMA_StreamCreateFileAuth LIB "basswma.dll" ALIAS "BASS_WMA_StreamCreateFileAuth" (BYVAL mem AS LONG, file AS ASCIIZ, BYVAL offset AS QUAD, BYVAL length AS QUAD, BYVAL flags AS DWORD, zUser AS ASCIIZ, zPath AS ASCIIZ) AS LONG

After the %ACCSTREAM = 4 contsant add this new one:
%WMASTREAM = 5

and replace the existing BassChannelPlay() code with that one:

FUNCTION BassChannelPlay() AS LONG
   LOCAL So, IsUrl AS LONG, sLowExt AS STRING

   CALL BassCloseChannel()

   IF BassInit() THEN

      IF INSTR(LCASE$(gzAudioFile), $ftp) OR INSTR(LCASE$(gzAudioFile), $http) THEN IsUrl = -1

      So = INSTR(-1, gzAudioFile, $Dot)
      IF So AND INSTR($BASSMUSICEXT, LCASE$(MID$(gzAudioFile, So)) + $Dot) THEN
         gnMediaType = %MUSIC
         gnAudioChannel = BASS_MusicLoad(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_PRESCAN OR %BASS_STREAM_AUTOFREE, 0)
      ELSE
         gnMediaType = %STREAM
         sLowExt = RIGHT$(LCASE$(gzAudioFile), 4)
         IF sLowExt = ".wma" THEN
            IF IsUrl THEN
               gnAudioChannel = BASS_WMA_StreamCreateFileAuth(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_AUTOFREE, "", "") ' %BASS_STREAM_PRESCAN)
            ELSE
               gnMediaType = %WMASTREAM
               gnAudioChannel = BASS_WMA_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_AUTOFREE) ' %BASS_STREAM_PRESCAN)
            END IF
         ELSEIF sLowExt = ".cda" THEN
            gnMediaType = %CDAUDIO
            gnAudioChannel = BASS_CD_StreamCreateFile(gzAudioFile, %BASS_STREAM_AUTOFREE)
         ELSEIF sLowExt = ".aac" THEN
            IF IsUrl THEN
               gnAudioChannel = BASS_AAC_StreamCreateURL(gzAudioFile, 0, %BASS_STREAM_AUTOFREE, CODEPTR(DownloadProc), BYVAL %NULL)
            ELSE
               gnAudioChannel = BASS_AAC_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_AUTOFREE) ' %BASS_STREAM_PRESCAN)
            END IF
         ELSEIF INSTR($BASSMP4, sLowExt) THEN
            IF IsUrl THEN
               gnAudioChannel = 0
            ELSE
               gnMediaType = %ACCSTREAM
               gnAudioChannel = BASS_MP4_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_AUTOFREE) ' %BASS_STREAM_PRESCAN)
            END IF
         ELSE
            IF IsUrl THEN
               gnAudioChannel = BASS_StreamCreateURL(gzAudioFile, 0, %BASS_STREAM_AUTOFREE, CODEPTR(DownloadProc), BYVAL %NULL)
            ELSE
               gnAudioChannel = BASS_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_AUTOFREE) ' %BASS_STREAM_PRESCAN)
            END IF
         END IF
      END IF

      IF gnAudioChannel THEN
         CALL BASS_ChannelSetSync(gnAudioChannel, %BASS_SYNC_END OR %BASS_SYNC_ONETIME, 0, CODEPTR(BassStreamEllapsed), 0)
         CALL ShowWindow(zGetMainItem(%ID_BTN_PLAY), %SW_HIDE): CALL zSetZorder(zGetMainItem(%ID_BTN_PLAY), %HWND_BOTTOM)
         CALL ShowWindow(zGetMainItem(%ID_BTN_PAUSE), %SW_SHOW): CALL zSetZorder(zGetMainItem(%ID_BTN_PAUSE), %HWND_TOP)

         CALL BassSetupFx(gnAudioChannel)
         CALL BassUpdateReverb(gnAudioChannel, zGetCheckButtonStatus(zGetMainItem(%ID_REVERB)))
         CALL BassUpdateChorus(gnAudioChannel, zGetCheckButtonStatus(zGetMainItem(%ID_CHORUS)))
         CALL BassUpdateFlanger(gnAudioChannel, zGetCheckButtonStatus(zGetMainItem(%ID_FLANGER)))
         CALL BassUpdateEcho(gnAudioChannel, zGetCheckButtonStatus(zGetMainItem(%ID_ECHO)))
         CALL BassUpdateRotate(gnAudioChannel, zGetCheckButtonStatus(zGetMainItem(%ID_ROTATION)))

         'CALL BASS_SetVolume(zGetTrackValue(zGetMainItem(%ID_TRACK_VOL)) / 100)
         CALL BassSetChannelVolume(zGetTrackValue(zGetMainItem(%ID_TRACK_VOL))) '// For Bass version 1.24

         CALL SetupEqualizer()

'         // Setup Search trackbar min max value.
         gnMediaPos = 0
         gnMediaLength = BassChannelGetLength()
         CALL zSetTrackMinMax(zGetMainItem(%ID_TRACK_SEARCH), 0, gnMediaLength)
         CALL zSetCTLText(zGetMainItem(%ID_DURATION), BassAudioToTime(gnMediaLength))
         CALL zSetTrackValue(zGetMainItem(%ID_TRACK_SEARCH), gnMediaPos)

'         // Detect ID3 TAG
         CALL BassGetID3TAG(gzAudioFile)

         FUNCTION = BASS_ChannelPlay(gnAudioChannel, 0)

'         ////////////////////////////////////////
          IF gnScanThread THEN '// still scanning
            gnScanKill = -1: CALL WaitForSingleObject(gnScanThread, 300) '// wait for the thread
          END IF
         IF gnScanKill = 0 THEN
            LOCAL nScanChannel AS LONG
            IF gnMediaType = %ACCSTREAM THEN
               nScanChannel = BASS_MP4_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_DECODE)
            ELSEIF gnMediaType = %WMASTREAM THEN
               nScanChannel = BASS_WMA_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_DECODE)
            ELSE
               nScanChannel = BASS_StreamCreateFile(%FALSE, gzAudioFile, 0, 0, %BASS_STREAM_DECODE)
            END IF
            IF nScanChannel THEN
               THREAD CREATE ScanPeaks(nScanChannel) TO gnScanThread
               'call ScanPeaks(nScanChannel)
            ELSEIF ghScanDC THEN
               CALL zFillRect(ghScanDC, 0, 0, %SCANWIDTH, %SCANHEIGHT, 0) '// Clear DC with black color
            END IF
         END IF
'         ////////////////////////////////////////

         gnAudioPause = %FALSE
      ELSE
         CALL BassStreamEllapsed(0, 0, 0, 0)
      END IF
   END IF
END FUNCTION


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