www.flickr.com
tres frijoles' photos More of tres frijoles' photos
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script -->
You are here: tearsoffire.org > Projects Web > ElectronicsProjects > BlackfinProjects > BfSbagen r7 - 25 Jun 2007 - 15:42 - ChristopherPepe


Start of topic | Skip to actions

BfSbagen



intro

sbagen is a gtd type program that generates binaural beats to induce various brainwave states. By playing a carrier frequency (let F_right=3000Hz) into your right ear, and a slightly faster or slower tone into your left ear (let F_left=3010Hz) a F_left - F_right (10Hz in this case) frequency brainwave is induced in your head. The brain operates on many different frequencies with the basic idea being that lowering the frequency that your brain is running at can help you concentrate and open you to suggestion (hypnosis, mediatation, sleep...).

Requires

  • blackfin system
  • uClinux with stereo audio support
  • working blackfin-gcc toolchain

you can get the blackfin toolchain from blackfin.uclinux.org, more specifically from here. get the newest stable release and you should be fine. I am using 2006R1 RC4 Toolchain Release (Final)

program

sbagen runs on many platforms from x86 (Windows, linux), OSX, ARM...and now on blackfin (under uClinux). I recompiled sbagen for the blackfin and initial tests look good. The binary isn't linked to libmad or libogg yet but will be. Soon it'll be included in the download from uazu.net and hopefully in the blackfin uClinux source tree.

  • sbagen: sbagen binary for the bf537, no libmad, no libogg

compile

To compile sbagen for the blackfin (no libogg or libmad support here) use the following command in the sbagen-1.4.3 directory.
bfin-uclinux-gcc -DT_LINUX -Wl,-elf2flt -o sbagen sbagen.c -L/opt/uClinux/bfin-uclinux/bfin-uclinux/lib -lm -lpthread

To add sbagen into the uClinux source tree:

  1. untar, and copy the sbagen-1.4.3 directory to ./uClinux-dist/user
  2. cp the below Makefile to ./uClinux-dist/user/sbagen-1.4.3/Makefile
  3. add
    dir_$(CONFIG_USER_SBAGEN)                   += sbagen-1.4.3
    to ./uClinux-dist/user/Makefile
  4. add help info to _./uClinux-dist/config/Configure.help such as
    CONFIG_USER_SBAGEN
      generate binural beats to make you more effiencient and better looking
  5. add sbagen to ./uClinux-dist/config/config.in so it shows in the menu during config:
    bool 'sbagen'                   CONFIG_USER_SBAGEN

Makefile

EXEC = sbagen
OBJS = sbagen.o
CFLAGS += -DT_LINUX
LDLIBS += -lm -lpthread

all: $(EXEC)

$(EXEC): $(OBJS)
        $(CC)  $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS_$@))

romfs:
        $(ROMFSINST) /bin/$(EXEC)

clean:
        -rm -f $(EXEC) *.elf *.gdb *.o

see ./uClinux/Documentation/Adding-User-Apps-HOWTO for more information on adding user apps to the tree

-- ChristopherPepe - 15 Sep 2006

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elseEXT sbagen manage 67.1 K 17 Sep 2006 - 11:50 ChristopherPepe sbagen binary for the bf537
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding tearsoffire.org? Send feedback