Differences

This shows you the differences between two versions of the page.

Link to this comparison view

faq:start [2012/03/09 02:38]
109.230.216.60 dHQNjxlOfRNe
faq:start [2017/08/26 17:21] (current)
jeb_ponderworthy.com [Q: How to remove noise from recordings? How to restore old recordings (from vinyl/tape)?]
Line 1: Line 1:
-In this video show the closes thingIt use MIDI. But if you want to use sheet music, you need to find saorwfte that convert Sheet to MIDI. I dont know any but I know they exist.Search in googleconvert sheet midiI recommend you to search for the midi of the song you want directly from internetConverting sheet to midi is not very accurate+====== Linux Audio User FAQ (Frequently Asked Questions) ====== 
 + 
 +===== General ===== 
 + 
 +==== Q: Where to ask a question ? ==== 
 +**A:** There are different mailing lists. Visit [[http://linuxaudio.org/resources| Resources at linuxaudio.org]] and [[http://lists.linuxaudio.org/listinfo/| Lists ]]  
 + 
 + 
 +==== 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 this isn't necessary anymore. See the following JACK FAQ entry: [[http://jackaudio.org/faq/realtime_vs_realtime_kernel.html | Do need a realtime kernel to use realtime scheduling?]] 
 + 
 +In Linux kernels 3.0 and later, many of the additionally required realtime patches have been incorporated as standardFor 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://jackaudio.org/faq/linux_rt_config.html | allow JACK to use realtime scheduling]]. 
 + 
 +This wiki has some more [[wiki:real_time_info | articles and general information]] about real time operation. 
 + 
 +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't match. 
 +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/tape)? ==== 
 +Some noises can be removed by surpressing specific frequencies, by applying EQs or Filters. 
 +Audiofile editors as audacity and rezound offer different solutions for noise removal. 
 + 
 +**Related articles** 
 +  * [[http://wiki.audacityteam.org/index.php?title=Noise_Removal| Noise Removal with Audacity]] 
 +  * [[http://www.cedaraudio.de/intro/dehiss_intro.html| Article about noise reduction]] 
 +  * [[http://www.soundonsound.com/sos/aug05/articles/ptrestoration.htm| SoundsOnSounds article - Comparing audio restoration plugins]] 
 +  * [[http://en.wikipedia.org/wiki/Audio_restoration| wikipedia - Audio restoration]] 
 +  * [[http://wiki.librivox.org/index.php/Detailed_Audacity_Noise_Removal| librivox wiki - Detailed: Noise removal with Audacity]] 
 +  * [[http://www.cedaraudio.com/| CedarAudio Company ]] - with some tech. info 
 +**Applications** 
 +  * [[http://gwc.sourceforge.net/| The Gnome Wave Cleaner Project]] 
 +  * [[http://www.fon.hum.uva.nl/praat/| Speach noise removal (?)]] 
 +  * [[http://home.snafu.de/wahlm/dl8hbs/declick.html| Dynamic Digital Declicker for Audio Files]] 
 +  * [[http://www.opensourcepartners.nl/~costar/gramofile/| GramoFile - digitalize old recordings]] 
 +  * [[http://www.muenchen-surf.de/mpaar/| "Declick 2000" plugin - not open source, but priceless]] 
 + 
 +==== Q: How to eliminate noise from live production? ==== 
 +Live noise has many causes, including ground-loops, and other equipment near and far injecting static of many kinds.  This includes including weak but audio-active USB signals, PC fan noise, firewire, et cetera, into powerline, ground, and thence into the system.  There are many approaches to this, and often more than one approach is needed. 
 + 
 +**Related articles** 
 +  * [[http://www.audioholics.com/home-theater-connection/ground-loops-eliminating-system-hum-and-buzz|Ground Loops - Eliminating System Hum and Buzz]] 
 +  * [[http://lsn.ponderworthy.com/doku.php/cleaning_the_tone|Cleaning the Tone]] 
 + 
 +==== Q: What about timers and timing ? ==== 
 +For moderate to new hardware, TSC is the best hardware timing sources.  Old hardware may have timing issues with multi-core CPU where HPET (high-precision-event-timer) is preferable. 
 +Then there is a software layer (in the kernel) to make available the hw-timers to the applications, through different interfaces. 
 +One example is the usual system-timer. 
 +An implementation, that tries to squeeze everything out of the hardware is the "HR timer" (high-resolution-timer). 
 +The higher the timer-resolution, the higher is the possible accuracy of audio/midi-processing. 
 +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, there's a so called tickless-timer feature in the kernel, 
 +which only does timer-ticks (function calls) at (user-)defined times (nano-seconds). 
 +For best performance, timer interrupts should be given a high scheduling priority 
 +(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 /proc/asound/timers 
 + 
 +**How to config kernel for HPET?** 
 +<code> 
 +# 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 "hrt|hr_t" 
 +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 
 +</code> 
 + 
 +Related Articles: 
 +[[http://kerneltrap.org/node/6750| Article at kerneltrap.org]] 
 +[[http://btorpey.github.io/blog/2014/02/18/clock-sources-in-linux/]] 
 + 
 + 
 +
 + 
 +
 + 
 +===== Audio ===== 
 + 
 + 
 +==== Q: How to order the numbering of soundcards, if using ALSA drivers? ==== 
 + 
 +In /etc/modprobe.d/alsa-base.conf (debian based distro) one can give an option line as: 
 + 
 +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, as follows: 
 + 
 +Look at the output of "lsusb" and "lsusb -n" for the vendor/product IDs 
 +of the devices, then specify these IDs in the vid and/or pid options, in 
 +hexadecimal.  For exampe, if your first USB device has IDs 0123:4567 and 
 +the second 89ab:cdef, use the line 
 + 
 +options snd-usb-audio index=2,3 pid=0x4567,0xcdef 
 + 
 +[[http://alsa.opensrc.org/MultipleCards#How_to_choose_a_particular_order_for_multiple_installed_cards| alsa - set card order ]] 
 + 
 +[[http://alsa.opensrc.org/index.php/MultipleUSBAudioDevices|additional information at alsa.opensrc.org -  http://alsa.opensrc.org/index.php/MultipleUSBAudioDevices]] 
 + 
 +
 + 
 +==== Q: Is it possible to use a label (device name) instead of a number, when referencing a soundcard (e.g. in qjackctl)   ==== 
 + 
 +Instead of 'hw:a.b' (hw:1,0) you can use 'hw:DEVICE_ID' which will tell the command 
 + 
 +>> cat /proc/asound/cards 
 +>> 1 [UA25EX         ]: USB-Audio - UA-25EX 
 + 
 +here you would specify: **hw:UA25EX** 
 + 
 +full command for jackd: /usr/bin/jackd -P70 -u -dalsa -dhw:UA25EX -r48000 -p512 -n3 -M -Xseq 
 + 
 + 
 +==== 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)  (jackd param -n) 
 +  * start with 2048 "frames per period" and divide it by 2, until you get xruns (lower is better here). In general a value of 64 to 256 is possible *with* a real-time kernel (only). Use a value higher than that, which produces xruns, so you don't get xruns anymore. (jackd param -p) 
 +  * for recording (from microphone etc., not for midi) you probably want to use a small period size for low latency monitoring 
 +  * for masteringmixing or editing: raise the period size up to >= 1024 (many postprocessing effects are very CPU intense, and you do not need low latency to listen) 
 +  * If you're using linux-distribution dedicated to audio-processing, with realtime-kernel, you can achieve lower latencies, by setting the -R (realtime) and -P (rt-priority) parameters of jackd.  
 +  * [[wiki:recommended_jackd_parameters|Recommended jackd parameters per soundcard]] 
 + 
 + 
 +==== 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 to keep up. 
 + 
 +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, and solve the problem. 
 + 
 + 
 +===== MIDI ===== 
 + 
 +==== Q: What is the difference between Jack-Midi and Alsa-Midi? ==== 
 +=== The short answer: === 
 + 
 +Jack-Midi has been introduced to extend/replace alsa-midi with: 
 +  * 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 'AUDIO' tab in qjackctl. 
 + 
 +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 
 +'ALSA' tab of qjackctl. 
 + 
 + 
 +**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, which can (almost) be used as a replacement 
 +for the ALSA midi sequencer. It has its pros and cons. This 
 +is what you see in the 'MIDI' tab in qjackctl. 
 + 
 +**Currently the two MIDI routing systems coexist, and this 
 +leads to some confusion.** 
 + 
 +In qjackctl you have three options for midi-in-Jack: 
 + 
 +**1.** 'None' - this means that Jack will not use any ALSA 
 +midi devices. Applications that use midi-in-jack 
 +(e.g. Aeolus) will still show up in the 'MIDI' tab, 
 +but you can't connect them to any physical ALSA midi 
 +ports, only to other apps (if there are any other). 
 + 
 +**2.** 'Raw' - this means that Jack will grab the raw ALSA 
 +(hardware) midi devices, and convert them into Jack 
 +midi ports with rather useless names. The same devices 
 +are still shown in the 'ALSA' tab, but you will notice 
 +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 'raw' option is the normal one to 
 +use. 
 + 
 +**3.** 'Seq' - this means Jack will convert *all* ALSA sequencer 
 +ports into Jack midi portsThe original ones remain 
 +accessible in the 'ALSA' tab. The Jack-midi to ALSA-seq  
 +bridge is only included in the ALSA backend, not in the  
 +FreeBoB/FFADO firewire backend. [[apps:all:a2jmidid]]  
 +or similar apps are then the solution. 
 + 
 +**Example:** 
 +[[apps:all:Aeolus]] has both an ALSA midi sequencer port, and a 
 +midi-in-Jack port. You will see Aeolus in both the 'MIDI' 
 +and 'ALSA' tabs. If you use 'Raw', you will have to 
 +use the Jack connection to connect Aeolus to a keyboard. 
 +If you use 'Seq' you can make the connection in either 
 +system. 
 + 
 +Also if you use 'Seq' there will be two Jack-midi ports 
 +for Aeolus: the Jack-midi port that Aeolus creates, and 
 +a Jack-midi copy of the ALSA sequencer port of Aeolus, 
 +shown as system:playback_#, with # some number. 
 + 
 +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 'ALSA' tab: 
 +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://www.alsa-project.org/main/index.php/Matrix:Main|Alsa Soundcard Matrix]] lists support status. 
 + 
 +  * Another source of information regarding to USB support: [[http://www.qbik.ch/usb/devices/]] 
 + 
 +  * For FireWire devices look on the [[http://www.ffado.org/?q=devicesupport/list|FFADO website]]. 
 + 
 +  * PCI: At [[http://kmuto.jp/debian/hcl/]] there is a rough test for compatibility of PCI devices. (currently using the 2.6.30-1-686 kernel) Just excecute "lspci -n" and paste on the site. 
 + 
 +  * There also is [[http://www.linux-on-laptops.com/| linux on laptops]], but it doesn't tell you if the laptop is particularly suited for audio production. 
 + 
 +  * [[http://linuxhcl.com/browse/categories| Linux HCL - Hardware Compatibility List]] 
 + 
 +  * [[http://www.h-node.com/hardware/catalogue/en| H-Node - Hardware Database - by the FSF (Free Software Foundation) ]] 
 + 
 +  * [[http://en.opensuse.org/Hardware| OpenSuse (distr.) Hardware Compatibility List]] 
 + 
 +  * [[http://de.opensuse.org/Hardware|  OpenSuse (distr.) Hardware Compatibility List (german) ]] 
 + 
 +  * [[http://www.ubuntu.com/certification/catalog| Ubuntu (distr.) Certified Hardware ]] 
 + 
 +  * [[http://wiki.ubuntuusers.de/Hardwaredatenbank| Ubuntu (distr.) users hardware wiki (german) ]] 
 + 
 +  * [[http://www.linux-drivers.org/| Linux Drivers - a List of further resources ]] 
 + 
 +
 + 
 +Devices following the USB 1.1 standard are usually supported. Some require additional firmware to be loaded however. 
 + 
 +(on debian/ubuntu: apt-get install midisport-firmware alsa-firmware-loaders) 
 + 
 +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 "Further resources" below) and an also growing number of host software for Linux supports native Linux VST plugins (see list below). Also there are some hosts or additional tools, which allow to run Windows VST plugins on Linux. 
 + 
 +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't work with any of the tools listed below, it is also possible to run a Windows VST host program under Linux via Wine and route its audio output to JACK (with or without WineASIO). 
 + 
 +**Note:** Instead of VST, you may prefer to use open plugin technologies like [[apps:categories:LV2 | LV2]], [[apps:all:LADSPA]], and [[apps:all:DSSI]]. 
 + 
 +**Linux VST hosts:** 
 + 
 +Open Source: 
 + 
 +  * [[http://ardour.org | Ardour]] 
 +  * [[http://www.audacityteam.org/ | Audacity]] 
 +  * [[http://kxstudio.linuxaudio.org/Applications:Carla | Carla]] 
 +  * [[http://www.anticore.org/jucetice/?page_id=4 | Jost]] 
 +  * [[https://lmms.io/ | LMMS]] 
 +  * [[http://www.muse-sequencer.org/ | Muse Sequencer]] 
 +  * [[http://qtractor.sourceforge.net/ | Qtractor]] 
 +  * [[http://users.notam02.no/~kjetism/radium/ | Radium]] 
 + 
 +Proprietary: 
 + 
 +  * [[http://www.bitwig.com/ | Bitwig]] 
 +  * [[http://energy-xt.com/ | energyXT]] 
 +  * [[http://www.renoise.com/  | Renoise]] 
 +  * [[http://tracktion.com | Tracktion]] 
 + 
 +**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://kxstudio.linuxaudio.org/Applications:Carla | Carla]] 
 +  * [[http://www.breakfastquay.com/dssi-vst/| dssi-vst]] 
 +  * [[http://www.joebutton.co.uk/fst/| fst-vst]] 
 + 
 +**Windows VST hosts:** 
 + 
 +  * [[http://www.reaper.fm/ | REAPER]] 
 +  * [[http://www.hermannseib.com/|VSTHost and SAVIHost by Hermann Seib (source available !)]] 
 +  * [[http://www.tobybear.de/files.html | MiniHost by Tobybear]] 
 +  * [[http://teragonaudio.com/MrsWatson | MrsWatson]] (command-line) 
 +  * [[http://www.kreatives.org/kristal/|KRISTAL Audio Engine by Matthias Juwan (free for non-commercial) ]] 
 + 
 + 
 +**Running Windows VST hosts on Linux** 
 + 
 +  * Using Wine with its ALSA driver (optionally [[http://gamesplusone.com/alsa_to_jack.html | forwarding Wine's ALSA output to JACK]]). 
 +  * Using Wine with WineASIO to JACK driver: 
 +    * [[http://wineasio.sourceforge.net/ | WineASIO homepage]] 
 +    * [[https://lkubuntu.wordpress.com/2014/01/09/how-to-set-up-wineasio/ | How to setup WineASIO]] (Ubuntu and Arch Linux) 
 +    * [[http://proaudio.tuxfamily.org/wiki/index.php?title=ASIO_with_Wineasio| Gentoo WineASIO info]] 
 + 
 + 
 +**Further resources:** 
 + 
 +  * [[http://linux-sound.org/linux-vst-plugins.html]] - VST/VSTi Plugins For Linux 
 +  * [[http://quicktoots.linuxaudio.org/toots/vst-plugins/]] - a more detailed introduction (**Deprecated** page) 
 + 
 + 
 +{{tag>howtos_and_faqs}}
faq/start.1331257135.txt.gz · Last modified: 2012/03/09 02:38 by 109.230.216.60