2004/C5/練習問題

#define si  494
#define Do  554
#define Re  587
#define Mi  659
#define Fa  740
#define So 784
#define Ra  880
#define Si  988
#define DO  1109
#define RE  1175
#define j 20
#define h j*2
#define hf j*2+j
#define s j*4
#define sf j*4+h
#define S  s/3
#define n j*8
#define nf j*8+s
#define z j*16 

task play_music()
{
   while (true)
   {Wait (s);
    PlayTone (Si, h);Wait (h);
    PlayTone (Ra, hf);Wait (s);
    PlayTone (Ra, h);Wait (h);
    PlayTone (RE, s);Wait (s);
    PlayTone (DO, h);Wait (h);
    PlayTone (Si, h);Wait (h);
    PlayTone (Ra, h);Wait (h);

    PlayTone (Fa, h);Wait (h);
    PlayTone (Ra, s);Wait (sf);
    PlayTone (Ra, j);Wait (j);
    PlayTone (Si, j);Wait (j);
    PlayTone (DO, j);Wait (j);
    PlayTone (RE, h);Wait (h);
    PlayTone (Ra, h);Wait (h);
    PlayTone (Fa, j);Wait (j);
   
    PlayTone (So, h);Wait (h);
    PlayTone (Fa, h);Wait (h);
    PlayTone (So, hf);Wait (hf);
    PlayTone (Fa, j);Wait (j);
    PlayTone (So, j);Wait (j);
    PlayTone (Ra, j);Wait (j);
    PlayTone (Si, hf);Wait (hf);
    PlayTone (Re, j);Wait (j);
    PlayTone (Ra, j);Wait (j);
    PlayTone (So, j);Wait (j);
    
    PlayTone (Fa, hf);Wait (hf);
    PlayTone (So, hf);Wait (hf);
    PlayTone (831, hf);Wait (hf);
    PlayTone (Ra, h);Wait (h);
    PlayTone (Re, j);Wait (h);
    PlayTone (Re, h);Wait (h);
    PlayTone (Si, h);Wait (h);
    
    PlayTone (Ra, hf);Wait (s);
    PlayTone (Ra, h);Wait (h);
    PlayTone (RE, s);Wait (s);
    PlayTone (DO, h);Wait (h);
    PlayTone (Si, h);Wait (h);
    PlayTone (Ra, h);Wait (h);
    
    PlayTone (Fa, h);Wait (h);
    PlayTone (Ra, s);Wait (sf);
    PlayTone (Ra, j);Wait (j);
    PlayTone (Si, j);Wait (j);
    PlayTone (DO, j);Wait (j);
    PlayTone (RE, h);Wait (h);
    PlayTone (Ra, h);Wait (h);
    PlayTone (Fa, j);Wait (j);
    
    PlayTone (Ra, S);Wait (S);
    PlayTone (So, S);Wait (S);
    PlayTone (Fa, S);Wait (S);
    PlayTone (Re, n);Wait (n);
                     Wait (hf);
    PlayTone (si, j);Wait (j);
    PlayTone (Re, j);Wait (j);
    PlayTone (Si, h);Wait (h);
    PlayTone (Ra, h);Wait (h);
    PlayTone (Si, h);Wait (h);
    PlayTone (Re, z+n);Wait (z);
    
    PlayTone (si, j);Wait (j);
    PlayTone (Re, j);Wait (j);
    PlayTone (So, j);Wait (j);
    PlayTone (Fa, h);Wait (h);
    PlayTone (Mi, j);Wait (j);
    PlayTone (Re, h);Wait (h);
    PlayTone (Mi, h);Wait (h);
    
    PlayTone (Re, nf);Wait (nf);
    }
  }
task main ()
{
     start play_music ;
 }

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2005-02-01 (火) 16:29:44 (5316d)