Hi,
Thanks for the info on move-sound and move-it. I'm trying to figure out how
those work, and didn't know there was a dlocsig ex in clm.
For the sinewave ex. listed earlier using dlocsig, I'm using f23, sbcl, emacs,
clm and slime, and the error below is about can't handle DLOCSIG etc.
Admittedly I'm not totally proficient at understanding the slime-repl output,
so this may not be what you need.
Thank You.
Jim
Execution of a form compiled with errors.
Form:
(DEFINSTRUMENT SINEWAVE
(START-TIME DURATION FREQ AMP &KEY (AMP-ENV '(0 1 1 1))
(PATH (MAKE-PATH :PATH '(-10 10 0 5 10 10))))
(MULTIPLE-VALUE-BIND (DLOC BEG END)
(MAKE-DLOCSIG :START-TIME START-TIME :DURATION DURATION :PATH PATH)
(LET* ((OSC (MAKE-OSCIL :FREQUENCY FREQ))
(AENV (MAKE-ENV :ENVELOPE AMP-ENV :SCALER AMP)))
(RUN
(LOOP FOR I FROM BEG BELOW
END
DO (DLOCSIG DLOC I (* (ENV AENV) (OSCIL OSC))))))))
Compile-time error:
(during macroexpansion of (DEFINSTRUMENT SINEWAVE
...))
the run macro can't handle DLOCSIG in (DLOCSIG DLOC I
(* (ENV AENV) (OSCIL OSC)))
[Condition of type SB-INT:COMPILED-PROGRAM-ERROR]
Restarts:
0: [*ABORT] Return to SLIME's top level.
1: [ABORT] abort thread (#<THREAD "worker" RUNNING {1005D354F3}>)
Backtrace:
0: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM
#<SB-SYS:FD-STREAM for "file /opt/clm_stuff/jsdlocsig.fasl" {10049E76E3}>
:TABLE #(447 #<PACKAGE "SB-IMPL"> SB-IMPL::%DEFUN #<PACKAGE "COMMON-L..
1: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file
/opt/clm_stuff/jsdlocsig.fasl" {10049E76E3}> NIL NIL)
2: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file
/opt/clm_stuff/jsdlocsig.fasl" {10049E76E3}> T)
3: (LOAD #P"/opt/clm_stuff/jsdlocsig.fasl" :VERBOSE NIL :PRINT NIL
:IF-DOES-NOT-EXIST T :EXTERNAL-FORMAT :DEFAULT)
--more--
(definstrument sinewave (start-time duration freq amp
&key
(amp-env '(0 1 1 1))
(path (make-path :path '(-10 10 0 5 10 10))))
(multiple-value-bind (dloc beg end)
(make-dlocsig :start-time start-time
:duration duration
:path path)
(let* ((osc (make-oscil :frequency freq))
(aenv (make-env :envelope amp-env :scaler amp)))
(run
(loop for i from beg below end do
(dlocsig dloc i (* (env aenv)(oscil osc))))))))
________________________________________
From: [email protected] <[email protected]> on
behalf of [email protected] <[email protected]>
Sent: Monday, December 14, 2015 8:00 PM
To: [email protected]
Subject: Cmdist Digest, Vol 92, Issue 2
Send Cmdist mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cmdist digest..."
Today's Topics:
1. dlocsig example (James Hearon)
2. Re: dlocsig example ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Mon, 14 Dec 2015 18:03:02 +0000
From: James Hearon <[email protected]>
To: "[email protected]" <[email protected]>
Subject: [CM] dlocsig example
Message-ID:
<blupr10mb0836ad6cf2c42ace43e86969e5...@blupr10mb0836.namprd10.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I'm getting myself all fouled up with trying to run a simple dlocsig example in
clm. I was using this one, from
https://ccrma.stanford.edu/~nando/clm/dlocsig/
(definstrument sinewave (start-time duration freq amp
&key
(amp-env '(0 1 1 1))
(path (make-path :path '(-10 10 0 5 10 10))))
(multiple-value-bind (dloc beg end)
(make-dlocsig :start-time start-time
:duration duration
:path path)
(let* ((osc (make-oscil :frequency freq))
(aenv (make-env :envelope amp-env :scaler amp)))
(run
(loop for i from beg below end do
(dlocsig dloc i (* (env aenv)(oscil osc))))))))
---------------------------------
I can move the samples in time using plain locsig and the run loop below,
binding the variables start and end,
but dlocsig seems to need the multiple-bind structure which I can't seem to to
get to run. I'm wondering if there's a better simple example someplace? Thank
You.
(definstrument sinewave (start-time duration freq amp deg dis
&key
(amp-env '(0 1 1 1)) )
(let* ((osc (make-oscil :frequency freq))
(start (floor (* start-time *srate*)))
(end (+ start (floor (* duration *srate*))))
(aenv (make-env :envelope amp-env :duration duration :scaler amp))
(loc (make-locsig :degree deg :distance dis :reverb .05)))
(run
(loop for i from start to end do
(locsig loc i (* (env aenv)(oscil osc)))
))));)
------------------------------
Message: 2
Date: Mon, 14 Dec 2015 10:34:19 -0800
From: [email protected]
To: James Hearon <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [CM] dlocsig example
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Which lisp are you running, and what error did you get?
Here I am running the move-sound instrument in sbcl:
(load "all.lisp")
(compile-file "dlocsig.lisp")
(load "dlocsig.fasl")
(compile-file "move-sound.ins")
(load "move-sound.fasl")
(load "v")
(with-sound (:channels 4) (move-it (:path (make-path '((-10 10) (.1 .1)
(10 -10)))) (fm-violin 0 1 440 .1)))
and I got "test.snd".
------------------------------
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
End of Cmdist Digest, Vol 92, Issue 2
*************************************
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist