Bug 154 - LOAD INSTRUMENT - relative paths
Summary: LOAD INSTRUMENT - relative paths
Status: ASSIGNED
Alias: None
Product: liblscp
Classification: Unclassified
Component: liblscp (show other bugs)
Version: SVN Trunk
Hardware: PC Linux
: P5 enhancement
Assignee: Rui Nuno Capela
URL:
Depends on:
Blocks:
 
Reported: 2011-10-16 20:41 CEST by Nicola Pandini
Modified: 2013-05-31 20:33 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Pandini 2011-10-16 20:41:22 CEST
Is there a way to use relative paths (like ./drums.sfz) with the lscp command "LOAD INSTRUMENT"?
It seems that actually only absolute paths works.

	thanks
Comment 1 Rui Nuno Capela 2011-10-16 20:56:45 CEST
nb. this is more like a support question than a bug.

yes, path in the LOAD INSTRUMENT command should be an absolute path for the linuxsampler server file-system.

asking the question the other way around: relative to what? which current directory?

a relative path makes sense if you now what your process current directory is.

unfortunately, the current directory of the linuxsampler server process is undefined or better yet, undetermined.

byee
Comment 2 Nicola Pandini 2011-10-16 23:17:40 CEST
(In reply to comment #1)
> nb. this is more like a support question than a bug.
sorry... this time I choose the wrong one :-)

> 
> yes, path in the LOAD INSTRUMENT command should be an absolute path for the
> linuxsampler server file-system.
> 
> asking the question the other way around: relative to what? which current
> directory?
> 
> a relative path makes sense if you now what your process current directory is.
> 
> unfortunately, the current directory of the linuxsampler server process is
> undefined or better yet, undetermined.
> 
> byee

I don't know which is the best way to implement it, for me one of the more convenient could be to have the current directory mapped on the directory in which the lscp file is located.
In this way I'd have lscp and sfz files in the same directory, and inside the lscp I could refer to a sfz using ./xxx.sfz.
Using relative paths makes the directory portable, and I think it would be a good thing.
Comment 3 Nicola Pandini 2011-10-16 23:22:27 CEST
(In reply to comment #2)
> (In reply to comment #1)
> > nb. this is more like a support question than a bug.
> sorry... this time I choose the wrong one :-)

I mean the wrong one from LS forum, mailing-list and bugzilla :-)
Comment 4 Christian Schoenebeck 2013-05-31 20:33:12 CEST
The sampler does not have any way to know at which location your .lscp file is stored. So a relative path dependent to the location of your .lscp file is not possible.

There are only 2 possibilites, which could coexist along to each other:

a) Relative path along to the sample binaries location.

b) Relative path along to some internal variable, that could i.e. be adjusted by 
   environment variable, command line option, LSCP command.