From andersvi at notam02.no Wed Jun 1 01:27:01 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Wed, 01 Jun 2016 10:27:01 +0200 Subject: [CM] snd-nogui - graph->ps in batch file? Message-ID: <87shwxjove.fsf@bek.no> Hi. Sparked by a question on linux-audio-users just now, i wanted to check if i could create sonograms and similar by scripting Snd (which could be very useful), but the .eps-file Snd leaves is empty. Evaluating the same list of calls step by step works fine. Putting in some (sleep 3) calls along the route didn't help either. Is this achievable? Here's what i'm trying: (open-sound "mono-10s.wav") (set! (transform-graph?) #t) (set! (time-graph?) #f) (set! (transform-graph-type) graph-as-sonogram) (set! (fft-log-frequency) #t) (graph->ps "mono-10s-sonogram.eps") (exit) -anders From tito.01beta at gmail.com Wed Jun 1 05:21:17 2016 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 1 Jun 2016 14:21:17 +0200 Subject: [CM] snd-nogui - graph->ps in batch file? In-Reply-To: <87shwxjove.fsf@bek.no> References: <87shwxjove.fsf@bek.no> Message-ID: <20160601122117.GA1749@rhk.homenet.telecomitalia.it> On Wed, Jun 01, 2016 at 10:27:01AM +0200, andersvi at notam02.no wrote: > Hi. > > Sparked by a question on linux-audio-users just now, i wanted to check > if i could create sonograms and similar by scripting Snd (which could be > very useful), but the .eps-file Snd leaves is empty. > > Evaluating the same list of calls step by step works fine. > > Putting in some (sleep 3) calls along the route didn't help either. > > Is this achievable? > > Here's what i'm trying: > > (open-sound "mono-10s.wav") > (set! (transform-graph?) #t) > (set! (time-graph?) #f) > (set! (transform-graph-type) graph-as-sonogram) > (set! (fft-log-frequency) #t) > (graph->ps "mono-10s-sonogram.eps") > (exit) you have success with update-transform-graph before graph->ps (open-sound "mono-10s.wav") (set! (transform-graph?) #t) (set! (time-graph?) #f) (set! (transform-graph-type) graph-as-sonogram) (set! (fft-log-frequency) #t) (update-transform-graph) (graph->ps "mono-10s-sonogram.eps") (exit) From tito.01beta at gmail.com Wed Jun 1 05:44:53 2016 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 1 Jun 2016 14:44:53 +0200 Subject: [CM] snd-nogui - graph->ps in batch file? In-Reply-To: <87shwxjove.fsf@bek.no> References: <87shwxjove.fsf@bek.no> Message-ID: <20160601124453.GA1655@rhk.homenet.telecomitalia.it> me: > bla bla bla update-transform-graph before graph->ps bla bla [...] show-full-duration #t is also useful From tito.01beta at gmail.com Wed Jun 1 07:39:12 2016 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 1 Jun 2016 16:39:12 +0200 Subject: [CM] snd-nogui - graph->ps in batch file? In-Reply-To: <87shwxjove.fsf@bek.no> References: <87shwxjove.fsf@bek.no> Message-ID: <20160601143912.GA1652@rhk.homenet.telecomitalia.it> I forgot to say that I'm using snd compiled with motif. snd_motif -b prior_script.scm ; OK snd_gtk -b prior_script.scm ; FAIL snd_nogui prior_script.scm ; FAIL From andersvi at notam02.no Wed Jun 1 05:42:41 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Wed, 01 Jun 2016 14:42:41 +0200 Subject: [CM] snd-nogui - graph->ps in batch file? References: <87shwxjove.fsf@bek.no> <20160601122117.GA1749@rhk.homenet.telecomitalia.it> Message-ID: <87bn3lf5by.fsf@bek.no> Hi Tito. T> you have success with update-transform-graph before graph->ps Right, this works in a '--with-gui' Snd. Thanks. But it seems not to help a '--without-gui' Snd much. -anders From bil at ccrma.Stanford.EDU Wed Jun 1 08:15:11 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 01 Jun 2016 08:15:11 -0700 Subject: [CM] =?utf-8?q?snd-nogui_-_graph-=3Eps_in_batch_file=3F?= In-Reply-To: <20160601143912.GA1652@rhk.homenet.telecomitalia.it> References: <87shwxjove.fsf@bek.no> <20160601143912.GA1652@rhk.homenet.telecomitalia.it> Message-ID: <1534671b881c32f7d6fbe7e7c5f539b3@ccrma.stanford.edu> Odd that it fails if the gtk version is running from a script -- I'll try to track this down. In the no-gui case, there's no graph, so (currently) there's nothing to write to the eps file. It never occurred to me to create a graph anyway! I'll look into that also. (The original Snd used ascii graphics -- "*" for data points and dashes for axes -- it got a lot of laughs... This was on the early NeXTs. Snd's predecessor Dpsysnd could show line graphs but it needed a PDP-10 and a Grinnell Vector Graphics Processor). From bil at ccrma.Stanford.EDU Wed Jun 1 10:45:35 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 01 Jun 2016 10:45:35 -0700 Subject: [CM] =?utf-8?q?snd-nogui_-_graph-=3Eps_in_batch_file=3F?= In-Reply-To: <87bn3lf5by.fsf@bek.no> References: <87shwxjove.fsf@bek.no> <20160601122117.GA1749@rhk.homenet.telecomitalia.it> <87bn3lf5by.fsf@bek.no> Message-ID: <414da399852df5e62ea626366c710256@ccrma.stanford.edu> I think in the gtk script case, the gtk event queue is not being completely drained, so this code at least gets a squished graph: (open-sound "oboe.snd") (set! (show-full-duration) #t) (set! (transform-graph?) #t) (set! (time-graph?) #f) (do ((i 0 (+ i 1))) ((or (= i 10000) (= (gtk_events_pending) 0))) (gtk_main_iteration)) (set! (transform-graph-type) graph-as-sonogram) (set! (fft-log-frequency) #t) (update-transform-graph) (graph->ps "hi.eps") (exit) This seems like several different bugs -- hooboy. From tito.01beta at gmail.com Wed Jun 1 11:00:15 2016 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 1 Jun 2016 20:00:15 +0200 Subject: [CM] snd-nogui - graph->ps in batch file? In-Reply-To: <414da399852df5e62ea626366c710256@ccrma.stanford.edu> References: <87shwxjove.fsf@bek.no> <20160601122117.GA1749@rhk.homenet.telecomitalia.it> <87bn3lf5by.fsf@bek.no> <414da399852df5e62ea626366c710256@ccrma.stanford.edu> Message-ID: <20160601180015.GA1683@rhk.homenet.telecomitalia.it> On Wed, Jun 01, 2016 at 10:45:35AM -0700, bil at ccrma.Stanford.EDU wrote: > I think in the gtk script case, the gtk event > queue is not being completely drained, so > this code at least gets a squished graph: > > (open-sound "oboe.snd") > (set! (show-full-duration) #t) > (set! (transform-graph?) #t) > (set! (time-graph?) #f) > > (do ((i 0 (+ i 1))) > ((or (= i 10000) > (= (gtk_events_pending) 0))) > (gtk_main_iteration)) > > (set! (transform-graph-type) graph-as-sonogram) > (set! (fft-log-frequency) #t) > (update-transform-graph) > (graph->ps "hi.eps") > > (exit) > > > This seems like several different bugs -- hooboy. Hey Bill, gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height() return 1 in batch mode and display_channel_data_with_size() is bypassed. The follow minimal patch is a possible fix. The values for width and height are copied from a printf in `snd_motif -b ...'. Largest values, slowest processing. diff -ur snd-16~/snd-chn.c snd-16/snd-chn.c --- snd-16~/snd-chn.c 2016-06-01 19:37:39.322878464 +0200 +++ snd-16/snd-chn.c 2016-06-01 19:37:45.044806529 +0200 @@ -4378,6 +4378,15 @@ { width = widget_width(channel_graph(cp)); height = widget_height(channel_graph(cp)); + +#if USE_GTK + if (ss->batch_mode) + { + width = 583; + height = 374; + } +#endif if ((height > 5) && (width > 5)) display_channel_data_with_size(cp, width, height, 0, just_fft, just_lisp, just_time, use_incoming_cr); } From bil at ccrma.Stanford.EDU Wed Jun 1 11:47:09 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 01 Jun 2016 11:47:09 -0700 Subject: [CM] =?utf-8?q?snd-nogui_-_graph-=3Eps_in_batch_file=3F?= In-Reply-To: <20160601180015.GA1683@rhk.homenet.telecomitalia.it> References: <87shwxjove.fsf@bek.no> <20160601122117.GA1749@rhk.homenet.telecomitalia.it> <87bn3lf5by.fsf@bek.no> <414da399852df5e62ea626366c710256@ccrma.stanford.edu> <20160601180015.GA1683@rhk.homenet.telecomitalia.it> Message-ID: Ah -- much nicer! Thanks! From bil at ccrma.Stanford.EDU Tue Jun 14 08:10:56 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 14 Jun 2016 08:10:56 -0700 Subject: [CM] Snd 16.6 Message-ID: <1ddc60f9ca898d6805b2014377b92d3a@ccrma.stanford.edu> Snd 16.6. added snd-lint.scm (Snd extensions for lint) s7's symbol function now takes any number of string args these are all concatenated to form the new symbol name s7's make-vector no longer takes an optional fourth argument. checked: gtk 3.21.2, sbcl 1.3.6, Fedora 24 Thanks!: Joe Python, Tito Latini. From j_hearon at hotmail.com Mon Jun 20 10:38:16 2016 From: j_hearon at hotmail.com (James Hearon) Date: Mon, 20 Jun 2016 17:38:16 +0000 Subject: [CM] Snd Scheme note lists In-Reply-To: References: Message-ID: Hi, For Snd using Scheme what would be best workflow or best practices for stitching together several with-sound calls or note lists? Ex. I have my insts loading from a separate .scm file using the "load" command and ten or so with-sound calls in a separate .scm file. I was doing that in lisp and CLM using "with-mix" but don't seem to see that thru scheme. I found the ":continue-old-file #t" with-sound flag and also the Notehook feature in the Snd Scheme manual but not sure this is best way to add those in sequence, programmatically. (with-sound ( :continue-old-file #t :reverb nrev :output "/home/MyTest.wav" :srate 48000 :channels 2 :header-type mus-riff :statistics #t :play #t) (nssb_sub 4.25 2 1440 .5 0.01 1.0 0 0.1 1 ) ) Regards, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From andersvi at notam02.no Mon Jun 20 11:19:43 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Mon, 20 Jun 2016 20:19:43 +0200 Subject: [CM] Snd Scheme note lists References: Message-ID: <87twgnpvsw.fsf@bek.no> Hi James. J> I was doing that in lisp and CLM using "with-mix" but don't seem J> to see that thru scheme. Seems like sound-let might be close: https://ccrma.stanford.edu/software/snd/snd/sndscm.html#sound-let -anders From bil at ccrma.Stanford.EDU Mon Jun 20 12:06:12 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 20 Jun 2016 12:06:12 -0700 Subject: [CM] Snd Scheme note lists In-Reply-To: References: Message-ID: If you want to concatenate several with-sounds into one, just concatenate the instrument calls, with some variable holding the section's start time.