A-cmd

===================================================

aplay

LinuxなどのシステムでALSA(Advanced Linux Sound Architecture)を利用して、コマンドラインからオーディオファイルを再生するためのユーティリティ

主な用途

  • コマンドラインからのオーディオ再生: aplay <ファイル名>
       コマンドラインから直接オーディオファイルを再生します。
  • オーディオデバイスの制御:
       再生するオーディオデバイスを指定、音量やサンプリングレートなどのパラメータを調整。
  • スクリプトでの利用:
       オーディオ再生を自動化したい場合などに、シェルスクリプトに組み込んで利用できます。

   aplay -l 再生用カードとデバイス番号を表示

   xxx@rasp:~ $ aplay -l
   **** List of PLAYBACK Hardware Devices ****
   card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

      オプション

shortLongDetail
-h–helphelp
–versionprint current version
-l–list-deviceslist all soundcards and digital audio devices
-L–list-pcmslist device names
-D–device=NAMEselect PCM by name
-q–quietquiet mode
-t–file-type TYPEfile type (voc, wav, raw or au)
-c–channels=#channels
-f–format=FORMATsample format (case insensitive)
-r–rate=#sample rate
-d–duration=#interrupt after # seconds
-s–samples=#interrupt after # samples per channel
-M–mmapmmap stream
-N–nonblocknonblocking mode
-F–period-time=#distance between interrupts is # microseconds
-B–buffer-time=#buffer duration is # microseconds
-period-size=#distance Give the channel map to override or followbetween
interrupts is # frames
–buffer-size=#buffer duration is # frames
-A–avail-min=#min available space for wakeup is # microseconds
-R–start-delay=#delay for automatic PCM start is # microseconds
(relative to buffer size if <= 0)
-T–stop-delay=#delay for automatic PCM stop is # microseconds from xrun
-v–verboseshow PCM structure and setup (accumulative)
-V–vumeter=TYPEenable VU meter (TYPE: mono or stereo)
-I–separate-channelsone file for each channel
-i–interactiveallow interactive operation from stdin
-m–chmap=ch1,ch2,..Give the channel map to override or follow

===================================================

APTツール

  ・ dpkgツールを拡張した、Debian系パッケージを管理するツール群
      ・ apt-cache : パッケージ情報の検索・参照などを行うコマンド
      ・ apt-get  : ネットワーク経由でパッケージを取得したり、
               パッケージのインストール・アンインストールなどを行うコマンド
      ・ apt    : apt-getコマンドとapt-cacheコマンドの機能を統合したコマンド
  ・ パッケージの取得元(リポジトリ)は /etc/apt/sources.list ファイルで設定

 apt-cache [サブコマンド]

サブコマンド説明
search キーワード指定したキーワードを含むパッケージを検索する
show パッケージ名パッケージについての一般的な情報を表示する
showpkg パッケージ名パッケージについての詳細な情報を表示する(依存関係を含む)
depends パッケージ名指定したパッケージの依存関係情報を表示する

=============================================== 

apt-get [オプション] コマンド

コマンド内容
install [package]パッケージのインストール/更新
updateパッケージリストの更新
upgradeインストールされてるパッケージの更新
dist-upgradeインストールされてるカーネルの更新(Ubuntu)
/ディストリビューションの更新(Debian)
remove [package]パッケージの削除
autoremove使ってないパッケージの削除
purge [package]パッケージの削除(設定ファイルも)
cleanアーカイブファイルの削除
autoclean使ってないパッケージのアーカイブファイルの削除

===============================================

 apt [オプション] コマンド

コマンド内容
updateパッケージ一覧を更新
upgradeパッケージを更新
full-upgradeパッケージを更新
autoremove更新に伴い必要なくなったパッケージを削除
(apt実行時にこのコマンドを実行するよう表示されたら実行する)
install パッケージやdebファイルをインストール
remove {パッケージ名}パッケージを削除
remove –purge {パッケージ名}
purge {パッケージ名}
パッケージを完全削除
show {パッケージ名}パッケージの詳細情報を表示
list {パッケージ名}パッケージを検索(完全一致)
search {パッケージ名}パッケージを検索(部分一致)
autocleanキャッシュされているが、インストールはされていないdebファイルを削除
cleanキャッシュされている全てのdebファイルを削除
オプション内容
no-install-recommendsパッケージに対する「推奨」パッケージを依存パッケージとしてインストールしない
-bソースパッケージをダウンロードした後にビルドする
-dダウンロードだけを実行する。展開やインストールは行わない
-f壊れた依存関係の修復を試みる
–no-removeパッケージが削除される場合に中断する
-q進捗表示などを表示しない。
-q=[1-2]のようにレベル指定が可能
–reinstallすでにインストールされていても再インストールする
-sシミュレーションをする。変更はしない
-t指定したリリースを利用する。stable以外のbackportsやunstableから
パッケージを取得する場合に利用する
-y問い合わせに自動でyesで答える
–asuume-no問い合わせに自動でnoで答える
-uアップデートするパッケージの一覧を表示する

===================================================

arecord

LinuxなどのシステムでALSA(Advanced Linux Sound Architecture)を利用して、コマンドラインからオーディオファイルを録音するためのユーティリティ

arecord -l  録音用カードとデバイス番号を表示

   xxx@rasp:~ $ arecord -l
   **** List of CAPTURE Hardware Devices ****
   card 0: WEBCAM [C270 HD WEBCAM], device 0: USB Audio [USB Audio]
     Subdevices: 1/1
     Subdevice #0: subdevice #0

オプションは  aplay と同じ。

==================================================