Next Previous Contents

4. ´ú¸Õ¦w®ÄÅX°Êµ{¦¡

4.1 /proc/devices, /dev/sndstat

¦pªG§A¦³¤º«Øªº­µ®Ä¤ä´©¡A§A·|¦b¶}¾÷®É¦¬¨ì¤@¨Ç¦³¥Îªº¸ê°T¡C¦pªG§Aªº­µ®Ä¤ä´©¬O¦w¸Ë¦¨¥i¸ü¤J¦¡¼Ò²Õªº¡A §A¤]¥i¥H¥Î¤U¦C¤è¦¡±o¨ì¤@¨Ç¸ê°T (©Î³\­n¥ý¥Î modprobe -r sound ±N­µ®Ä²¾°£)¡C

# modprobe -a sound trace_init=1
Sound initialization started

<Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
<Sound Blaster 16> at 0x330 irq 5 dma 0
<Yamaha OPL3 FM> at 0x388
Sound initialization complete
AWE32 Sound Driver v0.3.3e (DRAM 2048k)

¦pªG§A¦³ /proc µêÀÀÀɮרt²Î¡A§A¥i¥H¥Î¤U¦C¤èªk¬Ý¨ì²Ä¤G­Ó³]³Æ

# cat /proc/devices
Character devices:
[...]
14 sound
[...]

±µ¤U¨Ó½Ð»{»{§A¦b /dev/ ¤U¦³­Ó¤w¥¿½T¦w¸Ëªº³]³Æ¡C¸Ô±¡½Ð¬Ý Sound HOWTO ¡C µM«á°õ¦æ /dev/sndstat ¥i¬d¸ß­µ®Ä¼Ò²Õªºª¬ºA¡C

# cat /dev/sndstat
Sound Driver:3.5.4-960630 (Sat Oct 11 19:35:14 CEST 1997 root,
Linux flora 2.0.29 #1 Sat Oct 11 19:12:56 CEST 1997 i586 unknown)
Kernel: Linux flora 2.0.29 #1 Sat Oct 11 19:36:23 CEST 1997 i586
Config options: 0

Installed drivers:
Type 1: OPL-2/OPL-3 FM
Type 2: Sound Blaster
Type 7: SB MPU-401

Card config:
Sound Blaster at 0x220 irq 5 drq 1,5
SB MPU-401 at 0x330 irq 5 drq 0
OPL-2/OPL-3 FM at 0x388 drq 0

Audio devices:
0: Sound Blaster 16 (4.13)

Synth devices:
0: Yamaha OPL-3
1: AWE32 Driver v0.3.3e (DRAM 2048k)

Midi devices:
0: Sound Blaster 16

Timers:
0: System clock

Mixers:
0: Sound Blaster
1: AWE32 Equalizer

¦pªG§A¨S¦³¹³³o¼Ëªº¿é¥X¡A¤]³\¦b§Aªº«Øºcùئ³°ÝÃD¡AÄ~Äò§ä¬Ý¬Ý­þ¨à¤£¯à°Ê¡A¦A¦^¨Ó Getting Started¡AÀˬd¨C¤@¶µ¡C

4.2 ¿é¥X¡Ð Raw Audio Device

¥h¨ú±o¤@­Ó .au ÀÉ (Sun workstation) ©Î¼Ë¥»ÀɮסAµM«á³o¼Ë°µ¡G

# cat bell.au > /dev/audio

resp.

# cat sample > /dev/dsp

§A·|À³¸Ó¥i¥H¥Ñ Audio Device 0: Sound Blaster 16 (4.3)Å¥¨ì³o­ÓÀɮתº¤º®e¡C

4.3 ¿é¥X - OPL-2/OPL-3 Synthesis

¦pªG§A­n¨Ï¥Î OPL-2/OPL-3 FM ¦X¦¨¾¹¦b§Aªº­µ®Ä¥d¤W¼·©ñ MIDIÀɮסA½Ð¸Õ¬Ý¬Ý playmidi ³o­Óµ{¦¡(½Ð¬Ýªþ¿ý B)¡C¨Ï¥Î¤èªk¦p¤U

# playmidi -f dance.mid

©Î¬O

# playmidi -4 dance.mid

«e³õ·|µ¹§A OPL-2¡A«á³õ·|µ¹§A OPL-3 MIDI ­µ¼Ö¡C ¦pªG§Aı±o³o¨ÇÁn­µÅ¥¨Ó«Ü»¹¡A ¤£­n©Ç playmidi¡A¨º¬O¦]¬° FM ¦X¦¨¾¹Å¥°_¨Ó«Ü®t°Õ¡C

±z¥i¥H·Q¹³¤@¤U§A¥u¦³¤@­Ó OSS/Free ­µ®ÄÅX°Êµ{¦¡¡G¨º´N¬O§A©Ò¯à±o¨ìªº MIDI­µ¼Öªº«~½è¤F¡C (»P³nÅé¦X¦¨¤£¦P)¡C©¯¹Bªº¬O¡A§A¦³ SB AWE¡A§AÁÙ¥i¥H¨Ï¥Î Wave Table ¥H¤Î AWE Sound Driver Extension¤F¡C

4.4 ¿é¥X - Wave Table Synthesis

¦b AWE Driver Extension ùئ³­Ó«Ü¯S§Oªº¤u¨ãµ{¦¡ (awesfx) ¥i¥Î¨Ó¨Ï¥Î EMU 8000 Wave Table ¦X¦¨¾¹¡C ­º¥ý¡A§A¥²¶·±q§Aªº­µ®Ä¥dùظü¤J Sound Font Bank ¡Ð´Nºâ§A·Q¨Ï¥Î ROM ªº¨ú¼Ë ! §A¥i¥H±q§Aªº Windows ªº ¦w¸Ë¤¤¨ú±o³o­ÓÀÉ ¡Ð´M§äªþ¥[ÀɦW¬° *.sfb ©Î *.sf2ªºÀɮסC

ROM ¨ú¼Ë¥i¥H¨Ï¥Î SYNTHGM.SBK¨Ó¸ü¤J¡A ¯u¹êªº¨ú¼Ë©ñ¦b SYNTHGS.SBK ¤Î SYNTHMT.SBK ¥H¤Î SAMPLE.SBKùØ¡C§A¤]¥i¥H±q ftp©Î www ¨Ó¨ú±o¨ä¥Lªº Sound Font Banksvia ¡A¥i¥H¸Õ¸Õ Creative Labs ªº EMU ªººô­¶¡A ¦³­Ó Chaos ¨ú¼Ë¡A¥L­Ì¯uªº«Ü´Î (½ÐÀˬd AWE ÅX°Êµ{¦¡ºô¯¸)¡C

¸Õ¬Ý¬Ý¸ü¤J¼Ð·Çªº GM (ROM) set ¡A¨Ï¥Î

# sfxload -i synthgm.sbk

µM«á¼·©ñ­Ó¦ñÀHµÛ§Aªº SB AWE ªº midi ÀɮסG

# drvmidi dance.mid

4.5 ²V­µ

¨ú±o§A³Ì³ßÅwªº²V­µ¾¹µ{¦¡¨Ã°õ¦æ¥¦¡C¦b¦P¤@®É¶¡¼·©ñ¤@­Ó­µ®Ä¨ú¼Ë¥H¤Î¨â­Ó MIDI Àɼ˥»¡A µM«á¸Õ¸Õ²V­µ¾¹ªº³]©w¡C ¼·¤@·|¨à¡A«Ü®e©öªº¡C¥H¤U¦³¥L­Ì³QºÙ©Iªº³]³Æ¦Cªí¡G

Yamaha OPL-3

Synth ©Î FM

AWE32 Driver

Synth ©Î FM (¦³¤Hª¾¹D²V­µ¾¹¬O a mixer were the last two are separated from each other?)

Sound Blaster 16 (4.13)

PCM ©Î DSP

PC Speaker (still alive)

Spkr

ÁÙ¦³¤@¨Ç»P CD ROM ¬ÛÃöªº²V­µ¾¹¡A¥i¯à³s±µµÛ­µ®Ä¥dªº¦³ Master Volume, Bass, Treble ©M¤£¦P ¿é¤J­y¹Dªº¿ý­µ°ª§C¡C §A¥i¥H«ü©w­þ¨Ç­y¹DÀ³¸Ó³Q¿ý­µ¤U¨Ó¡C

4.6 ¿é¤J¡Ð¨Ï¥ÎRaw Audio Device¨Ó¨ú¼Ë

§A¥i¥H¿ý¤U¤£¦Pªº­µ·½¡G¬Û³sªº CD ROM¡B»P mic ¬Û³sªº³Á§J­·¡A¥H¤Î»P line in ¬Û³s±µªº¥ô¦ó­µ·½¡C±N²V­µ¾¹³]©w¦b¾A·íªº¦ì¸m¡C¼·©ñ¤@­ÓÁn­µ¨Ã±N¥¦¿ý­µ¦¨¤@­ÓÀɮסA¦A¥Ñ Raw Audio Device¨ÓŪ¨ú¡A¨Ò¦p¡G

# cdplay
# dd bs=8k count=5 </dev/dsp >music.au
5+0 records in
5+0 records out
# cat music.au >/dev/dsp

±q¿é¤J³]³Æ¨Ó¿ý­µ¥H¤Î¼·©ñ 5 ¬íªºÁn­µ¡C

4.7 MIDI °ð

©êÁ¾¡A¥Ø«eÁÙ¨S¦³Ãö©ó MIDI °ðªº¸ê°T!


Next Previous Contents