⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.alsaseq

📁 MIDI解码程序(用VC编写)
💻 ALSASEQ
字号:
=======================================================================                      ALSA Sequencer Interface          Copyright (c) 2000  Takashi Iwai <tiwai@suse.de>=======================================================================DESCRIPTION===========This document describes about the Advanced Linux Sound Architecture(ALSA) sequencer interface.  The ALSA sequencer interface communicatesbetween ALSA sequencer core and timidity.  The interface receivesevents from sequencer and plays it in (quasi-)real-time.On this mode, TiMidity works purely as the software real-time MIDIrender, that is as a software MIDI synth engine on ALSA.There is no scheduling routine in this interface, since all schedulingis done by ALSA sequencer core.For invoking ALSA sequencer interface, run timidity as follows:	% timidity -iA -B2,8 -Os -q0/0 -k0The fragment size is adjustable.  The smaller number gives betterreal-time response.  Then timidity shows new port numbers which werenewly created (128:0 and 128:1 below).       ---------------------------------------	% timidity -iA -B2,8 -Os -q0/0 -k0	TiMidity starting in ALSA server mode	Opening sequencer port 128:0 128:1       ---------------------------------------These ports can be connected with any other sequencer ports.For example, playing a MIDI file via pmidi (what's an overkill :-),	% pmidi -p128:0 foo.midIf a midi file needs two ports, you may connect like this:	% pmidi -p128:0,128:1 bar.midConnecting from external MIDI keyboard may become like this:	% aconnect 64:0 128:0INSTALLATION============Configure with --enable-alsaseq and --enable-audio=alsa option.Of course, other audio devices or interfaces can be chosenadditionally, too.For getting better real-time response, timidity must be run as root(see below).  Set-UID root is the easiest way to achieve this.  Youmay change the owner and the permission of installed timidity binaryas follows:	# chown root /usr/local/bin/timidity	# chmod 4755 /usr/local/bin/timidityBe aware that this might cause a security hole!REAL-TIME RESPONSE==================The interface tries to reset process scheduling to SCHED_FIFO and ashigh priority as possible.  The SCHED_FIFO'd program exhibits muchbetter real-time response.  For example, without SCHED_FIFO, timiditymay cause significant pauses at every time /proc is accessed. For enabling this feature, timidity must be invoked by root orinstalled with set-uid root.INSTRUMENT LOADING==================Timidity loads instruments dynamically at each time a program changeevent is received.  This causes sometimes pauses due to bufferunderrun during playback.  Furthermore, timidity resets the loadedinstruments when the all subscriptions are disconnected.  Thus forkeeping all loaded instruments even after playback is finished, youneed to connect a dummy port (e.g. midi input port) to a timidity portvia aconnect:	% aconnect 64:0 128:0RESET PLAYBACK==============You may stop all sounds during playback by sending SIGHUP signal totimiditiy.  The connections will be kept even after reset, but theevents will be no longer processed.  For enabling the audio again, you have to reconnect the ports.VISUALIZATION=============If you prefer a bit more fancy visual output, try my tiny program,aseqview.	% aseqview -p2 &Then connect two ports to timidity ports (assumed 129:0 and 129:1 were created by aseqview):	% aconnect 129:0 128:0	% aconnect 129:1 128:1The outputs ought to be redirected to 129:0,1 instead of 128:0,1.	% pmidi -p129:0,129:1 foo.midCOMPATIBILITY WITH OSS======================You may access to timidity also via OSS MIDI emulation on ALSAsequencer.  Take a look at /proc/asound/seq/oss for checking thedevice number to be accessed.       ---------------------------------------	% cat /proc/asound/seq/oss	OSS sequencer emulation version 0.1.8	ALSA client number 63	ALSA receiver port 0	...	midi 1: [TiMidity port 0] ALSA port 128:0	  capability write / opened none		midi 2: [TiMidity port 1] ALSA port 128:1	  capability write / opened none       ---------------------------------------In the case above, the MIDI devices 1 and 2 are assigned to timidity.Now, play with playmidi:	% playmidi -e -D1 foo.midBUGS====Well, well, they must be there..RESOURCES=========- ALSA home page	http://www.alsa-project.org- My ALSA hack page (including aseqview)	http://members.tripod.de/iwai/alsa.html

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -