Commit 9f9a62fd authored by simon's avatar simon
Browse files

refact update

parent 181f557e
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -44,10 +44,10 @@ func main() {
		case <-events[3]:
			octave--
		case h := <-events[4]:
			volume = h.(HatAngleEvent).Angle/6.28 + .5
			volume = h.(AngleEvent).Angle/6.28 + .5
		case h := <-events[5]:
			//f = time.Duration(100*math.Pow(2, float64(h.(HatAngleEvent).Angle)/6.28)) * time.Second / 44000
			note = int(h.(HatAngleEvent).Angle*6 / math.Pi)+6
			note = int(h.(AngleEvent).Angle*6 / math.Pi)+6
			play(NewSound(NewTone(Period(octave,note), float64(volume)), time.Second/3))
		}
	}
@@ -69,14 +69,3 @@ func play(s Sound) {
} 


/*  Hal3 Sat 28 Jan 17:57:57 GMT 2017 go version go1.6.2 linux/amd64
Sat 28 Jan 17:57:59 GMT 2017
*/
/*  Hal3 Thu 6 Apr 21:58:52 BST 2017 go version go1.6.2 linux/amd64
Thu 6 Apr 21:59:04 BST 2017
*/
/*  Hal3 Thu 6 Apr 21:59:14 BST 2017 go version go1.6.2 linux/amd64
Thu 6 Apr 22:00:57 BST 2017
*/