Go Down

Topic: guitar frequencies (Read 2 times) previous topic - next topic

PaulS

Quote
obs: is that line 87 of the frequency library - ? 

I like AWOL's analogy.

My car wouldn't start this morning. It's the white one. Can you tell me what is wrong?

You didn't show any code. You didn't post any error messages. You simply expected us to help you fix them.

Ducaqabe

sorry PaulS
you are  right, what I want to try is to re-use  the frequency counter library code/ the code on this public domain link:http://www.pjrc.com/teensy/td_libs_FreqCount.html#compare
because I think, it is relevant my project after modifying,. I compliled the code, there is always error like this one
thanks
the code is
Code: [Select]
// Frequency Counter Lib example

/*
  Martin Nawrath KHM LAB3
  Kunsthochschule f¸r Medien Kˆln
  Academy of Media Arts
  http://www.khm.de
  http://interface.khm.de/index.php/labor/experimente/
*/
#include <FreqCounter.h>


unsigned long frq;
int cnt;
int pinLed=13;

void setup() {
  pinMode(pinLed, OUTPUT);

  Serial.begin(115200);        // connect to the serial port

  Serial.println("Frequency Counter");

}



void loop() {

  // wait if any serial is going on
  FreqCounter::f_comp=10;   // Cal Value / Calibrate with professional Freq Counter
  FreqCounter::start(100);  // 100 ms Gate Time

  while (FreqCounter::f_ready == 0)

  frq=FreqCounter::f_freq;
  Serial.print(cnt++);
  Serial.print("  Freq: ");
  Serial.println(frq);
  delay(20);
  digitalWrite(pinLed,!digitalRead(pinLed));  // blink Led




header file

Code: [Select]
/*
  FreqCounter.h - Library for a Frequency Counter c.
  Created by Martin Nawrath, KHM Lab3, Dec. 2008
  Released into the public domain.
*/



#ifndef FreqCounter_h
#define FreqCounter_h


#include <avr/interrupt.h>
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

namespace FreqCounter {

extern unsigned long f_freq;
extern volatile unsigned char f_ready;
extern volatile unsigned char f_mlt;
extern volatile unsigned int f_tics;
extern volatile unsigned int f_period;
extern volatile unsigned int f_comp;

void start(int ms);


}

#endif


PaulS

There is a difference between
#include <FreqCounter.h>
and
Code: [Select]
#include "FreqCounter.h"
The difference is where the compiler looks for include files. If one doesn't work, because you have not installed the library as a library, try the other one.

Ducaqabe

Thanks  PoulS

now I changed header file from  #include <FreqCounter.h> to 
#include "FreqCounter.h"

I can see that was a part of the compile error, but still the compile problem not disappear,
new one is her: on the piture
how to install the library as library ?, sorry my novice questions?
thanks again

GoForSmoke


The issue with a pickup is that unless the rest of the strings are muted they will resonate too the absolute difference between any consecutive two notes is the 12th root  of 2 or 1.059463... (20 more places).

Bob


Sure, you won't get a perfectly clean sine wave. A pickup will also get effect from the guitar body sound box. Yet somehow an A sounds like an A, those resonances add a little tone is all.

You want just the string, do like Les Paul did and get a piece of train track.. or a hardwood 4x4. But then it's not an acoustic guitar.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up