0
0

Hi,

I’ve managed to get most things going in Blitz through a nice userlib in Blitz3D.

I can do the FFT and display a nice spectrum for example.

Now, i was looking at the fmod C example, the one with the oscilliscope in it. Would there be any way to get that to work without using a callback? My experimentations have gotten some results, but nothing that looks as nice as the one in the FMOD example.

THe “convert and downmix to signed int buffer” part is what’s playing with me i think, i have no idea how to do that in Blitz (or any Basic) code. It must be possible with banks i’d think (i can copy the buffer data to blitz banks, i had to do that for the spectrum analyzer as well, that works)

Any help would be VERY appreciated!

Shopper

  • You must to post comments
0
0

if (mixertype == FSOUND_MIXER_QUALITY_FPU)
{
float *src = (float *)newbuffer;

    for (count=0; count < length; count++)
    {
        dest[count] = (signed short)(src[count << 1] + src[(count << 1) + 1] * 0.5f);
    }
}
else
{
    signed short *src = (signed short *)newbuffer;

    for (count=0; count < length; count++)
    {
        dest[count] = (signed short)(((int)src[count << 1] + (int)src[(count << 1) + 1]) >> 1);
    }
}    

I have no clue what the above even DOES :) let alone that i am able to translate it to Blitz.

Shopper

  • You must to post comments
0
0

Whaoha. Can you send me your blitz code/userlib shopper? I’m known as bot builder on the blitz forums/blitzcoder. I’ve been working on creating a userlib etc. for blitz but haven’t gotten very far. I ‘m stuck at loading a sound :) . If you don’t want to send me the whole thing then just the bit that loads sounds would be ok.

Thanks!

oh yeah, and bot_builder56@fastmail.fm is my email.

hmm. I assume you know blitz stores all its values 32 bit? very annoiying.. Can’t really help you though. I’m not very experienced when it comes to using userlibs. hmm. I can understand some of that c/c++ but do those ‘<<‘ things do?!?!?! (all the c coders are probably laughing at me now)

  • You must to post comments
0
0

<< are called bit shifting, they shift (lol) by n bit to the left or right.
For example, 4 (100 in binary) :

4 << 1

100 << 1

1000 (8 in decimal)

Here, we added a zero because we shit 1 to the left (zero padding).
As you noticed, shifting to the left by 1 equal multiply by 2.
Shifting by 1 to the right is strictly the opposite.

PS : you have guess that those << 2 means to multiply by 4 😉

  • You must to post comments
0
0

Hey dude,

Yeah, Tracer will release the userlib this week i think, he did most of the work.

I haven’t personally tested samples yet, i do know that he has music, spectrum analyzers, channel info, etc working just fine.

Shopper

  • You must to post comments
0
0

K. cool. Huh. kinda funny. some people have been using bass in blitz programs, but thats apparently slower and can’t do as much. can’t wait for the lib. I’ll probably set it up to be really easy- like setting up listeners to cameras by just passing the camera handle :) . I was actually thinking that if I got to the point where you could setup your sound system in 4 commands, I was gonna sell it for cheap. Of course, now that someones gonna release it free I’ll just extend it a bit and release the extension. How much has tracer done BTW? Has he written any convenience functions yet?

  • You must to post comments
0
0

Hi,

Shopper shared his pass, so i don’t have to register again.

No, i haven’t done TOO much on convenience yet.. i am mostly testing right now as some things are a little odd userlib -> dll -> blitz and i can fix those only with testing :)

I did write per channel VU, spectrum analyzer, functions to retrieve sample names, etc already.. these work on MOD/etc. I’ve only been at this for a day or two now :)

Tracer

  • You must to post comments
0
0

Ah. Tracer I presume? Those spectrum analyzer functions/channel VU/sample names and stuff sounds good. If you release it, or email it to me I’ll work on 3d convenience functions. I assume you guys are using this for an app or somthing? I’ll mainly be focused on makeing it easily integratable with an fps.Wow. only one or two days. I’ve been sort of half working on it for like 4 days. :roll: You probably have more userlib exp. though. I generally stay away from them, but this looked like one nice dll :) I want to try out OXM aswell. sounds like a nice format. Have you got all the functions in a decls file!?!?!?! jeez that job in itself would be hard to manage. What about all the data declerations? you could just have those as blitz constants….

  • You must to post comments
0
0

If you want to do the 3D bits (NOT yet tested, at all), i can send you the userlib.

Mail me: tracer_nospam_@socal.rr.com

(remove the word nospam to get the address :) so, it’s tracer@…. )

All the functions are in the userlib but all the data defines aren’t done yet into a .bb..

Tracer

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.