corrected some warning messages

and read me...
master
Gaudi 8 years ago
parent d1b5051f5e
commit 91ab9ad85b
  1. 6
      Open_Theremin_V3/EEPROM.h
  2. 6
      Open_Theremin_V3/application.cpp
  3. 4
      Open_Theremin_V3/application.h
  4. 4
      Open_Theremin_V3/theremin_sintable.c
  5. 4
      Open_Theremin_V3/theremin_sintable2.c
  6. 4
      Open_Theremin_V3/theremin_sintable3.c
  7. 4
      Open_Theremin_V3/theremin_sintable4.c
  8. 4
      Open_Theremin_V3/theremin_sintable5.c
  9. 4
      Open_Theremin_V3/theremin_sintable6.c
  10. 4
      Open_Theremin_V3/theremin_sintable7.c
  11. 4
      Open_Theremin_V3/theremin_sintable8.c
  12. 4
      Open_Theremin_V3/timer.h
  13. 6
      README.md
  14. 24
      README.md~

@ -40,7 +40,7 @@ struct EERef{
//Access/read members.
uint8_t operator*() const { return eeprom_read_byte( (uint8_t*) index ); }
operator const uint8_t() const { return **this; }
operator uint8_t() const { return **this; }
//Assignment/write members.
EERef &operator=( const EERef &ref ) { return *this = *ref; }
@ -89,7 +89,7 @@ struct EEPtr{
EEPtr( const int index )
: index( index ) {}
operator const int() const { return index; }
operator int() const { return index; }
EEPtr &operator=( int in ) { return index = in, *this; }
//Iterator functionality.
@ -143,4 +143,4 @@ struct EEPROMClass{
};
static EEPROMClass EEPROM;
#endif
#endif

@ -159,7 +159,6 @@ AppMode Application::nextMode() {
void Application::loop() {
int32_t pitch_v = 0, pitch_l = 0; // Last value of pitch (for filtering)
int32_t vol_v = 0, vol_l = 0; // Last value of volume (for filtering)
int32_t pitch_f = 0; // pitch in frequency (for filtering)
uint16_t volumePotValue = 0;
uint16_t pitchPotValue = 0;
@ -231,7 +230,7 @@ void Application::loop() {
OCR0A = pitch & 0xff;
#endif
#if L_ENABLED
#if SERIAL_ENABLED
if (timerExpired(TICKS_100_MILLIS)) {
resetTimer();
Serial.write(pitch & 0xff); // Send char on serial (if used)
@ -245,7 +244,6 @@ void Application::loop() {
pitch_v=pitch_l+((pitch_v-pitch_l)>>2);
pitch_l=pitch_v;
pitch_f=FREQ_FACTOR/pitch_v;
//HW_LED2_ON;
@ -517,4 +515,4 @@ void Application::delay_NOP(unsigned long time) {

@ -55,8 +55,8 @@ class Application {
unsigned long GetQMeasurement();
static const float HZ_ADDVAL_FACTOR = 2.09785;
static const float MIDDLE_C = 261.6;
const float HZ_ADDVAL_FACTOR = 2.09785;
const float MIDDLE_C = 261.6;
void playNote(float hz, uint16_t milliseconds, uint8_t volume);
void hzToAddVal(float hz);

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table[1024] PROGMEM = {\
const int16_t sine_table[1024] PROGMEM = {\
273,\
288,\
302,\
@ -1029,4 +1029,4 @@ const int16_t sine_table[1024] PROGMEM = {\
259,\
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table2[1024] PROGMEM = {\
const int16_t sine_table2[1024] PROGMEM = {\
0,
2,
3,
@ -1029,4 +1029,4 @@ const int16_t sine_table2[1024] PROGMEM = {\
-3
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table3[1024] PROGMEM = {\
const int16_t sine_table3[1024] PROGMEM = {\
9,
13,
15,
@ -1029,4 +1029,4 @@ const int16_t sine_table3[1024] PROGMEM = {\
286,
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table4[1024] PROGMEM = {\
const int16_t sine_table4[1024] PROGMEM = {\
0,
3,
@ -1030,4 +1030,4 @@ const int16_t sine_table4[1024] PROGMEM = {\
0
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table5[1024] PROGMEM = {\
const int16_t sine_table5[1024] PROGMEM = {\
0,
76,
83,
@ -1029,4 +1029,4 @@ const int16_t sine_table5[1024] PROGMEM = {\
0
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table6[1024] PROGMEM = {\
const int16_t sine_table6[1024] PROGMEM = {\
0,
5,
10,
@ -1029,4 +1029,4 @@ const int16_t sine_table6[1024] PROGMEM = {\
-3
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table7[1024] PROGMEM = {\
const int16_t sine_table7[1024] PROGMEM = {\
11,
42,
47,
@ -1030,4 +1030,4 @@ const int16_t sine_table7[1024] PROGMEM = {\
};

@ -2,7 +2,7 @@
#include <avr/pgmspace.h>
const int16_t sine_table8[1024] PROGMEM = {\
const int16_t sine_table8[1024] PROGMEM = {\
11,
42,
47,
@ -1029,4 +1029,4 @@ const int16_t sine_table8[1024] PROGMEM = {\
0
};

@ -34,6 +34,8 @@ inline bool timerUnexpiredMillis(uint16_t milliseconds) {
void ticktimer (uint16_t ticks);
void millitimer (uint16_t milliseconds);
#if SERIAL_ENABLED
const uint16_t TICKS_100_MILLIS = millisToTicks(100);
#endif //SERIAL_ENABLED
#endif // _TIMER_H
#endif // _TIMER_H

@ -20,3 +20,9 @@ http://www.gaudi.ch/OpenTheremin/
3. Selecting the correct usb port on Tools -> Serial Port
4. Select the correct arduino board from Tools -> Board
5. Upload the code by clicking on the upload button.
### LICENSE
Written by Urs Gaudenz, GaudiLabs, 2016
GNU license, check LICENSE file for more information
All text above must be included in any redistribution

@ -1,2 +1,22 @@
# OpenTheremin_V3
Open Source Theremin Instrument, Arudino Codes
## Open.Theremin V3 control software
Arduino UNO Software for the Open.Theremin
### Don't click on the files!
Click on the "Download ZIP" Button to the right or [Click here](https://github.com/GaudiLabs/OpenTheremin_V3/archive/master.zip)
Then unpack the archive.
### Open Source Theremin based on the Arduino Platform
Open.Theremin is an arduino shield to build the legendary music instrument invented by Leon Theremin back in 1920. The theremin is played with two antennas, one to control the pitch and one for volume. The electronic shield with two ports to connect those antennas comprises two heterodyne oscillators to measure the distance of the hand to the antenna when playing the instrument. The resulting signal is fed into the arduino. After linearization and filtering the arduino generates the instruments sound that is then played through a high quality digital analog audio converter on the board. The characteristics of the sound can be determined by a wave table on the arduino.
For more info on the open source project and on availability of ready made shield see:
http://www.gaudi.ch/OpenTheremin/
### Installation
1. Open up the Arduino IDE
2. Open the File "Open_Theremin_V3.ino"
3. Selecting the correct usb port on Tools -> Serial Port
4. Select the correct arduino board from Tools -> Board
5. Upload the code by clicking on the upload button.

Loading…
Cancel
Save