Updated the piano booster BUILD README faq markdown docs.

This commit is contained in:
louis-barman 2020-11-25 21:17:20 +00:00
parent ffe956a7b2
commit b646048894
3 changed files with 124 additions and 425 deletions

103
BUILD.md
View File

@ -1,90 +1,99 @@
# Linux and BSD Unix
# Build instructions for Linux and BSD Unix
Ensure that the build required packages are installed. Full list of them you can find [here](pkgs).
Ensure that the following packages are installed:
`build-essential`, `cmake`, `pkg-config`, `libftgl-dev`, `qtbase5-dev`, `qttools5-dev`, `librtmidi-dev` , `libfluidsynth-dev`, `fluid-soundfont-gm`
Then type:
`cmake .`
or
To generate a project makefile using CMake, create a build folder
and then run CMake from it:
```
$ mkdir build
$ cd build
$ cmake ..
```
`cmake . -DCMAKE_INSTALL_PREFIX="/usr"`
To compile the PianoBooster source code type:
`make`
`make -j$(nproc)`
Finally as root type:
The pianobooster binary executable is now in a new build subdirectory. Piano Booster is designed to run in place so you can type `build/pianobooster` to start running the program.
`make install -C build`
(Optional) If you wish to install PianoBooster as root type:
(The pianobooster binary executable is now in the "build" subdirectory.)
`make install`
To build a debug version create a dir called "debug" and change to that dir and then type:
There is no make uninstall command but the files that have been installed are listed in a file called `install_manifest.txt` which can then be used to manually delete the installed files.
`cmake -DCMAKE_BUILD_TYPE=Debug .`
To build a debug version create a directory called "debug" and change to that dir and then type:
(Alternatively you can use qmake followed by make.)
`cmake -DCMAKE_BUILD_TYPE=Debug ..`
See [DEB](pkgs/deb) for more details.
See [RPM](pkgs/rpm/pianobooster.spec) for more details.
# Build instructions for macOS
See [ARCH](pkgs/arch/PKGBUILD) for more details.
See [TGZ](pkgs/slack) for more details.
# macOS
Install latest Xcode (from Apple Developer Connection, free registration required).
Install the latest Xcode (from Apple Developer Connection, free registration required).
Install CMake and QT libraries via Homebrew:
`$ brew install cmake qt5 ftgl jack`
`$ brew install cmake qt5 ftgl pkg-config fluid-synth`
Generate XCode project file via CMake:
To generate the project makefile first create a `build` directory
and then from that directory type:
`$ cmake -G Xcode . -DCMAKE_PREFIX_PATH=$(brew --prefix qt)`
`cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt)"`
Open the project file in XCode, set whatever options you like (universal or single architecture,
debug or release etc.) and compile.
To compile the PianoBooster source code type:
To make a self contained application bundle use QT's macdeployqt tool (included in QT 4.5.0).
`make`
# Windows
To copy the language translations into the build directory type:
To compile in Windows install the Open Source version of Qt and CMake and optionally Geany.
When installing Qt select the option to download and install the MinGW compiler. Open the
Qt Command Prompt and then change to the "PianoBooster" directory and then type the
command below:
`make install-translations`
`"C:\Program Files\CMake 2.6\bin\cmake.exe" -G "MinGW Makefiles" .`
To make a self contained application bundle use QT's macdeployqt tool (included in QT).
`$(brew --prefix qt)/bin/macdeployqt build/pianobooster.app -dmg`
# Build instructions for Windows
To compile in Windows install the Open Source version of Qt and CMake.
When installing Qt select the option to download and install the MinGW compiler. Open the Qt Command Prompt and change to the "PianoBooster" source code directory and then create a `build` directory and then from that directory type:
`cmake.exe -G "MinGW Makefiles" ..`
Once this is completed type:
`make`
Or alternatively you can install QtCreator and then open the pianobooster.pro.
Or alternatively you can install QtCreator and then open the `CMakeLists.txt`.
# Build options
**USE_FTGL**: link with ftgl; enabled by default; disabling notes localization.
Using `cmake` without any flags defaults to the recommended build options.
However the following build options below can be changed by using the `-D` flag to `cmake`.
**NO_DOCS**: do not install documents; disabled by default.
**WITH_INTERNAL_FLUIDSYNTH:** build with an internal FluidSynth sound generator [Default:ON]
**NO_LICENSE**: do not install license; disabled by default.
**USE_BUNDLED_RTMIDI:** Build with bundled rtmidi (for older distributions only) [Default: OFF]
**NO_CHANGELOG**: do not install changelog; disabled by default.
**USE_FTGL:** Build with ftgl for notes localization [Default:ON]
**WITH_MAN**: install man page; disabled by default.
**USE_SYSTEM_FONT:** Build with system font [Default: OFF]
**INSTALL_ALL_LANGS**: install all languages; disabled by default for cmake and always enabled for qmake.
**USE_JACK:** Build with Jack. The use of JACK is not required other than for BSD Unix. [Default: OFF]
**USE_BUNDLED_RTMIDI**: build with bundled (not system) rtmidi. This is only required
for older distributions that do not include the system rtmidi; disabled by default.
**DATA_DIR**: Build with specified data directory; [Default:"share/games/pianobooster"]
**USE_SYSTEM_FONT**: do not use and do not install bundled font, use system font instead; enabled by default.
**NO_LANGS**: Do not install languages; [Default: OFF]
**USE_FONT**: build with specified font; null by default.
**NO_DOCS**: Do not install documents [Default: OFF]
**DATA_DIR**: build with specified data directory; "share/games/pianobooster" is default.
**NO_LICENSE**: Do not install license [Default: OFF].
**NO_LANGS**: do not install languages; disabled by default.
**NO_CHANGELOG**: Do not install changelog [Default: OFF].
**WITH_MAN**: Install man page [Default: OFF].

169
README.md
View File

@ -1,103 +1,63 @@
![logo](logo/Logotype_horizontal.png)
INTRODUCTION
============
# INTRODUCTION
Piano Booster is a MIDI file player that displays the musical notes AND teaches you how to
play the piano. You can play along to any track in the midi file and PianoBooster will
follow YOUR playing. PianoBooster makes sight reading fun!
play the piano.
The difference between playing along to a CD or a standard MIDI file
is that Piano Booster listens and reacts to what you are playing on a
MIDI piano keyboard.
You can play along to any track in the MIDI file and PianoBooster will
follow your playing. Piano Booster makes learning to sight read fun!
Piano Booster is a free (Open Source) program available from: <https://github.com/captnfab/PianoBooster/>
Piano Booster is a free (Open Source) program, available from: <http://pianobooster.sourceforge.net/>
Original work by Louis J. Barman can be found here: <http://pianobooster.sourceforge.net/>
# FEATURES
A huge thanks to him and to all the contributers.
WINDOWS
=======
To run Piano Booster you need a MIDI Piano Keyboard and a MIDI interface for the PC. (If you
don't have a MIDI keyboard you can still try out PianoBooster using the PC keyboard, 'x' is
middle C - but a MIDI piano is recommend).
To hear the music you will need a General Midi compatible sound synthesizer. Unfortunately
the "Microsoft GS Wavetable software synthesizer" that comes with Windows XP introduces an
unacceptable delay (latency) between pressing a note and hearing the sound. For this reason
the use of "Microsoft GS Wavetable software synthesizer" is not recommend. Please see the
forum for possible solutions.
* The musical accompaniment follows your playing, if you stop then so does the music.
* Play a single hand and Piano Booster will play the other hand in time with you.
* Change the speed of playback to match your playing ability.
* Transpose +/- 12 semitones without stopping the play back.
* Plays any standard MIDI or KAR file.
* Play along to any instrument in the MIDI file.
* Adjust the volume of the current part or the volume of your piano part.
* Measures the accuracy of your playing.
* Timing markers show if you are playing ahead or behind the beat.
* A different instrument sound is used for the right and wrong notes that you play on the piano.
macOS
=====
# GETTING STARTED
To run Piano Booster you need a MIDI Piano Keyboard and a MIDI-USB interface if the keyboard
does not have a USB interface. (If you don't have a MIDI keyboard you can still try out
PianoBooster using the computer's keyboard, 'x' is middle C).
Binary executable version of Piano Booster are available for Windows, MacOS and Linux, which can be downloaded from the [Piano Booster website](<http://pianobooster.sourceforge.net/>). Piano booster now includes a built in version of the FluidSynth sound generator. In order for FluidSynth to work and to hear sound a `.sf2` (sound font) file is required which must be loaded using the MIDI Setup/Fluidsynth menu of Piano Booster. A recommended General Midi (GM) sound font file is the `FluidR3_GM.sf2`
To hear music from the computer you will need a General Midi compatible sound synthesizer.
While there are many possible choices for the Mac (Timidity, FluidSynth or an external MIDI
Synth), the easiest way is to use SimpleSynth, which can be obtained for free (MIT license)
from: <http://notahat.com/simplesynth>
To play along with Piano Booster you will need a MIDI Piano Keyboard.
If you don't have a MIDI keyboard you can still try out PianoBooster using the PC keyboard, 'x' is middle C - but a MIDI piano is highly recommended.
After connecting the MIDI keyboard you need to setup the midi input device using
the Piano Booster MIDI setup menu.
This must be started before Pianobooster, and also allows to load custom Soundfonts.
Piano Booster now comes with a music teaching course called Booster Music.
The MIDI files for this course are in a folder called `BoosterMusicBooks` located in the `Music` folder on your PC.
The Booster Music teaching course is also available on the [Piano Booster website](<http://pianobooster.sourceforge.net/>).
Use the File/Open from the Piano Booster menu to load the MIDI file ".mid" or a karaoke ".kar" file.
Double Click on the DMG file containing PianoBooster, then just drag the pianobooster.app
file wherever you wish (/Application folder is suggested).
[pianobooster-mac-0.6.5-alpha1.dmg](https://github.com/chrisballinger/PianoBooster/releases/tag/v0.6.5-alpha1) (not official)
LINUX and BSD UNIX
==================
To run Piano Booster you need a MIDI Piano Keyboard and a MIDI interface for the PC. (If you
don't have a MIDI keyboard you can still try out PianoBooster using the PC keyboard, 'x' is
middle C - but a MIDI piano is recommend).
To hear music from the computer you will need a General Midi compatible sound synthesizer.
On Linux to start fluidsynth type the following on a terminal window.
```
fluidsynth -g 1.0 -a alsa -o midi.alsa_seq.id=fs2 /usr/share/sounds/sf2/FluidR3_GM.sf2
```
An alternatively you can used TiMidity by type the following on a terminal window.
```
timidity -iA -B2,8 -Os -EFreverb=0
```
MIDI FILES
==========
To run PianoBooster you will need some Midi files preferably with right and left piano
parts on channels 4 and 3. Some high quality demo MIDI files that are compatible with
PianoBooster are available in doc/courses/*/ directories.
INSTRUCTIONS
============
The MIDI input device is used to connect your piano keyboard to the PC. First ensure that your
piano keyboard is connected up to the PC using a MIDI USB adaptor (or through a PC sound card).
Once the Piano Booster application starts up you must first setup the midi input and midi
output interface from the Setup menu. Next open a midi file ".mid" or a karaoke ".kar" file
using File/Open from the Piano Booster menu. Now choose the skill level, if you want to
just listen to the midi music - select 'listen', to play along with a midi keyboard with
the music following your playing - select 'follow you'. Finally click on the Play icon to
Finally choose the skill level, if you want to
just listen to the MIDI music - select 'listen', to play along with a MIDI keyboard with
the music following your playing - select 'follow you' and then click on the Play icon to
start.
It is recommended that you shut down all other programs while running Piano Booster so that
the scrolling notes move smoothly across the screen.
TRANSLATIONS
============
# TRANSLATIONS
PianoBooster isn't translated in your language? Help us, and we will gladly ship
new translations with it.
LICENSE
=======
Please see the [Web-based continuous localisation](https://hosted.weblate.org/projects/pianobooster/) (Weblate) to contribute to the language translations.
The translation required for the Piano Booster app are located [here](https://hosted.weblate.org/projects/pianobooster/pianobooster/) and the translation for the Booster Music course are located [here](https://hosted.weblate.org/projects/pianobooster/boostermusic/).
Piano Booster is fully copyrighted by the author and all rights are reserved.
# LICENSE
Piano Booster is fully copyrighted by the authors and all rights are reserved.
PianoBooster is free software (Open Source software): you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the Free Software
@ -112,63 +72,26 @@ The Piano Booster Documentation and Music are released under the Creative Common
[PianoBooster License](license.txt)
SOURCE CODE
===========
Download and uncompress the archive file below and then follow the instructions in
the *BUILD.md* file.
[PianoBooster releases](https://github.com/captnfab/PianoBooster/releases)
# SOURCE CODE
As part of GNU General Public License the source code for PianoBooster is available from
the GitHub site <https://github.com/captnfab/PianoBooster>. See the [BUILD.md](BUILD.md) for
instructions on how to build the source code.
DEBUGGING
=========
To get a backtrace, build Piano Booster with DEBUG option
type:
`cmake -DCMAKE_BUILD_TYPE=Debug .`
type:
`gdb ./pianobooster`
then:
`run`
then:
`bt`
DOCUMENTATION
=============
[Documentation](doc/README.md)
[Changelog](Changelog.txt)
BUGTRACKER
==========
# BUGTRACKER
[Issues](https://github.com/captnfab/PianoBooster/issues)
CONTRIBUTING
============
# CONTRIBUTING
PianoBooster is community developing project since 2018. You're welcome with patches:
PianoBooster is community developing project. You're welcome with patches:
[Pull Requests](https://github.com/captnfab/PianoBooster/pulls)
We have many [issues](https://github.com/captnfab/PianoBooster/issues) always.
We are looking for musicians to make music for pianobooster. It can be educational courses or other melodies: [music sources](music/src). For more information look at [README.md](doc/courses/README.md) and [faq.md](doc/faq.md).
We are looking for musicians to make music for pianobooster. It can be educational courses or other melodies: [music sources](music/src).
PLATFORMS
=========
We support Linux, BSD Unix and Windows platforms. We do not have macOS developers at the moment.
Thanks to everyone who has already made contributions to the Piano Booster project.

View File

@ -1,269 +1,36 @@
# Frequently Asked Questions
## Where are the music files?
Piano Booster now comes with it's own MIDI music course called `Booster Music`. The first time you run Piano Booster a music folder called `BoosterMusicBooks` is created in your `Music` folder on your PC. The Booster Music course is also available on the Piano Booster website. Also many other MIDI files that work with Piano Booster can be found by searching the web.
Piano Booster uses MIDI music files (.mid) or karaoke files (.kar) to play music.
## There is no sound, what is wrong?
First insure that you have installed the latest version of Piano Booster that includes the integrated FluidSynth sound generator. To check this open the Piano Booster MIDI setup dialogue window and confirm there is a FluidSynth tab shown. You also need to ensure that there is a SoundFont file loaded, the recommended sound font is called `FluidR3_GM.sf2`.
See [this thread](http://piano-booster.2625608.n2.nabble.com/Pieces-of-music-that-I-have-enjoyed-playing-please-add-to-this-list-td1600345.html)
on the forum which list useful source of midi files on the net.
Please add to this list if you find any pieces of music that you enjoy playing.
## How do I connect a MIDI piano keyboard?
First plug the MIDI keyboard into your PC, for older MIDI keyboards that do not use USB MIDI you will need to use a MIDI adaptor.
After connecting the MIDI keyboard open the Piano Booster MIDI setup menu and
then select the MIDI input interface that matches your keyboard.
## Community Favorites MIDI
## Does PianoBooster work with Jack?
JACK is not required for Piano Booster to work correctly since Piano Booster can already talk directly to a MIDI sound generator and a MIDI keyboard. JACK is mainly used in advanced music studio setups where there are multiple different sound sources inputs and outputs that need connecting together. JACK is also required on BSD Unix. Piano Booster is not normally compiled with support for JACK so if you really want to use JACK you will need to recompile PianoBooster from the source code.
Google search: Taylor's Traditional Tune Book, and download the "English Tunes". They are only single melody to play with quite good MIDI arrangements. Barry is quite fond of key changes which make it quite challenging. Especially "I Saw Three Ships."
## Will Piano Booster work with a real piano?
No, it will only work with a MIDI piano keyboard. As this is technically very difficult there are no plans to add this feature.
[Bach collection](https://www.mutopiaproject.org/cgibin/make-table.cgi?collection=bachgb&preview=1) and others from repository of sheet music - [Mutopia Project](https://www.mutopiaproject.org/)
[Miracle Piano Tutor](http://piano-booster.2625608.n2.nabble.com/attachment/4582249/0/teachmid.tar.gz)
## How do I start start a sound generator on Linux?
If you don't have a version of PianoBooster that includes the integrated FluidSynth (recommended) you can start FluidSynth manually. First install the FluidSynth `fluidsynth` and the GM sound font `fluid-soundfont-gm` packages and then run the following command line:
## CC and MIDI: What Songs are Legal to Share
```
fluidsynth -g 1.0 -a alsa -o midi.alsa_seq.id=fs2 /usr/share/sounds/sf2/FluidR3_GM.sf2
Piano Booster will only distribute MIDI files submitted to the project under the Creative Commons (CC) License.
```
An alternatively you can used TiMidity by typing the following in a terminal window:
MIDI files created by hand constitute "original work". Original work can be released under the CC license. (see [forum discussion](http://piano-booster.2625608.n2.nabble.com/Creating-music-for-PianoBooster-using-MMA-Everyone-can-help-td4167350.html#a4167350))
MIDI files copied from existing works, (either digital copies, format-shifted copies, or 'recording' the playback output of works) are subject to the copyright laws under which the original works were released.
... (other cases? please add relevant links, discussion)
## Making MIDI
Although MIDI files can be generated in several ways, this guide covers a method that also produces sheet music and accompaniment.
The general process: write "abc notation" of music (ABC file); convert ABC file to Solo MIDI and Sheet Music; write accompaniment "hints" (MMA file); convert solo MIDI and MMA file to final MIDI (ready to practice playing).
### ABC Notation
The ABCPlus notation describes the notes to be played by the right and left hands in plain text ascii-character file.
[Wiki](http://en.wikipedia.org/wiki/Abc_notation)
[Site](http://abcnotation.com/)
[The ABC Plus Project](http://abcplus.sourceforge.net/)
[Examples](http://abcnotation.com/examples)
### ABC to MIDI Conversion
#### Generating MIDI file
The ABC file is converted to a MIDI file using the abc2midi tool. This creates a MIDI file with right and left hand parts.
#### Generating sheet music
The ABC file can also be converted to a sheet music image with the abc2mtex tool.
### Auto-generated Accompaniment
The MMA software can greatly simplify creating accompanying "background" music.
[Musical MIDI Accompaniment](http://www.mellowood.ca/mma/)
## Open a MIDI File
Select File -> Open from PianoBooster main menu and then choose the .mid file or the .kar file. If you put all your MIDI files in adjacent directories then each directory will appear as books that can be accessed using the -book drop down list- and then each MIDI file can be accessed from the song drop down list.
## Listen to the MIDI music
When learning a new piece of music it is recommended that you first listen to the piece of music to hear how it should sound. Set the /skill level to listen/ and then click the /play stop button icon/. To stop the music click the /play/stop button again. To play the music from the beginning click on the /play from start button/.
## Play along with the MIDI music
Piano Booster has been specially designed so that you can play along with the MIDI music using a piano keyboard. Ensure that MIDI input is correctly set up. You can choose which hand to play select 'right', 'both' or 'left' from the hands selection. If you choose to play just a single part then Piano Booster will automatically play the other part for you. There are two different ways of playing along the 'follow you' mode and the 'play along' mode. When learning a new piece of music the follow you mode makes it much easier but you should progress to the 'play along' method as this ensure that you play with the correct timing.
## Playing the piano with the music 'following your' playing
Select the 'follow you' option and choose which hand you want play and then click the play button to start the accompaniment playing.
The music will start playing and at the same time you should playing along to the notes shown on the screen.
## Connecting MIDI Hardware
While Piano Booster can take input from the computer keyboard, it is recommended to use a MIDI capable keyboard or piano. This section assumes you are using a keyboard or piano with either a USB MIDI port or MIDI input/output ports with a MIDI/USB adapter.
MIDI or Musical Instrument Digital Interface allows electronic musical equipment to communicate with each other. MIDI works like a pipeline; data (the music notes) "flows" in one direction. Every MIDI device port is labeled as either IN/input or OUT/output. The Output of the first device goes to an Input of the next device.
If your keyboard has a USB MIDI port, then a standard USB cable to the computer will provide both input from keys and output to the keyboard speakers (if there are speakers).
If the keyboard as MIDI IN/OUT ports, then the OUTPUT port of keyboard must be connected the INPUT of the USB MIDI adapter. To hear the Piano booster output on the keyboard speakers, the OUTPUT of the USB adapter must be connected to the INPUT port on the keyboard.
## How do I hear the sound on Linux, BSD Unix?
To hear the sound Piano Booster needs a MIDI sound generator,
there are two different General Midi sound generators available on Linux, 'fluidsynth' and 'timidity'.
It's recommends to use 'fluidsynth' for BSD Unix.
To install fluidsynth you must install the following packages 'fluidsynth' 'fluid-soundfont-gm' and
'fluid-soundfont-gs' using your favourite package manager
or
Arch Linux: 'fluidsynth' 'soundfont-fluid'.
BSD Unix: 'fluidsynth' 'fluid-soundfont'.
To start the fluidsynth sound generator copy and paste the following command line (one very long command line).
Using ALSA:
`fluidsynth -i -s -g 0.4 -C 0 -R 0 -r 44100 -c 6 -z 128 -l -a alsa -o audio.alsa.device=plughw:0 -o midi.alsa_seq.id=fs /usr/share/sounds/sf2/FluidR3_GM.sf2 /usr/share/sounds/sf2/FluidR3_GS.sf2`
Using JACK:
`fluidsynth -i -s -g 0.4 -C 0 -R 0 -r 44100 -c 6 -z 128 -l -a jack -o midi.alsa_seq.id=fs -j /usr/share/sounds/sf2/FluidR3_GM.sf2 /usr/share/sounds/sf2/FluidR3_GS.sf2`
BSD Unix does not have ALSA, so you should use JACK:
`fluidsynth -i -s -g 0.4 -C 0 -R 0 -r 44100 -c 6 -z 128 -l -a jack -j /usr/local/share/sounds/sf2/FluidR3_GM.sf2 /usr/local/share/sounds/sf2/FluidR3_GS.sf2`
*Note:* Path `/usr/share/sounds/sf2` is Debian, Ubuntu, OpenSuse, Slackware, etc. For Alt Linux, Arch Linux, CentOS, Fedora, Mageia, OpenMandriva, ROSA, etc. you must use path `/usr/share/soundfonts` instead. BSD Unix uses `/usr/local/share/sounds/sf2`.
*Note:* JACK in BSD Unix cannot be started realtime by user, but it starts realtime by default, user does not have permissions. Disabling realtime helps. How to disable realtime or allow user to use realtime please ask your favorite BSD Unix forum.
If you have a fast machine then you can leave out the flags `-C 0 -R 0 -r 22050` which turns off the reverb, chorus and reduce the sample rate.
The flags `-c 6 -z 128` control the latency try `-c 5 -z 128` for less latency,
but at the risk of audio drop outs.
The flags `-o audio.alsa.device=plughw:0` bypasses the Pulse Audio layer
which caused a lot of latency delay but unfortunately these flags may also
bypass the desktop volume controls.
Flag `-i`: don't read commands from the shell. Flag `-s`: start FluidSynth as a server process. Flag `-g 1`: set the master gain = 1.
Flag `-a alsa` or `-a jack`: the name of the audio driver to use.
Flag `-j`: attempt to connect the jack outputs to the physical ports.
Flag `-l`: don't connect to LASH server.
For more information on running fluidsynth with low latency see
[this page](https://github.com/FluidSynth/fluidsynth/wiki/LowLatency).
On PianoBooster set the Setup/Midi Setup/Midi Output Device: to `FLUID Synth (fs):0`
If you get problems with unsteady playback or the audio cutting out then try closing all other programs,
turning off your wireless network and unplug any network cable.
If you get an error, make sure to have snd-seq-midi kernel module loaded in your
system (sudo modprobe snd-seq-midi).
You might prefer to use qsynth as GUI interface to fluidsynth for easy setting
of Reverbs, chorus effects, etc.
Using 'timidity': [wrapper script and desktop file](https://github.com/captnfab/PianoBooster/tree/master/tools/timidity).
Using 'fluidsynth': [wrapper script and desktop file](https://github.com/captnfab/PianoBooster/tree/master/tools/fluidsynth).
## How do I hear the sound on Arch Linux?
Timidity in Arch Linux does not work out of box.
To use Freepats (freepats-general-midi package) with TiMidity, add the following lines to /etc/timidity++/timidity.cfg:
`soundfont /usr/share/soundfonts/freepats-general-midi.sf2`
[Arch Linux Wiki](https://wiki.archlinux.org/index.php/Timidity)
Potentially needs to disable pulseaudio to use ALSA.
JACK can be used by jack or jack2. jack has better debug logs than jack2 to see errors, but they work equally.
But JACK does not work out of box, needs to configure it.
run:
`sudo sed -i "s|# End of file|@audio - rtprio 99|g" /etc/security/limits.conf`
run:
`sudo usermod -a -G audio exton`, where exton is user
log out and log in
stop pulseaudio:
`systemctl --user stop pulseaudio.socket`
run script:
`pianobooster-fluidsynth`
start pulseaudio after:
`systemctl --user start pulseaudio.socket`
*Note:* Fluidsynth works without JACK with ALSA out of box even without conflicts with pulseaudio.
## How do I hear the sound on Mac?
While there are many possible choices General Midi sound generators for the Mac
(Timidity, FluidSynth or an external MIDI Synth), the easiest way is to use
SimpleSynth, which can be obtained for free (MIT license) frome [here](http://notahat.com/simplesynth).
This must be started before Pianobooster, and also allows to load custom Soundfonts.
## How to use Fluidsynth with JACK
Just enable `use_jack="1"` in /usr/bin/pianobooster-fluidsynth. If `use_jack="0"`, then JACK is disabled.
## Why is there a delay between pressing the note and hearing the sound?
The delay between pressing the note and hearing the sound is called the latency.
Unfortunately some sound generators introduce a latency delay between receiving
the command to play a note and producing the audible sound. This unwanted delay
can make it extremely difficult to play along with the music.
The MS GM Wavetable Synthesizer that comes with Windows also suffers from this
problem as it introduces a noticeable delay of 150 milliseconds (0.15 seconds).
## My sound generator has high latency, what can I do?
The first thing to do is to turn up the speakers on your piano keyboard
(provided that you are using a piano keyboard that has it's own sound generator)
so that you can hear what you are playing without a delay.
Then aim to use the **'Play Along'** mode as much as possible.
To use the **'Follow You'** mode you will need set the latency value (see the next question)
or alternately use a realtime sound generator with low latency (recommended, For Linux, BSD Unix see
[fluidsynth Low Latency page](https://github.com/FluidSynth/fluidsynth/wiki/LowLatency).
```
timidity -iA -B2,8 -Os -EFreverb=0
```
## What is the latency fix?
The Latency fix aims to counteract the latency delay of the sound generator by
deliberately running the musical accompaniment several milliseconds ahead of
what you are playing on the piano to try and cancel out this delay within the
sound generator.
The latency value is entered from the 'settings/Midi setup' page.
If you are using the MS GM Wavetable Synthesizer then try entering a value for the delay of 150 mSec.
Whenever you set a value for the latency then the instrument sound
for your piano is automatically set to 'None' to mute
the delayed sound of your playing through the sound generator.
Remember to turn up the volume of the speakers on your piano.
If your piano does not have it's own speakers or you are still
using the PC keyboard then this fix will not work, sorry.
Unfortunately when you stop playing using the **'Follow You'** mode
then the music will stop in the wrong place (because the music
was deliberately being run ahead of your playing).
The use of the latency fix is less than ideal and so the **best**
solution is to change to different realtime sound generator that has a low latency delay.
Optional workaround: Try using a real time kernel.
## What value should I use for the latency fix?
To work out the value of the delay first enable the timing markers from the preferences menu.
(These are the white crosses that are drawn over the notes that show *when* you pressed the note).
Then using the **'Play Along'** mode look at the timing markers to see
if you are playing ahead or behind the notes.
If you are playing consistently behind the beat then try increasing
the latency value by say 100 milliseconds.
Conversely if the timing markers show you are playing ahead of the beat
then try decreasing the latency slightly.
It is always best to use a value that shows you are
playing *slightly ahead of the beat* rather than behind the beat.
(This is because Piano Booster in **'Follow You'** mode will slow down
the music if you are playing behind the beat.)
To disable the latency fix enter a value of zero.
The latency fix is no longer required since Piano Booster on Windows now includes the integrated FluidSynth sound generator which works in real-time and has low latency.
Previously on windows the latency fix was required when using the MS GM Wavetable Synthesizer sound generator which has very high latency.