\documentclass{jarticle}$B$G$O$J$/!$(B
\documentstyle{jarticle}$B$G;O$^$k$h$&$K=q$+$l$F$$$k$b$N$b$"$k!%$3$l$O!$8E$$%P!<%8%g%s$N(BLaTeX$BMQ$N%3%^%s%I$G!$B?$/$N%I%-%e%a%s%H$O!$$3$N$h$&$K=q$-49$($F$bLdBj$J$$$N$@$,!$(B6/9$B$N2]Bj$N$h$&$K!$(B
\usepackage{graphics}$B$H$$$&%3%^%s%I$r;H$&>l9g$O!$(B
\documentclass{jarticle}$B$NJ}$r;H$&I,MW$,$"$k!%(B
/home08/ktanaka/bin/txt2wav.pl t.txt > t.wav$B$r
class makeSin{ public static void main(String[] args){ int i; int hz=440; for(i=0;i<44100/hz;i++){ System.out.println(10000*Math.sin(i*2*Math.PI*hz/44100)); } } }$B$3$3$G!$(B
javac makeSin.java$B$G%3%s%Q%$%k$7$?8e!$(B
java makeSin > sin.txt /home08/ktanaka/bin/txt2wav.pl sin.txt > sin.wav$B$"$k$$$O!$(B
java makeSin | /home08/ktanaka/bin/txt2wav.pl > sin.wav$B$r
class makeHarmony{ public static void main(String[] args){ int i; double hz1=440; double hz2=554.37; double hz3=659.25; for(i=0;i<44100*5;i++){ System.out.println(5000*Math.sin(i*2*Math.PI*hz1/44100)+ 5000*Math.sin(i*2*Math.PI*hz2/44100)+ 5000*Math.sin(i*2*Math.PI*hz3/44100) ); } } }
$B:#F|$N2]Bj$O$J$$$,!$%W%m%0%i%_%s%0A4BN$N2]Bj$NCf$K!$>e$G>R2p$7$?$h$&$J2;@<%G!<%?%U%!%$%k$r=PNO%W%m%0%i%`$N:n@.(B($B;XDj$5$l$?2;$r=P$9$N$G$O$J$/!$<+M3$J%F!<%^$G(B10$BIC0JFb(B)$B$r4^$a$kM=Dj$J$N$G!$$$$m$$$m;n$7$F$_$k$h$&$K!%(B