Exemple #1
0
        private App()
        {
            var waveOut = new DirectSoundOut(60);

            var osc = new Oscillator(44100, Math.Sin);

            var controller = LeapController.GetController();
            var listener = controller.Listener;
            listener.Frames.Select(f => (f.Hands.Count > 0) ? f.Hands[0].PalmPosition.y : 0.0).Subscribe(osc.Frequency);

            waveOut.Init(new StreamProvider(osc));
            waveOut.Play();
        }
Exemple #2
0
 public StreamProvider(Oscillator osc)
     : base(44100, 1)
 {
     this.osc = osc;
 }