anarsoul / gnuitar

GNU General Public License v2.0
1 stars 1 forks source link
                                GNUitar
                       Guitar processor software

                           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, 2.0, Glib, pthreads and OSS sound driver. It also works on Windows. This program was inspired by two earlier works:

Performance - UNIX notes

GNUitar executable file should be setuid root to process sound using real-time priority class; otherwise you'll hear glitches and delays while switching between windows. The program drops privileges as soon as the effect-processing thread has been started, even before any GTK+ initialization or command line handling, so it should be safe on any system. GNUitar has a latency of about 4-8ms on Linux/Pentium II/450/AWE64 ISA!

Performance - 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 depends mostly on the sound card's driver.

GNUitar for Windows has two playback methods:

How To Control Latency

The latency can be controlled to a high degree in the Options dialog. It can be invoked from the Options->Sampling Parameters menu (or by Ctrl-P). You will need to stop playback before entering this dialog. There is an option called "Fragment Size". The lower the fragment size is, the better is the latency, but this is not a free lunch. If the latency is too low, the CPU drain from constantly attending to the sound card leaves no time for anything else! You may need to increase the fragment size on low-end computers. Try increasing this value if you hear repeated scratches from the speakers.

General notes on how to achieve the best performance:

 * The lower the sampling rate, the less there is CPU load. Drawback
   is the lower sound quality.
 * The lower the fragment size, the better is the latency. Drawback
   is the higher system load.
 * The audible periodic scratches (DirectSound output) can be fixed
   by decreasing the overrun threshold (sampling parameters dialog).
 * Increase the fragment size and decrease the sampling rate on
   low-end CPU, to gain the best latency/overruns/load ratio.
 * On Windows, prefer WDM drivers, if possible. Try both MME and
   DirectSound playback; choose which is the best.
 * Prefer Linux over Windows. Properly tuned Linux kernel has 10-100
   times better latency on the same hardware.
 * Make gnuitar executable setuid root on UNIX, to allow it run with
   increased priority.

                             Installation

See [6]INSTALL file for common installation notes.

                        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 try pressing it a 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 file name and play. Don't forget that continuous track write can fill out your hard drive. The track file format is WAV data on Windows and Linux.

Linux WAV writing depends on libsndfile. However, if you do not have sndfile, then the data is raw 16-bit signed data, with the sampling rate and channels as defined in the sampling parameters dialog. You can convert it with [7]sox like this: sox -w -s -c 1 -r 44100 track.raw track.wav,

and then to [8]ogg vorbis: oggenc track.wav

                                Effects

The controls and description of the effects follow below.

Autowah

The autowah is implemented using a digital model of the moog ladder filter. The model was designed by Antti Huovilainen, and it was published at DAFx'04. On low resonance values it acts a lot like a 2nd order bandpass filter with some saturation colouring the sound into a warm, bloomy sound. On high resonance values, the wah becomes a sound synthesizer itself.

period length of one cycle of effect

low freq lowest frequency (the cycle ends at this freq.)

high freq high frequency (the cycle starts at this freq.)

dry/wet mix clean sound with processed sound

resonance choose resonance of the moog ladder filter. Values above 110 % lead to self-supporting oscillations.

continuous sweep The Wah can be run in two modes, one where it sweeps between the low and high frequency in /\/\/\/ type manner, and another where it "listens" to input signal and tries to detect guitar picks for triggering the wah sweep synchronously with guitar picking. The pick detection works best if the wah receives unaltered input signal from the guitar, rather than say distorted input from the overdrive effect.

Distortion

distort power of effect

level volume in case you need to mute it quickly

saturation high-frequency "sand" in the sound

lowpass lowpass filter that can be used to change the sound feel

Delay

A no-frills time-delay effect that can also split original signal in several physical output channels if available.

decay decay % between subsequent repeats

time delay time between repeats

repeat number of repeats

multichannel (if available) switch effect to circulate delay voices through available channels

Reverberator

Reverberator produces echoed "space" sound. Controls:

delay delay before repeating starts

wet "wet" (processed) sound volume

dry "dry" (clean) sound volume

regen decay % between subsequent repeats

Tremolo

Tremolo is a pitch shifter that does not preserve note relationships (in other words, a bit like a genuine tremolo bar). This effect is really a version of Stereo phaser with Wet at 100 % and only one channel used for output.

period length of one cycle of effect

amplitude depth of modulation

Chorus / Flanger

This effect mixes a time-delayed versions of input with the original signal simulating several players playing the same tune. Variations of this concept also produce flanger and vibrato effects.

ChorusUse several voices and long base delay time.

FlangerWith just 1 voice and low delay time, the effect becomes a flanger. However, by adding more voices and increasing the delay, the sound again turns choruslike. If the multichannel mode is available and enabled, the effect distributes one voice per output channel.

Vibrato If dry/wet at 100% (fully wet) and 1 voice, this effect is a vibrato.

delay fixed time delay before mixing

depth the depth of modulation

period the length of modulation cycle

voices number of chorus voices to mix

dry/wet dry vs. wet mixing ratio

regen feedbacks some of the output back to input

Echo

Another reverberation effect, but not like the others. Echo simulates a large hall echo using varying length of delays in all its voices, and produces complicated echo pattern that simulates large hall full of hard surfaces of different sizes.

decay decay % between subsequent repeats

voices number of independent echo voices

delay sets the length of maximum echo delay

Phaser

Phaser operates by introducing a variable frequency dependant delay over the audio signal. If the dry/wet ratio is at 50 %, the delayed components will produce interference with the original signal which produces moving notches across the audio spectrum, producing the phaser sound. However, if dry/wet ratio is at 100%, this effect becomes a vibrato.

period length of the modulation cycle

depth an unitless measure of the maximum delay imposed by the effect on the audio

dry/wet the dry vs. wet mixing ratio

Rotary speaker

Rotary speaker is an implementation of the combined horn and bass speaker mounted on opposite sides of a rotating cabinet. As the cabinet turns, the doppler effect shifts the audio spectrum up and down, depending on whether the speaker is receding or approaching.

period Time for one complete rotation of the cabinet.

Vibrato

Slows down and speeds up playback to achieve an effect like old tape. This is done by time-delaying the playback in a long sinuous curve.

Overdrive

Another cool distortion. Emulates the distortion circuits in many popular overdrive pedals such as Ibanez TS9.

drive how much amplification

clip changes tone from TS9-type fuzz to less powerful distortion

treble tone control

Tube amplifier

Because Overdrive is limited to simulating the Ibanez TS9, another effect is required for more powerful distortion sounds. The effect loosely models a tube amplifier with a variable number of output stages, each which add different kind of clipping to the sound. Some tone controls are provided for additional flexibility.

stages Number of stages. All can be used to produce distortion, 5 stages being very close to overkill.

gain Gain per stage. Higher gains drive the later stages into more clipping.

bass cut A highpass filter with tunable cutoff frequency. Increasing this value reduces bass from the output.

middle cut Decreasing the value of the control introduces a deepening notch at 720 Hz, allowing the effect to be used for dark distortion sounds.

treble cut A lowpass filter with tunable cutoff frequency. This can be used to change the tone and control noise.

Noise gate

Simple noise reduction effect.

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 fade-in effect

Controls are:

Equalizer bank

A no-frills equalizer effect with plenty of sliders for fine grained control of the frequency response. Equalizers are rumoured to be especially useful before and after distortion effects.

Pitch shifter

Pitch shifter alters audible pitch by dividing the input into several small buffers and playing through them in a different rate, causing the pitch alteration. Because rate shifting implies generating new sample data or omitting some of the sample data, there is a discontinuity problem at buffer edges which is handled through weighting the buffer data with windowing function and overlapping the buffers in such a way that sample amplitude remains fairly constant.

Bugs With many pitch shifting values several frequencies encounter difficult phase cancellation that may render some notes almost inaudible or significantly alter their characteristics. Additionally, as the new sample data is "generated" from audio data across several hundred milliseconds, there will be echo effects when adjusting the rate upwards. Finally, the dry signal is delayed by this effect to control some of the phase cancellation during wet/dry mixing phase. The latency introduced depends on the amount of rate shifting.

halfnote how many half-notes to adjust upwards or downwards

finetune adjust for in-between tones for half-notes

wet/dry select mix % between unprocessed and processed signal

Tuner

This is a simple general-purpose instrument tuner. The display contains: