Commit 88c1f94c9a175002e792b726fd1985bdff218793

Authored by eishchuk
1 parent 8a202cc2

Add notes

.Rhistory 0 → 100644
.main.cpp.swp deleted
No preview for this file type
No preview for this file type
FA.WAV 0 → 100644
No preview for this file type
LA.WAV 0 → 100644
No preview for this file type
MI.WAV 0 → 100644
No preview for this file type
RE.WAV 0 → 100644
No preview for this file type
SI.WAV 0 → 100644
No preview for this file type
SOL.WAV 0 → 100644
No preview for this file type
main.cpp
... ... @@ -4,7 +4,7 @@
4 4 #include <math.h>
5 5  
6 6 #define DELAY 5000
7   -#define TOUCH 15000
  7 +#define TOUCH 35000
8 8 #define AMPLITUDE 0.5
9 9  
10 10 int main(int argc, char **argv)
... ... @@ -45,6 +45,11 @@ int main(int argc, char **argv)
45 45  
46 46 WavData note_do;
47 47 note_do.load("COW.WAV");
  48 +
  49 + printf("Frequency : %d\n", note_do.frequency());
  50 +
  51 +
  52 +
48 53 char * data_do = note_do.data();
49 54  
50 55 // TOUCH = durée d'une note
... ... @@ -53,18 +58,37 @@ int main(int argc, char **argv)
53 58  
54 59 // changer le son pour avoir une note approprié
55 60  
56   - int i;
  61 + /*int i;
57 62 for (i = 0; i < size ; i++) {
58 63 data_do[i] = i;
59   - }
  64 + }*/
60 65  
61 66 // assign new data & save
62 67  
63   - note_do.clearData();
64   - note_do.setDatasize(size);
65   - note_do.setData(data_do);
  68 + //note_do.clearData();
  69 + note_do.setDatasize(TOUCH);
  70 + note_do.setFrequency(16744);
  71 + //note_do.setData(data_do);
66 72  
67 73 note_do.save("DO.WAV");
68 74  
  75 + note_do.setFrequency(18794);
  76 + note_do.save("RE.WAV");
  77 +
  78 + note_do.setFrequency(21096);
  79 + note_do.save("MI.WAV");
  80 +
  81 + note_do.setFrequency(22350);
  82 + note_do.save("FA.WAV");
  83 +
  84 + note_do.setFrequency(25087);
  85 + note_do.save("SOL.WAV");
  86 +
  87 + note_do.setFrequency(28160);
  88 + note_do.save("LA.WAV");
  89 +
  90 + note_do.setFrequency(31608);
  91 + note_do.save("SI.WAV");
  92 +
69 93  
70 94 }
... ...
No preview for this file type
No preview for this file type