[CM] *clm-search-list* and relative pathnames
Achim Bornhoeft
achim.bornhoeft@web.de
Mon, 01 Oct 2007 13:39:37 +0200
I figured out, why I stumbled across this problem (I should have had a
closer look before posting. It's not the biggest problem anyway.):
Some of my sample reading instruments have no open-input inside, because
I put this in the with-sound to open and close only once per call. (This
makes them a little faster especially when having huge notelists.)
Here is an example (soundfile.ins):
(definstrument soundfile
(start-time duration soundfile amplitude-envelope &optional
(srt-conv 1.0))
(let* ((start-sample (* start-time *srate*))
(end-sample (+ start-sample (* duration *srate*)))
(wavetable (make-src :input soundfile :srate srt-conv))
(amp-env (make-env :duration duration :envelope
amplitude-envelope)))
(run
(loop for sample-number from start-sample to end-sample do
(outa sample-number (* (env amp-env)
(src wavetable)))))))
#|
With the full pathname both filename and input file structure are
working when passed to the instrument:
(with-sound (:srate 44100 :statistics t)
(soundfile 0 4 "/Users/born/Desktop/1-4.wav" '(0 0 0.1 1 0.9 1 1 0) .7))
(with-sound (:srate 44100 :statistics t)
(soundfile 0 4 (open-input "/Users/born/Desktop/1-4.wav") '(0 0 0.1 1
0.9 1 1 0) .7))
With *clm-search-list* => ("" "/Users/born/Desktop/1-4.wav")
this works:
(with-sound (:srate 44100 :statistics t)
(soundfile 0 4 (open-input "1-4.wav") '(0 0 0.1 1 0.9 1 1 0) .7))
but this is not working:
(with-sound (:srate 44100 :statistics t)
(soundfile 0 4 "1-4.wav" '(0 0 0.1 1 0.9 1 1 0) .7))
Assumed that soundfile.ins and 1-4.wav are living in the same directory
with an empty *clm-search-list* and relative pathnames it's the same:
(setf *clm-search-list* nil)
this one works:
(with-sound (:srate 44100 :statistics t)
(soundfile 0 4 (open-input "./1-4.wav") '(0 0 0.1 1 0.9 1 1 0) .7))
this not:
(with-sound (:srate 44100 :statistics t)
(soundfile 0 4 "./1-4.wav" '(0 0 0.1 1 0.9 1 1 0) .7))
|#
Achim
Michael Klingbeil schrieb:
> It's a bit hard to diagnose without looking at your "soundfile"
> instrument. Post the source and perhaps then we can figure it out.
>
>
> Achim Bornhoeft wrote:
>> With *clm-search-list* this is working:
>>
>> (with-sound (:srate 44100 :statistics t)
>> (soundfile 0 4 (open-input* "1-4.wav") '(0 0 0.1 1 0.9 1 1 0) .7))
>>
>> but with this the listener hangs:
>>
>> (with-sound (:srate 44100 :statistics t)
>> (soundfile 0 4 "1-4.wav" '(0 0 0.1 1 0.9 1 1 0) .7))
>>
>> Is there any possibility to use relative pathnames in CLM (OpenMCL)?
>>
>>
>> Bill Schottstaedt schrieb:
>>> The *clm-search-list* business works on a Mac (and Linux) in sbcl; I
>>> can't test
>>> openmcl, and can't see why it would hang even if merge-pathnames
>>> was unhappy.
>>>
>>> _______________________________________________
>>> Cmdist mailing list
>>> Cmdist@ccrma.stanford.edu
>>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>>>
>>
>
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>
--
Achim Bornhoeft
.- Neckarhalde 38, D-72070 Tuebingen
-.-. tel/fax +49 (0)7071 942745
-... mobil +49 (0)179 6936930
skype:achim.bornhoeft?call
--