How Do You Program Isochronic Tones in C#?

  • Thread starter btb4198
  • Start date
In summary: Rate) sample = 0; counter =0; } return sampleCount; } It does not sound right. I think you need to float things within the sine wave.
  • #1
btb4198
572
10
how do i make an isochronic tone?

is it like this?
Code:
 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;
            }

?
 
Engineering news on Phys.org
  • #2
I don't think so.

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

Code:
   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
 
  • #4
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
It does not sound like an Isochronic tone...
is my function wrong?
 
  • #7
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
lol it is safe... I made it lol...
and this is how I am going it :

Code:
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
 
  • #10
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.
 
  • #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
 
  • #12
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
 
  • #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 ?
 
  • #14
btb4198 said:
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 ?

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
 
  • #15
btb4198 said:
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 ...

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.
 
  • #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 ?
 

1. What is an isochronic tone?

An isochronic tone is a single tone that is turned on and off at regular intervals, creating a rhythmic pulsation. It is often used for brainwave entrainment, meditation, and relaxation.

2. How do you make an isochronic tone?

To make an isochronic tone, you need a tone generator software or app. Set the tone to a specific frequency and adjust the duration and interval of the on and off cycles. You can also add effects like binaural beats for added benefits.

3. What frequencies should I use for my isochronic tone?

The frequency of an isochronic tone depends on its intended purpose. For relaxation and meditation, a frequency between 4-7 Hz (theta waves) is recommended. For focus and concentration, a frequency between 13-40 Hz (gamma waves) is more effective.

4. Can anyone use an isochronic tone?

Yes, anyone can use an isochronic tone. However, it is not recommended for people with epilepsy or those wearing pacemakers. It is always best to consult with a healthcare professional before using any brainwave entrainment techniques.

5. Are there any scientific studies on the effectiveness of isochronic tones?

Yes, there have been several studies on the effectiveness of isochronic tones for various purposes, such as reducing anxiety, improving mood, and enhancing cognitive performance. However, more research is needed to fully understand the potential benefits and limitations of isochronic tones.

Similar threads

  • Electrical Engineering
Replies
1
Views
2K
  • Programming and Computer Science
Replies
21
Views
1K
  • Programming and Computer Science
Replies
16
Views
8K
  • Electrical Engineering
2
Replies
42
Views
3K
Replies
7
Views
3K
  • Electrical Engineering
Replies
4
Views
907
  • Electrical Engineering
Replies
28
Views
4K
Replies
18
Views
2K
  • Electrical Engineering
Replies
4
Views
2K
  • Programming and Computer Science
Replies
16
Views
3K
Back
Top