From bil at ccrma.Stanford.EDU Sat Jul 1 10:30:47 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sat, 01 Jul 2023 10:30:47 -0700 Subject: [CM] Snd 23.5 Message-ID: <48cf1f08fa048e23bdda7a7da7a2fcea@ccrma.stanford.edu> Snd 23.5 s7: various small bugs and optimizations. checked: sbcl 2.3.5|6 Thanks!: Anders Vinjar, Todd Ingalls, johnm, Kjetil Matheussen From kennethflak at protonmail.com Sat Jul 8 08:32:15 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Sat, 08 Jul 2023 15:32:15 +0000 Subject: [CM] Blog post about snd and SuperCollider Message-ID: Hi all, I wrote a little blog post about using snd's analysis capabilities to do some additive synthesis in SuperCollider. Some of you might find it interesting :-) https://roosnaflak.com/tech-and-research/additive-resynthesis-with-snd-and-supercollider/ Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From kennethflak at protonmail.com Wed Jul 12 02:37:10 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Wed, 12 Jul 2023 09:37:10 +0000 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <8953510efa185560e7267f351d51cd54@ccrma.stanford.edu> <25go6v64cuz6ejq3537ujktwhli25lqfvtszq5qtreaeq2xbvh@urzycbvkl65r> <0fb56bc11754709af5e0f9616065c5d7@ccrma.stanford.edu> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> Message-ID: <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> Hi list, There's been some exciting new developments in the land of neovim lately: github user @russtoku has implemented snd as a client for the conjure plugin in his fork: https://github.com/russtoku/conjure/tree/dev-snd, which now seems to work reasonably well. At some point soon it should be merged into the main branch of the original repo. This means it is now possible to evaluate code for snd directly in a nvim buffer! See this issue for more info: https://github.com/Olical/conjure/issues/507 What's missing (sorely) is some kind of completion source for snd. Judging from the source code it seems this is generated dynamically for the listener. For now I'd be happy to start using a dictionary-based approach, but then I'd need to know how to generate those keywords. Any pointers on how I could do that programmatically? Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club On 27 Jun 2023 02:27, bil at ccrma.Stanford.EDU wrote: >No, I don't know how emacs does it. It used to be going >through the emacs file comint.el, if I remember right. > From kennethflak at protonmail.com Wed Jul 12 02:38:11 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Wed, 12 Jul 2023 09:38:11 +0000 Subject: [CM] Copy/paste text from/to listener? Message-ID: I haven't found a way to copy and paste text to and from the listener. Is this possible? Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From bil at ccrma.Stanford.EDU Wed Jul 12 07:28:39 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 12 Jul 2023 07:28:39 -0700 Subject: [CM] =?utf-8?q?Copy/paste_text_from/to_listener=3F?= In-Reply-To: References: Message-ID: <0a03ffc6787b449f3b4c392eadca112c@ccrma.stanford.edu> It works both directions and in both the Motif and terminal versions for me (I tried it with a terminal and emacs). The notcurses repl may not work in this regard -- I'll check later today. From kennethflak at protonmail.com Wed Jul 12 08:43:30 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Wed, 12 Jul 2023 15:43:30 +0000 Subject: [CM] Copy/paste text from/to listener? In-Reply-To: <0a03ffc6787b449f3b4c392eadca112c@ccrma.stanford.edu> References: <0a03ffc6787b449f3b4c392eadca112c@ccrma.stanford.edu> Message-ID: I'm running the motif version. Seems to work within the listener by mouse selection and c-y, but I am not succeeding in communicating outside that, neither on x (i3) nor Wayland (sway). It took me a while to figure out the mechanics of copy-paste, though, so it might be an idea to include this in the docs? I discovered it by grepping the source tree. Roosna & Flak Contemporary Dance & Music https://roosnaflak.com -------- Original Message -------- On Jul 12, 2023, 17:28, < bil at ccrma.Stanford.EDU> wrote: It works both directions and in both the Motif and terminal versions for me (I tried it with a terminal and emacs). The notcurses repl may not work in this regard -- I'll check later today. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Wed Jul 12 12:03:20 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 12 Jul 2023 12:03:20 -0700 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <8953510efa185560e7267f351d51cd54@ccrma.stanford.edu> <25go6v64cuz6ejq3537ujktwhli25lqfvtszq5qtreaeq2xbvh@urzycbvkl65r> <0fb56bc11754709af5e0f9616065c5d7@ccrma.stanford.edu> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> Message-ID: <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> To get all the current names, use (symbol-table) in scheme, or s7_symbol_table and s7_for_each_symbol in C. I can send you the output of (format #f "~W" (symbol-table)) It's too long to include here (4266 names, 57k bytes). I guess you already know this, but snd-completion.c and snd-help.c have the code that traverses the symbol-table to get completions and help. (I'm a bit annoyed at that conjure/neovim guy -- I've been writing code since 1969 -- probably before he was born, and in languages he's never heard of). From bil at ccrma.Stanford.EDU Wed Jul 12 12:20:58 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 12 Jul 2023 12:20:58 -0700 Subject: [CM] =?utf-8?q?Copy/paste_text_from/to_listener=3F?= In-Reply-To: References: <0a03ffc6787b449f3b4c392eadca112c@ccrma.stanford.edu> Message-ID: I was using mouse selection to test it. I might not say anything in the Snd docs because it's an X/Motif thing (i.e. the "clipboard" I think it's called. Look for "interclient communication" in the X docs, and XA_PRIMARY). It doesn't work for me on a Mac. From kennethflak at protonmail.com Thu Jul 13 04:35:45 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Thu, 13 Jul 2023 11:35:45 +0000 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <25go6v64cuz6ejq3537ujktwhli25lqfvtszq5qtreaeq2xbvh@urzycbvkl65r> <0fb56bc11754709af5e0f9616065c5d7@ccrma.stanford.edu> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> Message-ID: Thank you so much, Bill! This is extremely helpful. I'll try to get this to output to a file in the correct format, so that the completion plugin can read it as well, preferably each time I run snd so that all the loaded files in my startup file gets included as well. Programming since '69, you say...? That's a VERY respectable amount of time. Thanks a lot for keeping up the development of snd! Regarding the docs: I would love a kind of baby-steps intro for beginner programmers of s7. I guess I'll write it myself as I learn more :-) I often find it useful to read beginner learner's notes myself. Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club On 12 Jul 2023 12:03, bil at ccrma.Stanford.EDU wrote: >To get all the current names, use (symbol-table) >in scheme, or s7_symbol_table and s7_for_each_symbol >in C. I can send you the output of > > (format #f "~W" (symbol-table)) > >It's too long to include here (4266 names, 57k bytes). > >I guess you already know this, but snd-completion.c >and snd-help.c have the code that traverses the >symbol-table to get completions and help. > >(I'm a bit annoyed at that conjure/neovim guy -- >I've been writing code since 1969 -- probably >before he was born, and in languages he's never >heard of). > From bil at ccrma.Stanford.EDU Thu Jul 13 10:21:06 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Thu, 13 Jul 2023 10:21:06 -0700 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <25go6v64cuz6ejq3537ujktwhli25lqfvtszq5qtreaeq2xbvh@urzycbvkl65r> <0fb56bc11754709af5e0f9616065c5d7@ccrma.stanford.edu> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> Message-ID: <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Dave Phillips wrote a tutorial for Snd a long time ago -- for Snd 6.0 (2003), I think. It eventually got out of sync with the program, but I still have a copy -- I can send it to you if you like. From kennethflak at protonmail.com Thu Jul 13 22:02:31 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 14 Jul 2023 05:02:31 +0000 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Message-ID: That would be great! Updating the tutorial should teach me a great deal about the program... From kennethflak at protonmail.com Fri Jul 14 03:57:32 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 14 Jul 2023 10:57:32 +0000 Subject: [CM] new-effects.scm crashes snd Message-ID: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> Hi, Getting a crash of snd when trying to load new-effects.scm. It happens both in wayland and x, also when running snd --noinit. I get this error: X Error of failed request: BadFont (invalid Font parameter) Major opcode of failed request: 55 (X_CreateGC) Resource id in failed request: 0x0 Serial number of failed request: 4155 Current serial number in output stream: 4164 ; process exited with code 1 My snd info: ? snd --help Snd is a sound editor; see http://ccrma.stanford.edu/software/snd/. This is Snd version 23.5 of 3-July-23: s7: 10.6 (3-July-2023), Xen: 4.3 Jack Sndlib 24.8 (5-Oct-21) CLM 6.19 (17-Nov-18) GSL 2.7.1 fftw-3.3.10-sse2-avx Motif 2.3.8 X11R6 OpenGL (snd gl: 13-Sep-22) Xpm 3.4.11 Ladspa: 1.1 gmp: 6.2.1, mpfr: 4.2.0-p9, mpc: 1.3.1 Compiled Jul 3 2023 07:23:28 C: gcc 13.1 Linux 6.4.2-arch1-1 x86_64 Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From kennethflak at protonmail.com Fri Jul 14 04:05:52 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 14 Jul 2023 11:05:52 +0000 Subject: [CM] new-effects.scm crashes snd In-Reply-To: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> References: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> Message-ID: OK, snd crashes when trying to load snd-motif.scm as well, this time with the error ; eval (current-form): (load "snd-motif.scm") X Error of failed request: BadFont (invalid Font parameter) Major opcode of failed request: 55 (X_CreateGC) Resource id in failed request: 0x0 Serial number of failed request: 4144 Current serial number in output stream: 4144 K_KP_7)(XmNsnapBackMultiple spring-colormap GLU_TESS_NEED_COMBINE_CALLBACK XK_KP_7)(spring-colormap GLU_TESS_NEED_COMBINE_CALLBACK XK_KP_7)(GLU_TESS_NEED_COMBINE_CALLBACK XK_KP_7)(XK_KP_7)()# equalize-panes ; process exited with code 1 ; -------------------------------------------------------------------------------- ; snd (stopped) From kennethflak at protonmail.com Fri Jul 14 04:29:20 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 14 Jul 2023 11:29:20 +0000 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Message-ID: Hi list, One more step in the journey towards getting conjure/nvim to work satisfyingly with snd, completion! I managed now to get it to work by running: (let ((p (open-output-file "/home/kf/snd-keywords.txt"))) (let f ((ls (vector->list (symbol-table)))) (display ls) (if (not (null? ls)) (begin (write (car ls) p) (newline p) (f (cdr ls))))) (close-output-port p)) to get a list of the current keywords. Next, I use nvim-cmp plugin with the cmp-dictionary source to get this to work: require'cmp'.setup{ sources = { { name = 'dict' } } } local dict = require("cmp_dictionary") dict.switcher({ filetype = { scheme = "/home/kf/snd-keywords.txt", } }) And that's it! Now the keywords should pop up as suggestions while typing. Nowhere near as clever as how it's handled in the listener, but vastly better than nothing. Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club On 13 Jul 2023 10:21, bil at ccrma.Stanford.EDU wrote: >Dave Phillips wrote a tutorial for Snd a long time >ago -- for Snd 6.0 (2003), I think. It eventually got >out of sync with the program, but I still have >a copy -- I can send it to you if you like. > From juanig at ccrma.Stanford.EDU Mon Jul 17 14:46:33 2023 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Mon, 17 Jul 2023 14:46:33 -0700 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <25go6v64cuz6ejq3537ujktwhli25lqfvtszq5qtreaeq2xbvh@urzycbvkl65r> <0fb56bc11754709af5e0f9616065c5d7@ccrma.stanford.edu> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Message-ID: There is also a sort "hello-world" hands on tutorial of Snd here: [1]. [1] https://ccrma.stanford.edu/guides/planetccrma/SND.html You can cut-and-paste commands to Snd's listener. -- Juan Reyes > Dave Phillips wrote a tutorial for Snd a long time > ago -- for Snd 6.0 (2003), I think.? It eventually got > out of sync with the program, but I still have > a copy -- I can send it to you if you like. > > _______________________________________________ From kennethflak at protonmail.com Mon Jul 17 22:22:15 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 18 Jul 2023 05:22:15 +0000 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Message-ID: Thanks! -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club On 17 Jul 2023 14:46, Juan Reyes wrote: > >There is also a sort "hello-world" hands on tutorial of Snd here: [1]. > > >[1] https://ccrma.stanford.edu/guides/planetccrma/SND.html > > >You can cut-and-paste commands to Snd's listener. > > > -- Juan Reyes > > > >> Dave Phillips wrote a tutorial for Snd a long time >> ago -- for Snd 6.0 (2003), I think.? It eventually got >> out of sync with the program, but I still have >> a copy -- I can send it to you if you like. >> >> _______________________________________________ > >_______________________________________________ >Cmdist mailing list >Cmdist at ccrma.stanford.edu >https://cm-mail.stanford.edu/mailman/listinfo/cmdist From kennethflak at protonmail.com Sat Jul 22 11:12:42 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Sat, 22 Jul 2023 18:12:42 +0000 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Message-ID: Hi all, I have written a blog post on my current snd/neovim setup: https://roosnaflak.com/tech-and-research/setting-up-snd-with-neovim/ Enjoy :-) Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club On 17 Jul 2023 14:46, Juan Reyes wrote: > >There is also a sort "hello-world" hands on tutorial of Snd here: [1]. > > >[1] https://ccrma.stanford.edu/guides/planetccrma/SND.html > > >You can cut-and-paste commands to Snd's listener. > > > -- Juan Reyes > > > >> Dave Phillips wrote a tutorial for Snd a long time >> ago -- for Snd 6.0 (2003), I think.? It eventually got >> out of sync with the program, but I still have >> a copy -- I can send it to you if you like. >> >> _______________________________________________ > >_______________________________________________ >Cmdist mailing list >Cmdist at ccrma.stanford.edu >https://cm-mail.stanford.edu/mailman/listinfo/cmdist From iainduncanlists at gmail.com Sat Jul 22 18:38:40 2023 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sat, 22 Jul 2023 18:38:40 -0700 Subject: [CM] Getting snd to work with conjure/neovim In-Reply-To: References: <6x5mkkvtzksjg7hziwtwonjbshrb3yyenvswuimjepzgvgmpgk@oabmm5q6kqgs> <32dd82eccd56d8262d32179468044f59@ccrma.stanford.edu> <3jqu52hn2mitrtcio7bbiy4uoeiwpdaero424evjegbhhx4vpp@z5nde5c45foh> <8a30b908b7735332717c4fa87f5322f5@ccrma.stanford.edu> <5c763e47c0f4181663b2c2712873afaf@ccrma.stanford.edu> Message-ID: Nice! thanks for doing this. I will definitely be trying it out. On Sat, Jul 22, 2023 at 11:13?AM Kenneth Flak wrote: > Hi all, > > I have written a blog post on my current snd/neovim setup: > https://roosnaflak.com/tech-and-research/setting-up-snd-with-neovim/ > Enjoy :-) > > Kenneth > > -- > Roosna & Flak - Contemporary Dance & Music > Web: roosnaflak.com > Code: {github,gitlab}.com/kflak > Mastodon: @kf at sonomu.club > On 17 Jul 2023 14:46, Juan Reyes wrote: > > > >There is also a sort "hello-world" hands on tutorial of Snd here: [1]. > > > > > >[1] https://ccrma.stanford.edu/guides/planetccrma/SND.html > > > > > >You can cut-and-paste commands to Snd's listener. > > > > > > -- Juan Reyes > > > > > > > >> Dave Phillips wrote a tutorial for Snd a long time > >> ago -- for Snd 6.0 (2003), I think. It eventually got > >> out of sync with the program, but I still have > >> a copy -- I can send it to you if you like. > >> > >> _______________________________________________ > > > >_______________________________________________ > >Cmdist mailing list > >Cmdist at ccrma.stanford.edu > >https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > > _______________________________________________ > 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 kennethflak at protonmail.com Sun Jul 23 22:29:09 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 24 Jul 2023 05:29:09 +0000 Subject: [CM] Retrieving FFT info at cursor programmatically? Message-ID: Hi list, Is there a way to get the magnitudes of all the FFT bins at sample N (or cursor position) programmatically in snd? Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From bil at ccrma.Stanford.EDU Mon Jul 24 06:55:01 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 24 Jul 2023 06:55:01 -0700 Subject: [CM] =?utf-8?q?Retrieving_FFT_info_at_cursor_programmatically=3F?= In-Reply-To: References: Message-ID: <32f0f8027f7948b305a7f1960b13118d@ccrma.stanford.edu> One way is to call snd-spectrum using channel->float-vector to get the data. If you already have the fft data in snd, you can use the peaks function to write it either to the listener or a text file. From kennethflak at protonmail.com Mon Jul 24 11:38:39 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 24 Jul 2023 18:38:39 +0000 Subject: [CM] Retrieving FFT info at cursor programmatically? In-Reply-To: <32f0f8027f7948b305a7f1960b13118d@ccrma.stanford.edu> References: <32f0f8027f7948b305a7f1960b13118d@ccrma.stanford.edu> Message-ID: <7oorlfwsltwew2lg6wy744nfcenzrt7wkgjkmawpcgaefoykbb@z5j6dwvzxjaj> Thanks, Bill! Will give it a try tomorrow with a clear head :-) From kennethflak at protonmail.com Tue Jul 25 02:16:43 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 25 Jul 2023 09:16:43 +0000 Subject: [CM] new-effects.scm crashes snd In-Reply-To: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> References: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> Message-ID: Trying again, because this is driving me nuts, this time running the program through gdb. Output is pretty much the same as the previous errors: (gdb) start Temporary breakpoint 1 at 0xbbf10: file /usr/src/debug/snd/snd-23.5/snd.c, line 533. Starting program: /usr/bin/snd [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe0f8) at /usr/src/debug/snd/snd-23.5/snd.c:533 533 { (gdb) c Continuing. [New Thread 0x7ffff5b396c0 (LWP 13035)] [Thread 0x7ffff5b396c0 (LWP 13035) exited] [New Thread 0x7ffff5b396c0 (LWP 13036)] [New Thread 0x7ffff4efb6c0 (LWP 13037)] [New Thread 0x7fffecfff6c0 (LWP 13038)] [New Thread 0x7fffde5ff6c0 (LWP 13039)] [New Thread 0x7fffdddfe6c0 (LWP 13040)] [New Thread 0x7fffdd5fd6c0 (LWP 13041)] [New Thread 0x7fffdcdfc6c0 (LWP 13042)] [New Thread 0x7fffcffff6c0 (LWP 13043)] [New Thread 0x7fffcf7fe6c0 (LWP 13044)] [New Thread 0x7fffceffd6c0 (LWP 13045)] [New Thread 0x7fffce7fc6c0 (LWP 13046)] X Error of failed request: BadFont (invalid Font parameter) Major opcode of failed request: 55 (X_CreateGC) Resource id in failed request: 0x0 Serial number of failed request: 3723 Current serial number in output stream: 3724 [Thread 0x7fffce7fc6c0 (LWP 13046) exited] [Thread 0x7fffceffd6c0 (LWP 13045) exited] [Thread 0x7fffcf7fe6c0 (LWP 13044) exited] [Thread 0x7fffdcdfc6c0 (LWP 13042) exited] [Thread 0x7fffdd5fd6c0 (LWP 13041) exited] [Thread 0x7fffdddfe6c0 (LWP 13040) exited] [Thread 0x7fffcffff6c0 (LWP 13043) exited] [Thread 0x7fffde5ff6c0 (LWP 13039) exited] [Thread 0x7fffecfff6c0 (LWP 13038) exited] [Thread 0x7ffff4efb6c0 (LWP 13037) exited] [Thread 0x7ffff5b396c0 (LWP 13036) exited] [Inferior 1 (process 13028) exited with code 01] I am suspecting it is something really simple, like a missing font in my system or so that is messing up, but I can't for the life of me figure out what it could be. I am also puzzled by the fact that snd works out of the box for me, whereas only some extensions are causing a crash. For what it's worth I asked Niklas (oddodd.org) to test this on his system, which is reasonably similar to mine (arch linux, sway), but he experiences no crashes. Could someone that has this working please share their .xinitrc, or in some other way shed some light on this? From bil at ccrma.Stanford.EDU Tue Jul 25 06:38:14 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 25 Jul 2023 06:38:14 -0700 Subject: [CM] new-effects.scm crashes snd In-Reply-To: References: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> Message-ID: <99d7ceb7bb66ee0039eaec231db76551@ccrma.stanford.edu> In new-effects.scm the only font mentioned that might be a problem is the "built-in" X font (for stuff like XC_crosshair). In snd-motif.scm, there are two uses of the font "9x15" -- this is a very old (but very good) fixed width font that may now be relegated to the X miscellaneous fonts package. You may have to install it by hand, xorg-x11-fonts-misc in Fedora. I need to add some other choice there -- everywhere else, the code uses various user-chosen fonts, I think. From kennethflak at protonmail.com Tue Jul 25 06:57:13 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 25 Jul 2023 13:57:13 +0000 Subject: [CM] new-effects.scm crashes snd In-Reply-To: <99d7ceb7bb66ee0039eaec231db76551@ccrma.stanford.edu> References: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> <99d7ceb7bb66ee0039eaec231db76551@ccrma.stanford.edu> Message-ID: Will try to track the font down in the Arch repos. Vaguely optimistic about that. So far I have identified the same issues in these files: (load "special-menu.scm") (load "new-effects.scm") (load "marks-menu.scm") There might be more floating around, but haven't gotten around to testing them all. From kennethflak at protonmail.com Tue Jul 25 07:27:18 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 25 Jul 2023 14:27:18 +0000 Subject: [CM] new-effects.scm crashes snd In-Reply-To: <99d7ceb7bb66ee0039eaec231db76551@ccrma.stanford.edu> References: <7n6t5t6ci65gaoc5mqyvo5sb5z3d7bgpw72lqecoys2xpf5auv@2qrrft2jcp7h> <99d7ceb7bb66ee0039eaec231db76551@ccrma.stanford.edu> Message-ID: Aha, found it! https://archlinux.org/packages/extra/any/xorg-fonts-misc/ is the Arch linux package containing the correct font. From kennethflak at protonmail.com Fri Jul 28 07:57:27 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 28 Jul 2023 14:57:27 +0000 Subject: [CM] [SND] Files from (save-region) can't be read by other applications Message-ID: Hi, I'm testing this little piece of code to save all regions: (let ( (iterator 0) (filename "test")) (map (lambda (r) (save-region r (format #f "test~A.wav" iterator)) (set! iterator (+ iterator 1))) (regions)) ) It works fine, but leads to the following when trying to play them back from mpv: ? mpv test*.wav Playing: test0.wav [ffmpeg/demuxer] au: unknown or unsupported codec tag: 34 is not implemen ted. Update your FFmpeg version to the newest one from Git. If the proble m still occurs, it means that your file has a feature which has not been implemented. [ffmpeg/demuxer] au: If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailin g list. (ffmpeg-devel at ffmpeg.org) [lavf] avformat_open_input() failed [ffmpeg/demuxer] au: unknown or unsupported codec tag: 34 is not implemen ted. Update your FFmpeg version to the newest one from Git. If the proble m still occurs, it means that your file has a feature which has not been implemented. [ffmpeg/demuxer] au: If you want to help, upload a sample of this file to https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailin g list. (ffmpeg-devel at ffmpeg.org) [lavf] avformat_open_input() failed Failed to recognize file format. Similarly, when importing into Reaper I get blank items. I can, however, open them in snd with no problem I suppose I need to set the correct output format in the export sections, but I have zero idea which one I should pick for maximum compatibility... Any help is most welcome! Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From kennethflak at protonmail.com Fri Jul 28 09:41:08 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 28 Jul 2023 16:41:08 +0000 Subject: [CM] [SND] Files from (save-region) can't be read by other applications In-Reply-To: References: Message-ID: Aha, seems I found it. Setting the header-type to mus-riff seems to solve it: (let ( (iterator 0) (filename "test")) (map (lambda (r) (save-region r (format #f "test~A.wav" iterator) :header-type mus-riff) (set! iterator (+ iterator 1))) (regions)) ) However, I am curious if there's a way to set this as the default behavior for all file export operations? My ~/.snd_prefs_s7 says I already have this: (set! (default-output-header-type) mus-riff) It seems that the default header type is mus-next, which neither reaper nor mpv/ffmpeg seem to be very happy about. Best, Kenneth From bil at ccrma.Stanford.EDU Fri Jul 28 12:59:54 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 28 Jul 2023 12:59:54 -0700 Subject: [CM] [SND] Files from (save-region) can't be read by other applications In-Reply-To: References: Message-ID: <3a6937c2320683d31127b2a8cf585d78@ccrma.stanford.edu> I changed this to use default-output-header-type. Snd used mus-next because it stores data as doubles, and it's simpler to write/read double samples, but mus-riff does not support that sample type (or didn't the last time I looked). So you'll need to use: (save-region r (format #f "test~A.wav" iterator) :header-type mus-riff :sample-type mus-lfloat) I should also check that default choices are compatible... From kennethflak at protonmail.com Fri Jul 28 23:37:09 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Sat, 29 Jul 2023 06:37:09 +0000 Subject: [CM] [SND] Files from (save-region) can't be read by other applications In-Reply-To: <3a6937c2320683d31127b2a8cf585d78@ccrma.stanford.edu> References: <3a6937c2320683d31127b2a8cf585d78@ccrma.stanford.edu> Message-ID: Thanks! From kennethflak at protonmail.com Sun Jul 30 21:44:59 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 31 Jul 2023 04:44:59 +0000 Subject: [CM] [SND] How to split multichannel files into mono files? Message-ID: <4meegmnnutsjv4i6a4jxkcl7v3rguh4goemra5f77gzhiaso2w@jez23txjks5a> Hi list, Is there a simple way to split all channels in a file containing 2 or more channels into new mono sounds? I can't seem to find any reference to this operation in the docs. Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From kennethflak at protonmail.com Mon Jul 31 00:11:06 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 31 Jul 2023 07:11:06 +0000 Subject: [CM] [SND] how to record when using jack? Message-ID: In an old tutorial there is mention of how to record directly into snd. However, in my snd setup I am not seeing any File/Record item in my menu. Is it possible to enable this when using --with-jack, or is this something that is only active when using snd directly with alsa? -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From bil at ccrma.Stanford.EDU Mon Jul 31 05:36:19 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 31 Jul 2023 05:36:19 -0700 Subject: [CM] =?utf-8?q?=5BSND=5D_how_to_record_when_using_jack=3F?= In-Reply-To: References: Message-ID: <99fdda94cdfd1fe95663aaf597f85156@ccrma.stanford.edu> Snd no longer has any recording ability. Originally there was a simple recorder (although it had great VU meters), and I could maintain it. But at that time audio hardware was changing rapidly, especially adding many more channels. I got many requests for support for new devices which I did not have. Some people very generously sent me code, but did not have time to offer maintenance. The code eventually became such a mess that I decided it was the programming equivalent of an "attractive nuisance". I had no personal use for it, and other programs existed that were dedicated to that function (Ardour for example), so I finally threw the whole thing away. From bil at ccrma.Stanford.EDU Mon Jul 31 05:44:08 2023 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 31 Jul 2023 05:44:08 -0700 Subject: [CM] =?utf-8?q?=5BSND=5D_How_to_split_multichannel_files_into_mon?= =?utf-8?q?o_files=3F?= In-Reply-To: <4meegmnnutsjv4i6a4jxkcl7v3rguh4goemra5f77gzhiaso2w@jez23txjks5a> References: <4meegmnnutsjv4i6a4jxkcl7v3rguh4goemra5f77gzhiaso2w@jez23txjks5a> Message-ID: <849de4df548b6e97b074302b13e7d9f5@ccrma.stanford.edu> One way is to loop through the channels calling save-sound-as on each, something like: (do ((i 0 (+ i 1))) ((= i (channels snd))) (save-sound-as filename snd :channel i)) where filename needs to be different for each channel. From kennethflak at protonmail.com Mon Jul 31 07:16:20 2023 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 31 Jul 2023 14:16:20 +0000 Subject: [CM] [SND] how to record when using jack? In-Reply-To: <99fdda94cdfd1fe95663aaf597f85156@ccrma.stanford.edu> References: <99fdda94cdfd1fe95663aaf597f85156@ccrma.stanford.edu> Message-ID: Makes a lot of sense. A good example of the Unix philosophy, as far as I can tell... There are still some references to capture devices floating around in the code base that confused me for a while, and snd creates 3 inlets for incoming sound, but I suppose these are inevitable consequences of the libs being used?