Making an isochronic tone

1. May 9, 2014

btb4198

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. May 9, 2014

meBigGuy

I don't think so.

I think you need A*sin(wt) where w=frequency of tone and A = repeating envelope

3. May 9, 2014

btb4198

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

4. May 9, 2014

meBigGuy

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

5. May 9, 2014

6. May 9, 2014

btb4198

It does not sound like an Isochronic tone...
is my function wrong?

7. May 10, 2014

meBigGuy

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.

8. May 10, 2014

Bobbywhy

By The Way, neither am I going to run an EXE file. So, I'll not hear your "isochronic tone".

9. May 10, 2014

btb4198

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

10. May 11, 2014

meBigGuy

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. May 11, 2014

btb4198

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. May 11, 2014

Bobbywhy

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. May 11, 2014

btb4198

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. May 11, 2014

Bobbywhy

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. May 12, 2014

AlephZero

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. May 12, 2014

btb4198

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 ?