comparison org/hearing.org @ 167:9e6a30b8c99a

renamed some functions in eyes.org
author Robert McIntyre <rlm@mit.edu>
date Sat, 04 Feb 2012 04:07:25 -0700
parents e4c2cc79a171
children 94b79c191fc7
comparison
equal deleted inserted replaced
166:e4c2cc79a171 167:9e6a30b8c99a
739 739
740 #+include: "../java/src/com/aurellem/send/AudioSend.java" src java :exports code 740 #+include: "../java/src/com/aurellem/send/AudioSend.java" src java :exports code
741 741
742 * Finally, Ears in clojure! 742 * Finally, Ears in clojure!
743 743
744 Now that the infrastructure is complete (modulo a few patches to 744 Now that the infrastructure is complete the clojure ear abstraction is
745 jMonkeyEngine3 to support accessing this modified version of =OpenAL= 745 simple. Just as there were =SceneProcessors= for vision, there are
746 that are not worth discussing), the clojure ear abstraction is rather
747 simple. Just as there were =SceneProcessors= for vision, there are
748 now =SoundProcessors= for hearing. 746 now =SoundProcessors= for hearing.
749 747
750 #+include "../../jmeCapture/src/com/aurellem/capture/audio/SoundProcessor.java" src java 748 #+include "../../jmeCapture/src/com/aurellem/capture/audio/SoundProcessor.java" src java
751 749
752
753 Ears work the same way as vision.
754
755 (hearing creature) will return [init-functions sensor-functions]. The
756 init functions each take the world and register a SoundProcessor that
757 does foureier transforms on the incommong sound data, making it
758 available to each sensor function.
759 750
760 751
761 #+name: ears 752 #+name: ears
762 #+begin_src clojure 753 #+begin_src clojure
763 (ns cortex.hearing 754 (ns cortex.hearing
864 which when called will return the auditory data from that ear." 855 which when called will return the auditory data from that ear."
865 [#^Node creature] 856 [#^Node creature]
866 (for [ear (ears creature)] 857 (for [ear (ears creature)]
867 (hearing-fn creature ear))) 858 (hearing-fn creature ear)))
868 859
869
870 #+end_src 860 #+end_src
871 861
872 * Example 862 * Example
873 863
874 #+name: test-hearing 864 #+name: test-hearing