Forums > MaxMSP

counting difference tones

February 27, 2009 | 4:52 am

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


February 27, 2009 | 5:57 am

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~


February 27, 2009 | 6:03 am

thanks… trying that


February 27, 2009 | 6:15 am

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?


February 27, 2009 | 8:27 am
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


February 28, 2009 | 2:37 am

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


February 28, 2009 | 6:28 pm
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.

http://cnmat.berkeley.edu/downloads

mz


March 2, 2009 | 10:34 pm

looking into it… thanks


Viewing 8 posts - 1 through 8 (of 8 total)