From bil at ccrma.Stanford.EDU Mon Sep 5 16:24:32 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 05 Sep 2016 16:24:32 -0700 Subject: [CM] Snd 16.8 Message-ID: <477d824a71ded42eef480729b947463f@ccrma.stanford.edu> Snd 16.8. cmn: Michael Edwards got cmn to work in ECL. s7: object->let changed ->byte-vector to string->byte-vector let-temporarily is now built-in checked: sbcl 1.3.8|9, gtk 3.21.5 Thanks!: Michael Edwards. From artaslynn at gmail.com Sun Sep 11 17:07:18 2016 From: artaslynn at gmail.com (Lynn Artas) Date: Sun, 11 Sep 2016 18:07:18 -0600 Subject: [CM] working with large data sets Message-ID: Hello list, I?m working with sonifying a large number of data points using grace. The values are recorded as a .csv by another application, which I then open in excel. From here, I have tried copying and pasting (paste special as unformatted) into word (grace doesn't do anything when I try to replace ^M or ^p) so I was using word for removing ^p and replacing with a space. I realize grace might be working, but not be as obvious as word that it is working on it. Here are a couple specific problems: 1. formatting is a pain/fatal! both word and grace take minutes to paste the data into a document, and word takes a few minutes just to search and replace the ^p. I?ve tried to leave the data as is in the grace document (if it works, it?s pretty enough for me), but I often get a crash just trying to paste the data into a document in grace. Or a crash upon loading the second 24000 point stream of data. (I'll need to load ten of these 24,000 streams) When I leave the document to do something else while it churns, I get the spinning beach ball of doom when I return to grace....aaaaand, as usual, just had grace crash again while typing this while awaiting my paste. When I try with raw (unformatted) data, I've had it crash as I load (evaluate) the second 24,000 stream. 2. after I use Word to take out the ^p and replace with space, when I look at the file with more in terminal, every number has a ^M (carriage return in DOS/Windows-?!) in front of it and word won?t let me search and replace the ^M. (^M is not a valid special character for the Find What box according to MS word). Here are my questions: 1. Is there a limit on the amount of data points you can load into memory, or is it just the formatting characters gumming up the works? 2. And most important?can anyone outline a better way to work with big data streams in grace? Thanks for any help, ~L. -------------- next part -------------- An HTML attachment was scrubbed... URL: From taube at illinois.edu Mon Sep 12 03:29:53 2016 From: taube at illinois.edu (Taube, Heinrich K) Date: Mon, 12 Sep 2016 10:29:53 +0000 Subject: [CM] working with large data sets In-Reply-To: References: Message-ID: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> hi lynn the bridge from grace?s editor to s7 is intended as a code editor and simply isnt made for huge wads of data. I would use an external app like emacs to edit the data in a .scm file and then simply load that file i Grace (or more speciically, into s7, which grace uses.) so the scheme file would look like (define mydata ?(1 2 3 ?.. 24,000 )) also with huge data its possible may run out of heap space. if thats the case and depending on what you are tring to do, you could switch to the CM2/CLM/Common Lisp. those packages work will and common lisp would probably handle the large data sets that you are using. > On Sep 11, 2016, at 7:07 PM, Lynn Artas wrote: > > Hello list, > > I?m working with sonifying a large number of data points using grace. The values are recorded as a .csv by another application, which I then open in excel. From here, I have tried copying and pasting (paste special as unformatted) into word (grace doesn't do anything when I try to replace ^M or ^p) so I was using word for removing ^p and replacing with a space. I realize grace might be working, but not be as obvious as word that it is working on it. > > Here are a couple specific problems: > > 1. formatting is a pain/fatal! both word and grace take minutes to paste the data into a document, and word takes a few minutes just to search and replace the ^p. I?ve tried to leave the data as is in the grace document (if it works, it?s pretty enough for me), but I often get a crash just trying to paste the data into a document in grace. Or a crash upon loading the second 24000 point stream of data. (I'll need to load ten of these 24,000 streams) When I leave the document to do something else while it churns, I get the spinning beach ball of doom when I return to grace....aaaaand, as usual, just had grace crash again while typing this while awaiting my paste. > > When I try with raw (unformatted) data, I've had it crash as I load (evaluate) the second 24,000 stream. > > 2. after I use Word to take out the ^p and replace with space, when I look at the file with more in terminal, every number has a ^M (carriage return in DOS/Windows-?!) in front of it and word won?t let me search and replace the ^M. (^M is not a valid special character for the Find What box according to MS word). > > Here are my questions: > > 1. Is there a limit on the amount of data points you can load into memory, or is it just the formatting characters gumming up the works? > > 2. And most important?can anyone outline a better way to work with big data streams in grace? > > > Thanks for any help, > ~L. > > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From bil at ccrma.Stanford.EDU Mon Sep 12 05:00:28 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 12 Sep 2016 05:00:28 -0700 Subject: [CM] working with large data sets In-Reply-To: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> References: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> Message-ID: <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> > with huge data its possible may run out of heap space Not s7's heap -- it grows as needed. You might run out of RAM, but 24000 cells is just a megabyte worst case and won't normally even trigger a GC. If s7 by itself dies, send me the data file. (I routinely work with millions of data points, so something else has to be the culprit -- I edit 1GByte data files in emacs). On editing out special chars, you can use s7 to do that, control-p is 16, control-m 13 etc. If possible, run your test in a debugger (gdb in Linux/Mac) and send me a stacktrace. From artaslynn at gmail.com Mon Sep 12 07:04:50 2016 From: artaslynn at gmail.com (Lynn Artas) Date: Mon, 12 Sep 2016 08:04:50 -0600 Subject: [CM] working with large data sets In-Reply-To: <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> References: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> Message-ID: Thanks for the tips. I'll start with emacs. Can anyone recommend a favorite emacs for mac? I know Rick is/was a fan of Aquamacs. On Mon, Sep 12, 2016 at 6:00 AM, wrote: > with huge data its possible may run out of heap space >> > > Not s7's heap -- it grows as needed. You might run out > of RAM, but 24000 cells is just a megabyte worst case > and won't normally even trigger a GC. If s7 by itself > dies, send me the data file. (I routinely work with > millions of data points, so something else has to be > the culprit -- I edit 1GByte data files in emacs). > > On editing out special chars, you can use s7 to do that, > control-p is 16, control-m 13 etc. If possible, run > your test in a debugger (gdb in Linux/Mac) and send > me a stacktrace. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Sep 12 07:49:42 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 12 Sep 2016 07:49:42 -0700 Subject: [CM] working with large data sets In-Reply-To: References: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> Message-ID: > Can anyone recommend a favorite emacs for mac? I use emacsformacosx -- google "emacs for mac" and I think you'll see it. There are also comparisons available online. I used aquamacs originally, but was not happy with it. (I actually do all real editing on linux, so my opinion is not worth a lot). From taube at illinois.edu Mon Sep 12 08:10:46 2016 From: taube at illinois.edu (Taube, Heinrich K) Date: Mon, 12 Sep 2016 15:10:46 +0000 Subject: [CM] working with large data sets In-Reply-To: References: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> Message-ID: <9768AF65-8B8C-4513-968F-A27872CA0D20@illinois.edu> I use aquamacs 9+ hours a day! > On Sep 12, 2016, at 9:49 AM, bil at ccrma.stanford.edu wrote: > >> Can anyone recommend a favorite emacs for mac? > > I use emacsformacosx -- google "emacs for mac" and > I think you'll see it. There are also comparisons > available online. I used aquamacs originally, but > was not happy with it. (I actually do all real > editing on linux, so my opinion is not worth a lot). > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From pascal at trilingual.eu Mon Sep 12 07:12:19 2016 From: pascal at trilingual.eu (Pascal Lorenz) Date: Mon, 12 Sep 2016 16:12:19 +0200 Subject: [CM] working with large data sets In-Reply-To: References: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> Message-ID: <0A7006D9-10D9-462E-BD3A-50D4A2EED368@trilingual.eu> I prefer Emacs Mac Port . > On 12 Sep 2016, at 16:04, Lynn Artas wrote: > > Thanks for the tips. I'll start with emacs. Can anyone recommend a favorite emacs for mac? I know Rick is/was a fan of Aquamacs. > > On Mon, Sep 12, 2016 at 6:00 AM, > wrote: > with huge data its possible may run out of heap space > > Not s7's heap -- it grows as needed. You might run out > of RAM, but 24000 cells is just a megabyte worst case > and won't normally even trigger a GC. If s7 by itself > dies, send me the data file. (I routinely work with > millions of data points, so something else has to be > the culprit -- I edit 1GByte data files in emacs). > > On editing out special chars, you can use s7 to do that, > control-p is 16, control-m 13 etc. If possible, run > your test in a debugger (gdb in Linux/Mac) and send > me a stacktrace. > > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist -------------- next part -------------- An HTML attachment was scrubbed... URL: From artaslynn at gmail.com Mon Sep 12 08:55:05 2016 From: artaslynn at gmail.com (Lynn Artas) Date: Mon, 12 Sep 2016 09:55:05 -0600 Subject: [CM] working with large data sets In-Reply-To: <9768AF65-8B8C-4513-968F-A27872CA0D20@illinois.edu> References: <9B687AB4-8F61-4A27-9470-E3989DB031D8@illinois.edu> <85afe28b0417e1d3d0c6019ac297f128@ccrma.stanford.edu> <9768AF65-8B8C-4513-968F-A27872CA0D20@illinois.edu> Message-ID: I was too excited to wait for advice, so I ended up googling just that, Bil. emacsformacosx was the first hit and looked good enough to try. I knew I had chosen wisely when I saw the emacs Psychotherapist in the Help menu. On Mon, Sep 12, 2016 at 9:10 AM, Taube, Heinrich K wrote: > I use aquamacs 9+ hours a day! > > > On Sep 12, 2016, at 9:49 AM, bil at ccrma.stanford.edu wrote: > > > >> Can anyone recommend a favorite emacs for mac? > > > > I use emacsformacosx -- google "emacs for mac" and > > I think you'll see it. There are also comparisons > > available online. I used aquamacs originally, but > > was not happy with it. (I actually do all real > > editing on linux, so my opinion is not worth a lot). > > > > _______________________________________________ > > Cmdist mailing list > > Cmdist at ccrma.stanford.edu > > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j_hearon at hotmail.com Mon Sep 19 10:57:37 2016 From: j_hearon at hotmail.com (James Hearon) Date: Mon, 19 Sep 2016 17:57:37 +0000 Subject: [CM] s7, undefined reference errors In-Reply-To: References: Message-ID: Hi, I was trying to get back to looking at s7 as interpreter but I'm failing to compile for some reason. I have s7.o, s7.h, and snd is working ok. But I'm getting undefined ref errors trying to compile below and a little stumped what might be going wrong? Seems like it's not finding something it needs. //gcc -o repel_test repel_test.c s7.o -Wl,-export-dynamic -lm -I. -ldl #include "/opt/snd-16/s7.h" int main (int argc, char **argv) { s7_scheme *sc; sc = s7_init(); s7_load(sc, "/opt/snd-16/repl.scm"); s7_eval_c_string(sc, "((*repl* 'run))"); return(0); } ----------------- /opt/snd-16/s7.o: In function `sweep': s7.c:(.text+0x1b40): undefined reference to `__gmpz_clear' s7.c:(.text+0x1bdf): undefined reference to `__gmpq_clear' s7.c:(.text+0x1c7e): undefined reference to `mpfr_clear' s7.c:(.text+0x1d1d): undefined reference to `mpc_clear' /opt/snd-16/s7.o: In function `s7_number_to_real_with_caller': s7.c:(.text+0x1e272): undefined reference to `mpfr_get_d' /opt/snd-16/s7.o: In function `s7_real': s7.c:(.text+0x1e470): undefined reference to `mpfr_get_d' /opt/snd-16/s7.o: In function `s7_is_negative': s7.c:(.text+0x1e956): undefined reference to `mpfr_sgn' /opt/snd-16/s7.o: In function `s7_is_positive': s7.c:(.text+0x1ea20): undefined reference to `mpfr_sgn' /opt/snd-16/s7.o: In function `s7_real_part': ... /opt/snd-16/s7.o: In function `s7_random': s7.c:(.text+0x12e539): undefined reference to `mpfr_get_d' /opt/snd-16/s7.o: In function `s7_gmp_init': s7.c:(.text+0x12f864): undefined reference to `mpfr_set_default_prec' /opt/snd-16/s7.o: In function `s7_init': s7.c:(.text+0x13efa2): undefined reference to `__gmpz_init_set_ui' s7.c:(.text+0x13efb5): undefined reference to `__gmp_randinit_default' s7.c:(.text+0x13efd2): undefined reference to `__gmp_randseed' s7.c:(.text+0x13efe1): undefined reference to `__gmpz_clear' collect2: error: ld returned 1 exit status Regards, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.s.matheussen at gmail.com Mon Sep 19 11:11:13 2016 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Mon, 19 Sep 2016 20:11:13 +0200 Subject: [CM] s7, undefined reference errors In-Reply-To: References: Message-ID: On Mon, Sep 19, 2016 at 7:57 PM, James Hearon wrote: > Hi, > > I was trying to get back to looking at s7 as interpreter but I'm failing > to compile for some reason. > > > I have s7.o, s7.h, and snd is working ok. But I'm getting undefined ref > errors trying to compile below and a little stumped what might be going > wrong? Seems like it's not finding something it needs. > > > //gcc -o repel_test repel_test.c s7.o -Wl,-export-dynamic -lm -I. -ldl > #include "/opt/snd-16/s7.h" > int main (int argc, char **argv) > { > s7_scheme *sc; > sc = s7_init(); > s7_load(sc, "/opt/snd-16/repl.scm"); > s7_eval_c_string(sc, "((*repl* 'run))"); > return(0); > } > > ----------------- > > /opt/snd-16/s7.o: In function `sweep': > s7.c:(.text+0x1b40): undefined reference to `__gmpz_clear' > Hi, It seems like you compile s7 with "WITH_GMP" defined somehow. Perhaps you have a mus-config.h file where WITH_GMP is defined? I guess it compiles if you remove WITH_GMP from mus-config.h, or link in libgmp: -lgmp -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Sep 19 11:41:21 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 19 Sep 2016 11:41:21 -0700 Subject: [CM] s7, undefined reference errors In-Reply-To: References: Message-ID: <095edb1a3870b4d955c6251d1a5df5ef@ccrma.stanford.edu> As Kjetil points out, you must have configured Snd with --with-gmp or somehow created mus-config.h with WITH_GMP set to 1. That file does not come with s7 (on the theory that people will read the instructions). If you want to use gmp, you'll need -lgmp -lmpfr -lmpc. If not, just delete whatever is in mus-config.h and recompile s7, or run configure again (for Snd) without --with-gmp, make clean, make. From k.s.matheussen at gmail.com Tue Sep 20 00:05:33 2016 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Tue, 20 Sep 2016 09:05:33 +0200 Subject: [CM] s7, undefined reference errors In-Reply-To: <095edb1a3870b4d955c6251d1a5df5ef@ccrma.stanford.edu> References: <095edb1a3870b4d955c6251d1a5df5ef@ccrma.stanford.edu> Message-ID: By the way, have you measured any difference in performance for non-bignumbers when using WITH_GMP? On Mon, Sep 19, 2016 at 8:41 PM, wrote: > As Kjetil points out, you must have configured Snd > with --with-gmp or somehow created mus-config.h > with WITH_GMP set to 1. That file does not come with > s7 (on the theory that people will read the instructions). > If you want to use gmp, you'll need -lgmp -lmpfr -lmpc. > If not, just delete whatever is in mus-config.h and > recompile s7, or run configure again (for Snd) without > --with-gmp, make clean, make. > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Tue Sep 20 07:17:57 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 20 Sep 2016 07:17:57 -0700 Subject: [CM] s7, undefined reference errors In-Reply-To: References: <095edb1a3870b4d955c6251d1a5df5ef@ccrma.stanford.edu> Message-ID: > By the way, have you measured any difference in performance > for non-bignumbers when using WITH_GMP? The gmp version is always slower, sometimes a lot slower (more than a factor of 10). I was using gmp/mpfr for some (for lack of a less pompous word) research and didn't care about the speed. In numerical contexts, the multiprecision library calls completely dominate (99% of the compute time), so I didn't try to optimize the other 1%. I plead lack of time and energy! I've reached that point in life that if I try to work harder, I instantly fall asleep. From j_hearon at hotmail.com Tue Sep 20 10:11:02 2016 From: j_hearon at hotmail.com (James Hearon) Date: Tue, 20 Sep 2016 17:11:02 +0000 Subject: [CM] s7, undefined reference errors In-Reply-To: References: <095edb1a3870b4d955c6251d1a5df5ef@ccrma.stanford.edu>, Message-ID: Hi, snd configure... ./configure --with-s7 --with-gsl --with-motif --with-gl --with-gmp --with-alsa CFLAGS=HAVE_COMPLEX_NUMBERS CFLAGS=HAVE_COMPLEX_TRIG CFLAGS="-I/usr/include/linux/param.h" Oops, I guess I did compile with gimp. I'm not sure why I did that. Must have been something I was trying to see perhaps related to gl. Thanks so much for pointing out that problem. re: all my compile times are usually over a minute, but I've been using lots of lets set!, and patterns, so I figured that was it. I'll recompile snd without gimp and see how that goes. Regards, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersvi at notam02.no Tue Sep 27 07:00:37 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Tue, 27 Sep 2016 16:00:37 +0200 Subject: [CM] tank reverb Message-ID: <87bmz9mohm.fsf@bek.no> Hi all. Tom Erbe visited us here in Oslo a week ago, and talked about "Erbe-Verb" and other recent work he's done on reverbs. In his great presentation he mentioned a paper by Jon Dattorro: "Effect Design #1" describing a 'tank-style' plate-reverb amongst other things. I beleive it was reverse-engineered from one of the early Lexicon digital reverbs? I hadn't noticed the paper before, despite everybody else in the room seeming to be familiar with it. Anyway, it sparked me into setting up something similar in CLM/SND (attached). Albeit somewhat slow, it sounds quite good with many different types of input. The 'tank' is unity gain, so setting decay=1 creates a nice 'freeze' effect. See some suggested settings at the example calls at the bottom of the file. Note: there are 2 minor differences in the tap-section from those in Dattorro's paper. I'll perhaps fix these later, if noone gets there before me. Currently only stereo. Should be easy to extend (to e.g. quad or FOA) by setting up further sets of taps from the same tank. I'll perhaps do more tests with this when i get time. Have fun. -anders -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: tankrev.scm URL: From bil at ccrma.Stanford.EDU Tue Sep 27 09:32:44 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 27 Sep 2016 09:32:44 -0700 Subject: [CM] tank reverb In-Reply-To: <87bmz9mohm.fsf@bek.no> References: <87bmz9mohm.fsf@bek.no> Message-ID: Thanks very much! I'll add that to the snd tarball. From andersvi at notam02.no Tue Sep 27 11:05:42 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Tue, 27 Sep 2016 20:05:42 +0200 Subject: [CM] tank reverb References: <87bmz9mohm.fsf@bek.no> Message-ID: <87zimtkykp.fsf@bek.no> a> Note: there are 2 minor differences in the tap-section from those in a> Dattorro's paper. I'll perhaps fix these later, if noone gets there a> before me. Wow, do i feel speedy today. Fixed in attached (i hope): -------------- next part -------------- A non-text attachment was scrubbed... Name: tankrev.scm Type: application/vnd.lotus-screencam Size: 6033 bytes Desc: not available URL: From andersvi at notam02.no Wed Sep 28 02:45:11 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Wed, 28 Sep 2016 11:45:11 +0200 Subject: [CM] clm delay offset for tap? Message-ID: <87y42cicig.fsf@bek.no> Hi Bill, others. I'm confused about (positive) offset argument to tap. Negative offsets yields perhaps expected results, but positive offsets starts pulling values from what seems an odd offset into the line. (set! (*s7* 'print-length) 20) (define d1 (make-delay 10)) (do ((i 0 (+ 1 i))) ((= i 10)) (delay d1 i)) (mus-data d1) => (float-vector 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0) (tap d1) => 0.0 (tap d1 1) => 5.0 (tap d1 -1) => 1.0 (map (lambda (i) (tap d1 i)) '(0 1 2 3 4 5 6 7 8 9)) => (0.0 5.0 4.0 3.0 2.0 1.0 0.0 9.0 8.0 7.0) (map (lambda (i) (tap d1 i)) '(-0 -1 -2 -3 -4 -5 -6 -7 -8 -9)) => (0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0) Thanks for all help and guidance. -anders From tito.01beta at gmail.com Wed Sep 28 06:33:07 2016 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 28 Sep 2016 15:33:07 +0200 Subject: [CM] clm delay offset for tap? In-Reply-To: <87y42cicig.fsf@bek.no> References: <87y42cicig.fsf@bek.no> Message-ID: <20160928133307.GA1672@rhk.homenet.telecomitalia.it> On Wed, Sep 28, 2016 at 11:45:11AM +0200, andersvi at notam02.no wrote: > Hi Bill, others. > > I'm confused about (positive) offset argument to tap. > > Negative offsets yields perhaps expected results, but positive offsets > starts pulling values from what seems an odd offset into the line. > > (set! (*s7* 'print-length) 20) > > (define d1 (make-delay 10)) > > (do ((i 0 (+ 1 i))) > ((= i 10)) > (delay d1 i)) > > (mus-data d1) > => (float-vector 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0) > > (tap d1) > => 0.0 > (tap d1 1) > => 5.0 > (tap d1 -1) > => 1.0 > > (map (lambda (i) (tap d1 i)) '(0 1 2 3 4 5 6 7 8 9)) > => (0.0 5.0 4.0 3.0 2.0 1.0 0.0 9.0 8.0 7.0) > > (map (lambda (i) (tap d1 i)) '(-0 -1 -2 -3 -4 -5 -6 -7 -8 -9)) > => (0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0) That's a bug with the modulus operator in c (int)-1 % (unsigned int)10 => 5 (int)-1 % (int)10 => -1 The follow patch seems ok: diff -ur snd-16~/clm.c snd-16/clm.c --- snd-16~/clm.c 2016-09-28 15:21:57.567364000 +0200 +++ snd-16/clm.c 2016-09-28 15:22:15.075143897 +0200 @@ -4382,7 +4382,7 @@ int taploc; if (gen->size == 0) return(gen->line[0]); if ((int)loc == 0) return(gen->line[gen->loc]); - taploc = (int)(gen->loc - (int)loc) % gen->size; + taploc = (int)(gen->loc - (int)loc) % (int)gen->size; if (taploc < 0) taploc += gen->size; return(gen->line[taploc]); } From bil at ccrma.Stanford.EDU Wed Sep 28 07:01:37 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 28 Sep 2016 07:01:37 -0700 Subject: [CM] =?utf-8?q?clm_delay_offset_for_tap=3F?= In-Reply-To: <20160928133307.GA1672@rhk.homenet.telecomitalia.it> References: <87y42cicig.fsf@bek.no> <20160928133307.GA1672@rhk.homenet.telecomitalia.it> Message-ID: <5c3226973ad48fef382ac1964e69b68d@ccrma.stanford.edu> > (int)-1 % (unsigned int)10 => 5 That's very interesting -- I never noticed this! Thanks very much for the bugfix -- I'll merge it into my sources today -- then I need to look at all the other % cases. From k.s.matheussen at gmail.com Wed Sep 28 07:48:25 2016 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Wed, 28 Sep 2016 16:48:25 +0200 Subject: [CM] clm delay offset for tap? In-Reply-To: <5c3226973ad48fef382ac1964e69b68d@ccrma.stanford.edu> References: <87y42cicig.fsf@bek.no> <20160928133307.GA1672@rhk.homenet.telecomitalia.it> <5c3226973ad48fef382ac1964e69b68d@ccrma.stanford.edu> Message-ID: On Wed, Sep 28, 2016 at 4:01 PM, wrote: > (int)-1 % (unsigned int)10 => 5 >> > > That's very interesting -- I never noticed this! > Thanks very much for the bugfix -- I'll merge it into > my sources today -- then I need to look at all > the other % cases. > > Yes, very good catch. Regarding unsigned integers, there have been so many bugs caused by unsigned integers that I have stopped using them completely in my software. (The common bug is of course "(unsigned int)-1 < 0", and variants of it, which is always false.) I think Qt practices the same philosophy; no unsigned integers. -------------- next part -------------- An HTML attachment was scrubbed... URL: