Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.
sound
サウンドプレイヤー機能
呼び出し手順
sound(y [,fs,bits,command)
引数
- y
実数ベクトル
- fs
実数, サンプリング周波数(単位:サンプル/秒) (デフォルト値は 22050)
- bits
実数, ビット数(未使用)
- command
Unixシステムでのみ使用され, サウンド(wav)ファイルを演奏する際に使用される コマンドの名前を指定します. デフォルト値は
aplayです./dev/audioを指定した場合, 8ビットmu-law raw サウンドファイルが作成され,/dev/audioに送信されます.
説明
sound(y,fs)は,行列y
(サンプリング周波数fs)で指定されたサウンド信号を演奏します.
実際には,この関数は playsndのラッパーです.
yの値は範囲-1.0 <= y <= 1.0にあると仮定されます.
この範囲の外側の値は丸められます.
y の行数はチャネル数を指定します.
sound(y) は,デフォルトのサンプリング・レート
22050 サンプル/秒でサウンドを演奏します.
sound(y,fs,nbits) は,
可能な場合(この機能は未使用),
nbits ビット/サンプルでサウンドを演奏します.
多くのプラットフォームは8または16ビットをサポートします.
例
// 2チャンネル信号 y=loadwave("SCI/modules/sound/demos/chimes.wav"); sound(y)
参照
- playsnd — command-line sound player facility
| Report an issue | ||
| << savewave | Sound file handling | soundsec >> |