è¶ çµ¶æå·§ Ruby ããã°ã©ãã³ã°ã®è³ªçã§ãã©ããã£ã¦é³ãé³´ããã¦ããã®ããã¨ãã質åããã£ãã®ã§ãèªåã®ããã®è¨é²ãå ¼ãã¦ç°¡åã«ç´¹ä»ã ã¨ãã£ã¦ã Linux Sound programming with OSS API ã«ããéããRuby ã§æ¸ãã¨ãããªæãã # ããã©ã«ãã§ã¯ 8bit 8000 Hz SampleSize = 256 SamplingRate = 8000 # ... 0:ã© 1:ã©# 2:ã· 3:ã 4:ã# 5:㬠6:ã¬# 7:ã 8:ãã¡ 9:ãã¡# 10:ã½ 11:ã½# 12:ã© ... tone = 3 # ããªã¥ã¼ã : 0 ã SampleSize/2 ã¾ã§ volume = 60 # åçããé·ã: ç§ length = 2 # å¨æ³¢æ°: åºæºã®ã©ã¯ 440Hz ã1 ãªã¯ã¿ã¼ãä¸ããã¨åã«ãªã freq = 440 * 2**(tone / 1
{{#tags}}- {{label}}
{{/tags}}