Shop OBEX P1 Docs P2 Docs Learn Events
microphone,pitch calculations - Page 2 — Parallax Forums

microphone,pitch calculations

2»

Comments

  • HemPeterHemPeter Posts: 28
    edited 2014-04-03 04:38
    I don't know why you are editing because the first version was fine.

    For me, all the pauses and "er"s were very cringy ;) I originally thought that doing it in one take would be a good idea..
    It was only up for a couple of days when it was up originally.. what made you want to download it in the first place? ;)
  • stamptrolstamptrol Posts: 1,731
    edited 2014-04-03 05:44
    @PhiPi,

    Nothing quite so exotic. Mostly eastern north american maple, hickory and other close grained hardwoods.

    Cheers,

    Tom
  • HemPeterHemPeter Posts: 28
    edited 2014-04-03 16:27
    Sorry for hijacking your thread Tom
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-04-03 16:52
    stamptrol wrote:
    Nothing quite so exotic. ...
    Thanks, I was just curious because a friend who makes violin bows has asked me to build what sounds like the very same thing that your customer wants, although without the same level of automation and speed constraints.

    -Phil
  • ercoerco Posts: 20,256
    edited 2015-02-16 15:40
    Heater. wrote: »
    Not possible on the Stamp.

    What you need is a Fast Fourier Transform to tell what frequencies are present in your signal.

    You may need a steep low pass filter to get this working nicely.

    Not necessarily, depending on the tone. When I asked about a Stamp detecting a recorder (flute) note, I got the same answers about harmonics and FFTs, so I put it on the back burner. Well I tried it today and it worked great on my first attempt... frequency range 500-1000 hz. OP Tom was asking about 440 hz, so I say give it a whirl. Quite fun to play with actually, and now I'm experimenting with Stamp-generated harmony.
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    ' sample twice, discard if vastly different
    
    PAUSE 100
    
    Main:
        '
        COUNT 15,50,W1
        COUNT 15,50,W2
        IF W2<W1 AND W1-W2>3 THEN main ' discard if 2 samples are more than 3 apart
        IF W1<W2 AND W2-W1>3 THEN main ' discard if 2 samples are more than 3 apart
        W1=W1+W2 'update W1, now total ~similar to COUNT 100
        IF W1<30 THEN main   ' ignore LF noise & pauses
        W2=W1*10
    
        FREQOUT 9,500,W2
    
        IF W1>49 AND W1<55 THEN DEBUG "CCC",CR:GOTO main    ' 52-53
        IF W1>56 AND W1<62 THEN DEBUG "DDD",CR:GOTO main    ' 59
        IF W1>65 AND W1<68 THEN DEBUG "EEE",CR:GOTO main  ' 66-67
        IF W1>67 AND W1<75 THEN DEBUG "FFF",CR:GOTO main  ' 70
        IF W1>77 AND W1<82 THEN DEBUG "GGG",CR:GOTO main  '79-80
        IF W1>86 AND W1<93 THEN DEBUG "AAA",CR:GOTO main  '89-91
        IF W1>96 AND W1<103 THEN DEBUG "BBB",CR:GOTO main  ' 98-99
        IF W1>102 AND W1<109 THEN DEBUG " HIGH CCC",CR:GOTO main  '106-107
    
    GOTO main
    
  • ercoerco Posts: 20,256
    edited 2015-02-27 12:24
    Thanks, I was just curious because a friend who makes violin bows has asked me to build what sounds like the very same thing that your customer wants, although without the same level of automation and speed constraints.

    Musicians take their violin bows very seriously. My friend's husband is a professional musician, LA Philharmonic, studio recording and such. I met up with them in Paris one April, several years ago. I was on a cheap jaunt, biking through Europe and running the Paris marathon. My friends were there on "official business" to get two vintage violin bows appraised. Just the bows. Four star hotels, fancy meals, the works. Their whole trip was a tax writeoff. Some people... are much smarter than me.

    Most people.
Sign In or Register to comment.