Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| faq:start [2012/03/09 01:38] – dHQNjxlOfRNe 109.230.216.60 | faq:start [2017/08/26 15:21] (current) – [Q: How to remove noise from recordings? How to restore old recordings (from vinyl/tape)?] jeb_ponderworthy.com | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | In this video I show the closes thing. It use MIDI. But if you want to use sheet music, you need to find a saorwfte | + | ====== Linux Audio User FAQ (Frequently Asked Questions) ====== |
| + | |||
| + | ===== General ===== | ||
| + | |||
| + | ==== Q: Where to ask a question ? ==== | ||
| + | **A:** There are different mailing lists. Visit [[http:// | ||
| + | |||
| + | |||
| + | ==== Q: How to optimize my system for audio / midi ? ==== | ||
| + | |||
| + | **A:** For some uses, it can be helpful to run a realtime (RT) kernel, but generally | ||
| + | |||
| + | In Linux kernels 3.0 and later, many of the additionally required realtime patches have been incorporated as standard. For those who are recording Audio, a standard non-realtime kernel may be sufficient for your needs, and running Jack with a non realtime kernel will work fine. | ||
| + | |||
| + | You need to configure your system, however, to [[http:// | ||
| + | |||
| + | This wiki has some more [[wiki: | ||
| + | |||
| + | Those who produce a lot of MIDI I/O, may want to use a Linux kernel with non-standard timer interrupt frequency (aka "tick rate"). The standard frequency is set at 250 Hz, and realtime kernels are generally set at 1000 Hz. You may still have to use a realtime kernel to obtain accurate MIDI playback using the higher timing setting. | ||
| + | ==== Q: Some of my applications sound a (half)tone too high/low, have a wrong pitch ? ==== | ||
| + | **A:** It's likely, that the sample-rate of the programs you're using doesn' | ||
| + | Decide for a samplerate and make sure all applications actually use it. | ||
| + | When running a sound-server (jack), make sure it uses the same samplerate. | ||
| + | (For example when running fluidsynth, set the -r parameter appropriately) | ||
| + | |||
| + | |||
| + | ==== Q: How to remove noise from recordings? How to restore old recordings (from vinyl/ | ||
| + | Some noises can be removed by surpressing specific frequencies, | ||
| + | Audiofile editors as audacity and rezound offer different solutions for noise removal. | ||
| + | |||
| + | **Related articles** | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | **Applications** | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | ==== Q: How to eliminate noise from live production? ==== | ||
| + | Live noise has many causes, including ground-loops, | ||
| + | |||
| + | **Related articles** | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | ==== Q: What about timers and timing ? ==== | ||
| + | For moderate to new hardware, TSC is the best hardware timing sources. | ||
| + | Then there is a software layer (in the kernel) to make available the hw-timers to the applications, | ||
| + | One example is the usual system-timer. | ||
| + | An implementation, | ||
| + | The higher the timer-resolution, | ||
| + | For midi processing it is recommended to increase the system-timer frequency from 250Hz (current default) to 1000Hz. | ||
| + | The hr-timer offers even higher frequencies. | ||
| + | In order to save power at high frequencies, | ||
| + | which only does timer-ticks (function calls) at (user-)defined times (nano-seconds). | ||
| + | For best performance, | ||
| + | (see: priority settings, rtirq). | ||
| + | |||
| + | **How to know, if a TSC / HPET (hardware) is available? | ||
| + | dmesg | grep -i tsc | ||
| + | dmesg | grep -i hpet | ||
| + | |||
| + | **How to get a list of available timers?** | ||
| + | cat / | ||
| + | |||
| + | **How to config kernel for HPET?** | ||
| + | < | ||
| + | # cat .config | grep -i hpet | ||
| + | CONFIG_HPET_TIMER=y | ||
| + | CONFIG_HPET_EMULATE_RTC=y | ||
| + | CONFIG_HPET=y | ||
| + | CONFIG_HPET_MMAP=y | ||
| + | |||
| + | # cat .config | egrep -i " | ||
| + | CONFIG_SCHED_HRTICK=y | ||
| + | CONFIG_SCx200HR_TIMER=m | ||
| + | CONFIG_SND_HRTIMER=m | ||
| + | CONFIG_SND_SEQ_HRTIMER_DEFAULT=y | ||
| + | |||
| + | CONFIG_NO_HZ=y | ||
| + | CONFIG_HZ_1000=y | ||
| + | </ | ||
| + | |||
| + | Related Articles: | ||
| + | [[http:// | ||
| + | [[http:// | ||
| + | |||
| + | |||
| + | . | ||
| + | |||
| + | . | ||
| + | |||
| + | ===== Audio ===== | ||
| + | |||
| + | |||
| + | ==== Q: How to order the numbering of soundcards, if using ALSA drivers? ==== | ||
| + | |||
| + | In / | ||
| + | |||
| + | options [sound-driver-name] index=[number] | ||
| + | |||
| + | When a driver handles more than one device, you have to specify multiple | ||
| + | values for the index option, like this: | ||
| + | |||
| + | options snd-usb-audio index=2,3 | ||
| + | |||
| + | > How do I specify order of *several* USB soundcards in alsa-base.conf? | ||
| + | |||
| + | If you have several soundcards of one type (=the same driver), you | ||
| + | can additionally specify product-ids, | ||
| + | |||
| + | Look at the output of " | ||
| + | of the devices, then specify these IDs in the vid and/or pid options, in | ||
| + | hexadecimal. | ||
| + | the second 89ab:cdef, use the line | ||
| + | |||
| + | options snd-usb-audio index=2,3 pid=0x4567, | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | . | ||
| + | |||
| + | ==== Q: Is it possible to use a label (device name) instead of a number, when referencing a soundcard (e.g. in qjackctl) | ||
| + | |||
| + | Instead of ' | ||
| + | |||
| + | >> cat / | ||
| + | >> 1 [UA25EX | ||
| + | |||
| + | here you would specify: **hw: | ||
| + | |||
| + | full command for jackd: / | ||
| + | |||
| + | |||
| + | ==== Q: How to set up the JACK audio server? (jackd) ==== | ||
| + | |||
| + | |||
| + | **A:** | ||
| + | * Use a samplerate supported by your hardware (usually 44100 (CD-quality) or 48000 (DAT-quality)) (jackd param -r) | ||
| + | * Use either 2 or 3 as value for periods per buffer (depends on hardware) | ||
| + | * start with 2048 " | ||
| + | * for recording (from microphone etc., not for midi) you probably | ||
| + | * for mastering, mixing or editing: raise the period size up to >= 1024 (many postprocessing effects are very CPU intense, and you do not need low latency | ||
| + | * If you're using a linux-distribution dedicated to audio-processing, | ||
| + | * [[wiki: | ||
| + | |||
| + | |||
| + | ==== Q: What is an xrun? ==== | ||
| + | |||
| + | **A:** A buffer is not filled in time for the requesting software to use it. Sound data does not arrive fast enough so that the requesting software has a continuous stream of data, in other words, the requesting software runs out of sound data. This is because some part of the system is not fast enough | ||
| + | |||
| + | An obvious fix for this is increasing the period size. If you're running jack with 128, for example, and you're getting regular X-runs, then increasing the size to 256 may help immediately, | ||
| + | |||
| + | |||
| + | ===== MIDI ===== | ||
| + | |||
| + | ==== Q: What is the difference between Jack-Midi and Alsa-Midi? ==== | ||
| + | === The short answer: === | ||
| + | |||
| + | Jack-Midi has been introduced to extend/ | ||
| + | * improved timing | ||
| + | * sample-accurate midi-event alignment | ||
| + | They currently co-exist. | ||
| + | |||
| + | === The long answer: === | ||
| + | |||
| + | //kindly provided by Fons Adriaensen (2008-09-23 at linux-audio-user _AT_ lists.linuxaudio.org)// | ||
| + | |||
| + | To understand how all this fits together you need | ||
| + | to know the following. | ||
| + | |||
| + | **1.** The bottom layer: ALSA audio and ALSA raw midi. | ||
| + | |||
| + | On most (nearly all) Linux systems these are the | ||
| + | drivers handling audio and midi devices respectively. | ||
| + | A program can use these directly, but then it is | ||
| + | limited to connecting to hardware devices only. | ||
| + | |||
| + | **2.** Interconnecting applications and hardware: Jack | ||
| + | and ALSA midi sequencer. | ||
| + | |||
| + | Jack can interconnect audio programs that are written | ||
| + | to use it to each other and to an audio card. To talk | ||
| + | to the audio card Jack uses the ALSA driver in most cases. | ||
| + | This is what you see in the ' | ||
| + | |||
| + | The ALSA midi sequencer does the same for midi. It can | ||
| + | connect applications to each other and to physical midi | ||
| + | interfaces (raw ALSA ports). This is what you see in the | ||
| + | ' | ||
| + | |||
| + | |||
| + | **3.** Jack midi replacing ALSA midi sequencer. | ||
| + | |||
| + | For a programmer the ALSA midi sequencer can be hard to use. | ||
| + | It has had serious problems with timing, mainly | ||
| + | because of lack of high-resolution timer support in Linux | ||
| + | until recent times. This has resulted in the development | ||
| + | of midi-in-Jack, | ||
| + | for the ALSA midi sequencer. It has its pros and cons. This | ||
| + | is what you see in the ' | ||
| + | |||
| + | **Currently the two MIDI routing systems coexist, and this | ||
| + | leads to some confusion.** | ||
| + | |||
| + | In qjackctl you have three options for midi-in-Jack: | ||
| + | |||
| + | **1.** ' | ||
| + | midi devices. Applications that use midi-in-jack | ||
| + | (e.g. Aeolus) will still show up in the ' | ||
| + | but you can't connect them to any physical ALSA midi | ||
| + | ports, only to other apps (if there are any other). | ||
| + | |||
| + | **2.** ' | ||
| + | (hardware) midi devices, and convert them into Jack | ||
| + | midi ports with rather useless names. The same devices | ||
| + | are still shown in the ' | ||
| + | you can't connect them there anymore - they are usually | ||
| + | supporting only one client, and Jack has already taken | ||
| + | them. This means that applications that only support | ||
| + | connecting to ALSA midi sequencer can't be connected | ||
| + | to physical midi devices anymore. In the dreams of the | ||
| + | Jack midi developers, such apps will soon cease to exist, | ||
| + | and if that happens the ' | ||
| + | use. | ||
| + | |||
| + | **3.** ' | ||
| + | ports into Jack midi ports. The original ones remain | ||
| + | accessible | ||
| + | bridge is only included in the ALSA backend, not in the | ||
| + | FreeBoB/ | ||
| + | or similar apps are then the solution. | ||
| + | |||
| + | **Example: | ||
| + | [[apps: | ||
| + | midi-in-Jack port. You will see Aeolus in both the ' | ||
| + | and ' | ||
| + | use the Jack connection to connect Aeolus to a keyboard. | ||
| + | If you use ' | ||
| + | system. | ||
| + | |||
| + | Also if you use ' | ||
| + | for Aeolus: | ||
| + | a Jack-midi copy of the ALSA sequencer port of Aeolus, | ||
| + | shown as system: | ||
| + | |||
| + | Don't use the latter. What happens if you do that is that | ||
| + | the midi data from your keyboard will follow a rather long | ||
| + | route: Raw ALSA -> Jack port -> Jack port -> ALSA sequencer | ||
| + | -> Aeolus. | ||
| + | |||
| + | The most direct route is still the one in the ' | ||
| + | Raw ALSA -> ALSA sequencer -> Aeolus. | ||
| + | |||
| + | . | ||
| + | |||
| + | . | ||
| + | |||
| + | ===== Hardware ===== | ||
| + | |||
| + | ==== Q: Is my Hardware / Soundcard supported in the Linux OS ? ==== | ||
| + | |||
| + | **A:** | ||
| + | |||
| + | * For PCI, PCIE, PCMCIA and USB devices, the [[http:// | ||
| + | |||
| + | * Another source of information regarding | ||
| + | |||
| + | * For FireWire devices look on the [[http:// | ||
| + | |||
| + | * PCI: At [[http:// | ||
| + | |||
| + | * There also is [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | . | ||
| + | |||
| + | Devices following the USB 1.1 standard are usually supported. Some require additional firmware to be loaded however. | ||
| + | |||
| + | (on debian/ | ||
| + | |||
| + | Support for USB 2.0 devices is also increasingly common. | ||
| + | |||
| + | . | ||
| + | |||
| + | |||
| + | |||
| + | ===== Software ===== | ||
| + | |||
| + | ==== Q: Is it possible to run VST plugins on Linux? ==== | ||
| + | **A:** First one has to distinguish between **native** Linux VST plug-ins and VST plugins built for other operating system (usually Windows). There is a growing number of native Linux plugins, which are available in VST format (see " | ||
| + | |||
| + | Windows VST plugins often come as two versions built for either 32-bit or 64-bit platforms. Some of the aforementioned tools only support 32-bit plugins, some both versions. | ||
| + | |||
| + | If a Windows VST plugin doesn' | ||
| + | |||
| + | **Note:** Instead of VST, you may prefer to use open plugin technologies like [[apps: | ||
| + | |||
| + | **Linux VST hosts:** | ||
| + | |||
| + | Open Source: | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | Proprietary: | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | **Note:** Some Linux plugin hosts only provide VST support, if you enable it at compile time with appropriate options. | ||
| + | |||
| + | |||
| + | **Linux-Hosts with Windows VST support: | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | **Windows VST hosts:** | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | |||
| + | **Running Windows VST hosts on Linux** | ||
| + | |||
| + | * Using Wine with its ALSA driver (optionally [[http:// | ||
| + | * Using Wine with WineASIO to JACK driver: | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[http:// | ||
| + | |||
| + | |||
| + | **Further resources: | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | |||
| + | {{tag> | ||
