Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 28 Aug 2014, 21:20
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Sbagen Binaural beats for Linux!
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [24 Posts]   Goto page: Previous 1, 2
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 28 Sep 2011, 05:38    Post subject:  

Frying your brain with relaxing binaurality is also possible in Slacko Beta 5

Code:
#! /bin/bash
# Psbagen (c) GNU GENERAL PUBLIC LICENSE
# Puppy Slacko version GUI created by Lobster Sept 28 2011
# added defaulttexteditor for source dode,
#
# http://uazu.net/sbagen/

##############
# The theory behind binaural beats
# is that if you apply slightly different frequency
# sine waves to each ear, a beating affect is created
# in the brain itself, due to the brain's internal wiring.
# If, in the presence of these tones, you relax and let your mind go,
# your mind will naturally synchronize with the beat frequency.
# In this way it is possible to tune the frequency of your brain waves
# to particular frequencies that you have selected,
# using of the four bands: Delta: deep sleep,
# Theta: dreaming and intuitive stuff, Alpha: awake,
# focussed inside, and Beta: awake, focussed outside.
############## 

export Psbagen='
<window title="Psbagen v1.1" window-position="1">
<vbox>
 <menubar>
  <menu>
   <menuitem>
         <label>~ Close Prev sound</label>
         <action>killall -KILL sbagen &</action>
    </menuitem>
    <menuitem>
         <label>Alpha Relaxation</label>
         <action>./sbagen basics/ts-brain-alpha.sbg &</action>
    </menuitem>
      <menuitem>
         <label>Beta Concentration</label>
         <action>./sbagen basics/ts-brain-beta.sbg &</action>
    </menuitem>
     <menuitem>
         <label>Delta Sleep</label>
         <action>./sbagen basics/ts-brain-delta.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Theta Meditation</label>
         <action>./sbagen basics/ts-brain-theta.sbg &</action>
    </menuitem>
    <menuitem stock="gtk-quit">
         <action>echo You selected the quit menu item</action>
         <action type="exit">exit by menu</action>
    </menuitem>
      <label>Basic</label>
  </menu>
  <menu>
   <menuitem>
         <label>~ Close Prev sound</label>
         <action>killall -KILL sbagen &</action>
    </menuitem> 
    <menuitem>
         <label>Schumann</label>
         <action>./sbagen -E -F 6000 basics/ch-schumann-cycle.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Inspiration</label>
         <action>./sbagen -E -F 6000 basics/ch-inspiration.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Awakened Mind</label>
         <action>./sbagen -E -F 6000 basics/ch-awakened-mind.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Purring</label>
         <action>./sbagen -E -F 6000 basics/ts-purring-cat.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Chakras</label>
         <action>./sbagen -E -F 6000 basics/prog-chakras-1.sbg &</action>
    </menuitem>
    <menuitem>
         <label>OBE</label>
         <action>./sbagen -E -F 6000 basics/ch-obe.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Aspirin</label>
         <action>./sbagen -E -F 6000 basics/ch-aspirin.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Runners High</label>
         <action>./sbagen -E -F 6000 basics/ch-runners-high.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Bells</label>
         <action>./sbagen -E -F 6000 basics/bells-3.sbg &</action>
    </menuitem>
        <menuitem>
         <label>Calm</label>
         <action>./sbagen -E -F 6000 basics/ts-calm.sbg &</action>
    </menuitem>
    <label>Sequences</label>
  </menu>
  <menu>
     <menuitem>
         <label>~ Close Prev sound</label>
         <action>killall -KILL sbagen &</action>
    </menuitem> 
     <menuitem>
         <label>Recharge</label>
         <action>./sbagen -E -F 6000 basics/ts-recharge.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Concentration</label>
         <action>./sbagen -E -F 6000 basics/ts1-concentration.sbg &</action>
    </menuitem>
      <menuitem>
         <label>Focus</label>
         <action>./sbagen -E -F 6000 basics/focus-27-b.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Wave</label>
         <action>./sbagen -E -F 6000 basics/wave-01.sbg &</action>
    </menuitem>
    <menuitem>
         <label>Einstein</label>
         <action>./sbagen -E -F 6000 basics/ch-einstein.sbg &</action>
    </menuitem> 
    <menuitem>
         <label>Caffiene</label>
         <action>./sbagen -E -F 6000 basics/ch-sonic-caffeine.sbg &</action>
    </menuitem> 
       <label>Focus</label>
  </menu>
  <menu>
    <menuitem>
         <label>Sbagen Website</label>
         <action>defaultbrowser http://uazu.net/sbagen/ &</action>
    </menuitem>
    <menuitem>
         <label>Binaural Beats Wikipedia</label>
         <action>defaultbrowser http://en.wikipedia.org/wiki/Binaural_beats &</action>
    </menuitem>
    <menuitem>
         <label>Compiling info used</label>
         <action>defaultbrowser http://www.khattam.info/howto-installing-sbagen-in-ubuntu-10-04-lucid-lynx-and-10-10-maverick-meerkat-2010-06-09.html &</action>
    </menuitem>
    <menuitem>
         <label>Audio Highs</label>
         <action>defaultbrowser http://gethighnow.com/audio-highs/ &</action>
    </menuitem>
    <menuitem>
         <label>Ambient Radio</label>
         <action>defaultbrowser http://www.internet-radio.org.uk/stations/ambient/ &</action>
    </menuitem>
    <menuitem>
         <label>Nature sounds</label>
         <action>defaultbrowser http://naturesoundsfor.me/ &</action>
    </menuitem>
    <menuitem>
         <action>defaulttexteditor psbagen1.1 &</action>
         <label>Edit source code</label>
         <action>exit</action>
    </menuitem>
  <label>Help</label>
  </menu>   
  </menubar>
 <frame>
       <pixmap>
         <input file>logo.jpg</input>
       </pixmap>
       <text><label>Puppy Sbagen</label></text>
       <text><label>Binaural Beat Generator</label></text>
       <text><label>Best effects = use headphones</label></text>
 </frame>
   <hbox>
        <button cancel></button>
   </hbox>
</vbox>
</window>'

gtkdialog3 --program Psbagen
unset Psbagen

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
burek

Joined: 12 May 2012
Posts: 3

PostPosted: Sat 12 May 2012, 08:04    Post subject:  

Here is a free database of sbg files (for SBaGen) with audio preview: http://sbagendb.gusari.org/.
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 567
Location: Gatton, Queensland

PostPosted: Sat 26 May 2012, 23:22    Post subject:  

duck1dong, Lobster, 666philb -
this is bloody brilliant! I've been using sbagen for a few weeks in XP (to cool my nerves whenever in that environment) and Lobster - your GUI is marvelous! I understand that a Windows GUI is work-in-progress for author Jim Peters, and I deal with console windows when running sbagen there. The additional features including 'convert *.sbg to 30min, 60min *.wav' are great in windoze - I'm forced to use it as I have a e740 PocketPC (winCE 2002), as sbagen ports only exist for winCE2003 onwards. Not needed here in puppydom I guess with available audio mixers and recorders, but I haven't explored that opportunity yet.

The console approach has spoiled me a little however - I can see the sbg file technical notes (contributors' names, rationale for design, playback data etc) that the Lobster GUI shields me from. Is there a possibility for a "shields down" option so those notes can be viewed during playback? Another "feature" of the consoles is that multiple *.sbg files can be played simultaneously (there are some really naff combos you can get with various tonal sequences when overlaying different files, as Jim Peters notes with his 'purring cat' discovery) - but I don't yet see how that can happen here. You've very kindly provided the script for your GUI, Lobster - I guess if I pulled my fingers out (of my ears) I could write it myself...

Using this now as I write in FATSlacko5.3.3 - no further dependencies required after downloading the pet here http://www.murga-linux.com/puppy/viewtopic.php?p=496169#496169. Brain happily sizzling now,
Cheers!

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 27 May 2012, 04:30    Post subject:  

Sorry, me being so stressed out that I fail to read every post.

Am I supposed to use Headphones and that it works less effective
over the speakers?

Thanks for that link.

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
burek

Joined: 12 May 2012
Posts: 3

PostPosted: Sun 27 May 2012, 08:27    Post subject:  

nooby, yes, you neead headphones, because pulsing beats form in your brain, not in your ears, like with monaural beats. If you understand how BA beats work, it will be obvious why do you nead headphones:



Both your ears get the different frequency, so those freqs "mix" in your brain, producing pulsing beats. And if you play it on your speakers, both freqs would just interfere already with each others and that "mixed" audio will get into both your ears, somehow distorted because of the different distances between each of your ears and each speaker.

P.S.
If you compress your audio, avoid using mp3, because it will distort your audio really noticeably. I've tested the results using aac+ (he-aac v2) audio codec and concluded that 320 kbps mp3 has more artifacts (distortions) than 48 kbps aac+. Just to be sure, I'm using 64 kbps aac+ (that is still 5 times less than mp3 with far better quality).

Quote from: http://en.wikipedia.org/wiki/High-Efficiency_Advanced_Audio_Coding
Quote:
Scientific testing by the European Broadcasting Union has indicated that HE-AAC at 48 kbit/s was ranked as "Excellent" quality using the MUSHRA scale.[8] MP3 in the same testing received a score less than half that of HE-AAC and was ranked "Poor" using the MUSHRA scale. Data from this testing also indicated that some individuals confused 48 kbit/s encoded material with an uncompressed original.


Shortly, aac+ is a great audio codec and it gets more and more popular, effectively replacing an old mp3 codec.

You can try with NeroAACEnc or you can use ffmpeg with libaacplus lib and pipe it to the output of sbagen, to produce really high quality audio.

Code:
sbagen -WO <sbagen params> | ffmpeg -y -f wav -i - -acodec libaacplus -ab 64k -ac 2 -ar 44100 out.aac
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 567
Location: Gatton, Queensland

PostPosted: Sun 27 May 2012, 08:52    Post subject:  

Thanks for the code example, burek - and welcome to the kennels Smile
So I guess that your example might be included in the GUI script Lobster has provided, perhaps? Would the duration of the generated wave file be stipulated by the user in the "<sbagen params>" part of the code, or clipped manually by the user with another program, like Audacity?

Great tip too on replacing outmoded MP3 with aac+ - do I understand correctly that 64kbps aac+ files are compressed to 20% to those of similar MP3's, but with superior quality? That's impressive indeed!

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Sun 27 May 2012, 08:53    Post subject:  

Yes that seems reasonable and my neighbors will be happy too
if I change to headphones of good quality. Smile

As it is now the whole building shake rattle and roll to that beat Groowy

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
burek

Joined: 12 May 2012
Posts: 3

PostPosted: Sun 27 May 2012, 09:23    Post subject:  

Puppyt, there are several ways to limit the duration of the output file, without the need for an external app like Audacity:
- pressing [q] or [ctrl+c] on the keyboard to stop ffmpeg (it will correctly finish writting the output file)
- specifying -t <seconds> in ffmpeg's options, like this:
Code:
sbagen -WO <sbagen params> | ffmpeg -y -f wav -i - -acodec libaacplus -ab 64k -ac 2 -ar 44100 -t 300 out.aac

- specifying the duration with SBaGen options, either on the command line (for example with t<duration>) or within an .sbg file

Personally, I never used GUI scripts, I like to control things using cmd line, knowing exactly what I did and what is to be an expected output Smile

And yes, aac+ is of far better quality than mp3, for the same bitrate selected. If you search with Google for online radio stations, you'll notice that 90% of them are streaming their audio using aac+ at 32 kbps which is 10 times smaller bandwidth, comparing to the mp3 @ 320 kbps with even worse audio quality perceived than aac+.

64 kbps aac+ is probably the highest quality you'll need for your audio files (I've reencoded all my mp3s to 32kbps aac+ and now I have 10 times more space on my hdd with the same songs of the same quality) Smile
Back to top
View user's profile Send private message 
Puppyt

Joined: 09 May 2008
Posts: 567
Location: Gatton, Queensland

PostPosted: Sun 27 May 2012, 09:32    Post subject:  

Thanks burek - that's a huge help Smile
_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 2 [24 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0987s ][ Queries: 13 (0.0044s) ][ GZIP on ]