counting difference tones

Feb 27, 2009 at 4:52am

counting difference tones

i am trying to count the beat freq. of the difference between two cosines… i was thinking for a test:

two oscillators

to zerox

to thresh

to edge

and counting bangs per second… but it doesn’t work… instead zerox (however i try to use it) only ever seems to give me the number of crossings for the highest freq.–regardless of what else is going on…

shouldn’t i get a fluctuation in crossings per what other waves are fed into a single zerox object?

is there a more logical way to count beating?

ultimately i want to measure consonance of incoming audio

#42551
Feb 27, 2009 at 5:57am

If I’m understanding you correctly, this approach will not work because the signal will actually be crossing zero many times within each beat unless the frequency is so low it is inaudible.

You may have to use an object that detects a peak amplitude and set its threshold at or close to the cycle~’s amplitude.

Maybe peakamp~

#152279
Feb 27, 2009 at 6:03am

thanks… trying that

#152280
Feb 27, 2009 at 6:15am

first… there’s no threshold setting for peakamp
instead we are setting the period for reporting our highest amplitude

but, setting it to a super short period revealed that the only amplitudes were zero and unity… yet i can hear that x times a sec (the beat freq.) the crossings line up… shouldn’t those ticks be louder? or is that psychoacoustic?

#152281
Feb 27, 2009 at 8:27am
 Quote: i am trying to count the beat freq. of the difference between two cosines… i was thinking for a test:

two oscillators

to zerox

to thresh

to edge

Couldn’t you just subtract their frequency values?

_
johan

#152282
Feb 28, 2009 at 2:37am

of course i already know the difference tones i am testing this with… i want ultimately to measure the interference of incoming audio

#152283
Feb 28, 2009 at 6:28pm
 helmut34 wrote on Fri, 27 February 2009 18:37 of course i already know the difference tones i am testing this with… i want ultimately to measure the interference of incoming audio

There’s a CNMAT object called roughness~ that might be interesting to you.