Page 1 of 1

LS Feature Requests and Suggestions

Posted: Sun Jun 12, 2011 4:04 am
by laforge
I'd like to contribute another custom written lscp file. I don't use graphic desktop environments on my sampler-laptop. This is for console nerds like myself.
On the main page theres also lscp files but this is an instrument mapping example.

Code: Select all

#Filename: /home/oper/linuxsampler/in.lscp
SET ECHO 1
CLEAR MIDI_INSTRUMENTS 0
RESET

CREATE AUDIO_OUTPUT_DEVICE ALSA CARD='0,0' SAMPLERATE=44100 FRAGMENTSIZE=128 FRAGMENTS=3
#Frament(size) settings seemed to keep my laptop from making cracking sounds

CREATE MIDI_INPUT_DEVICE ALSA

ADD CHANNEL
LOAD ENGINE sfz 0
SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0
SET CHANNEL MIDI_INPUT_DEVICE 0 0
#SET CHANNEL VOLUME 0 0.6

LOAD INSTRUMENT '/home/oper/linuxsampler/sal/sal.sfz' 0 0

ADD MIDI_INSTRUMENT_MAP
MAP MIDI_INSTRUMENT 0 0 0 sfz '/home/oper/linuxsampler/sal/sal.sfz' 0 1.0 PERSISTENT
MAP MIDI_INSTRUMENT 0 0 1 sfz '/home/oper/linuxsampler/elec/mello-rhodes.sfz' 0 1.0 PERSISTENT
MAP MIDI_INSTRUMENT 0 0 2 sfz '/home/oper/linuxsampler/hammondsoul.sfz' 0 1.0 PERSISTENT
SET CHANNEL MIDI_INSTRUMENT_MAP 0 0
#The persistent option reduced the chance of LS crashing when switching instruments faster than they could be loaded + reduced lag

#GET CHANNEL INFO 0
QUIT
Feature requests:
- i have to type "/home/oper/linuxsampler/" all the time. can this be remedied? The linux abbreviation "~/linuxsampler" also doesn't work afaik.
- can PERSISTENT be default behaviour or is that not practical somehow?
- On line 213 of linuxsampler.cpp

Code: Select all

        LinuxSampler::gig::Profiler::enable();
        dmsg(1,("OK\n"));
    }

    system("sh ~/.linsam");
    printf("LinuxSampler initialization completed. :-)\n\n");

    while (atomic_read(&running)) {
This code addition is very practical. Now the system knows the >exact time< when LS actually finished starting up. I hate writing custom perl scripts that sleep() and check to see if a daemonised LS is done yet...
So my request is that system("sh ~/.linsam") is added to LS so everyone can benefit from it.

My content of /home/oper/.linsam

Code: Select all

echo "BEGIN .linsam"
cat $HOME/linuxsampler/in.lscp | netcat localhost 8888
aconnect "Virtual Keyboard":0 LinuxSampler:0
echo "END .linsam"
Keep up the good work!

Re: LS Feature Requests and Suggestions

Posted: Sat Jun 25, 2011 2:21 pm
by laforge
Would like to actually get a response from devs here :(

Re: LS Feature Requests and Suggestions

Posted: Fri Aug 19, 2011 8:48 am
by cuse
The tilde character "~" could be made a symbol for the user's home directory, yes, at least on POSIX systems.

About PERSISTENT to be changed as default behavior: the most common case is ON_DEMAND, so I would stick with that default behavior, unless the a big number of users tell us that Im wrong here.

About the startup script, we could rather make that a command line parameter, like:

Code: Select all

linuxsampler --exec-after-init /home/foo/ls.sh

Re: LS Feature Requests and Suggestions

Posted: Sat Sep 03, 2011 10:27 am
by laforge
Thanks much appreciated! Command line parameter would be excellent.
Another (much less significant) suggestion:

Code: Select all

LOAD INSTRUMENT '/home/oper/linuxsampler/piano-1000.gig' 0 0

ADD MIDI_INSTRUMENT_MAP
MAP MIDI_INSTRUMENT 0 0 0 gig '/home/oper/linuxsampler/piano-1000.gig' 0 1.0 PERSISTENT
MAP MIDI_INSTRUMENT 0 0 1 gig '/home/oper/linuxsampler/rhodes-ambient.gig' 0 0.3 PERSISTENT
MAP MIDI_INSTRUMENT 0 0 2 gig '/home/oper/linuxsampler/organ-church.gig' 0 1.5 PERSISTENT
...
SET CHANNEL MIDI_INSTRUMENT_MAP 0 0
In this setup it's needed to add the first instrument twice, once in the mapping, once as the loaded instrument.
Something to simplify this would be sweet, example: LOAD INSTRUMENT MIDI_INSTRUMENT_MAP 0 0 (load first instrument from first mapping, whatever it's name)