getting FM

This commit is contained in:
Bill Verplank 2013-05-21 09:16:07 -07:00
parent 646cd74442
commit c147175bb2
3 changed files with 8 additions and 3 deletions

View File

@ -28,7 +28,7 @@ void loop(){
Music.setFrequency(frequency);
xB = analogRead(A0);
volume = -float(xB)/256.; // B position
volume = -float(xB)/1024.; // B position
volume = pow(10,volume);
Music.setGain(volume);

View File

@ -1,8 +1,13 @@
//FM synthes of a sort
<<<<<<< HEAD:software/lib/MMM/examples/Motion/_8_FM/_8_FM.ino
//hang on! (it's unstable and wants to limit cycle)
=======
//hang on! it's unstable and wants to limit cycle
#define BIT_DEPTH 8 // gives us 16 Waveforms
>>>>>>> getting FM:software/apps/Modeling/FM/FM.ino
#include <Music.h>
#define BIT_DEPTH 8 // gives us 16 Waveforms
#include <Motor.h>

View File

@ -11,7 +11,7 @@
// You still need to call Music.init() in the setup() function below.
#include <Music.h>
int delayTime = 1000;
int delayTime = 2000;
int cnt = 0;
long timeNow;
long lastTime = 0;