[Plugin] BASS Spectrum Analyzer [v0.14]
#41

Quote:
Originally Posted by SDraw
Посмотреть сообщение
Well, I made something with channels...I think it's good. But the delay can be seen a little bit.

http://www.youtube.com/watch?v=sUUs21vJkBs
this one is better lol the one i was working upon wasnt that cool like that good job!
Reply
#42

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
this one is better lol the one i was working upon wasnt that cool like that good job!
Oh, thx
Reply
#43

And again,
I preformed right and left channels in first ten buffers.
[ame]http://www.youtube.com/watch?v=rgrUf_Hy9xo[/ame]
But to solve the delay I had to stream online radio from media player to localhost DNAS server.
Reply
#44

@SDraw :O
FK U ( , mine is nothing in fron tof urs
I am like MSICC
[-/me sits in corner crying-]
Reply
#45

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
@SDraw :O
FK U ( , mine is nothing in fron tof urs
I am like MSICC
[-/me sits in corner crying-]
Don't be sad
Reply
#46

Is there something you cant make in samp:O

SAMP is cool place where all new programmers etc can show off

Amazing plugin , great job
Reply
#47

Very nice update.
But I have suggestion: in bass library I found function to get deturation of handle. (I can't add it myself because I don't understand C++/C#) I think, it would be nice thing
Reply
#48

Quote:
Originally Posted by SDraw
Посмотреть сообщение
Very nice update.
But I have suggestion: in bass library I found function to get deturation of handle. (I can't add it myself because I don't understand C++/C#) I think, it would be nice thing
I'm not sure what you mean, can you paste the function? Do you mean duration?
Reply
#49

Quote:
Originally Posted by h02
Посмотреть сообщение
I'm not sure what you mean, can you paste the function? Do you mean duration?
Maybe duration....My English isn't so good...
Function is BASS_ChannelGetLength
Reply
#50

Thx for the new update, I'll test it when I get home (have some nice ideas to test with it)

Quote:
Originally Posted by SDraw
Посмотреть сообщение
Very nice update.
But I have suggestion: in bass library I found function to get deturation of handle. (I can't add it myself because I don't understand C++/C#) I think, it would be nice thing
I have an idea of how to do this by script, that's why I was interested in multiple handles
Reply
#51

Quote:
Originally Posted by SDraw
Посмотреть сообщение
Maybe duration....My English isn't so good...
Function is BASS_ChannelGetLength
v0.14
https://github.com/h02/SA-MP-BASS-Sp...9d4205b1b998db
Код:
native BASS_ChannelGetLength(handle); // Returns channel length in seconds
Available at https://github.com/h02/SA-MP-BASS-Sp...yzer/downloads
Reply
#52

Hey h02, i'm trying to compile your plugin on Linux, but there is an error that I can not solve

I tried using this on natives.cpp
pawn Код:
#if defined LINUX
    HSTREAM chan;
#else
    vector<HSTREAM> chan;
#endif
but it gives many errors

I have also tried this on spectrum.cpp
pawn Код:
#if defined LINUX
    HSTREAM chan;
#endif
but says that chan is already defined


the only solution I found was to compile define chan2
but do not know if this affects the proper functioning of the plugin
pawn Код:
#if defined LINUX
    HSTREAM chan2;
    int CSpectrum::PlayStream(char url)
    {
        if(m_iOperatingMode == SPECTRUM_MODE_NONE)
        {
            return -1;
        }
        if (!(chan2=BASS_StreamCreateURL("http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870",0,BASS_STREAM_DECODE,NULL,0)))
        {
            //&& !(chan=BASS_MusicLoad(FALSE,"chicken.mp3",0,0,BASS_MUSIC_RAMP|BASS_SAMPLE_LOOP,0))) {
            return BASS_ErrorGetCode();
        }

        BASS_ChannelPlay(chan2,FALSE);

        return SPECTRUM_ERROR_SUCCESS;
    }
#else

    int CSpectrum::PlayStream(char url)
    {
        if(m_iOperatingMode == SPECTRUM_MODE_NONE)
        {
            return -1;
        }
        if (!(chan=BASS_StreamCreateURL("http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870",0,BASS_STREAM_DECODE,NULL,0)))
        {
            //&& !(chan=BASS_MusicLoad(FALSE,"chicken.mp3",0,0,BASS_MUSIC_RAMP|BASS_SAMPLE_LOOP,0))) {
            return BASS_ErrorGetCode();
        }

        BASS_ChannelPlay(chan,FALSE);

        return SPECTRUM_ERROR_SUCCESS;
    }
#endif
by the way I defined "MulDiv" in natives.cpp
pawn Код:
#ifdef LINUX
    int MulDiv(int nNumber, int nNumerator,int nDenominator)
    {
        return (nNumber*nNumerator+nDenominator/2)/nDenominator;
    }
#endif
if anyone can test functionality would greatly appreciate it


EDIT:
I tested myself and the plugin does not load, I guess is a compilation error since the error resulting
Код:
Failed (plugins/spectrum.so: undefined symbol: BASS_Init)
Binary: http://www.solidfiles.com/d/d74f2f50f0/
Source: http://www.solidfiles.com/d/9d2e7c497a/
Reply
#53

Quote:
Originally Posted by Jovanny
Посмотреть сообщение
Hey h02, i'm trying to compile your plugin on Linux, but there is an error that I can not solve

I tried using this on natives.cpp
pawn Код:
#if defined LINUX
    HSTREAM chan;
#else
    vector<HSTREAM> chan;
#endif
but it gives many errors

I have also tried this on spectrum.cpp
pawn Код:
#if defined LINUX
    HSTREAM chan;
#endif
but says that chan is already defined


the only solution I found was to compile define chan2
but do not know if this affects the proper functioning of the plugin
pawn Код:
#if defined LINUX
    HSTREAM chan2;
    int CSpectrum::PlayStream(char url)
    {
        if(m_iOperatingMode == SPECTRUM_MODE_NONE)
        {
            return -1;
        }
        if (!(chan2=BASS_StreamCreateURL("http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870",0,BASS_STREAM_DECODE,NULL,0)))
        {
            //&& !(chan=BASS_MusicLoad(FALSE,"chicken.mp3",0,0,BASS_MUSIC_RAMP|BASS_SAMPLE_LOOP,0))) {
            return BASS_ErrorGetCode();
        }

        BASS_ChannelPlay(chan2,FALSE);

        return SPECTRUM_ERROR_SUCCESS;
    }
#else

    int CSpectrum::PlayStream(char url)
    {
        if(m_iOperatingMode == SPECTRUM_MODE_NONE)
        {
            return -1;
        }
        if (!(chan=BASS_StreamCreateURL("http://yp.shoutcast.com/sbin/tunein-station.pls?id=860870",0,BASS_STREAM_DECODE,NULL,0)))
        {
            //&& !(chan=BASS_MusicLoad(FALSE,"chicken.mp3",0,0,BASS_MUSIC_RAMP|BASS_SAMPLE_LOOP,0))) {
            return BASS_ErrorGetCode();
        }

        BASS_ChannelPlay(chan,FALSE);

        return SPECTRUM_ERROR_SUCCESS;
    }
#endif
by the way I defined "MulDiv" in natives.cpp
pawn Код:
#ifdef LINUX
    int MulDiv(int nNumber, int nNumerator,int nDenominator)
    {
        return (nNumber*nNumerator+nDenominator/2)/nDenominator;
    }
#endif
if anyone can test functionality would greatly appreciate it

Binary: http://www.solidfiles.com/d/d74f2f50f0/
Source: http://www.solidfiles.com/d/9d2e7c497a/
Hi Jovanny,

chan needs to remain a vector, to fix the problem with it revert your current changes to chan and delete spectrum.cpp and spectrum.h from your build directory (left-over files I forgot to remove.) After removing these two files and inserting MulDiv I was able to get a linux version to compile on CentOS, however I don't believe it is being linked properly to BASS. "Failed (plugins/spectrum.so: undefined symbol: BASS_ChannelGetData)"

I'm not entirely sure on the solution to this, sorry I can't be of more help.
Reply
#54

Quote:
Originally Posted by h02
Посмотреть сообщение
Hi Jovanny,

chan needs to remain a vector, to fix the problem with it revert your current changes to chan and delete spectrum.cpp and spectrum.h from your build directory (left-over files I forgot to remove.) After removing these two files and inserting MulDiv I was able to get a linux version to compile on CentOS, however I don't believe it is being linked properly to BASS. "Failed (plugins/spectrum.so: undefined symbol: BASS_ChannelGetData)"

I'm not entirely sure on the solution to this, sorry I can't be of more help.
class spectrum no it's needed?

PS: I compile on ubuntu 11.10
Reply
#55

Oops...
Channel data changes from normal to almost low value every 5 seconds.
Код:
12:14:38] 0.212329,0.235094,0.016666
[12:14:38] 0.154324,0.190104,0.021227
[12:14:38] 0.266783,0.291539,0.015227
[12:14:38] 0.064767,0.102883,0.014908
[12:14:38] 0.014948,0.034863,0.011818
[12:14:39] 0.065808,0.072678,0.010988
[12:14:39] 0.021445,0.042351,0.013093
[12:14:39] 0.099526,0.109791,0.007576
[12:14:39] 0.036259,0.047864,0.007565
[12:14:39] 0.049168,0.055711,0.008622
[12:14:39] 0.039917,0.043995,0.006407
[12:14:39] 0.044328,0.053303,0.005996
[12:14:39] 0.027950,0.028426,0.006256
[12:14:39] 0.028382,0.030788,0.007434
[12:14:40] 0.023265,0.026278,0.001123
[12:14:40] 0.015520,0.019705,0.005338
[12:14:40] 0.013097,0.014129,0.000263
[12:14:40] 0.002568,0.002245,0.004526
[12:14:40] 0.000298,0.000475,0.007297
[12:14:40] 0.000614,0.002301,0.006293
[12:14:40] 0.000567,0.000296,0.002658
[12:14:40] 0.000153,0.000441,0.004073
[12:14:40] 0.000089,0.000433,0.002547
[12:14:41] 0.000235,0.001084,0.006031
[12:14:41] 0.000370,0.001027,0.004588
[12:14:41] 0.000651,0.006551,0.027111
[12:14:41] 0.004144,0.019761,0.024658
[12:14:41] 0.000223,0.005939,0.009822
[12:14:41] 0.000635,0.003616,0.009511
[12:14:41] 0.003643,0.014068,0.006229
[12:14:41] 0.001544,0.005845,0.000984
[12:14:41] 0.003780,0.006397,0.003401
[12:14:42] 0.001521,0.007189,0.005855
[12:14:42] 0.000259,0.004647,0.005475
[12:14:42] 0.000031,0.000584,0.001549
[12:14:42] 0.000273,0.001776,0.006382
[12:14:42] 0.000491,0.000583,0.007027
[12:14:42] 0.000951,0.004921,0.009357
[12:14:42] 0.003757,0.085854,0.241976
[12:14:42] 0.043612,0.284564,0.361797
[12:14:42] 0.037205,0.525822,0.385485
[12:14:43] 0.207283,0.558021,0.328592
[12:14:43] 0.247848,0.600538,0.322871
[12:14:43] 0.353742,0.617164,0.240993
[12:14:43] 0.050937,0.789265,0.319721
This is for the first three floats. Song has data where it's bigger than 0.01. But....this....This is something abnormal....
Reply
#56

Quote:
Originally Posted by SDraw
Посмотреть сообщение
Oops...
Channel data changes from normal to almost low value every 5 seconds.
Код:
12:14:38] 0.212329,0.235094,0.016666
[12:14:38] 0.154324,0.190104,0.021227
[12:14:38] 0.266783,0.291539,0.015227
[12:14:38] 0.064767,0.102883,0.014908
[12:14:38] 0.014948,0.034863,0.011818
[12:14:39] 0.065808,0.072678,0.010988
[12:14:39] 0.021445,0.042351,0.013093
[12:14:39] 0.099526,0.109791,0.007576
[12:14:39] 0.036259,0.047864,0.007565
[12:14:39] 0.049168,0.055711,0.008622
[12:14:39] 0.039917,0.043995,0.006407
[12:14:39] 0.044328,0.053303,0.005996
[12:14:39] 0.027950,0.028426,0.006256
[12:14:39] 0.028382,0.030788,0.007434
[12:14:40] 0.023265,0.026278,0.001123
[12:14:40] 0.015520,0.019705,0.005338
[12:14:40] 0.013097,0.014129,0.000263
[12:14:40] 0.002568,0.002245,0.004526
[12:14:40] 0.000298,0.000475,0.007297
[12:14:40] 0.000614,0.002301,0.006293
[12:14:40] 0.000567,0.000296,0.002658
[12:14:40] 0.000153,0.000441,0.004073
[12:14:40] 0.000089,0.000433,0.002547
[12:14:41] 0.000235,0.001084,0.006031
[12:14:41] 0.000370,0.001027,0.004588
[12:14:41] 0.000651,0.006551,0.027111
[12:14:41] 0.004144,0.019761,0.024658
[12:14:41] 0.000223,0.005939,0.009822
[12:14:41] 0.000635,0.003616,0.009511
[12:14:41] 0.003643,0.014068,0.006229
[12:14:41] 0.001544,0.005845,0.000984
[12:14:41] 0.003780,0.006397,0.003401
[12:14:42] 0.001521,0.007189,0.005855
[12:14:42] 0.000259,0.004647,0.005475
[12:14:42] 0.000031,0.000584,0.001549
[12:14:42] 0.000273,0.001776,0.006382
[12:14:42] 0.000491,0.000583,0.007027
[12:14:42] 0.000951,0.004921,0.009357
[12:14:42] 0.003757,0.085854,0.241976
[12:14:42] 0.043612,0.284564,0.361797
[12:14:42] 0.037205,0.525822,0.385485
[12:14:43] 0.207283,0.558021,0.328592
[12:14:43] 0.247848,0.600538,0.322871
[12:14:43] 0.353742,0.617164,0.240993
[12:14:43] 0.050937,0.789265,0.319721
This is for the first three floats. Song has data where it's bigger than 0.01. But....this....This is something abnormal....
I don't see anything here indicating abnormal behavior, it is probably the expected output of the sound file you were playing.

What were you expecting? You can read the documentation at http://www.un4seen.com/doc/bass/BASS...elGetData.html to get a better understanding of what this function is returning.
Reply
#57

Sorry, my fault....I set update to 100....
Reply
#58

Quote:
Originally Posted by AMEENAMEEN
View Post
Is the linux version?
http://forum.sa-mp.com/showpost.php?...8&postcount=69
Reply
#59

Very good plugin.
Reply
#60

I dont see very use of this but anyways nice.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)