using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public class Program
{
public static void Music_001()
{
int frequency = 20;
int duration = 500;
////////////////////////////////////////////
frequency = 400;
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (1d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (2d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (3d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (4d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (5d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (6d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (2d + (0d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (2d + (1d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
}
public static void Music_002()
{
int base_freq = 400;
double octave = 1d;
double x7om = 0d;
double x14om = 0d;
double base_freq_step = 400d * (1d / 14d);
int frequency;
int duration;
for (base_freq = 400; base_freq <= 800; base_freq = (int)(base_freq + base_freq_step))
{
for (octave = 1d; octave <= 6d; octave += 1d)
{
for (x7om = 0d; x7om <= 6d; x7om += 1d)
{
for (x14om = 0d; x14om <= 1d; x14om += 1d)
{
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 150;
Console.Beep(frequency, duration);
}
}
}
}
}
public static void Music_003()
{
int base_freq = 400;
double octave = 1d;
double x7om = 0d;
double x14om = 0d;
double base_freq_step = 400d * (1d / 14d);
int frequency;
int duration;
//for (base_freq = 400; base_freq <= 800; base_freq = (int)(base_freq + base_freq_step))
//{
// for (octave = 1d; octave <= 6d; octave += 1d)
// {
// for (x7om = 0d; x7om <= 6d; x7om += 1d)
// {
// for (x14om = 0d; x14om <= 13d; x14om += 1d)
// {
// frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
// duration = 150;
// Console.Beep(frequency, duration);
// }
// }
// }
//}
////////////////////////////////////////////////////
base_freq = 400;
octave = +1d;
x7om = +5d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
base_freq = 400;
octave = +1d;
x7om = +5d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
////////////////////////////////////////////////////
base_freq = 400;
octave = +1d;
x7om = +6d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
////////////////////////////////////////////////////
base_freq = 400;
octave = +2d;
x7om = +0d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
}
public static void Play_Note(
int base_freq,
double octave,
double x7om,
double x14om,
int duration
)
{
////////////////////////////////////////////////////
int frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
}
public static void Music_004()
{
// public static void Play_Note( int base_freq , double octave , double x7om , double x14om , int duration )
int bf01 = 480;
int bf_Silence = 37;
Play_Note(bf01, +1d, +5d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +5d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +4d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +3d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +6d, +1d, 1500);
Play_Note(bf_Silence, +1d, +0d, +0d, 10);
Play_Note(700, +1d, +5d, +1d, 1500);
Play_Note(bf01, +1d, +5d, +0d, 1500);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +4d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 10);
}
static void Main(string[] args)
{
int frequency = 20;
int duration;
double theta2;
int radius_max;
int radius;
int frequency_min;
int frequency_max;
//Music_001();
//Music_002();
//Music_003();
Music_004();
Console.ReadLine();
}
}
}
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public class Program
{
public static void Music_001()
{
int frequency = 20;
int duration = 500;
////////////////////////////////////////////
frequency = 400;
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (1d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (2d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (3d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (4d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (5d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (1d + (6d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (2d + (0d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
////////////////////////////////////////////
frequency = (int)(400 * (2d + (1d / 7d)));
duration = 500;
Console.Beep(frequency, duration);
////////////////////////////////////////////
}
public static void Music_002()
{
int base_freq = 400;
double octave = 1d;
double x7om = 0d;
double x14om = 0d;
double base_freq_step = 400d * (1d / 14d);
int frequency;
int duration;
for (base_freq = 400; base_freq <= 800; base_freq = (int)(base_freq + base_freq_step))
{
for (octave = 1d; octave <= 6d; octave += 1d)
{
for (x7om = 0d; x7om <= 6d; x7om += 1d)
{
for (x14om = 0d; x14om <= 1d; x14om += 1d)
{
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 150;
Console.Beep(frequency, duration);
}
}
}
}
}
public static void Music_003()
{
int base_freq = 400;
double octave = 1d;
double x7om = 0d;
double x14om = 0d;
double base_freq_step = 400d * (1d / 14d);
int frequency;
int duration;
//for (base_freq = 400; base_freq <= 800; base_freq = (int)(base_freq + base_freq_step))
//{
// for (octave = 1d; octave <= 6d; octave += 1d)
// {
// for (x7om = 0d; x7om <= 6d; x7om += 1d)
// {
// for (x14om = 0d; x14om <= 13d; x14om += 1d)
// {
// frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
// duration = 150;
// Console.Beep(frequency, duration);
// }
// }
// }
//}
////////////////////////////////////////////////////
base_freq = 400;
octave = +1d;
x7om = +5d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
base_freq = 400;
octave = +1d;
x7om = +5d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
////////////////////////////////////////////////////
base_freq = 400;
octave = +1d;
x7om = +6d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
////////////////////////////////////////////////////
base_freq = 400;
octave = +2d;
x7om = +0d;
x14om = +0d;
frequency = (int)(base_freq * (octave + (x7om / 7d) + (x14om / 14d)));
duration = 750;
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
}
public static void Play_Note(
int base_freq,
double octave,
double x7om,
double x14om,
int duration
)
{
////////////////////////////////////////////////////
Console.Write("\n int frequency = (int)");
Console.Write("\n (");
Console.Write("\n base_freq * (octave + (x7om / 7d) + (x14om / 14d))");
Console.Write("\n ); \n\n");
int frequency = (int)
(
base_freq * (octave + (x7om / 7d) + (x14om / 14d))
);
Console.Write("\n\n\n base_freq = " + base_freq);
Console.Write(" , octave = " + octave);
Console.Write(" , x7om = " + x7om);
Console.Write(" , x14om = " + x14om);
Console.Write("\n\n frequency = " + frequency);
Console.Write(" , duration = " + duration);
Console.Write("\n\n");
Console.Beep(frequency, duration);
////////////////////////////////////////////////////
}
public static void Music_004()
{
// public static void Play_Note( int base_freq , double octave , double x7om , double x14om , int duration )
int bf01 = 670;
int bf_Silence = 37;
Play_Note(bf01, +1d, +5d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +5d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +4d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +3d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +6d, +1d, 1500);
Play_Note(bf_Silence, +1d, +0d, +0d, 10);
Play_Note(bf01, +1d, +6d, +1d, 1500);
Play_Note(bf01, +1d, +5d, +0d, 1500);
Play_Note(bf_Silence, +1d, +0d, +0d, 300);
Play_Note(bf01, +1d, +4d, +0d, 1000);
Play_Note(bf_Silence, +1d, +0d, +0d, 10);
}
public static void Music_005()
{
// public static void Play_Note( int base_freq , double octave , double x7om , double x14om , int duration )
int bf01 = 600;
int bf_Silence = 37;
Play_Note(bf01, +1d, +0d, +0d, 500);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +2d, +0d, 500);
}
public static void Music_006()
{
// public static void Play_Note( int base_freq , double octave , double x7om , double x14om , int duration )
int bf01 = 600;
int bf_Silence = 37;
Play_Note(bf_Silence, +1d, +0d, +0d, 2500);
Play_Note(bf01, +1d, +0d, +0d, 500);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +2d, +0d, 500);
Play_Note(bf_Silence, +1d, +0d, +0d, 500);
Play_Note(bf01, +1d, +3d, +0d, 500);
Play_Note(bf01, +1d, +0d, +0d, 500);
Play_Note(bf_Silence, +1d, +0d, +0d, 250);
Play_Note(bf01, +1d, +2d, +0d, 500);
Play_Note(bf_Silence, +1d, +0d, +0d, 250);
Play_Note(bf01, +1d, +3d, +0d, 500);
Play_Note(bf01, +1d, +0d, +0d, 500);
//Play_Note(bf_Silence, +1d, +0d, +0d, 100);
Play_Note(bf01, +1d, +2d, +0d, 500);
//Play_Note(bf_Silence, +1d, +0d, +0d, 100);
Play_Note(bf01, +1d, +3d, +0d, 500);
Play_Note(bf01, +1d, +3d, +0d, 500);
Play_Note(bf01, +1d, +2d, +0d, 500);
Play_Note(bf01, +1d, +0d, +0d, 500);
Play_Note(bf01, +2d, +0d, +0d, 500);
Play_Note(bf01, +2d, -8d, +0d, 500);
Play_Note(bf01, +1d, +3d, +0d, 500);
Play_Note(bf01, +1d, +3d, +0d, 500);
Play_Note(bf01, +1d, +2d, +0d, 500);
Play_Note(bf01, +1d, +0d, +0d, 500);
// ************************* \\
Play_Note(bf01, +2d, +7d, +0d, 500);
Play_Note(bf01, +2d, +6d, +1d, 500);
Play_Note(bf01, +2d, +6d, +0d, 500);
Play_Note(bf01, +2d, +5d, +1d, 500);
Play_Note(bf01, +2d, +5d, +0d, 500);
Play_Note(bf01, +2d, +4d, +1d, 500);
Play_Note(bf01, +2d, +4d, +0d, 500);
Play_Note(bf01, +2d, +3d, +1d, 500);
Play_Note(bf01, +2d, +3d, +0d, 500);
Play_Note(bf01, +2d, +2d, +1d, 500);
Play_Note(bf01, +2d, +2d, +0d, 500);
Play_Note(bf01, +2d, +1d, +1d, 500);
Play_Note(bf01, +2d, +1d, +0d, 500);
Play_Note(bf01, +2d, +0d, +1d, 500);
Play_Note(bf01, +2d, +0d, +0d, 500);
Play_Note(bf01, +2d, -1d, +1d, 500);
Play_Note(bf01, +2d, -1d, +0d, 500);
Play_Note(bf01, +2d, -2d, +1d, 500);
Play_Note(bf01, +2d, -2d, +0d, 500);
Play_Note(bf01, +2d, -3d, +1d, 500);
Play_Note(bf01, +2d, -3d, +0d, 500);
Play_Note(bf01, +2d, -4d, +1d, 500);
Play_Note(bf01, +2d, -4d, +0d, 500);
Play_Note(bf01, +2d, -5d, +1d, 500);
Play_Note(bf01, +2d, -5d, +0d, 500);
Play_Note(bf01, +2d, -6d, +1d, 500);
Play_Note(bf01, +2d, -6d, +0d, 500);
Play_Note(bf01, +2d, -7d, +1d, 500);
Play_Note(bf01, +2d, -7d, +0d, 500);
Play_Note(bf01, +2d, -8d, +1d, 500);
Play_Note(bf01, +2d, -8d, +0d, 500);
Play_Note(bf01, +2d, -9d, +1d, 500);
Play_Note(bf01, +2d, -9d, +0d, 500);
Play_Note(bf01, +2d, -10d, +1d, 500);
Play_Note(bf01, +2d, -10d, +0d, 500);
Play_Note(bf01, +2d, -11d, +1d, 500);
Play_Note(bf01, +2d, -11d, +0d, 500);
// ************************* \\
}
public static void Music_007()
{
// public static void Play_Note( int base_freq , double octave , double x7om , double x14om , int duration )
int bf01 = 600;
int bf_Silence = 37;
Play_Note(bf_Silence, +1d, +0d, +0d, 2500);
// ************************* \\
double i_max;
i_max = +120d;
double i_min;
i_min = -1d;
int du;
du = 100;
for (double i =i_max; i >= i_min; i -= 1d)
{
Play_Note(bf01, +1d, i, +1d, du);
Play_Note(bf01, +1d, i, +0d, du);
Play_Note(bf_Silence, +1d, 0d, +0d, du);
Play_Note(bf01, +1d, i_max - i, +1d, du);
Play_Note(bf01, +1d, i_max - i, +0d, du);
Play_Note(bf_Silence, +1d, 0d, +0d, du);
}
// ************************* \\
}
static void Main(string[] args)
{
//int frequency = 20;
//int duration;
//double theta2;
//int radius_max;
//int radius;
//int frequency_min;
//int frequency_max;
//Music_001();
//Music_002();
//Music_003();
//Music_004();
//Music_005();
Music_007();
Console.Write("\n\n\n int frequency = (int)");
Console.Write("\n (");
Console.Write("\n base_freq * (octave + (x7om / 7d) + (x14om / 14d))");
Console.Write("\n ); \n\n\n");
Console.ReadLine();
}
}
}