-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
659 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
layout: post | ||
title: "Server Installation – Raspberry Pi" | ||
heading: "Install Jamulus Server on a Raspberry Pi" | ||
author: "fredsiva" | ||
lang: "en" | ||
--- | ||
|
||
This guide shows you how to install Jamulus on a Raspberry Pi. | ||
<!--more--> | ||
|
||
## Server Installation - Raspberry Pi | ||
|
||
**_Please ensure you have read the [server overview](/wiki/Running-a-Server)_** | ||
|
||
_Jamulus has been tested on a Raspberry Pi 4 2Gb by Jamulus user [SIVA Frédéric](https://sourceforge.net/u/fredsiva/profile/)_ | ||
|
||
1. Install Raspbian Buster (allow [VNC](https://www.raspberrypi.org/documentation/remote-access/vnc/) and [SSH](https://www.raspberrypi.org/documentation/remote-access/ssh/README.md) for comfort, but will ultimately run without VNC for higher speed) | ||
|
||
1. Edit [config.txt](https://www.raspberrypi.org/documentation/configuration/config-txt/) to enable boot without HDMI by adding `hdmi_force_hotplug=0` | ||
|
||
1. [Get the sources](/wiki/Installation-for-Linux#get-jamulus-sources), install the [dependent packages](/wiki/Installation-for-Linux#install-dependencies) according to the Linux client install guide **but do NOT install JACK package(s)** - you don't need them on a [headless server](/wiki/Server-Linux#running-a-headless-server). To run a client, install all listed dependencies. | ||
|
||
1. Compile the source code for a server as per [these instructions](/wiki/Server-Linux#compile-sources-create-a-user). Compile a client using the [default instructions](/wiki/Installation-for-Linux#compile-this-bad-boy). | ||
|
||
This will build Jamulus and put it in `/usr/local/bin/Jamulus` | ||
|
||
Connect Raspberry Pi with Ethernet cable to your router. | ||
|
||
If you are running a server, test by starting with the `--server` option, and watch GUI on VNC (or HDMI). When running as a client, you should see the GUI start. | ||
|
||
`Jamulus -s` | ||
|
||
If all is well, run in your chosen [server mode](/wiki/Choosing-a-Server-Type) as follows (or use systemd unit script provided in the [Linux guide](/wiki/Server-Linux#create-a-start-script)), for example a public server: | ||
|
||
`sudo chrt 99 ionice -c1 nice -n -20 Jamulus -s -n -e [yourCentralServer] -o "yourServerName;yourCity;[country ID]"&` | ||
|
||
**Please also see this [important note on Central Servers](/wiki/Central-Servers).** | ||
|
||
See also [Command Line Options](/wiki/Command-Line-Options) for other parameters you can set. | ||
|
||
### To upgrade Jamulus | ||
|
||
Stop the server and simply repeat step 3 for obtaining the sources and installing above. | ||
|
||
If you want to install a specific release, you can do the following using git (where `[RELEASE]` is a release ID such as r3_5_8). See the [official tagged releases](https://github.com/jamulussoftware/jamulus/releases). | ||
|
||
First, `cd` inside the directory in which the Jamulus sources were unpacked/downloaded, then use the following commands: | ||
|
||
~~~ | ||
git pull | ||
git checkout [RELEASE] | ||
~~~ | ||
|
||
Then compile the sources as per a new install. Start Jamulus back up. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
--- | ||
layout: post | ||
title: "Linux Bash Installation Script" | ||
heading: "Bash Installation Script" | ||
author: "niebert" | ||
lang: "en" | ||
--- | ||
|
||
Thanks to [niebert](https://github.com/niebert), if you plan to install Jamulus on many Linux machines, you can try this script. | ||
<!--more--> | ||
|
||
The following example was tested on Linux Mint and combines all the commands to install Jamulus on Linux into one script (currently for Ubuntu/Linux Mint). | ||
|
||
## How it works | ||
|
||
To incorporate the different commands for different Linux distributions, variables define the distribution and the release for which the installation script should be performed. The following focuses on Ubuntu with release 18.04 as example. So the suggested script name for the release is e.g. `install4ubuntu18_4.sh`. The script commands are generic so that the installation could also be modified so that they work on other Linux distributions. | ||
|
||
### Installation dependent on Linux Distribution | ||
The following script calls different installation commands depending on the Linux distribution. | ||
The variable `DISTRO` defines which commands are executed. Set the variable depending on the Linux distribution you are using. | ||
* `DISTRO="Ubuntu"` for a Ubuntu or Linux Mint | ||
* `DISTRO="Debian"` for a Debian or Raspbian Linux | ||
* `DISTRO="Fedora"` for a Fedora Linux | ||
Furthermore if the installation is dependent of the release the variable `LINVERSION` is introduced but is currently not used. In the Ubuntu `if` statement there is an example how version depending installation calls can be performed. | ||
```bash | ||
if [ "$LINVERSION" = "18.4" ] | ||
then | ||
echo "Perform Installation Specifics for $DISTRO Version $DISTRO" | ||
fi | ||
``` | ||
The variable `LINVERSION` is currently not used in the following script but it is just a demo how to use the version specific installation commands. | ||
|
||
### Adaptation of the Installation Script | ||
If you want to create an installation script for Debian just copy the script `install4ubuntu18_4.sh` to `install4debian10_6.sh` and modify the distro variables to | ||
```bash | ||
#!/bin/sh | ||
# set DISTRO either to "Ubuntu", "Debian" or "Fedora" | ||
DISTRO="Debian" | ||
LINVERSION="10.6" | ||
``` | ||
After that, test the installation on Debian and modify the commands so that the installation script works on Debian. You can share working scripts, if you like. **Edit by Jamulus-Website maintainers:** You should contact [niebert](https://github.com/niebert) if you want to share scripts. | ||
|
||
### The Installation Script | ||
Copy the following installation script into a file and save it to the filename `install4ubuntu18_4.sh`. After saving the file e.g. in your `Download` directory change to the directory and call the following script with `sh install4ubuntu18_4.sh`. | ||
```bash | ||
#!/bin/sh | ||
# set DISTRO either to "Ubuntu", "Debian" or "Fedora" | ||
DISTRO="Ubuntu" | ||
LINVERSION="18.04" | ||
|
||
# Get Jamulus Release Name with "curl" and "grep" | ||
R=`curl -s https://api.github.com/repos/jamulussoftware/jamulus/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")'` | ||
echo "Jamulus Installation Script for $DISTRO $LINVERSION" | ||
echo "Release: $R" | ||
INSTALLJAMULUS="no" | ||
while true; do | ||
read -p "Do you wish to install Jamulus on $DISTRO $LINVERSION? (y/n) " yn | ||
case $yn in | ||
[Yy]* ) | ||
echo "Start Installation $DISTRO $LINVERSION" | ||
echo "(1) Fetch Release $R from GitHub" | ||
wget https://github.com/corrados/jamulus/archive/$R.tar.gz | ||
echo "(2) Extract Source Code for Jamulus Release $R from GitHub" | ||
tar -xvf $R.tar.gz | ||
echo "(3) Delete ${R}.tar.gz from GitHub" | ||
rm $R.tar.gz | ||
echo "(4) Update Repository" | ||
sudo apt-get update | ||
INSTALLJAMULUS="yes" | ||
break;; | ||
[Nn]* ) | ||
echo "Cancelled Jamulus Installation on $DISTRO $LINVERSION" | ||
exit;; | ||
* ) echo "Please answer yes or no.";; | ||
esac | ||
done | ||
|
||
# echo "Check Variable: $INSTALLJAMULUS" | ||
|
||
if [ "$INSTALLJAMULUS" = "yes" ]; then | ||
echo "(5) Install Build Essentials for $DISTRO" | ||
|
||
if [ "$DISTRO" = "Ubuntu" ] | ||
then | ||
echo "Installation for $DISTRO" | ||
sudo apt-get install cmake qmake gcc g++ | ||
sudo apt-get install build-essential qt5-qmake qtdeclarative5-dev qt5-default qttools5-dev-tools libjack-jackd2-dev | ||
sudo apt-get install qjackctl | ||
if [ "$LINVERSION" = "18.4" ] | ||
then | ||
echo "Perform Installation Specifics for $DISTRO Version $DISTRO" | ||
fi | ||
|
||
elif [ "$DISTRO" = "Debian" ] | ||
then | ||
sudo apt-get install build-essential qtdeclarative5-dev qt5-default qttools5-dev-tools libjack-jackd2-dev | ||
sudo apt-get install qjackctl | ||
elif [ "$DISTRO" = "Fedora" ] | ||
then | ||
sudo dnf install qt5-qtdeclarative-devel jack-audio-connection-kit-dbus jack-audio-connection-kit-devel | ||
sudo dnf install qjackctl | ||
fi | ||
|
||
echo "(6) Compile Jamulus $R" | ||
echo "Change to Directory jamulus-$R" | ||
cd "jamulus-$R" | ||
# ls | ||
qmake Jamulus.pro | ||
make clean | ||
make | ||
sudo make install | ||
echo "Compilation DONE" | ||
cd .. | ||
echo "(6) Delete the Source Files after Installation" | ||
rm -R "jamulus-$R" | ||
|
||
else | ||
|
||
echo "Installation cancelled" | ||
|
||
fi | ||
|
||
``` | ||
|
||
|
||
## Possible Improvements of the Installation Script for Jamulus | ||
The script can ask in the very beginning for which Linux distribution the installation script should be called. | ||
This can be tested with the command `lsb_release` | ||
|
||
The `lsb_release` command returns the distribution specific information about a Linux distro. | ||
With a `grep` command with regular expression the variable `DISTRO` and `LINVERSION`. | ||
E.g. the Ubuntu based systems return with the command the following information. | ||
```bash | ||
$ lsb_release -a | ||
No LSB modules are available. | ||
Distributor ID: Ubuntu | ||
Description: Ubuntu 11.04 | ||
Release: 11.04 | ||
Codename: natty | ||
``` | ||
|
||
The challenge is, that `lsb_release` command must be available on Linux system. On CentOS/Fedora based systems `lsb_release` command is only available, if the `lsb` core packages are installed. So the automated Linux version detected might no work. | ||
|
||
So reading the `DISTRO` and `LINVERION` with the `read` command might be the better distribution dependent improvement than an automated setting with `lsb_release`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
layout: post | ||
title: "Software Synth in Jamulus" | ||
lang: "en" | ||
author: "niebert" | ||
heading: "Software Synth in Jamulus" | ||
--- | ||
|
||
This article will show you how to use a software synth with Jamulus. | ||
|
||
<!--more--> | ||
|
||
## Linux | ||
|
||
We will look at the concept of playing a software synth on Linux but other operating systems should work similarly. | ||
Let's have a look at what we need: | ||
1. A software synth like [setBfree](https://github.com/pantherb/setBfree) **(Hammond Organ Synth)** which we'll use in this example. It emulates an organ and outputs its audio to JACK on Linux. | ||
2. A **MIDI Keyboard**. The MIDI keyboard is used to generate the key pressed events, which are transmitted through a USB-MIDI interface to your operating system. After that the synthesizer [setBfree](https://github.com/pantherb/setBfree) generates the corresponding sound for the pressed key. The MIDI keyboard could also be replaced by a digital wind midi controller, which does the same (although the tone is dependent on how the musician blows air into the digital wind controller). | ||
3. A **connector to Jamulus**. You may hear the audio output of the synth on your speakers but the audio output may not be used as input for Jamulus. That's why we need to connect the audio output of the synth to Jamulus (this can be done with QjackCtl on Linux). | ||
|
||
### General Information about ALSA, JACK and MIDI | ||
|
||
This part is specific to Linux. Let's have a look at a few concepts how Linux handles Audio and MIDI before actually looking at how to connect the synth. | ||
|
||
- **ALSA** This is the basic layer which connects to the hardware, i.e. the sound card and the midi controller for the keyboard. | ||
- **JACK** is built on top of ALSA and uses ALSA for the audio output. It provides an easy-to-use environment for music production on Linux. | ||
- The **synthesizer** like the [Hammond Organ emulator setBfree](https://github.com/pantherb/setBfree) connects to JACK and sends its audio there. | ||
- **Jamulus** connects to JACK too and can therefore receive and send audio to every application connected to JACK (including our synthesizer). | ||
|
||
### Requirements for using Software Synths in Jamulus on Linux | ||
|
||
If you use your MIDI keyboard, you might need ALSA2JACK MIDI (`a2jmidid`) from the `a2j` package to be able to connect it to JACK. We use the synth `setBfree` in this example, so I also need this software synth (of course, you can replace this by your favourite Linux synthesizer). Both packages `a2jmidid` and `setbfree` can be installed with your package manager e.g. on Debian/Ubuntu by using the `apt-get` commands: | ||
|
||
```shell | ||
sudo apt-get install a2jmidid | ||
sudo apt-get install setbfree | ||
``` | ||
|
||
### Connecting ALSA, JACK and MIDI for a Synth for Jamulus | ||
|
||
Let's have a look at the workflow. | ||
|
||
1. Install Jamulus (you've probably already done that. If not, please have a look at the [installation page in the documentation](/wiki/Getting-Started)). If you followed those instructions, JACK and QjackCtl were already installed. | ||
2. **ALSA to JACK - MIDI** Next, we must create a connection from ALSA to JACK to route the MIDI input from the keyboard to setBfree. Let's have a look at how to do that: | ||
- Open QjackCtl e.g. from the command line by typing `qjackctl` and start JACK by clicking on the play button | ||
- Launch the ALSA2JACK MIDI connector with `a2jmidid -e`. While this connector runs, the `a2j` connection interface should be visible in `QjackCtl` in the JACK-MIDI tab. | ||
|
||
![QJackctl JACK-MIDI a2j](https://user-images.githubusercontent.com/20726856/101836060-ff2abe80-3b3c-11eb-8109-347fab4f03a6.png) | ||
|
||
- Now connect your USB MIDI device as an input to `MIDI through` in the ALSA-MIDI tab of QjackCtl. MIDI events from your keyboard will now reach JACK. | ||
|
||
![QJackctl ALSA-MIDI MIDI through](https://user-images.githubusercontent.com/20726856/101836057-fe922800-3b3c-11eb-8ee2-60cc591cf908.png) | ||
|
||
- Start your synth e.g. from the command line with (in my case) `setBfree`. You will now see the `setBfree` graphical user interface. It should look like this: | ||
|
||
![setBfree synth](https://user-images.githubusercontent.com/20726856/101836062-ffc35500-3b3c-11eb-80d3-ebcfadac4942.png) | ||
|
||
You can now check if the synth generates sound by clicking on the displayed organ keyboard and listening for sound through your speakers. | ||
- In QjackCtl we can now connect `a2j` in JACK-MIDI as an input to the synth, which generates sound for each key pressed on the keyboard. Keep in mind that you can connect synths if they are started and visible to QjackCtl. So you can connect after starting the [Hammond Emulator setBfree](https://github.com/pantherb/setBfree), i.e. connect `a2j` to `setbfree` if you also see the Hammond Synth setBFree in QjackCtl. | ||
|
||
![JACK-MIDI connect synth MIDI](https://user-images.githubusercontent.com/20726856/101932865-b4ac4f00-3bdb-11eb-8834-6f392402a8b6.png) | ||
|
||
- Let's test the software synth with our MIDI Keyboard! If you have speakers attached to your device you should hear the emulated Hammond sound for all the keys you press on your MIDI keyboard. If you just want to play the software synth with your keyboard, you're finished here. But if you want to connect the sound of the synth to Jamulus, the only remaining step is to connect the synths' audio to Jamulus. | ||
|
||
**Synth to Jamulus - Audio**: In the previous step we ensured that the MIDI signals from your keyboard got sent to to the MIDI input of JACK. Now we need to create an audio connection from JACK (i.e. the generated Hammond sound of the synth) to Jamulus. To do so, we connect the [Hammond Emulator setBfree](https://github.com/pantherb/setBfree) output to Jamulus. Therefore, start Jamulus so that you can see Jamulus in QjackCtl. Now connect the audio output of the [Hammond Emulator setBfree](https://github.com/pantherb/setBfree) to the audio input of Jamulus in JACK. | ||
|
||
![QJackctl connect synth to Jamulus](https://user-images.githubusercontent.com/20726856/101958961-ad4d6b80-3c04-11eb-86cd-24e7efa6fe00.png)) | ||
|
||
There is one last step. In your local connection setup, you might see that the setBfree synth output (left) is not only connected to the Jamulus input (right), but also to `system`. `System` would be your speakers or headphones, but what you want to listen to is just the output from Jamulus, not the direct sound from setBfree also at the same time (not exactly - they'd be separated by a small time lag). So now you must disconnect setBfree from "system". That way you will hear the audio coming from the Jamulus server (yours and that of whoever you are playing with) and will avoid an echo or flanger effect. | ||
|
||
Now you're done. | ||
|
||
`QjackCtl` can also be used for operations like plugging in instruments in mixer and the mixer into an amplifier and the amplifier again to the speakers. | ||
|
||
There are also other Open Source synths like QSynth or [ZynAddSubFX](https://sourceforge.net/projects/zynaddsubfx/) which can be installed on your Linux system. | ||
|
||
Have fun playing your synth within Jamulus! |
Oops, something went wrong.