Stable and comfortable

You name it!
Post Reply
bodzio66
Newbie
Posts: 24
Joined: Wed Oct 19, 2011 4:03 pm

Stable and comfortable

Post by bodzio66 » Thu Nov 08, 2012 10:37 am

As in the title, but under several conditions. I work at lubuntu (lxde) quantal 12.10. Adding repository only blablack in launchpad. Now I add no other audio repositories than UbuntuStudio. LS requires a very stable system, innovations are often inaccurate. Ladish is still unstable, jackdbus, jackd2, libjackd2. It is the system removes a pulseaudio and libjackd2 (preferably immediately install libjack0). It must be well configured / etc / security / limits.d / audio.conf. If you work with LS needs to be in the group audio, disk, rtkit. Rtkit and rtirq must be installed rtkit added to startup. Rtirq well configured for the audio. Of course, you need to install the kernel lowlatency and run the system. Difficult and very important is to configure qjackctl - always individual. Important is stable order of sound cards in the system - / etc / modprobe.d / alsa-base.conf. These problems have a wide description of the web - there is no room for the accurate translation.
In qjackctl must, of course, turn rt and use only ALSA MIDI sequencer!!
These preliminary point, I go into the details:
LS is mute and unmute unstable ....I threw this function, for example, replacing - my file lscp:

SET CHANNEL VOLUME 0 0.47
SET CHANNEL VOLUME 1 0.27
SET CHANNEL VOLUME 2 0
SET CHANNEL VOLUME 3 0

Such a simple and soft as the sound comes fully mute and unmute stable.
Here I explain how to run all the files lscp and other activators. Let's call this the above file "registering2.lscp". We determine its location on the disk, such as /home/play/LSCP/registering2.lscp. Now create a file - activator, beware - Let us give him the power to do! Let's call it the same way - registering2. Its content may be such as:

#!/bin/bash
cat /home/play/LSCP/registering2.lscp | netcat localhost 8888

Assign a shortcut key to it. I am using the LXDE desktop environment. There are shortcut keys configuration in /home/play/.config/openbox /lxde-rc.xml (or Lubuntu-rc.xml)
There pasting:

<keybind key="KP_7">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Registration 2</name>
</startupnotify>
<command>/home/play/LSCP/registering2</command>
</action>
</keybind>

In this way, I create all the shortcuts: Registration, charging other instruments, transpose (just expand on this issue). Overlay video is here unnecessary and even disturbing. Without taking your fingers from the keys quickly toggle functionality that I need. Extremely comfortable!!
I give more examples. I had a problem with the various entries in the file sfz and rapid change. This file loading a new set of instruments for the existing channels:

LOAD INSTRUMENT NON_MODAL '/home/play/Eb pianoforte.sfz' 0 0
LOAD INSTRUMENT NON_MODAL '/home/play/Eb percussion.sfz' 0 1
There are only two mentioned, there may be a lot. It works instantly and securely but is great condition!:
All charges instruments used must be inserted into the starting lscp database and important as PERSISTENT!! (Startup file for a very long time to load but then I is stable!):
example:
# MIDI instrument map 0 - Chromatic
ADD MIDI_INSTRUMENT_MAP 'Chromatic'
MAP MIDI_INSTRUMENT 0 0 0 SFZ '/home/play/Eb\x20pianoforte.sfz' 0 1 PERSISTENT 'Eb pianoforte.sfz [1]'
MAP MIDI_INSTRUMENT 0 0 1 SFZ '/home/play/Eb\x20percussion.sfz' 0 1 PERSISTENT 'Eb percussion.sfz [1]'

As a broker I use rakarrack audio effects. The kernel of the program is stable, although a lot of bad effects is, also works great as an intermediary bonds qjackctl audio (do not use the qjackctl patchbay - it is unstable). I plug out ports LS LSCP boot file:

# Audio JACK Device 0
CREATE AUDIO_OUTPUT_DEVICE JACK ACTIVE='true' CHANNELS='2' NAME='LinuxSampler' SAMPLERATE='192000'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='rakarrack:in_1'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 NAME='0fort'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='rakarrack:in_2'
SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 NA/home/play/ME='1fort'

Rakarrack is good at keeping audio_system - you have to set it up in the rakarrack.
When it comes to MIDI real revolution is here mididings broker! It is associated with qjackctl both ways in and out. The LSCP we give only the names of MIDI. My example:

# MIDI ALSA Device 0
CREATE MIDI_INPUT_DEVICE ALSA ACTIVE='true' NAME='LS_FORTEPIAN' PORTS='2'
SET MIDI_INPUT_PORT_PARAMETER 0 0 NAME='KEYB_ORGANY'
SET MIDI_INPUT_PORT_PARAMETER 0 1 NAME='ZKEY88'

I used to complicate the two ports - plug in two separate keyboards to a single computer! For the record, each has its own port.
Now I'll show you a real miracle - mididings program file:

from mididings import *

config(in_ports=[
('keyb_organy' ,'USB Midi Cable:USB Midi Cable MIDI 1' ),
('zkey88' ,'UM-ONE:UM-ONE MIDI 1')
])
config(out_ports=[
('KEYB_ORGANY','LS_ORGANY:KEYB_ORGANY','LS_FORTEPIAN:KEYB_ORGANY','LS_DZWONY:KEYB_ORGANY'),
('ZKEY88' ,'LS_ORGANY:ZKEY88','LS_FORTEPIAN:ZKEY88','LS_DZWONY:ZKEY88')
])
run(
Transpose(4) >>
[
VoiceFilter(voice='highest', retrigger=False) >> Velocity(fixed=66) >> Channel(2) ,
VoiceFilter(voice='lowest', retrigger=False) >> Velocity(fixed=66) >> Channel(3) ,
VoiceFilter(voice='highest', retrigger=False) >> Filter(NOTE|CTRL) >> Channel(6) ,
VoiceFilter(voice='lowest', retrigger=False) >> Filter(NOTE|CTRL) >> Channel(5) ,
Filter(NOTE|CTRL) >> Channel(4) ,
Velocity(fixed=66) >> Channel(1)
]
)

Transpose +4 refers to all channels. Velocity(fixed=66) blocking the pressure sensitivity keys for channels 1-3. Channel 4 - normal playing. VoiceFilter only lets you play always the bottom or top of the channel's voice - it was my dream! Channel 2 and 6 play only high voice.
'zkey88' ,'UM-ONE:UM-ONE MIDI 1'
above entry allows you to connect hardware midi port. Note! It's hard! Omit the name of the port number, and the names of the-alias ('UM-ONE:UM-ONE MIDI 1') that you see in qjackctl. This must be done carefully otherwise it will be a problem. We only use the ALSA sequencer! Midi is no stable! 'zkey88' - example is the name of the port used to start LS LSCP file.
An example of an activator for the files "*.py" for mididings:

#!/bin/bash
killall -w mididings #Killall allows you to break the previous connection midi.
sleep 0.2
mididings -f /home/play/transpose/transp4.py

In conclusion, I believe that you should join the project mididings of LS. Re-worked in graphic overlays mute function (I suggest my solution). It would be good to create a kind of LStudio based on LXDE or XFCE4 - here in creating a convenient shortcut keys is very important. Everything I wrote above works for me on several computers securely, allow it to freely copy and use. At the end once again thank you very much to all those who contributed to the construction of the Linuxsampler (and mididings).

bodzio66
Newbie
Posts: 24
Joined: Wed Oct 19, 2011 4:03 pm

Re: Stable and comfortable

Post by bodzio66 » Thu Nov 08, 2012 11:42 am

O Sorry I forgot about overloading functions based on existing instruments as PERSISTENT. LSCP my sample file:

LOAD INSTRUMENT NON_MODAL '/home/play/D organ.sfz' 0 0
SET CHANNEL MIDI_INSTRUMENT_MAP 0 0 4 3
LOAD INSTRUMENT NON_MODAL '/home/play/D percussion.sfz' 0 1
SET CHANNEL MIDI_INSTRUMENT_MAP 1 0 4 4
LOAD INSTRUMENT NON_MODAL '/home/play/D vibraphone.sfz' 0 2
SET CHANNEL MIDI_INSTRUMENT_MAP 2 0 4 5
LOAD INSTRUMENT NON_MODAL '/home/play/D pianoforte.sfz' 0 3
SET CHANNEL MIDI_INSTRUMENT_MAP 3 0 4 6
LOAD INSTRUMENT NON_MODAL '/home/play/D celesta.sfz' 0 4
SET CHANNEL MIDI_INSTRUMENT_MAP 4 0 4 7

And then I hit another key for another activator lscp file and loads the instruments of the same group but with different definitions tune:

LOAD INSTRUMENT NON_MODAL '/home/play/Eb organ.sfz' 0 0
SET CHANNEL MIDI_INSTRUMENT_MAP 0 0 5 3
LOAD INSTRUMENT NON_MODAL '/home/play/Eb percussion.sfz' 0 1
SET CHANNEL MIDI_INSTRUMENT_MAP 1 0 5 4
LOAD INSTRUMENT NON_MODAL '/home/play/Eb vibraphone.sfz' 0 2
SET CHANNEL MIDI_INSTRUMENT_MAP 2 0 5 5
LOAD INSTRUMENT NON_MODAL '/home/play/Eb pianoforte.sfz' 0 3
SET CHANNEL MIDI_INSTRUMENT_MAP 3 0 5 6
LOAD INSTRUMENT NON_MODAL '/home/play/Eb celesta.sfz' 0 4
SET CHANNEL MIDI_INSTRUMENT_MAP 4 0 5 7
Good luck!

bodzio66
Newbie
Posts: 24
Joined: Wed Oct 19, 2011 4:03 pm

Autostart LS

Post by bodzio66 » Thu Nov 08, 2012 2:28 pm

Even dessert. Scripts run by the startup. Of course, all components must be well prepared and configured. Qjackctl set to automatically start jackd. You should install moreutils (function parallell). Mididings Rakarrack like to be well prepared, create a preset file. In fact, the month of work ... But then ...
First we create a desktop file in /home/play/.config/autostart
example:
[Desktop Entry]
Exec=parallel -- | qjackctl | /home/play/LS_start
Name=starting linuxsampler
OnlyShowIn=LXDE;
Type=Application
Version=1.0

file LS_start:
#!/bin/bash
sleep 5
parallel -- | /home/play/rakarrack_LS | /home/play/LS_start1

file rakarrack_LS:
#!/bin/bash
nice --18 rakarrack -l /home/play/example_preset_file_.rkr -n #-n is no gui

file LS_start1:
#!/bin/bash
sleep 2
nice --18 linuxsampler --lscp-port 8888 --exec-after-init /home/play/LS_start2

file LS_start2:
#!/bin/bash
sleep 1
cat /home/play/lscp/My_LSCP_startup_master_file.lscp | netcat localhost 88888
sleep 1
/home/play/transpose/transp0 #mididings script - I gave the example of the previous topic

That's all
I will only reset the subsystem
example:
#!/bin/bash
killall -w jackd qjackctl linuxsampler netcat qsampler mididings rakarrack
sleep 1
parallel -- | qjackctl | /home/play/LS_start

Everything you have described is a great short months of work and a lot of testing. Of course, if anyone has comments or corrections to this operation please write.

Post Reply