Searching \ for 'A musical question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=musical+question
Search entire site for: 'A musical question'.

Truncated match.
PICList Thread
'A musical question'
2004\07\07@235339 by Robert B.

flavicon
face
----- Original Message -----
From: "David VanHorn" <spam_OUTdvanhornTakeThisOuTspamCEDAR.NET>


> Ok, This has to pass for "oddball question of the year".
>
> I've been asked if there's any (reasonably simple) way, to lock an
incoming audio tone, to standard musical notes.   If I understand this
right, the effect would be something like Cher's "Believe" vocal track.
This was done with heavy post processing, and is out of the ballpark here.

Are you talking about processing vocals?  I'm not really sure what you're
after here, but it sounds like a very interesting idea, so please elaborate!

> Alternatively, any reasonable way to let a performer know when they are
reasonably close to a standard pitch, and by that I mean probably five
octaves of notes, with sharps and flats.

Would there be a problem with just sampling the tone at a few kHz with an
ADC then measuring a time-averaged value between peaks?  The musical
spectrum is incredibly well defined, and it would only take a pretty simple
look-up table or calculation to determine an audio tone within a cent or
two.  Or, take a short trip to your local music shop and get a cheap digital
tuner.  I believe they work based off of a 440-hz reference (A-440 pitch)
and have kept singers, instruments, and foghorns in tune for years.  Even
the cheap ones have sharp/flat indicators, line in/out, and impeccable
accuracy, though perhaps not a PIC brain.



> I don't mind telling you kids, this one makes my head hurt.
>
> --
> http://www.piclist.com hint: The PICList is archived three different
> ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\07\08@001145 by David VanHorn

flavicon
face
>
>Are you talking about processing vocals?  I'm not really sure what you're
>after here, but it sounds like a very interesting idea, so please elaborate!

Not vocals, but close.
Think of the way a trombone or violin has continuously variable pitch.
I'd like to "soft-lock" to the nearest proper note.


>Would there be a problem with just sampling the tone at a few kHz with an
>ADC then measuring a time-averaged value between peaks?  The musical
>spectrum is incredibly well defined, and it would only take a pretty simple
>look-up table or calculation to determine an audio tone within a cent or
>two.  Or, take a short trip to your local music shop and get a cheap digital tuner.  I believe they work based off of a 440-hz reference (A-440 pitch) and have kept singers, instruments, and foghorns in tune for years.  Even the cheap ones have sharp/flat indicators, line in/out, and impeccable
>accuracy, though perhaps not a PIC brain.

Well, will they tell me what note i'm on, in say 250mS or thereabouts?
With this branch, I'm thinking of some sort of LED board display that shows the note you're closest to, and maybe some way to indicate how far off you are, and in which direction, but it would have to be essentially realtime.

I can provide sine or square output, and I think it's constant amplitude, or at least it can be made to be.

Hmm.. Maybe I was thinking of this in the wrong direction.
The octaves are all harmonics, so basically it's just 12 table entries, then doubling/tripling etc, and if I start on the high end, the more messing about I have to do, then the more time I have available to do it in.







>> I don't mind telling you kids, this one makes my head hurt.
>>
>> --
>> http://www.piclist.com hint: The PICList is archived three different
>> ways.  See http://www.piclist.com/#archives for details.
>
>--
>http://www.piclist.com hint: The PICList is archived three different
>ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2004\07\08@005017 by Robert B.

flavicon
face
If you're going to be processing a single note at a time (not a chord) then
I'd say just count the time between peaks, see which note your calculations
are closest to, display the note on some output display, calculate the
difference between the "pure" note and your slightly-off rendition, and
display the difference.  Loop as needed.  A couple problems might be getting
the sound into the PIC for sampling undistorted, and averaging the frequency
over a sufficiently long interval to minimize noise.  This method would work
well with a PIC since high resolution generally is not needed, and an 8-bit
ADC is enough to detect the audio peaks.  Also the bandwidth to be processed
is very small.

If you're looking to do real time signal processing of a
trombone/violin/voice/other instrument, keep in mind that these instrument's
classic sounds come not only from the primary note being produced, but from
the overtones, resonance, and harmonics generated in the instrument as well.
Hence a trumpet playing a C flat sounds different than a boner playing the
same note, which both sound very very different from a violin.  If you just
want to pick the nearest acceptable note and capture it (as in a midi-style
interface) then you can ignore these tone-producing harmonics and just
sample the range of primary frequencies.  On the other hand, to accurately
reproduce the tone and timber of an instrument digitally requires a ton of
processing power... more than a PIC could afford.  For your application, not
only do you have to stretch out or shrink the primary tones to be "in tune",
but you also have to shrink/stretch the harmonics and resonances produced by
the instrument as well in order to maintain the sound.  The harmonics extend
beyond the range of human hearing, so you're looking at a minimum sampling
rate of 10's of kHz to even get close to a quality reproduction.  Real-time
processing of even crummy 8-bit sound digitally sampled at that rate is IMHO
way out of a PIC's league, and almost certainly would require the
postprocessing you suspect Cher used.

So if you just want to soft-lock to the nearest note and not reproduce the
instrument's character, it should be doable with a PIC.  If you're thinking
bigger, then good luck!   And LMK how it goes!



{Original Message removed}

2004\07\08@040120 by Engineering Info

picon face
How about an LM567 with a fast moving sweep oscilator

David VanHorn wrote:

{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body

2004\07\08@084316 by fred jones

picon face
Hi,
I'm sorry but I'm still having a difficult time trying to figure out what
you are wanting to do.  Years ago, back in the commodore 64 days, I built a
board with an input into a zero crossing detector through a frequency to
voltage converter into an ADC to the parallel port on the C64.  The zero
crossing detector did a good job of giving the fundamental frequency if I
sang or played an acoustic instrument into a microphone on the input.  I
calculated, based on A=440, what voltage I would get out of the FtoV
converter for all 12 notes and so figured the midway points between notes.
I took that and sent out the correct midi note on command to a midi port
adapter so I could sing a note into the microphone and have a midi keyboard
or midi sound module play the corresponding note as a trumpet, string, or
whatever sound selected on the sound maker.  It worked quite well.  Seemed
to me that the only thing that caused me problems was the delay between when
you began to sing the note and when it all got translated into a midi
command to the keyboard.  Since the C64 was slow (I think it was 1mhz clock
freq)I abandoned the basic code and I wrote it in assembly which made it
acceptable.  Something like this could easily be done to calculate the note
and how far off it is with a pic, just send it to an LED or LCD.  If you
want to buy something off the shelf, I have a Korg tuner that allows you to
sing or play  into it and it will show the note you are closest to on an LED
and a visual LED line will show how many "cents" off you are sharp or flat.
Good luck,
FJ
>
>Are you talking about processing vocals?  I'm not really sure what you're
>after here, but it sounds like a very interesting idea, so please
elaborate!

Not vocals, but close.
Think of the way a trombone or violin has continuously variable pitch.
I'd like to "soft-lock" to the nearest proper note.


>Would there be a problem with just sampling the tone at a few kHz with an
>ADC then measuring a time-averaged value between peaks?  The musical
>spectrum is incredibly well defined, and it would only take a pretty
simple
>look-up table or calculation to determine an audio tone within a cent or
>two.  Or, take a short trip to your local music shop and get a cheap
digital tuner.  I believe they work based off of a 440-hz reference (A-440
pitch) and have kept singers, instruments, and foghorns in tune for years.
Even the cheap ones have sharp/flat indicators, line in/out, and impeccable
>accuracy, though perhaps not a PIC brain.

Well, will they tell me what note i'm on, in say 250mS or thereabouts?
With this branch, I'm thinking of some sort of LED board display that shows
the note you're closest to, and maybe some way to indicate how far off you
are, and in which direction, but it would have to be essentially realtime.

I can provide sine or square output, and I think it's constant amplitude, or
at least it can be made to be.

Hmm.. Maybe I was thinking of this in the wrong direction.
The octaves are all harmonics, so basically it's just 12 table entries, then
doubling/tripling etc, and if I start on the high end, the more messing
about I have to do, then the more time I have available to do it in.







>> I don't mind telling you kids, this one makes my head hurt.
>>
>> --
>> http://www.piclist.com hint: The PICList is archived three different
>> ways.  See http://www.piclist.com/#archives for details.
>
>--
>http://www.piclist.com hint: The PICList is archived three different
>ways.  See http://www.piclist.com/#archives for details.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

_________________________________________________________________
Check out the latest news, polls and tools in the MSN 2004 Election Guide!
http://special.msn.com/msn/election2004.armx

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

2004\07\08@141318 by David VanHorn

flavicon
face
At 07:41 AM 7/8/2004 -0500, fred jones wrote:

>Hi,
>I'm sorry but I'm still having a difficult time trying to figure out what
>you are wanting to do.

Me too.. :)

The general idea, is to either help the instrument "lock" to the proper note, or to help the performer identify when he's got it right.

This is somewhat of a special case, in that I can get sine or square output without much harmonic content, so I think I will probably go in the direction of an LED board to indicate the note, and the counter approach to determine where I am.  I may not even need to filter it, just light the leds as it happens, and let the "eyeball averager" deal with it.

Thanks.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...