BlitzBassStudio 1.7.x

Blitz3D Forums/Blitz3D Userlibs/BlitzBassStudio 1.7.x

Abrexxes(Posted 2009) [#1]
Hi, here is a beta version of 1.7.0

http://www.abrexxes.huntingsoftware.de/temp5/bbs170.zip

Note: the 3D Part is not working at the moment. If you find some problems with the demos (except 3D) please give me a note.

@John, if have remade (and deletet) the stuff (already done for 1.7.0) so i hope that you can compile this here. If not, wait for the new stuff.

If someone will share "codesnippets" for Bass, they are wellcome (vumeters, functions, whatever)


----- v.1.x.x
* changed files: a lot! Read this here for API changes!
- removed bass_tag plugin (dll/include)
- update modinfo to 1.5 (see modinfo folder for new commands)
- addet new functions to modinfo/functions.txt (decls update)
- added new function "BASS_Debug", see docs (blitz_bass_studio_help_functions.txt)
- added new function "BASS_CheckVersion", see docs (blitz_bass_studio_help_functions.txt)
- 3D Part

- fixed some stuff in the dx8 effecs (bass.decls/bass.bb)(no code change needed)
- added tut_record_3.bb (code by _33)
- added demo_spectrum3.bb (code by Flame)
- added new links in STUFF
- created new folder "codesnippets" for stuff



Have Fun


John Blackledge(Posted 2009) [#2]
Abrexxes, since it is just the 3D stuff I'm waiting for, I'll wait.

Even so, thanks for continuing development.


Abrexxes(Posted 2009) [#3]
Hi John, please install the link above and update (bass.bb/bass.decls/BBS_Help_funktions.txt) with this (3D stuff).

http://www.abrexxes.huntingsoftware.de/temp5/john.zip

So, you will be compatible and you are up to date. If you have a problem post it, if not we are backward compatible. ;)

bye


John Blackledge(Posted 2009) [#4]
Abrexxes, Installed as instructed.

I now get an 'illegal type conversion' message on the BASS_ChannelSet3DPosition() line, with or without the % at the end of the function name:

mx# = EntityX#(Model(i)\hEnt,1)
my# = EntityY#(Model(i)\hEnt,1)+1.5
mz# = EntityZ#(Model(i)\hEnt,1)
BASS_ChannelSet3DPosition(Model(i)\CharChannel,mx#,my#,mz#)

Also, would this be the right way to get camera orientation?:

mp# = EntityPitch#(Model(i)\hEnt,1)
mw# = EntityYaw#(Model(i)\hEnt,1)
mr# = EntityRoll#(Model(i)\hEnt,1)
BASS_ChannelSet3DPositionOri(Model(i)\CharChannel,mp#,mw#,mr#)


John Blackledge(Posted 2009) [#5]
Sorry, I should heave mentioned: that's on compile, even before running.


Abrexxes(Posted 2009) [#6]
BASS_ChannelSet3DPosition(Model(i)\CharChannel,mx#,my#,mz#)

This is the original BASS Command (Bass.chm), so you try to return 3 values as 3 pointers (type)

BASS_ChannelSet3DPositionPos(Model(i)\CharChannel,mx#,my#,mz#)



=== 3D Commands ====================================================================

For attributes see --> BASS_Set3DPosition / BASS_ChannelSet3DPosition(bass.chm)
Note 4 experts: the original bass commands with 4 pointers (types) is also working
BASS_ChannelSet3DAttributes and BASS_Set3DFactors you can use as shown in the bass.chm

- BASS_Set3DPositionPos%(posX#,posY#,posZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_Set3DPositionVel%(velX#,velY#,velZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_Set3DPositionFront%(frontX#,frontY#,frontZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_Set3DPositionTop%(topX#,topY#,topZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_Set3DPositionFrontTop%(frontX#,frontY#,frontZ#,topX#,topY#,topZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_ChannelSet3DPositionPos% (channel%,posX#,posY#,posZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_ChannelSet3DPositionOri% (channel%,oriX#,oriY#,oriZ#) : "" Returns TRUE or FALSE (1/0)

- BASS_ChannelSet3DPositionVel% (channel%,velX#,velY#,velZ#) : "" Returns TRUE or FALSE (1/0)


Note: the BASS_Set3DPositionFrontTop is to INIT a listener (if needed)...

Remarks
The front and top parameters must both be set in a single call, they can not be set individually.


BASS_ChannelSet3DPositionOri(Model(i)\CharChannel,mp#,mw#,mr#)

Yes, should be. but i must also make some tests (demos), 3D is not really my stuff. ;)

bye


John Blackledge(Posted 2009) [#7]
That seems to do it, Abrexxes.
Sound now working in 3D, thanks.
Will test some more later.


Abrexxes(Posted 2009) [#8]
John!

Check this out!
http://www.abrexxes.huntingsoftware.de/temp5/3d.zip

Arrow keys to move, A D to turn the camera.

Thanks to klepto2 (3D Vectors) all the problems are gone, i will rewrite some functions for a last time and we are winners !

Juhu!!!!

a code snippet
If KeyDown(203) 
		MoveEntity camera,-0.1,0,0
Else If KeyDown(205)
		MoveEntity camera,0.1,0,0
EndIf
	
If KeyDown(200)
		MoveEntity camera,0,0,0.1
Else If KeyDown(208)
		MoveEntity camera,0,0,-0.1
EndIf

If KeyDown(30)  Then  
           RotateEntity camera,0,camgrad,0 
			camgrad=camgrad+1 
           Else If KeyDown(32)
           RotateEntity camera,0,camgrad,0
           camgrad=camgrad-1
EndIf

Bass_Update3DListener(camera) ; new ....... *blub*

RenderWorld


simple enough ? XD

cu


Abrexxes(Posted 2009) [#9]
Just add this to bass.bb and call the funktion in every frame. You dont need to call other functions.

Function Bass_Update3DListener%(entity%) 
	Local Bank,temp
	Local fx#,fy#,fz#,tx#,ty#,tz# 
		Bank  = CreateBank(3 * 4)
			PokeFloat Bank,0,EntityX(entity)
			PokeFloat Bank,4,EntityY(entity)
			PokeFloat Bank,8,EntityZ(entity)
		If Not  BASS_Set3DPositionPosP%(Bank,0,0,0) BASS_Debug()
	FreeBank Bank

      ;LookAt Vector (Front)
	TFormVector 0,0,1,entity,0 
		fx = TFormedX() 
		fy = TFormedY() 
		fz = TFormedZ() 
	;UpVector (Top)
	TFormVector 0,1,0,entity,0 
		tx = TFormedX() 
		ty = TFormedY() 
		tz = TFormedZ() 
      Return BASS_Set3DPositionFrontTop(fx,fy,fz,tx,ty,tz) 
 End Function 



Guy Fawkes(Posted 2009) [#10]
You could save ALOT of memory, & time using this:

Like so:



~DS~


Abrexxes(Posted 2009) [#11]
@mod, can be closed or deletet. Thanks