Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Making an isochronic tone

  1. May 9, 2014 #1
    how do i make an isochronic tone?

    is it like this?
    Code (Text):


     for (int n = 0; n < sampleCount; n++)
            {
                if( counter == Beat)
                {
                  buffer[n + offset] = 0;
                    sample++;
                }
                else
                {
                buffer[n + offset] = (float)(Amplitude * Math.Sqrt((2 * Math.PI * sample * Frequency) / sampleRate));
                sample++;
                if (sample >= sampleRate) sample = 0;
                   
                    counter =0;
                }
     
    ?
     
  2. jcsd
  3. May 9, 2014 #2

    meBigGuy

    User Avatar
    Gold Member

    I don't think so.

    I think you need A*sin(wt) where w=frequency of tone and A = repeating envelope
     
  4. May 9, 2014 #3
    ok I tried that but it still does not sound right :

    Code (Text):

       public override int Read(float[] buffer, int offset, int sampleCount)
        {
            int sampleRate = WaveFormat.SampleRate;
       
            for (int n = 0; n < sampleCount;)
            {
                if( counter == Beat)
                {
                  buffer[n + offset] = 0;
                  buffer[n + offset + 1 ] = 0;
                  buffer[n + offset + 2] = 0;
                  n = n + 3;
                    sample = sample +3;
                }
                else
                {
                buffer[n + offset] = (float)(Amplitude * Math.Sin((2 * Math.PI * sample * Frequency) / sampleRate));
                sample++;
                n++;
                if (sample >= sampleRate) sample = 0;
                   
                    counter =0;
                }
            }
            return sampleCount;
        }
     
    this is what i have now
     
  5. May 9, 2014 #4

    meBigGuy

    User Avatar
    Gold Member

    What is amplitude set to?

    Have you plotted the sine wave?

    How does it sound wrong? It's pretty hard for me to hear it.

    You may need to float things within the sine
     
  6. May 9, 2014 #5
  7. May 9, 2014 #6
    It does not sound like an Isochronic tone...
    is my function wrong?
     
  8. May 10, 2014 #7

    meBigGuy

    User Avatar
    Gold Member

    What frequency sine wave do you want, and what amplitude pattern. What are you actually getting? Seems pretty simple to me. Can't you do a little basic troubleshooting?

    BTW, No way I'm going to run an exe file.
     
  9. May 10, 2014 #8

    Bobbywhy

    User Avatar
    Gold Member

  10. May 10, 2014 #9
    lol it is safe... I made it lol...
    and this is how I am going it :

    Code (Text):


    for (int n = 0; n < sampleCount;n++)
            {
                if( counter == Beat)
                {
                  buffer[n + offset] = 0;
                  sample++;
                  counter = 0;
                }
                else
                {
                buffer[n + offset] = (float)(Amplitude * Math.Sin((2 * Math.PI * sample * Frequency) / sampleRate));
                sample++;
                counter++;
                if (sample >= sampleRate) sample = 0;

     
    sampleRate is 44100
    Frequency changes
    and so does Amplitude
    Beat is the isochronic tone frequency
    from what I read online, when the beat is 0...
    I just do not know if i set it up right in the cool

    also how many 0s should I add at one time...
    right now I am adding a 0 everytime counter = beat which I do not know if that it right ...

    how should I set it up ?
    I did not find an equation for it
     
  11. May 11, 2014 #10

    meBigGuy

    User Avatar
    Gold Member

    If you are getting a modulated tone that electronically behaves as you'd expect, then I can be of no further help. I know nothing about isochronic tones, what paramaters they require, and/or their physiological or pychological effects.
     
  12. May 11, 2014 #11
    does that code look right, base on the beat ? if I have a 10Hx beat, should I add a zero every 100 points? and how many 0s should I add... that is what I really need to know
     
  13. May 11, 2014 #12

    Bobbywhy

    User Avatar
    Gold Member

    Just for our members and visitors here at Physics Forums, here is some information about isochronic tones, how they are generated, and what they are used for.

    “Isochronic tones are regular beats of a single tone used for brainwave entrainment. Similar to monaural beats, the interference pattern that produces the beat is outside the brain so headphones are not required for entrainment to be effective. They differ from monaural beats, which are constant sine wave pulses rather than entirely separate pulses of a single tone.”
    http://en.wikipedia.org/wiki/Isochronic_tones

    “Brainwave entrainment is the practice of entraining one's brainwaves to a desired frequency, by means of a periodic stimulus with corresponding frequency.”
    http://en.wikipedia.org/wiki/Comparison_of_brainwave_entrainment_software

    Bobbywhy
     
  14. May 11, 2014 #13
    Bobbywhy,

    I am setting up my code right for this ? I could not find any online equations for it . how many 0s should I add in for each beat ?
     
  15. May 11, 2014 #14

    Bobbywhy

    User Avatar
    Gold Member

    I cannot answer your question. There may be some help available here:
    http://www.lux-vst.com/plugins/lux-brainwave-entrainment-instrument/

    And, if that brings “no joy”, then you might try using Google and the search terms “isochronic tone generator software”. There are lots of entries to check.

    Bobbywhy
     
  16. May 12, 2014 #15

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

    If samplerate is the number of samples per second, and you want a gap of 0.1 seconds, you need 0.1*samplerate zeros.

    One or two zeros won't do anything much. Try 10,000 or 20,000 and see if that is more like what you want.
     
  17. May 12, 2014 #16
    how do I know when to add the 0s? per the beat ?
    so if I have a 4kh beat, how do i know when to start add the 0 then when to go back the the normal signal ?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Making an isochronic tone
  1. Acoustic tones (Replies: 3)

  2. Tone generator (Replies: 1)

Loading...