Re: [CM] snd-nogui - graph->ps in batch file?
Ah -- much nicer! Thanks! ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] snd-nogui - graph->ps in batch file?
On Wed, Jun 01, 2016 at 10:45:35AM -0700, b...@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 1) >(= (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.c2016-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); } ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] snd-nogui - graph->ps in batch file?
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 ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] snd-nogui - graph->ps in batch file?
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 ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] snd-nogui - graph->ps in batch file?
me: > bla bla bla update-transform-graph before graph->ps bla bla [...] show-full-duration #t is also useful ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Re: [CM] snd-nogui - graph->ps in batch file?
On Wed, Jun 01, 2016 at 10:27:01AM +0200, ander...@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) ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist
[CM] snd-nogui - graph->ps in batch file?
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 ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist