GNUitar Guitar processor software (C) 2000-2005 Max V.Rudensky <fonin@gnuitar.com> 1. What is GNUitar ? GNUitar is a real-time sound effects software that allows you to use your computer as a guitar processor. It has GTK+ based interface. It can be compiled on any flavor of UNIX that have GTK+ 1.2, Glib, pthreads and OSS sound driver. It also works on Windows. Program is inspired by 2 works: o Ele 0.1 by Morris Slutsky http://www-personal.umich.edu/~mslutsky/elepage/index.html o Guitar FX Processor by Marin Vlah http://fly.srk.fer.hr/~mvlah/fx_processor.html GNUitar is free software and is distributed under GNU GPL license. 2. Download http://www.gnuitar.com/downloads.php http://freshmeat.net/projects/gnuitar http://sourceforge.net/projects/gnuitar 3. Requirements You will need o GTK+ version 1.2.6 or better; we also support now GTK+ 2.x branch. o GLIB 1.2 or better o POSIX threads on UNIX o full-duplex sound card o To compile: GCC on UNIX, Microsoft Visual C++ 6.0 on Windows 4. Performance GNUitar is a CPU-consuming program. Pentium/166 is sufficient to run GNUitar, Pentium II/300 is recommended, and on Pentium II/450 it will work just fine. Real performance is very depend on your CPU/sound card/sound driver/OS combination. The best performance can be achieved on Linux, because of its great real-time features and advanced OSS sound drivers. When running the program, make sure you close all unnecessary applications, to give more resources to it. Avoid anything that can cause disk I/O or CPU usage. GNUitar runs with increased priority; this may cause hang-ups and delayed system response on low-end machines. Therefore you should care to save all important data in other applications, before you launch GNUitar. 4.1 UNIX notes GNUitar executable file should be setuid root to process sound with real-time priority; otherwise you'll hear glitches and delays while switching between windows. It switches to real user id as soon as it set real-time priority to effect-processing thread, and before any GTK initializations are being performed, so it shouldn't break security on your system. GNUitar has a latency of about 4-8ms on Linux/Pentium II/450/AWE64 ISA ! 4.2. Windows notes Windows have complex problems with latency when processing audio in real time, mostly because of its non-uniform drivers architecture. GNUitar latency on Windows is much higher than on Linux. The real latency is very depend on sound board driver. GNUitar for Windows has two playback methods: o Playback via MME o Playback via DirectSound The first method uses the standard MME API (functions waveOut*()). The second method requires DirectX to be installed and uses DirectSound for playback. The method can be switched from the sampling parameters dialog, by checking/unchecking the "Playback via DirectSound" checkbox. DirectSound playback shows the best results that are almost close to Linux performance. The MME playback exists for compatibility purposes, and for another reason. If a driver is not optimized for DirectSound, Windows will automatically emulate DirectSound output using the MME devices. If a WDM driver is used (see below), DirectSound support is not implemented by the driver developer but by the operating system. MME playback support exists specially for this case, when the output via DirectSound is emulated by OS. 4.3. Windows Sound Drivers Overview There are few kinds of sound drivers for Windows: old VXD (Win95/98), NT4-kernel style, and modern WDM drivers that were introduced in Windows 98/SE. Currently GNUitar uses common MME API (MME=MultiMedia Extension) that is compatible with all kinds of drivers; however AFAIK WDM drivers provide much lower latency. Therefore, avoid VXD drivers; use modern WDM drivers instead, if possible. The difference in latency between two kinds of drivers is really noticeable: I had 100ms up to ~400ms on Pentium III/850/ISA AWE64/VXD/MME playback, and ~60ms on Pentium MMX/166/Yamaha OPL3/WDM/MME playback laptop. Try to re-launch GNUitar few times, if the initial latency is bad. The kind of bus (PCI/ISA) of the sound card does not affect the latency very much, the deal is with OS and its architecture. So do not through away your old ISA Sound Blaster and replace it with modern sound card, first try it on Linux ! 4.4. How To Control Latency The latency can be controlled with a high degree from the GNUitar interface. There is a settings dialog that can be called from the ``Options->Sampling Parameters'' menu (or by ``Ctrl-P''). There is an option called "Fragment Size". The greater is the fragment size, the greater is the latency, BUT... You might want to increase fragment size on low-end computers, to decrease the system load and number of buffer overruns (drops). The buffer overrun is the immediate result of the bad performance. Buffer overruns have a hearable effect of a scratches, sometimes periodic (ten overruns per second produce a 10 Hz tone). General notes on how to achieve the best performance: o The lower is the sampling rate, the better is the latency. Drawback is the sound quality. o The lower is the fragment size, the better is the latency. Drawback is the higher system load. o The hearable periodic scratches (DirectSound output) can be fixed by decreasing the overrun threshold (sampling params dialog). o Increase the fragment size and decrease the sampling rate on low-end CPU, to gain the best latency/overruns/load ratio. o On Windows, prefer WDM drivers, if possible. Try both MME and DirectSound playback; choose which is the best. o Prefer Linux over Windows. Properly tuned Linux kernel has 10-100 times better latency on the same hardware. o Make gnuitar executable setuid root on UNIX, to allow it run with increased priority. 5. Installation See INSTALL file for common installation notes. 6. Interface and Controls There are 3 areas in the main window. The right area is a list of all available effects. The central area contains effects that are currently used. There are few buttons right to it should be used to add/remove effects and change its order. Each effect has separate top-level control window with appropriate sliders. Each effect-control box is shown in the window manager task bar. The left area contains available effect layouts, or presets, and button to add the one. Layout is a "snapshot" of your effects and its' settings, you can load/save using "File" menu. Big "Switch" button is used to switch layouts. In this manner, you can change current sound by one mouse/keyboard click. Big "START/STOP" button is used to start/stop playback. You may want to press it few times if you experience buffer overruns or broken sound output. You can write track of what you play to a file. Just click check-box "Write track" at the bottom of program window, enter filename and play. Don't forget that continuous track write can fill out your hard drive. The track file format is raw data, word length, signed (the sampling rate and mono/stereo are controlled from the sampling parameters dialog). You can convert it with SoX program like this sox -w -s -c 1 -r 44100 track.raw track.wav, and then to MP3: bladeenc track.wav Sox is available at http://home.sprynet.com/~cbagwell/sox.html, and Bladeenc is at http://home8.swipnet.se/~w-82625. Windows users can write track directly to .wav file (currently it is not available on UNIX). Autowah speed - speed of wah-wah'ing freq.low - low frequency (the cycle starts from this freq.) freq.hi - high frequence (the cycle stops at this freq.) mix - mix clean sound with processed sound 7. Effects The controls and description of the effects are described below. 7.1. Reverberator Reverberator produces echoed "space" sound. Controls: delay - delay time wet - "wet" (processed) sound volume dry - "dry" (clean) sound volume regen - number of repeats 7.2. Delay Another kind of reverberation. decay - this controls how the repeated sound is fading out time - this is the delay time repeat - number of repeats 7.3. Distortion distort - power of effect level - volume, for the case if you need to mute it quickly saturation - high-frequency "sand" in the sound lowpass - low-band filter that can be used to change the sound feel 7.4. Vibrato Vibrato sounds like when you turn the master volume on and off very quickly (few times per second). speed - the speed of modulation amplitude - the depth of modulation 7.5. Chorus depth - the depth of modulation speed - the speed of modulation wet - "wet" (processed) sound volume dry - "dry" (clean) sound volume regen - hard to explain 7.6. Echo Another reverberation effect, not like the others. While other reverb effects are just kinds of sound patterns repeating, echo attempts to achieve a large hall echo. decay - this controls how the repeated sound is fading out count - number of repeats size - controls delay time 7.7. Distortion 2 Another cool distortion. Emulates Ibanez TS9 pedal. drive - power of effect lowpass - low-band filter that can be used to change the sound feel. 7.8. Noise Gate Simple noise reduction effect. Should be used BEFORE distortion. IMPORTANT NOTES: - Should be used BEFORE the distortion. - If you want to achieve a note slight attack (fade in), you must increase the Hold time as much as possible. Otherwise with the low Attack time and low signal you the effect will be constantly false triggered, therefore breaking the fadein effect. Controls are: threshold - minimal volume of the sound required to pass signal to the output. hold - if the signal is below threshold during this time, it will be muted. Should be as low as possible. Simply - it is an effect triggering time. release time - if the signal is below threshold, the playback is not muted immediately but fades out this time instead attack - if the signal is above the threshold, it will fade in this time. Ususally should be 0, but having it non-zero will produce interesting effect just like the violin sound. hysteresis - the threshold required to turn off the playback when it is already asound (the regular threshold affects only the growing signal, while hysteresis affects fading signal). Should not be larger than the threshold. 8. Bugs o Windows version is not very stable yet. There could be problems with memory leaks and with sound initialisation/closing. Send bug reports to fonin@gnuitar.com 9. About Free Software Development You should always keep in mind, that development of free software doesn't work in the same way as commercial development. Every successful free software project has an active userbase behind it. This means that your comments, ideas and bug reports are extremely important. If something doesn't work, or some feature is missing, please mail me about it. Thank you in advance! You can send GNUitar related mails to me at mailto:fonin@gnuitar.com. 10. Legal Issues GNUitar is a free software and is distributed under the terms of GNU GPL license. You are free to copy and share the program with other people, you are not limited with the number of computers where you can use it. You can redistribute the program and the works based on it under the terms of GPL license. You have complete sources and detailed compile instructions to build the program yourself, as well as binaries. You have full freedom with using and sharing the program, according to the GNU software concept. 11. Related Links http://www.gnuitar.com/downloads.php and http://sourceforge.net/projects/gnuitar and http://freshmeat.net/projects/gnuitar - GNUitar project pages http://linux-sound.org - excellent categorized list of Unix sound software http://home.sprynet.com/~cbagwell/sox.html - SoX playback/record/processing software http://home8.swipnet.se/~w-82625 - BladeEnc, free MP3 encoder 12. Authors Max Rudensky <fonin@gnuitar.com> <fonin@yahoo.com> http://www.omnistaronline.com/~fonin Eugen Bogdan aka Dexterus <dexterus@hackernetwork.com>