Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Steve M. Robbins <steve@su...> - 2010-12-28 22:09:45
Attachments:
application/pgp-signature
|
Hi, I'm trying out Nyquist for the first time. I built the 3.03 version from source on my Debian Linux 64-bit machine. I'm working through the manual but got stuck in the Introduction [1]; I can make a sound using play osc(60) but after pasting in the code for mkwave() and note(), it fails while trying to play a sequence: SAL> play seq(my-note(c4, i), my-note(d4, i), my-note(f4, i), my-note(g4, i), my-note(d4, q)) Saving sound file to /home/steve/Music/Nyquist/steve-temp.wav error: too few arguments Call traceback: SAL top-level command interpreter I don't understand why there would be too few arguments. I presume this works for others. Any ideas? 64-bit issue? I saw Roger Dannenberg's message [2] saying Nyquist does not compile on any 64-bit architectures, but the build system (basically just run make in the top directory) uses the -m32 switch on all compiles and libraries to run in 32-bit mode. I want to switch over to 64-bit native code, but the combination of Lisp, garbage collection, and lazy evaluation means there are lots of places where memory is carefully managed with assumptions about pointer sizes. It's not just a matter of recompiling. That doesn't match my experience, however. I used sys/unix/linux/Makefile to build but did not see any -m32 flag used. On the other hand, I used system versions of portaudio and liblo rather than those in the nyquist source tree, so maybe that's where -m32 is used? Thanks for any pointers or hints, -Steve [1] http://www.cs.cmu.edu/~rbd/doc/nyquist/part2.html#9 [2] https://sourceforge.net/mailarchive/forum.php?thread_name=4CDFFA07.9080303%40cs.cmu.edu&forum_name=nyquist-users |
From: Roger Dannenberg <rbd@cs...> - 2010-12-29 00:30:55
Attachments:
Message as HTML
|
My guess is there are a couple of definitions of my-note floating around. You should check the definition (e.g. see GRINDEF) or redefine my-note to make sure you know how many parameters it takes. Using/learning about getting a stack trace from XLISP would also tell you exactly which function is a problem. -Roger On 12/28/10 4:54 PM, Steve M. Robbins wrote: > Hi, > > I'm trying out Nyquist for the first time. I built the 3.03 version > from source on my Debian Linux 64-bit machine. > > I'm working through the manual but got stuck in the Introduction [1]; > I can make a sound using > > play osc(60) > > but after pasting in the code for mkwave() and note(), it > fails while trying to play a sequence: > > SAL> play seq(my-note(c4, i), my-note(d4, i), my-note(f4, i), > my-note(g4, i), my-note(d4, q)) > > > Saving sound file to /home/steve/Music/Nyquist/steve-temp.wav > error: too few arguments > Call traceback: > SAL top-level command interpreter > > > I don't understand why there would be too few arguments. I presume > this works for others. Any ideas? 64-bit issue? > > I saw Roger Dannenberg's message [2] saying > > Nyquist does not compile on any 64-bit architectures, but the build > system (basically just run make in the top directory) uses the -m32 > switch on all compiles and libraries to run in 32-bit mode. I want > to switch over to 64-bit native code, but the combination of Lisp, > garbage collection, and lazy evaluation means there are lots of > places where memory is carefully managed with assumptions about > pointer sizes. It's not just a matter of recompiling. > > That doesn't match my experience, however. I used > sys/unix/linux/Makefile to build but did not see any -m32 flag used. > On the other hand, I used system versions of portaudio and liblo > rather than those in the nyquist source tree, so maybe that's where > -m32 is used? > > Thanks for any pointers or hints, > -Steve > > [1] http://www.cs.cmu.edu/~rbd/doc/nyquist/part2.html#9 > [2] https://sourceforge.net/mailarchive/forum.php?thread_name=4CDFFA07.9080303%40cs.cmu.edu&forum_name=nyquist-users > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > > > _______________________________________________ > Nyquist-users mailing list > Nyquist-users@... > https://lists.sourceforge.net/lists/listinfo/nyquist-users |
From: Steve M. Robbins <steve@su...> - 2010-12-29 05:22:20
Attachments:
application/pgp-signature
|
On Tue, Dec 28, 2010 at 07:30:46PM -0500, Roger Dannenberg wrote: > My guess is there are a couple of definitions of my-note floating > around. You should check the definition (e.g. see GRINDEF) or > redefine my-note to make sure you know how many parameters it takes. Just to be clear, I am typing in (cut and paste, actually) the definition for my-note directly from the manual: define function my-note(pitch, dur) return osc(pitch, dur, *table*) So I'm pretty sure I'm using the 2-variable version. I should also mention that "play my-note(d4,i)" works. It's just when I try to make a sequence that it fails. > Using/learning about getting a stack trace from XLISP would also > tell you exactly which function is a problem. -Roger OK, I'll pursue this strategy. Thanks, -Steve |
From: Roger Dannenberg <rbd@cs...> - 2010-12-29 14:26:43
Attachments:
Message as HTML
|
This is very odd. Everything looks normal except for the error. I assume you built from then latest sources in SVN (not the source download .zip file). This works fine for me on OS X, but I will try this specific example on a 64-bit linux system. Thanks, Roger On 12/29/10 12:21 AM, Steve M. Robbins wrote: > On Tue, Dec 28, 2010 at 11:07:12PM -0600, Steve M. Robbins wrote: >> On Tue, Dec 28, 2010 at 07:30:46PM -0500, Roger Dannenberg wrote: >>> My guess is there are a couple of definitions of my-note floating >>> around. You should check the definition (e.g. see GRINDEF) or >>> redefine my-note to make sure you know how many parameters it takes. >> Just to be clear, I am typing in (cut and paste, actually) the >> definition for my-note directly from the manual: >> >> define function my-note(pitch, dur) >> return osc(pitch, dur, *table*) >> >> So I'm pretty sure I'm using the 2-variable version. I should >> also mention that "play my-note(d4,i)" works. It's just >> when I try to make a sequence that it fails. >> >> >>> Using/learning about getting a stack trace from XLISP would also >>> tell you exactly which function is a problem. -Roger > OK, so I switched to xlisp mode and the output shows a bunch of stuff now. > > First, I checked that the definition of my-note is what I typed in: > > 1> (grindef 'my-note) > (LAMBDA (PITCH DUR) > (OSC PITCH DUR *TABLE*)) > > So I can play a single note > > (play (my-note a4 i)) > > I can play a sequence of one note > > (play (seq (my-note a4 i))) > (play (seq (my-note b4 i))) > > But I can't play a sequence of two notes > > (play (seq (my-note b4 i) (my-note a4 i))) > Saving sound file to /home/steve/Music/Nyquist/steve-temp.wav > error: too few arguments > Function: #<Closure: #10ff060> > Arguments: > 0.5 > Function: #<Subr-SND-MAX: #f6b720> > Arguments: > #<Sound: #8d50a2f0> > 1000000 > Function: #<FSubr-COND: #f5c720> > Arguments: > ((SOUNDP SND) (SND-MAX SND SAMPLES)) > ((ARRAYP SND) (LET ((PEAK 0) (CHANS (LENGTH SND))) (DOTIMES (I CHANS) (SETF PEAK (MAX PEAK (SND-MAX (AREF SND I) (/ SAMPLES CHANS))))) PEAK)) > (T (ERROR "unexpected value in multichannel-max" SND)) > Function: #<Closure-MULTICHANNEL-MAX: #f83738> > Arguments: > #<Sound: #8d50a2f0> > 1000000 > Function: #<FSubr-SETF: #f5e2f8> > Arguments: > PEAK > (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*) > Function: #<FSubr-COND: #f5c720> > Arguments: > ((AND (NOT (SOUNDP SND)) (NOT (EQ (TYPE-OF SND) (QUOTE ARRAY)))) (ERROR "AUTONORM (or PLAY?) got unexpected value" SND)) > ((EQ *AUTONORM-TYPE* (QUOTE PREVIOUS)) (SCALE *AUTONORM* SND)) > ((EQ *AUTONORM-TYPE* (QUOTE LOOKAHEAD)) (SETF PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*)) (SETF PEAK (MAX 0.001 PEAK)) (SETF *AUTONORM* (/ *AUTONORM-TARGET* PEAK)) (SCALE *AUTONORM* SND)) > (T (ERROR "unknown *autonorm-type*")) > Function: #<FSubr-COND: #f5c720> > Arguments: > (*AUTONORMFLAG* (COND ((AND (NOT (SOUNDP SND)) (NOT (EQ (TYPE-OF SND) (QUOTE ARRAY)))) (ERROR "AUTONORM (or PLAY?) got unexpected value" SND)) ((EQ *AUTONORM-TYPE* (QUOTE PREVIOUS)) (SCALE *AUTONORM* SND)) ((EQ *AUTONORM-TYPE* (QUOTE LOOKAHEAD)) (SETF PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*)) (SETF PEAK (MAX 0.001 PEAK)) (SETF *AUTONORM* (/ *AUTONORM-TARGET* PEAK)) (SCALE *AUTONORM* SND)) (T (ERROR "unknown *autonorm-type*")))) > (T SND) > Function: #<FSubr-LET: #f5c5a0> > Arguments: > (PEAK) > (COND (*AUTONORMFLAG* (COND ((AND (NOT (SOUNDP SND)) (NOT (EQ (TYPE-OF SND) (QUOTE ARRAY)))) (ERROR "AUTONORM (or PLAY?) got unexpected value" SND)) ((EQ *AUTONORM-TYPE* (QUOTE PREVIOUS)) (SCALE *AUTONORM* SND)) ((EQ *AUTONORM-TYPE* (QUOTE LOOKAHEAD)) (SETF PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*)) (SETF PEAK (MAX 0.001 PEAK)) (SETF *AUTONORM* (/ *AUTONORM-TARGET* PEAK)) (SCALE *AUTONORM* SND)) (T (ERROR "unknown *autonorm-type*")))) (T SND)) > Function: #<Closure-AUTONORM: #f81090> > Arguments: > #<Sound: #8d50a2f0> > Function: #<Subr-SND-SAVE: #f6b5a0> > Arguments: > (AUTONORM (SEQ (MY-NOTE B4 I) (MY-NOTE A4 I))) > 1000000000 > "/home/steve/Music/Nyquist/steve-temp.wav" > 4 > 1 > 16 > 0 > T > Function: #<FSubr-LET: #f5c5a0> > Arguments: > ((NY:FNAME *DEFAULT-SOUND-FILE*) (NY:MAXLEN NY:ALL) (NY:ENDIAN NIL) (NY:SWAP 0)) > (COND ((NULL NY:FNAME) (COND ((STRINGP NY:MAXLEN) (SETF NY:FNAME NY:MAXLEN) (SETF NY:MAXLEN NY:ALL)) (T (SETF NY:FNAME *DEFAULT-SOUND-FILE*))))) > (COND ((EQUAL NY:FNAME "") (COND ((NOT *SOUNDENABLE*) (FORMAT T "s-save: no file to write! play option is off!\n")))) (T (SETF NY:FNAME (SOUNDFILENAME NY:FNAME)) (FORMAT T "Saving sound file to ~A~%" NY:FNAME))) > (COND ((EQ NY:ENDIAN :BIG) (SETF NY:SWAP (IF (BIGENDIANP) 0 1))) ((EQ NY:ENDIAN :LITTLE) (SETF NY:SWAP (IF (BIGENDIANP) 1 0)))) > (SND-SAVE (QUOTE (AUTONORM (SEQ (MY-NOTE B4 I) (MY-NOTE A4 I)))) NY:MAXLEN NY:FNAME *DEFAULT-SF-FORMAT* *DEFAULT-SF-MODE* *DEFAULT-SF-BITS* NY:SWAP *SOUNDENABLE*) > Function: #<FSubr-LET: #f5c5a0> > Arguments: > ((PEAK (S-SAVE (AUTONORM (SEQ (MY-NOTE B4 I) (MY-NOTE A4 I))) NY:ALL *DEFAULT-SOUND-FILE* :PLAY *SOUNDENABLE*))) > (AUTONORM-UPDATE PEAK) > > Any clues? > > Thanks, > -Steve > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > > > _______________________________________________ > Nyquist-users mailing list > Nyquist-users@... > https://lists.sourceforge.net/lists/listinfo/nyquist-users |
From: Steve M. Robbins <steve@su...> - 2010-12-29 17:01:06
|
On Wed, Dec 29, 2010 at 09:26:23AM -0500, Roger Dannenberg wrote: > This is very odd. Everything looks normal except for the error. I > assume you built from then latest sources in SVN (not the source > download .zip file). No, I built from the .zip file and actually I had to apply a few small patches. I'm building a 3.03 package for Debian, and used the attached series of patches. Most are self-explanatory. The only one that I could imagine causing trouble would be the makefile patch, but even that one shouldn't affect the xlisp interpreter (which is where I imagine the problem lies). Today, I will try building from SVN head. Cheers, -Steve |
From: Steve M. Robbins <steve@su...> - 2010-12-29 19:04:59
Attachments:
application/pgp-signature
|
On Wed, Dec 29, 2010 at 11:00:58AM -0600, Steve M. Robbins wrote: > Today, I will try building from SVN head. OK, so the SVN head build works. I see that the entire tree is now built using -m32, so perhaps that's the problem. I'll continue on with reading the manual now. Thanks, -Steve |
From: Steve M. Robbins <steve@su...> - 2010-12-29 05:21:28
Attachments:
application/pgp-signature
|
On Tue, Dec 28, 2010 at 11:07:12PM -0600, Steve M. Robbins wrote: > On Tue, Dec 28, 2010 at 07:30:46PM -0500, Roger Dannenberg wrote: > > My guess is there are a couple of definitions of my-note floating > > around. You should check the definition (e.g. see GRINDEF) or > > redefine my-note to make sure you know how many parameters it takes. > > Just to be clear, I am typing in (cut and paste, actually) the > definition for my-note directly from the manual: > > define function my-note(pitch, dur) > return osc(pitch, dur, *table*) > > So I'm pretty sure I'm using the 2-variable version. I should > also mention that "play my-note(d4,i)" works. It's just > when I try to make a sequence that it fails. > > > > Using/learning about getting a stack trace from XLISP would also > > tell you exactly which function is a problem. -Roger OK, so I switched to xlisp mode and the output shows a bunch of stuff now. First, I checked that the definition of my-note is what I typed in: 1> (grindef 'my-note) (LAMBDA (PITCH DUR) (OSC PITCH DUR *TABLE*)) So I can play a single note (play (my-note a4 i)) I can play a sequence of one note (play (seq (my-note a4 i))) (play (seq (my-note b4 i))) But I can't play a sequence of two notes (play (seq (my-note b4 i) (my-note a4 i))) Saving sound file to /home/steve/Music/Nyquist/steve-temp.wav error: too few arguments Function: #<Closure: #10ff060> Arguments: 0.5 Function: #<Subr-SND-MAX: #f6b720> Arguments: #<Sound: #8d50a2f0> 1000000 Function: #<FSubr-COND: #f5c720> Arguments: ((SOUNDP SND) (SND-MAX SND SAMPLES)) ((ARRAYP SND) (LET ((PEAK 0) (CHANS (LENGTH SND))) (DOTIMES (I CHANS) (SETF PEAK (MAX PEAK (SND-MAX (AREF SND I) (/ SAMPLES CHANS))))) PEAK)) (T (ERROR "unexpected value in multichannel-max" SND)) Function: #<Closure-MULTICHANNEL-MAX: #f83738> Arguments: #<Sound: #8d50a2f0> 1000000 Function: #<FSubr-SETF: #f5e2f8> Arguments: PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*) Function: #<FSubr-COND: #f5c720> Arguments: ((AND (NOT (SOUNDP SND)) (NOT (EQ (TYPE-OF SND) (QUOTE ARRAY)))) (ERROR "AUTONORM (or PLAY?) got unexpected value" SND)) ((EQ *AUTONORM-TYPE* (QUOTE PREVIOUS)) (SCALE *AUTONORM* SND)) ((EQ *AUTONORM-TYPE* (QUOTE LOOKAHEAD)) (SETF PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*)) (SETF PEAK (MAX 0.001 PEAK)) (SETF *AUTONORM* (/ *AUTONORM-TARGET* PEAK)) (SCALE *AUTONORM* SND)) (T (ERROR "unknown *autonorm-type*")) Function: #<FSubr-COND: #f5c720> Arguments: (*AUTONORMFLAG* (COND ((AND (NOT (SOUNDP SND)) (NOT (EQ (TYPE-OF SND) (QUOTE ARRAY)))) (ERROR "AUTONORM (or PLAY?) got unexpected value" SND)) ((EQ *AUTONORM-TYPE* (QUOTE PREVIOUS)) (SCALE *AUTONORM* SND)) ((EQ *AUTONORM-TYPE* (QUOTE LOOKAHEAD)) (SETF PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*)) (SETF PEAK (MAX 0.001 PEAK)) (SETF *AUTONORM* (/ *AUTONORM-TARGET* PEAK)) (SCALE *AUTONORM* SND)) (T (ERROR "unknown *autonorm-type*")))) (T SND) Function: #<FSubr-LET: #f5c5a0> Arguments: (PEAK) (COND (*AUTONORMFLAG* (COND ((AND (NOT (SOUNDP SND)) (NOT (EQ (TYPE-OF SND) (QUOTE ARRAY)))) (ERROR "AUTONORM (or PLAY?) got unexpected value" SND)) ((EQ *AUTONORM-TYPE* (QUOTE PREVIOUS)) (SCALE *AUTONORM* SND)) ((EQ *AUTONORM-TYPE* (QUOTE LOOKAHEAD)) (SETF PEAK (MULTICHANNEL-MAX SND *AUTONORM-MAX-SAMPLES*)) (SETF PEAK (MAX 0.001 PEAK)) (SETF *AUTONORM* (/ *AUTONORM-TARGET* PEAK)) (SCALE *AUTONORM* SND)) (T (ERROR "unknown *autonorm-type*")))) (T SND)) Function: #<Closure-AUTONORM: #f81090> Arguments: #<Sound: #8d50a2f0> Function: #<Subr-SND-SAVE: #f6b5a0> Arguments: (AUTONORM (SEQ (MY-NOTE B4 I) (MY-NOTE A4 I))) 1000000000 "/home/steve/Music/Nyquist/steve-temp.wav" 4 1 16 0 T Function: #<FSubr-LET: #f5c5a0> Arguments: ((NY:FNAME *DEFAULT-SOUND-FILE*) (NY:MAXLEN NY:ALL) (NY:ENDIAN NIL) (NY:SWAP 0)) (COND ((NULL NY:FNAME) (COND ((STRINGP NY:MAXLEN) (SETF NY:FNAME NY:MAXLEN) (SETF NY:MAXLEN NY:ALL)) (T (SETF NY:FNAME *DEFAULT-SOUND-FILE*))))) (COND ((EQUAL NY:FNAME "") (COND ((NOT *SOUNDENABLE*) (FORMAT T "s-save: no file to write! play option is off!\n")))) (T (SETF NY:FNAME (SOUNDFILENAME NY:FNAME)) (FORMAT T "Saving sound file to ~A~%" NY:FNAME))) (COND ((EQ NY:ENDIAN :BIG) (SETF NY:SWAP (IF (BIGENDIANP) 0 1))) ((EQ NY:ENDIAN :LITTLE) (SETF NY:SWAP (IF (BIGENDIANP) 1 0)))) (SND-SAVE (QUOTE (AUTONORM (SEQ (MY-NOTE B4 I) (MY-NOTE A4 I)))) NY:MAXLEN NY:FNAME *DEFAULT-SF-FORMAT* *DEFAULT-SF-MODE* *DEFAULT-SF-BITS* NY:SWAP *SOUNDENABLE*) Function: #<FSubr-LET: #f5c5a0> Arguments: ((PEAK (S-SAVE (AUTONORM (SEQ (MY-NOTE B4 I) (MY-NOTE A4 I))) NY:ALL *DEFAULT-SOUND-FILE* :PLAY *SOUNDENABLE*))) (AUTONORM-UPDATE PEAK) Any clues? Thanks, -Steve |