From kennethflak at protonmail.com Sat Aug 3 05:47:04 2019 From: kennethflak at protonmail.com (Kenneth Flak) Date: Sat, 03 Aug 2019 12:47:04 +0000 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux Message-ID: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Hi list, First time poster here! I am trying to get started with snd, but I'm encountering a bug that renders the software nearly unworkable for me: Any movement or selection action in the graph window is only updated after I move the focus away from snd and back again. This applies both for selecting a range with the mouse, ctrl-b and friends to move around, as well as setting marks. My system is Arch Linux, with Swaywm/wlroots window manager. When I open snd from the terminal I get the errors: Gdk-Message: 15:38:05.368: Unable to load sb_h_double_arrow from the cursor theme Gdk-Message: 15:38:05.368: Unable to load sb_v_double_arrow from the cursor theme Gdk-Message: 15:38:05.368: Unable to load sb_right_arrow from the cursor theme Gdk-Message: 15:38:05.368: Unable to load sb_left_arrow from the cursor theme I installed snd from the Arch community repo with the default build flags: ./configure --prefix=/usr \ --with-alsa \ --with-gmp \ --with-gtk \ --with-jack \ --with-ladspa \ --with-pulseaudio \ --with-ruby Maybe I'm just missing some dependency? I haven't yet gone through the trouble of building from source. Also let me know if this is not the place to report bugs, I couldn't find any issue trackers... Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: github.com/kflak Mastodon: @kf at vis.social From bil at ccrma.Stanford.EDU Sat Aug 3 06:51:24 2019 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sat, 03 Aug 2019 06:51:24 -0700 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux In-Reply-To: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> References: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Message-ID: I haven't tried to use wayland, but I think sb_h_double_arrow is in xcursor-themes in Arch? Seems odd that gtk would use these in wayland (I think they come originally from XC_SB_H* in some X library, and the names now refer (in gtk 3.94) to string constants like "col-resize", whatever that means). I haven't put any real effort into Snd with the latest gtk's -- gtk is changing radically all the time, and I can't keep up. I'll see if I can fire up wayland and poke at it. Thanks for the bug report. From kennethflak at protonmail.com Sun Aug 4 05:49:48 2019 From: kennethflak at protonmail.com (Kenneth Flak) Date: Sun, 04 Aug 2019 12:49:48 +0000 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux In-Reply-To: References: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Message-ID: Hi again, Tried fiddling around a bit with different cursor themes in lxappearance, but it doesn't seem to have much effect. I also tried to set the cursor to auto-follow on play, but this didn't do much either. Interestingly enough: to get the waveform window to update I only need to move the cursor away from that window, for example it updates whenever I go from waveform to listener and back again. It is not, therefore, necessary to completely shift the focus away from the snd application to update the graphics. Best, K -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: github.com/kflak Mastodon: @kf at vis.social On 3 Aug 2019 06:51, bil at ccrma.Stanford.EDU wrote: > >I haven't tried to use wayland, but I think sb_h_double_arrow >is in xcursor-themes in Arch? Seems odd that gtk would use >these in wayland (I think they come originally from XC_SB_H* >in some X library, and the names now refer (in gtk 3.94) to >string constants like "col-resize", whatever that means). >I haven't put any real effort into Snd with the latest gtk's -- >gtk is changing radically all the time, and I can't keep up. >I'll see if I can fire up wayland and poke at it. Thanks >for the bug report. > > From kennethflak at protonmail.com Sun Aug 4 22:22:52 2019 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 05 Aug 2019 05:22:52 +0000 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux In-Reply-To: References: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Message-ID: I tried installing i3wm and running snd within the safe confines of xorg. This produced no errors and the behavior seems generally bug-free, so I believe it is safe to say it's a wayland issue. -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: github.com/kflak Mastodon: @kf at vis.social On 3 Aug 2019 06:51, bil at ccrma.Stanford.EDU wrote: > >I haven't tried to use wayland, but I think sb_h_double_arrow >is in xcursor-themes in Arch? Seems odd that gtk would use >these in wayland (I think they come originally from XC_SB_H* >in some X library, and the names now refer (in gtk 3.94) to >string constants like "col-resize", whatever that means). >I haven't put any real effort into Snd with the latest gtk's -- >gtk is changing radically all the time, and I can't keep up. >I'll see if I can fire up wayland and poke at it. Thanks >for the bug report. > > From kennethflak at protonmail.com Mon Aug 5 02:09:46 2019 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 05 Aug 2019 09:09:46 +0000 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux In-Reply-To: References: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Message-ID: Ok, so I think I found a workaround by setting the GDK backend to x11 like so: GDK_BACKEND=x11 snd This makes the display issue and warnings go away. I haven?t had time to do any extensive testing yet, so please consume with pinch of salt as of yet... Roosna & Flak - Contemporary Dance & Music http://roosnaflak.com On Sat, Aug 3, 2019 at 16:51, wrote: > I haven't tried to use wayland, but I think sb_h_double_arrow > is in xcursor-themes in Arch? Seems odd that gtk would use > these in wayland (I think they come originally from XC_SB_H* > in some X library, and the names now refer (in gtk 3.94) to > string constants like "col-resize", whatever that means). > I haven't put any real effort into Snd with the latest gtk's -- > gtk is changing radically all the time, and I can't keep up. > I'll see if I can fire up wayland and poke at it. Thanks > for the bug report. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Aug 5 04:40:26 2019 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 05 Aug 2019 04:40:26 -0700 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux In-Reply-To: References: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Message-ID: Thanks very much! I'll add that to the README instructions. From kennethflak at protonmail.com Mon Aug 5 05:11:06 2019 From: kennethflak at protonmail.com (Kenneth Flak) Date: Mon, 05 Aug 2019 12:11:06 +0000 Subject: [CM] Display issuse with snd on swaywm/wayland/arch linux In-Reply-To: References: <9Q-CtBu03RE3qlAPAy33LIIdzC6XIpRndY5fQZyYbgkATQclIVL6GwP_ra-9RJliKI86GzeuACauH_JqTE1fayT8eAysdQehhFa38mB_Kc4=@protonmail.com> Message-ID: <8kmvwDcC0GyxYy95BXp3tv0hbFz8V_wlUlC09SBfkEFG_K4rgkkum9GfOhNlVyOsybOYahHfVYz3mXLK4b-Q72qe-bTyNrFSWUqDgVAS1Kw=@protonmail.com> Great! Obviously, native wayland support would be awesome at some stage, but I can imagine this is not quite trivial... I suspect the transition from xorg to wayland will still take years, and lack of backwards compatibility would cause a great deal of screaming, so changing the GDK_BACKEND will probably work for a long time still. K -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: github.com/kflak Mastodon: @kf at vis.social On 5 Aug 2019 04:40, bil at ccrma.Stanford.EDU wrote: > >Thanks very much! I'll add that to the README instructions. > > From deeteeoh1138 at gmail.com Sun Aug 25 15:03:17 2019 From: deeteeoh1138 at gmail.com (David O'Toole) Date: Sun, 25 Aug 2019 18:03:17 -0400 Subject: [CM] duplicating each N samples of an audio file Message-ID: Hello there! I'm trying to duplicate each N samples of an audio file so that ABCD becomes AABBCCDD and so on. I have modified one of the examples to produce the following code below, but it doesn't work. It makes a properly-sized blank audio file, but only the first block is written. Indeed, putting in a print statement shows that the loop is only run once. But NUM-BLOCKS turns out to be 51 which is what I expected. Forgive me if this is a simple Scheme error, as I am more familiar with Common Lisp and Elisp than I am with Scheme. Or I may be misunderstanding something about Snd itself. I would greatly appreciate any help you can offer. Thank you. ---_David (when (= 0 (length (sounds))) (open-sound "/home/dto/Desktop/beatloop.wav")) (define echo-mosaic (lambda* (block-len snd chn) (let* ((len (framples snd chn)) (num-blocks (floor (/ len (srate snd) block-len))) (new (new-sound #f :size (* 2 len)))) (if (> num-blocks 1) (let ((actual-block-len (ceiling (/ len num-blocks)))) (do ((n 0 (+ n 1))) ((= n num-blocks)) (let ((beg (* n actual-block-len))) (let ((reg (make-region beg (+ beg actual-block-len) chn))) (mix-region reg (* 2 beg) new chn) (mix-region reg (+ (* 2 beg) actual-block-len) new chn) (forget-region reg)))) new))))) (echo-mosaic 0.25 0 0) -------------- next part -------------- An HTML attachment was scrubbed... URL: From tito.01beta at gmail.com Mon Aug 26 02:30:06 2019 From: tito.01beta at gmail.com (Tito Latini) Date: Mon, 26 Aug 2019 11:30:06 +0200 Subject: [CM] duplicating each N samples of an audio file In-Reply-To: References: Message-ID: <20190826093006.GA2945@vis.roboris> On Sun, Aug 25, 2019 at 06:03:17PM -0400, David O'Toole wrote: > Hello there! I'm trying to duplicate each N samples of an audio file so > that ABCD becomes AABBCCDD and so on. I have modified one of the examples > to produce the following code below, but it doesn't work. It makes a > properly-sized blank audio file, but only the first block is written. > Indeed, putting in a print statement shows that the loop is only run once. > But NUM-BLOCKS turns out to be 51 which is what I expected. Forgive me if > this is a simple Scheme error, as I am more familiar with Common Lisp and > Elisp than I am with Scheme. Or I may be misunderstanding something about > Snd itself. I would greatly appreciate any help you can offer. Thank you. > ---_David > > (when (= 0 (length (sounds))) > (open-sound "/home/dto/Desktop/beatloop.wav")) > > (define echo-mosaic > (lambda* (block-len snd chn) > (let* ((len (framples snd chn)) > (num-blocks (floor (/ len (srate snd) block-len))) > (new (new-sound #f :size (* 2 len)))) > (if (> num-blocks 1) > (let ((actual-block-len (ceiling (/ len num-blocks)))) > (do ((n 0 (+ n 1))) > ((= n num-blocks)) > (let ((beg (* n actual-block-len))) > (let ((reg (make-region beg (+ beg actual-block-len) chn))) > (mix-region reg (* 2 beg) new chn) > (mix-region reg (+ (* 2 beg) actual-block-len) new chn) > (forget-region reg)))) > new))))) > > (echo-mosaic 0.25 0 0) There is a trivial error; it is correct: (let ((reg (make-region beg (+ beg actual-block-len -1) snd chn))) ...) The result of your echo-mosaic is a new empty sound file with pending mixes. Perhaps you want save-sound after loop: (do ((n 0 (+ n 1))) - ((= n num-blocks)) + ((= n num-blocks) (save-sound new)) possibly with a filename for new-sound. From deeteeoh1138 at gmail.com Wed Aug 28 08:39:57 2019 From: deeteeoh1138 at gmail.com (David O'Toole) Date: Wed, 28 Aug 2019 11:39:57 -0400 Subject: [CM] misbehavior in functions to shift and stretch regions Message-ID: I have these functions which work fine in snd 18.1 but produce errors in snd 19.6 ... SHIFT-REGION uses EXPSRC to return a pitch-shifted version of the region you give it. STRETCH-REGION uses EXPANDN to return a time-stretched version of the region it gets. Both functions below (and their corresponding error messages in snd 19.6) are below. The whole batch file is at https://gitlab.com/dto/mosaic-el/blob/master/mosaic.scm and this just needs a suitable input filename toward the bottom of the file if you want to try debugging it. (Give it a minute or two of music.) I would greatly appreciate any insight or suggestions you might be able to provide, as I would like to continue developing this code in the latest Snd and get more involved. This "mosaic.scm" is part of a library of functions to specify rearrangements of beats and melodies in ways inspired by vaporwave and/or "chopped and screwed" music. The basic operating procedure of mosaic.scm is inspired by "soundmosaic" although I haven't implemented the analysis/matching portion yet. But in the meantime I'm getting some interesting rhythms :) Here is SHIFT-REGION: (define* (shift-region region factor) (let ((new-region '()) (new-sound (new-sound :channels 2 :srate 44100 :file (snd-tempnam)))) (insert-region region 0 new-sound #f) (map-channel (expsrc factor) 0 (framples region) new-sound 0) (map-channel (expsrc factor) 0 (framples region) new-sound 1) (set! new-region (make-region 0 (framples region) new-sound #t)) (close-sound new-sound) new-region)) ---------------OUTPUT FROM SHIFT-REGION in snd 19.6-------- ----snippets removed--- (shift-region # 0.66) -> # (shift-region # 0.66) -> # (shift-region # 0.66) -> attempt to apply a free cell to (# 0.66) in ? ----------------------------------------------------------- Now here is STRETCH-REGION. (define* (stretch-region region factor) (let* ((new-region '()) (temp-1 (snd-tempnam)) (temp-2 (snd-tempnam)) (new-sound (new-sound :channels 2 :srate 44100 :file temp-2)) (len (floor (* factor (framples region))))) (save-region region temp-1) (with-sound (:output temp-2) (expandn 0 (* factor (samples->seconds (framples region))) temp-1 0.6 :expand factor :ramp 0.2 :seglen (* 0.7 *mosaic-slice-size*) :hop (* 0.1 *mosaic-slice-size*) :amp-env '(0 1 100 1))) (save-sound new-sound) (select-sound new-sound) (set! new-region (make-region 0 (- len 1) new-sound #t)) (close-sound new-sound) new-region)) ------OUTPUT FROM STRETCH-REGION in snd 19.6 ----snippets removed---- >(stretch-region # 2) -> # >(stretch-region # 2) -> attempt to apply a real 0.0 to (# 2) in 0.0? ---------------------------------- On another occasion (different ordering of events), it produced this: ---------------------------------------------------- (stretch-region # 2) -> attempt to apply a slot (variable binding) 'vol 0.6000000000000001 to (# 2) in 'vol 0.6000000000000001? Also even in snd 18.1 there are problems. Apparently if you shift and then stretch the same region, it segfaults. How can I get a proper backtrace? Thank you. From bil at ccrma.Stanford.EDU Wed Aug 28 10:05:37 2019 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 28 Aug 2019 10:05:37 -0700 Subject: [CM] misbehavior in functions to shift and stretch regions In-Reply-To: References: Message-ID: <094d9b0e0f5342dc9f400a47ac36bcb6@ccrma.stanford.edu> The free cell problem probably means some s7 object is not GC protected when it should be. I haven't managed to hit the bug with your code yet (GC bugs depend on just about everything), but if you'd like to poke at it, first build s7 with S7_DEBUGGING=1 (either through CFLAGS in a makefile, or define it in s7.c), remake snd, run snd under gdb, hit the bug, and the stacktrace should tell you which pointer is unhappy; look at it via p ptr[0] in gdb, and at the bottom of the copious output you'll find where that cell was last allocated, and where the gc call happened that freed it. Sometimes that is enough to fix the bug. I haven't looked at the second bug yet, but at first glance it looks like an optimizer problem. From bil at ccrma.Stanford.EDU Wed Aug 28 11:54:25 2019 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 28 Aug 2019 11:54:25 -0700 Subject: [CM] misbehavior in functions to shift and stretch regions In-Reply-To: References: Message-ID: Just to follow-up here in cmdist, it appears both problems were caused by a bug in the s7.html trace macro. I'll update ccrma's s7.html tomorrow morning. From deeteeoh1138 at gmail.com Thu Aug 29 16:25:26 2019 From: deeteeoh1138 at gmail.com (David O'Toole) Date: Thu, 29 Aug 2019 19:25:26 -0400 Subject: [CM] how to detect beats Message-ID: I'd like to write a function that places a mark (and or trims etc) at the position of the first beat in a song, i.e. the first kick drum most likely. What is the best way to detect (for example) the first "boom" in a typical 4/4 dance rhythm? Are more sophisticated beat sensing operations possible in snd, such as being able to locate a snare? From deeteeoh1138 at gmail.com Fri Aug 30 04:00:54 2019 From: deeteeoh1138 at gmail.com (David O'Toole) Date: Fri, 30 Aug 2019 07:00:54 -0400 Subject: [CM] SchemeMosaic Message-ID: I'm working on some new Scheme code for Snd. It's called SchemeMosaic, it's intended as a chopping-and-screwing tool for Vaporwave and other forms of electronic music. It is inspired by Soundmosaic and will eventually be a complete reimplementation in Snd Scheme, plus new features. A project page with some audio and code samples is here: https://gitlab.com/dto/mosaic-el Hope you enjoy !