instrument tuner!?

rossmalone@gmail.com's icon

Is there an object which can compare an inputted frequency to a predetermined one, allowing me to build a guitar/bass tuner?
if anyone can help please do :)
thanks
ross

Steven Miller's icon

There may be an object or 3rd party external, but it's easy to do
this operation yourself. Simply subtract the second number (the
input) from the first number (the reference). If the result is
positive the input is flat, if it is negative the input is sharp. If
the result is 0 you're right on, of course.

Rather than display the simple frequency difference, convert the
frequency ratio into cents by plugging it into the formula (see
below) for converting frequency to cents and display that, which
might be more helpful. Displaying some sort of visual indicator which
changes in response to the cents magnitude would also be useful.

1 cent = 1/100 (1%) of an equal-tempered semitone
one octave = 1200 cents
c = (1200/log2) * logR; where R = frequency ratio in decimal form

On Feb 27, 2008, at 9:26 AM, Ross Malone wrote:

>
> Is there an object which can compare an inputted frequency to a
> predetermined one, allowing me to build a guitar/bass tuner?
> if anyone can help please do :)
> thanks
> ross

----
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home
SFIFEM
Atrium Sound Space
OVOS
CMP

rossmalone@gmail.com's icon

Thanks so much for your help!
that sounds perfect, i have had a fiddle around with max but i can't find a way of converting an audio signal to numbers, i've tried using number~ but i can't get it to show anything useful!
thanks again
ross

Steven Miller's icon

Have a look at [snapshot~] in the MSP reference manual.

On Feb 27, 2008, at 2:10 PM, Ross Malone wrote:

>
> Thanks so much for your help!
> that sounds perfect, i have had a fiddle around with max but i
> can't find a way of converting an audio signal to numbers, i've
> tried using number~ but i can't get it to show anything useful!
> thanks again
> ross

----
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home
SFIFEM
Atrium Sound Space
OVOS
CMP

Steven Miller's icon

I forgot to mention - as you probably already know, the straight
audio signal of your guitar/bass converted into numbers via
[snapshot~] won't have any relationship to frequency. It'll be a
readout of the amplitude. To get the frequency of the incoming signal
you'll need to use a pitch follower of some sort. Have a look at
[fiddle~] for example - you can find it at .

On Feb 27, 2008, at 2:10 PM, Ross Malone wrote:

>
> Thanks so much for your help!
> that sounds perfect, i have had a fiddle around with max but i
> can't find a way of converting an audio signal to numbers, i've
> tried using number~ but i can't get it to show anything useful!
> thanks again
> ross

----
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home
SFIFEM
Atrium Sound Space
OVOS
CMP