Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / BASS - Lazarus Free Pascal Plugin Example Classic and Studio

Author
Message
TheLion
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 18th Oct 2024 08:31 Edited at: 18th Oct 2024 08:43
Hi
I'm back with the Bass example a little more than Fmod, might go back to Fmod now.
as previous it's not a complete wrapper only information for displaying the graphics
with sound.

Again all code included to help you write your own plugins/AGK Studio or AppGameKit Classic Progs.


Check out the link

Leo

https://www.dropbox.com/scl/fi/uhuw7bkstfr5f2g7tg65l/Bass2417-Build.zip?rlkey=2pea28goml8c0rx428lde0u02&st=i822x7o5&dl=0

PS AppGameKit Classic 32 bit.... Be mindful 32bit and 64bit Bass.dll's have the same name.dont mix
them. Also the 32 bit version seems to have a bug and locks up when you select pause
in the program, the 64 bit Dll is fine, think it's to do mem issues on a 32 bit platform.

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Oct 2024 00:44 Edited at: 19th Oct 2024 00:54
nice.

at a glance, the 2 are near identical(?) so, curious why you'll be revisiting the FMOD dll? exposing more is always nice but also wondering if you had a preference for either?

meanwhile, i skimmed FMOD in general and read the goose game interview to learn a bit more about the potential that these dll's offer. for me, it was only about being about to do things like adapt play to whatever music is currently playing but i also read that (at least) one of them are able to stream music (perhaps beyond what a dll here could offer) and some other neat stuff.

i also wondered if either could analyze files and offer data like BPM that we could (also) utilize in a non-live fashion. ie, thinking about anylyzing a song, determining BPM or even plotting volumes that could then be used for a rhythm game or who knows what.

somewhere it was mentioned to be wary of volumes or data being returned that would cause the graphic representation to leave the screeen or such so, short of an internal normaliztion (which would be great), it would be ideal to know the potential to exceed threshholds like this beforehand so we can normalize our code to account for them, etc

just curious, really, and looking forward to playing with these.

also worth mentioning is the licensing for both BASS and FMOD. i'll be doing demos and maybe including some of the functionality in jam games, etc, but those doing more should make sure review the licenses.

thanks for sharing, and any insight
TheLion
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 19th Oct 2024 10:24 Edited at: 19th Oct 2024 22:52
Morning Virtual

Yes the two are more or less identical, far easier to cut and paste routines from the Fmod.dll to the Bass one and adjust the system calls, re-visiting
Fmod? It's a first love thing!

Streaming Music/Sound, easily done, as mentioned before, it's all about representing sound in a graphical form. Please check out the help files.

My preference has always been Fmod, I literally grew up with it. From Atari GFA basic, Assembler, Stos and umpteen others right up to the present
day DarkBaic Pro, AppGameKit Classic - Studio and PureBasic, with a little toe tipping into C, C++ and Jave along the way. Eventually settling on Pascal as
the bees knees

Fmod v Bass: It's at present Bass. The licence for Fmod is far more expensive and Bass has a more likeable one from a developers point of view,
although I am not a developer. And besides along the ten day learning curve with Bass I discovered it has plugins something I've never really looked
into. Blown away ! Bass has a plugin for Chip music( Happy days! ) I'm currently writing a chip player DLL (Wrapper), will release it when done, if all
works.

As for the analyzing, both systems have more than enough routine calls to look at BPM (Beats Per Minute) and the like. checkout out the help files
for both. All the code is included for all to see, it just needs to be adjusted to your needs.

Normalization. It's a personal thing, I don't error check as above delve into the help files.

Licence. Be careful! make sure you read and understand before using it. For me, it's all personal use and not profit based.

Leo
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Oct 2024 18:20
I thought fmod was always a lot more popular with developers than bass?
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 29th Oct 2024 22:48
I've wrapped assorted features for both FMOD and BASS some time ago. In fact, I remember my FMOD wrapper was one of the first plugins uploaded here when the plugin feature was added.
I switched to BASS after just basically doing a MOD/XM wrapper and have added quite a lot of functionality - including beat detection, EQ and special XM control commands.

I like the BASS documentation and Delphi support, which is what I make my plugins with (still!)

Here's what I've got so far with BASS:

AGKBASS_Init
AGKBASS_Load_Mod
AGKBASS_Load_Ogg
AGKBASS_Play_Mod
AGKBASS_Play_Ogg
AGKBASS_Stop_Ogg
AGKBASS_isActive_Ogg
AGKBASS_SetVol_Ogg
AGKBASS_SetVol_Mod
AGKBASS_Free
AGKBASS_Stop_Mod
AGKBASS_StartInstrumentSync
AGKBASS_StartSpecialSync
AGKBASS_Get_Instrument
AGKBASS_Get_StereoLevel_Mod
AGKBASS_Get_StereoLevel_Ogg
AGKBASS_Get_SpecialSync
AGKBASS_Set_VolumeSlide
AGKBASS_SetPosition
AGKBASS_GetPosition
AGKBASS_CalcEQ_OGG
AGKBASS_GetEQVals_OGG
TheLion
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 30th Oct 2024 08:49 Edited at: 30th Oct 2024 08:54
Hi nz0

Cool! I'd like to see it and the pascal code if your OK with that. Still prefer Fmod though, as I've said before
Fmod and I go back a long way . Yeah the Delphi support is good with Bass, Firelight technologies dropped
Delphi support after FmodEX v42411 no worries for me able to convert the C headers I'm working on the last
FmodEX version now, which was 44464 and after that I will be going after Fmod Studio Engine.

PS I'm retired now so, all this keeps my mind active and gives me something to do

keep coding
Leo
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Nov 2024 22:24 Edited at: 2nd Nov 2024 22:41
Hi,
I'd not released my BASS updated stuff for a while, as I had some ideas for certain implementations which I haven't completed/gotten around to. I myself am also retired and strangely, seem to have less time these days to mess around with stuff than I used to
The BASS implementation of AGKBASS_Set_VolumeSlide is worth it's weight in gold for being able to use float values for volume controls - something I missed in AppGameKit native sound controls.

I still have something pretty cool which I was working on: a VR version of music triggered / controlled FX which is a V2 of what I originally tried



This is an AppGameKit vis of the EQ functions.



However, I made something a bit more polished with the idea of an editor to place equipment / stage design and an editor to place visual FX based on audio conditions and/or timeline events. This unfortunately sat on ice for a couple of years.
Also, I harboured an idea for something audio related where the music is an intrinsical part of the gameplay ( e.g. like the Amiga game "Jumping Jackson" where the character builds the music up track by track).
So many ideas, not enough time!

TheLion
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 3rd Nov 2024 18:46 Edited at: 3rd Nov 2024 18:48
Do you know, I don't know how I had time to go to work! Retirement can get quite busy suppose to be a time for relaxation, that's a joke.

The virtual nightclub looks amazing, not done much on 3D or VR. Did go on my grandson's VR system once,frightened me to death, way too
realistic. Zombies and sharks I quickly took the headset off, being a coward and all.

The Fmod 44464 release is coming along nicely now with the following commands although I've been concentrating on the spectrum analyser
at the moment, Fmod has built in environments so might just do that and call it a day with it. The circle scope was a little taxing too.

A list of the Fmod 44464 plugin commands

Init,PlayURL,StopURL,Play,Stop,Close,SetPaused,GetSpectrum,GetScope,RMSVolume,SetLoop,Ispaused,Isplaying,GetFrequency,SetFrequency
SetPan,GetPan,SetVolume,GetVolume,ModChannels,ModVolume,GetBinFrequency,GetSongPosition,SetSongPosition,GetSongLength.



Volume functions have always been decimal since the release of Fmodex pre fmodex they returned integers.

Take care
Leo

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Nov 2024 17:25
I think this is pretty awesome. I don't see a lot of people needing to use it for games though. I had wondered about applying this to a shader and how that might make the visuals draw quicker or more efficiently.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

TheLion
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 6th Nov 2024 21:12
Yeah, it's not really for games, it's more or less to show how to use these sound engines although you do need to read the licences on both Fmodex and Bass are not free for commercial gain.
That would be spectacular, throwing the returned values at a particle emitter or shader. The 32 band analyser is fairly straightforward to do, just use the command Err=Fmod.GetSpectrum(0,32,0,0)
this will average the frequencies into 32 bins, to read the bins use Bin_Value=Fmod.Getspectrum(1,0,n,Amplification) fairly easy.

I'm looking into OpenAl now I've been reading up on it, when Fmodex 44464 is done I will be playing around with that too, not as powerful as the above two but totally free.

Thanks Phaelax

PS Please let me see if you choose to try the shaders or particles.

Login to post a reply

Server time is: 2024-11-07 02:58:26
Your offset time is: 2024-11-07 02:58:26