Compiling Error with "Playtune" Code
hello,
i try concise possible when explaining errors receiving. basically, trying compile "playtunes", piece of code turns arduino simple synthesizer. can read brief overview of code here:
http://code.google.com/p/arduino-playtune/
when try compile it, receive following error messages:
in file included sketch_apr14a.cpp:11:
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:37:22: error: wprogram.h: no such file or directory
in file included sketch_apr14a.cpp:11:
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:42: error: 'byte' has not been declared
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:43: error: 'byte' has not been declared
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:44: error: 'boolean' not name type
sketch_apr14a.cpp: in function 'void loop()':
sketch_apr14a:188: error: no matching function call 'playtune::tune_playscore(byte [3204])'
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:43: note: candidates are: void playtune::tune_playscore(int*)
sketch_apr14a:189: error: 'class playtune' has no member named 'tune_playing'
that's it. here more information may helpful:
i try concise possible when explaining errors receiving. basically, trying compile "playtunes", piece of code turns arduino simple synthesizer. can read brief overview of code here:
http://code.google.com/p/arduino-playtune/
when try compile it, receive following error messages:
in file included sketch_apr14a.cpp:11:
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:37:22: error: wprogram.h: no such file or directory
in file included sketch_apr14a.cpp:11:
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:42: error: 'byte' has not been declared
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:43: error: 'byte' has not been declared
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:44: error: 'boolean' not name type
sketch_apr14a.cpp: in function 'void loop()':
sketch_apr14a:188: error: no matching function call 'playtune::tune_playscore(byte [3204])'
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:43: note: candidates are: void playtune::tune_playscore(int*)
sketch_apr14a:189: error: 'class playtune' has no member named 'tune_playing'
that's it. here more information may helpful:
- running windows vista 64 bit
- directory: c:\users\preston\desktop\arduino-1.0\libraries\playtune
- files in playtune library: playtune.cpp, playtune.h
- uno
code: [select]
//**************************************************
//
// test of playtune library arduino nano
//
// l. shustek, 31 jan 2011, initial release.
// l. shustek, 27 feb 2011, new score data
//
//**************************************************
#include <playtune.h>
//------------------------------------------------
// scores put in program space memory
//------------------------------------------------
// playtune bytestream file "bach_bwv798.mid" created miditones v1.1 on sun feb 27 12:45:00 2011
byte progmem score [] = {
// sinfonia no.12 in major bwv.798 j.s.bach
// conductor track
7,208, 0x90,0x45, 0x91,0x39, 1,77, 0x80, 0x81, 0x90,0x44, 0,166, 0x80, 0x90,0x45, 0,166, 0x80, 0x90,0x47,
0x91,0x38, 1,77, 0x80, 0x81, 0x90,0x45, 0,166, 0x80, 0x90,0x44, 0,166, 0x80, 0x90,0x45, 0x91,0x36, 1,77,
0x81, 1,77, 0x91,0x31, 0,166, 0x80, 0x90,0x47, 0,166, 0x80, 0x81, 0x90,0x44, 0,166, 0x80, 0x90,0x45,
0,166, 0x80, 0x90,0x47, 0x91,0x32, 0,166, 0x80, 0x90,0x40, 0,166, 0x80, 0x81, 0x90,0x49, 0,166, 0x80,
0x90,0x40, 0,166, 0x80, 0x90,0x4a, 0x91,0x34, 0,166, 0x80, 0x90,0x40, 0,166, 0x80, 0x81, 0x90,0x4c, 1,77,
0x80, 0x90,0x49, 0x91,0x2d, 0,166, 0x80, 0x90,0x47, 0,166, 0x80, 0x81, 0x90,0x45, 0x91,0x39, 0,166, 0x80,
0x90,0x47, 0,166, 0x80, 0x81, 0x90,0x49, 0x91,0x38, 0,166, 0x80, 0x90,0x4b, 0,166, 0x80, 0x81, 0x90,0x4c,
0x91,0x36, 0,166, 0x80, 0x90,0x4e, 0,166, 0x80, 0x81, 0x90,0x50, 0x91,0x34, 0x92,0x40, 0,166, 0x80, 0x90,0x51,
0,166, 0x80, 0x81, 0x82, 0x90,0x53, 0x91,0x3f, 0,166, 0x81, 0x91,0x40, 0,166, 0x81, 0x91,0x3f, 0x92,0x42,
0,166, 0x80, 0x90,0x51, 0,166, 0x80, 0x81, 0x82, 0x90,0x50, 0x91,0x40, 0,166, 0x80, 0x81, 0x90,0x4e, 0x91,0x3f,
0,166, 0x80, 0x81, 0x90,0x4c, 0x91,0x3d, 0x92,0x40, 0,166, 0x80, 0x90,0x4b, 0,166, 0x80, 0x81, 0x90,0x49,
0,166, 0x80, 0x90,0x47, 0,166, 0x80, 0x90,0x4c, 0x91,0x38, 0,166, 0x82, 0x92,0x42, 0,166, 0x81, 0x82,
0x91,0x3f, 0,166, 0x81, 0x91,0x40, 0,166, 0x81, 0x91,0x42, 0x92,0x39, 0,166, 0x81, 0x91,0x3b, 0,166,
0x81, 0x82, 0x91,0x44, 0,166, 0x81, 0x91,0x3b, 0,166, 0x80, 0x81, 0x90,0x45, 0x91,0x4b, 0x92,0x3b, 0,166,
0x80, 0x82, 0x90,0x3b, 0,166, 0x80, 0x90,0x47, 1,77, 0x80, 0x81, 0x90,0x4c, 0x91,0x44, 0x92,0x40, 0,166,
0x81, 0x91,0x45, 0,166, 0x80, 0x81, 0x82, 0x90,0x4a, 0x91,0x47, 0,166, 0x80, 0x81, 0x90,0x49, 0x91,0x45, 0,166,
0x80, 0x81, 0x90,0x4a, 0x91,0x44, 0,166, 0x80, 0x81, 0x90,0x4c, 0x91,0x42, 0,166, 0x80, 0x81, 0x90,0x4e, 0x91,0x40,
0,166, 0x80, 0x81, 0x90,0x50, 0x91,0x3e, 0,166, 0x80, 0x81, 0x90,0x51, 0x91,0x3d, 0x92,0x39, 0,166, 0x81,
0x91,0x49, 0,166, 0x81, 0x82, 0x91,0x4e, 0x92,0x38, 0,166, 0x80, 0x82, 0x90,0x51, 0x92,0x39, 0,166, 0x80,
0x82, 0x90,0x50, 0x92,0x3b, 0,166, 0x81, 0x91,0x4b, 0,166, 0x81, 0x82, 0x91,0x4c, 0x92,0x39, 0,166, 0x80,
0x82, 0x90,0x50, 0x92,0x38, 0,166, 0x80, 0x82, 0x90,0x4e, 0x92,0x39, 0,166, 0x81, 0x91,0x49, 0,166, 0x81, };
// score contains 3203 bytes, , 3 tone generators used.
playtune pt;
void setup() {
// enable 3 nano timers notes output on digital pins 10, 11, , 12.
// pins should wired 500-ohm resistors, other ends of should connected together
// 1 terminal of 8-ohm speaker. other terminal of speaker should connected ground.
// no other hardware needed!
pt.tune_initchan (10);
pt.tune_initchan (11);
pt.tune_initchan (12);
}
void loop () {
pt.tune_playscore (score); /* start playing */
while (pt.tune_playing) ; /* wait here until playing stops */
}
c:\users\preston\desktop\arduino-1.0\libraries\playtune/playtune.h:37:22: error: wprogram.h: no such file or directory
http://arduino.cc/forum/index.php/topic,97455.0.html
paragraph 2.
Arduino Forum > Using Arduino > Programming Questions > Compiling Error with "Playtune" Code
arduino
Comments
Post a Comment