Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - djjoy

Pages: [1]
1
Plugin Development / Re: Help to get exact bpm count and beatgrid
« on: September 29, 2016, 10:06:18 »
Some help or comments with this question?

Best Regards,

DJ Joy

2
Plugin Development / Re: Help to get exact bpm count and beatgrid
« on: September 24, 2016, 08:12:18 »
Hi again,
I have many hours testing and I have no goods results.

I try with qm-tempotrack and I get something like this:
Using block size = 1024, step size = 512
Plugin accepts 1 -> 1 channel(s)
Sound file has 1 (will mix/augment if necessary)
Output is: "tempo"
Note: nonZeroCount was 61771, is now 61771
 0.011609977: 99.384 99.38 bpm
 1.497687074: 93.9631 93.96 bpm
 4.469841269: 92.2852 92.29 bpm
 7.441995464: 93.9631 93.96 bpm
 8.928072562: 92.2852 92.29 bpm
 13.386303854: 95.7031 95.70 bpm
 14.872380952: 89.1029 89.10 bpm
 17.844535147: 90.6661 90.67 bpm
 19.330612244: 95.7031 95.70 bpm
 20.816689342: 92.2852 92.29 bpm
 22.302766439: 99.384 99.38 bpm
 25.274920634: 97.5088 97.51 bpm
 26.760997732: 95.7031 95.70 bpm
 28.247074829: 90.6661 90.67 bpm
 31.219229024: 86.1328 86.13 bpm
 32.705306122: 99.384 99.38 bpm
 35.677460317: 93.9631 93.96 bpm
 38.649614512: 92.2852 92.29 bpm
 40.135691609: 97.5088 97.51 bpm
 44.593922902: 117.454 117.45 bpm
 46.079999999: 132.512 132.51 bpm
 47.566077097: 129.199 129.20 bpm
 53.510385487: 132.512 132.51 bpm
 56.482539682: 139.675 139.67 bpm
 60.940770974: 135.999 136.00 bpm
 66.885079364: 143.555 143.55 bpm
......

Is this correct?
If the original song has a 93.232bpm (testing in VirtualDJ and Tracktor)... I have to process the received data to get this bpm?
I have to change some parameters ?

Waiting for your reply

Best Regards,

DJ JOY

3
Plugin Development / Help to get exact bpm count and beatgrid
« on: September 21, 2016, 17:56:10 »
Hello everybody,
I'm newbie in vamp and also in c++.
I have a DJ application that uses bass.dll, but the bpm counter of bass.dll is not very precise, and I want proccess the song throught vapm plugins to get the exact bpm.

If I use fixedtempo:0 with output = 0 (tempo), modifing your vamp-simple-host example to use with bass:
I get this:
0.002902494, 59.998911565: 51.3587 51.4 bpm
when the real bpm ( in traktor and virtual dj ) is 93.232

I use bass decode to send data to process:
BASS_Init(-1,44100,BASS_DEVICE_MONO,0,NULL);  //only one channel
stream = BASS_StreamCreateFile(FALSE,filename,0,0, BASS_STREAM_DECODE | BASS_SAMPLE_FLOAT);  //open the song in decode float samples mode


//loop to fill data in the plugin

    // Here we iterate over the frames, avoiding asking the numframes in case it's streaming input.
    do {

        int count;

        if ((blockSize==stepSize) || (currentStep==0)) {
            // read a full fresh block
         count = BASS_ChannelGetData(stream, filebuf, blockSize );
            if (count  < 0)
         {
                cerr << "ERROR: sf_readf_float failed: "  << endl;
                break;
            }
            if (count != blockSize) --finalStepsRemaining;
        } else {
            //  otherwise shunt the existing data down and read the remainder.
            memmove(filebuf, filebuf + (stepSize * channels), overlapSize * channels * sizeof(float));
         count = BASS_ChannelGetData(stream, filebuf + (overlapSize * channels ), stepSize );
            if (count < 0) {
                cerr << "ERROR: sf_readf_float failed: " <<  endl;
                break;
            }
            if (count != stepSize) --finalStepsRemaining;
            count += overlapSize;
        }

        for (int c = 0; c < channels; ++c) {
            int j = 0;
            while (j < count) {
                plugbuf[c][j] = filebuf[j * info.chans + c];
                ++j;
            }
            while (j < blockSize) {
                plugbuf[c][j] = 0.0f;
                ++j;
            }
        }

        rt = RealTime::frame2RealTime(currentStep * stepSize, info.freq);

        printFeatures
            (RealTime::realTime2Frame(rt + adjustment, info.freq),
             info.freq, outputNo, plugin->process(plugbuf, rt),
             out, useFrames);
      int frames;
      frames = BASS_ChannelGetLength(stream, BASS_POS_BYTE);
        if (frames > 0){
            int pp = progress;
            progress = (int)((float(currentStep * stepSize) / frames) * 100.f + 0.5f);
            if (progress != pp && out) {
                cerr << "\r" << progress << "%";
            }
        }

        ++currentStep;

    } while (finalStepsRemaining > 0);


Can you helpme about this? What's wrong?

Best Regards,

DJ Joy









Pages: [1]