nyquist-users — general discussion list for users of Nyquist

You can subscribe to this list here.

 2005 2006 2008 2009 2010 2011 2013 Jan Feb Mar (5) Apr May Jun (4) Jul Aug (3) Sep (3) Oct Nov Dec (1) Jan (5) Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan (12) Feb (1) Mar (1) Apr (9) May Jun (2) Jul (1) Aug Sep Oct Nov Dec Jan (2) Feb (1) Mar Apr May Jun Jul (3) Aug Sep Oct Nov Dec Jan Feb (3) Mar Apr May Jun Jul Aug Sep Oct (21) Nov (6) Dec (9) Jan Feb Mar (1) Apr May Jun Jul Aug Sep Oct Nov (1) Dec Jan Feb Mar Apr May (1) Jun Jul Aug Sep Oct Nov Dec
S M T W T F S

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15
(1)
16
(1)
17
(2)
18

19
(1)
20

21

22

23

24

25

26

27

28

29

30

31

Showing 5 results of 5

 [Nyquist-users] Simple function to reverse a sound From: - 2005-03-19 12:25:37 ```Hi! I wrote a very simple function to "reverse" a sound in time=2E It doesn't run very quickly, but it might be useful for short sounds=2E I couldn't think of any way to do it except extract all the samples to an array, reverse the array, and convert it back to a sound=2E If there's a more efficient way (other than writing it in C), please let me know=2E If you think it might be useful, please feel free to add it to the next release=2E It uses a "helper" function, 'array-reverse', since=20 there doesn't seem to be any function in Xlisp to do this=2E David=2E (defun array-reverse (a length) ;; Note: this function updates the input parameter ;; in place=2E If you don't want this, copy the array ;; to another variable first=2E (prog* ((mid (/ length 2)) (tmp nil)) (if (equal (type-of a) 'ARRAY) (do ((n1 0) (n2 (1- length))) ((>=3D n1 mid) a) (setf tmp (aref a n1)) (setf (aref a n1) (aref a n2)) (setf (aref a n2) tmp) (setf n1 (1+ n1)) (setf n2 (1- n2)) ) (return a) ) ) ) (defun snd-reverse (s) ;; returns time-reversed sound (preserving sample rate and start=20 ;; time), but doesn't operate on multi-channel sounds (if (soundp s) (prog* ((len (snd-length s NY:ALL)) (a (snd-samples s len))) (array-reverse a len) (return (snd-from-array (snd-t0 s) (snd-srate s) a)) ) ) ) -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E ```
 [Nyquist-users] RE: Nyquist-users digest, Vol 1 #2 - 2 msgs From: Roger B. Dannenberg - 2005-03-17 17:52:08 ```Wonderful idea! I'll put in either a global (*maximum-table-size*) or a = call (SET-MAXIMUM-TABLE-SIZE n) to let users override the default, and I'll = leave the default at 100,000. -Roger ```
 FW: [Nyquist-users] Re: Question about maximum table size From: - 2005-03-17 00:16:10 ```Thanks=2E I realize that for some people (rather, some machines), 1 millio= n samples might be too large, resulting in a crash, while for others,=20 100,000 might be too small=2E I just wanted some confirmation that there was a contradiction between the documentation and the actual limit, or if not, then help in clearing up my misunderstanding=2E Since I'm just learning how to do things in Nyquist, it's not important=2E= But maybe in some future release, the table size could be specified as=20 a command-line parameter, rather than hard-coded in an "include" file=2E Then users could specify whatever is appropriate for their hardware (although it could default to 100,000 samples)=2E Thanks for your help=2E David=2E Original Message: ----------------- From: Roger B=2E Dannenberg rbd@...=2Ecmu=2Eedu Date: Wed, 16 Mar 2005 15:40:59 -0500 To: nyquist-users@...=2Esourceforge=2Enet Subject: [Nyquist-users] Re: Question about maximum table size Yes, there's a bug either in the documentation or the code: the table size= limit is 100K samples, which is 400KB=2E The table size limit is a tradeof= f between giving users the freedom to do what they want and keeping Nyquist alive=2E Before there was a limit, users would complain that Nyquist crash= ed for no apparent reason=2E The reason was that Nyquist was trying to alloca= te huge tables=2E In almost all cases, there was a better way to do things=2E= With convolution, I think you can break the convolution up into two or more parts, perform them separately, and then shift and sum the results togethe= r to get the correct result=2E I realize this is easy to say and somewhat painful to code and test=2E And if you're going to allocate a bunch of big= tables, why not just increase the tables size? A 4MB memory allocation isn= 't so much on most modern machines=2E But is that enough? What should the lim= it be? (Also, Nyquist doesn't do fast convolution, so the time is proportiona= l to M*N where M and N are the lengths of the two sounds to be convolved=2E)= I guess the thing to do is increase the max size to 1M and put in some err= or reporting in case the allocation fails so when it does the user gets a meaningful error report=2E I'll work on in=2E Meanwhile, have you tried the convolution at 22kHz? 88K samples (4 seconds= at 22kHz) should fit into the current 100K sample limit=2E ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users=2E= Discover which products truly live up to the hype=2E Start reading now=2E http://ads=2Eosdn=2Ecom/?ad_ide95&alloc_id=14396&op=AAick _______________________________________________ Nyquist-users mailing list Nyquist-users@...=2Esourceforge=2Enet https://lists=2Esourceforge=2Enet/lists/listinfo/nyquist-users -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E ```
 [Nyquist-users] Re: Question about maximum table size From: Roger B. Dannenberg - 2005-03-16 20:41:18 ```Yes, there's a bug either in the documentation or the code: the table = size limit is 100K samples, which is 400KB. The table size limit is a = tradeoff between giving users the freedom to do what they want and keeping = Nyquist alive. Before there was a limit, users would complain that Nyquist = crashed for no apparent reason. The reason was that Nyquist was trying to = allocate huge tables. In almost all cases, there was a better way to do things. = With convolution, I think you can break the convolution up into two or more parts, perform them separately, and then shift and sum the results = together to get the correct result. I realize this is easy to say and somewhat painful to code and test. And if you're going to allocate a bunch of big tables, why not just increase the tables size? A 4MB memory allocation = isn't so much on most modern machines. But is that enough? What should the = limit be? (Also, Nyquist doesn't do fast convolution, so the time is = proportional to M*N where M and N are the lengths of the two sounds to be convolved.) I guess the thing to do is increase the max size to 1M and put in some = error reporting in case the allocation fails so when it does the user gets a meaningful error report. I'll work on in. Meanwhile, have you tried the convolution at 22kHz? 88K samples (4 = seconds at 22kHz) should fit into the current 100K sample limit. ```
 [Nyquist-users] Question about maximum table size From: - 2005-03-15 18:50:12 ```Hi! I'm using version 2=2E30 of the Windows version (pre-compiled), and I=20 sometimes get an error message about maximum table size=2E According to the message, the maximum size is 100,000 samples, but according to the Nyquist manual, it's 1,000,000 samples (pg=2E 36)=2E I haven't downloaded the source code to see how it's defined in 'sound=2Eh', and I was hoping not to have to compile it myself=2E Am I incorrect in thinking the size should be 1,000,000 and not 100,000? Here's the statement I'm getting the error on=2E I'm trying to "convolve" a sound with another sound that's 4 sec=2E in length, at a sampling rate of 44,100=2E That would be over 100,000 but still under 1,000,000=2E > (setf s300 (normalize (convolve s (gong-3 300 4)))) error: maximum table size (100000) exceeded - NIL if continued: use truncated sound for table (I'm using "gong=2Elsp" to generate the 4 sec=2E sound for the convolve operation=2E) Thanks for your help, David=2E -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E ```

Showing 5 results of 5