getting FM
This commit is contained in:
parent
646cd74442
commit
c147175bb2
@ -28,7 +28,7 @@ void loop(){
|
|||||||
Music.setFrequency(frequency);
|
Music.setFrequency(frequency);
|
||||||
|
|
||||||
xB = analogRead(A0);
|
xB = analogRead(A0);
|
||||||
volume = -float(xB)/256.; // B position
|
volume = -float(xB)/1024.; // B position
|
||||||
volume = pow(10,volume);
|
volume = pow(10,volume);
|
||||||
Music.setGain(volume);
|
Music.setGain(volume);
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
//FM synthes of a sort
|
//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)
|
||||||
|
=======
|
||||||
|
//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>
|
#include <Music.h>
|
||||||
#define BIT_DEPTH 8 // gives us 16 Waveforms
|
|
||||||
|
|
||||||
#include <Motor.h>
|
#include <Motor.h>
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
// You still need to call Music.init() in the setup() function below.
|
// You still need to call Music.init() in the setup() function below.
|
||||||
#include <Music.h>
|
#include <Music.h>
|
||||||
|
|
||||||
int delayTime = 1000;
|
int delayTime = 2000;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
long timeNow;
|
long timeNow;
|
||||||
long lastTime = 0;
|
long lastTime = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user