POV-Ray : Newsgroups : povray.off-topic : BPM Server Time
4 Sep 2024 05:19:25 EDT (-0400)
  BPM (Message 11 to 20 of 77)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: scott
Subject: Re: BPM
Date: 8 Jun 2010 02:52:00
Message: <4c0de890@news.povray.org>
>> Hey, at least he didn't say it's obviously impossible. :-)
>
> No - just ludicrously difficult. ;-)

Funny how it took me about 30 mins of research and coding to come up with a 
working program, when previously I didn't know a single thing about it.  It 
didn't require any skills beyond being able to set up a struct and calling 
windows API functions.  In my book ludicrously difficult is when I think and 
work on something for *weeks* or *months* and cannot get anywhere close to a 
working program.

> Still, I would also guess that, say, CDex is going to write identical WAV 
> files for every track ripped. So I can probably just go measure how many 
> bytes the header is, and skip that...

IIRC that's exactly what I did at some point previously.  I guessed/knew the 
samples were in 16bit stereo format, so just took 4 bytes at a time from the 
file and experimented with the order until the result wasn't white noise!


Post a reply to this message

From: scott
Subject: Re: BPM
Date: 8 Jun 2010 02:54:12
Message: <4c0de914@news.povray.org>
> See attached. Press any key rhythmically to send "taps". The reset 
> button... uh... resets the stats.

If I press buttons too fast I get a negative maximum BPM :-)


Post a reply to this message

From: Invisible
Subject: Re: BPM
Date: 8 Jun 2010 04:03:16
Message: <4c0df944$1@news.povray.org>
>>> Hey, at least he didn't say it's obviously impossible. :-)
>>
>> No - just ludicrously difficult. ;-)
> 
> Funny how it took me about 30 mins of research and coding to come up 
> with a working program, when previously I didn't know a single thing 
> about it.  It didn't require any skills beyond being able to set up a 
> struct and calling windows API functions.

So I'm guessing you know an awful lot more about C than I do.

>> Still, I would also guess that, say, CDex is going to write identical 
>> WAV files for every track ripped. So I can probably just go measure 
>> how many bytes the header is, and skip that...
> 
> IIRC that's exactly what I did at some point previously.  I guessed/knew 
> the samples were in 16bit stereo format, so just took 4 bytes at a time 
> from the file and experimented with the order until the result wasn't 
> white noise!

I suppose you could just open the file in a hex editor and look for the 
chunk names.

Oh, wait - you'd need a hex editor to do that...


Post a reply to this message

From: Invisible
Subject: Re: BPM
Date: 8 Jun 2010 04:05:02
Message: <4c0df9ae$1@news.povray.org>
scott wrote:
>> See attached. Press any key rhythmically to send "taps". The reset 
>> button... uh... resets the stats.
> 
> If I press buttons too fast I get a negative maximum BPM :-)

Really? That's impressive. You're a special guy! :-D

No, the minimum and maximum values are derived by taking the mean and 
adding/subtracting the SD. If the SD is sufficiently large, it should be 
possible to make the minimum value negative. (I.e., if the error ratio 
is greater than 100%.) Not sure how you'd make the maximum go negative, 
but it's probably possible somehow...


Post a reply to this message

From: scott
Subject: Re: BPM
Date: 8 Jun 2010 04:28:15
Message: <4c0dff1f@news.povray.org>
>> Funny how it took me about 30 mins of research and coding to come up with 
>> a working program, when previously I didn't know a single thing about it. 
>> It didn't require any skills beyond being able to set up a struct and 
>> calling windows API functions.
>
> So I'm guessing you know an awful lot more about C than I do.

What's C got to do with it?  You can call DLL functions from lots of 
different languages.  So long as your language allows you to set up a block 
of data with the common data types it shouldn't be at all tricky.


Post a reply to this message

From: Invisible
Subject: Re: BPM
Date: 8 Jun 2010 04:31:56
Message: <4c0dfffc$1@news.povray.org>
scott wrote:
>>> Funny how it took me about 30 mins of research and coding to come up 
>>> with a working program, when previously I didn't know a single thing 
>>> about it. It didn't require any skills beyond being able to set up a 
>>> struct and calling windows API functions.
>>
>> So I'm guessing you know an awful lot more about C than I do.
> 
> What's C got to do with it?  You can call DLL functions from lots of 
> different languages. 

Sure. So long as you have the necessary magic numbers for the specific 
functions you want to access, and you know how to do the pointer 
manipulation to make it happen. It's not exactly trivial though.

(Unless, of course, you're working with a language which actually has 
built-in support for calling DLLs. Then presumably it *is* trivial.)

> So long as your language allows you to set up a 
> block of data with the common data types it shouldn't be at all tricky.

Heh, right.

I still think recording a few keypresses and doing some statistics on 
them is way, way simpler.


Post a reply to this message

From: scott
Subject: Re: BPM
Date: 8 Jun 2010 04:32:41
Message: <4c0e0029$1@news.povray.org>
> No, the minimum and maximum values are derived by taking the mean and 
> adding/subtracting the SD. If the SD is sufficiently large, it should be 
> possible to make the minimum value negative. (I.e., if the error ratio is 
> greater than 100%.) Not sure how you'd make the maximum go negative, but 
> it's probably possible somehow...

How are you calculating the maximum BPM?  I guess you are calculating some 
minimum beat time using the mean and SD and then inverting it?  Maybe the 
minimum beat time is negative if the SD is too big compared to the mean?


Post a reply to this message

From: Invisible
Subject: Re: BPM
Date: 8 Jun 2010 04:34:33
Message: <4c0e0099$1@news.povray.org>
scott wrote:
>> No, the minimum and maximum values are derived by taking the mean and 
>> adding/subtracting the SD. If the SD is sufficiently large, it should 
>> be possible to make the minimum value negative. (I.e., if the error 
>> ratio is greater than 100%.) Not sure how you'd make the maximum go 
>> negative, but it's probably possible somehow...
> 
> How are you calculating the maximum BPM?  I guess you are calculating 
> some minimum beat time using the mean and SD and then inverting it?  
> Maybe the minimum beat time is negative if the SD is too big compared to 
> the mean?

Minimum = mean - SD
Maximum = mean + SD

(But remember that it takes the mean and SD over the beat period, and 
then takes the reciprocol of that to compute the BPM value.)

So, yes, as I asserted, if SD > mean than one of the figures comes out 
negative.


Post a reply to this message

From: scott
Subject: Re: BPM
Date: 8 Jun 2010 04:42:12
Message: <4c0e0264$1@news.povray.org>
> I still think recording a few keypresses and doing some statistics on 
> them is way, way simpler.

Since when do you take the simpler solution? :-)


Post a reply to this message

From: Invisible
Subject: Re: BPM
Date: 8 Jun 2010 04:50:52
Message: <4c0e046c@news.povray.org>
scott wrote:
>> I still think recording a few keypresses and doing some statistics on 
>> them is way, way simpler.
> 
> Since when do you take the simpler solution? :-)

What you trying to say? :-P


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.