[CM] Re: Re: Play Head (SND-8.3)
Kjetil Svalastog Matheussen
k.s.matheussen@notam02.no
Sat, 12 Aug 2006 13:32:55 +0200 (CEST)
Olivier =?iso-8859-1?b?RG9hcuk=?=:
>
> Selon Bill Schottstaedt <bil@ccrma.Stanford.EDU>:
>
> > > I was trying to obtain something that closely looks like Sound Forge
> >
> > I'd like to include this in the Snd tarball, if possible -- others have
> > asked for such a package. I haven't done much of the Ruby work,
> > since Mike is so good at it, and I am a beginner, but I could probably
> > handle ladspa.rb -- I'll look at it tomorrow.
>
> I would be so glad to see my conf file in the snd tarball! But note that since
> it is a fork of Kjetil S. Matheussen's work and i am not fluent in scheme,
> there are some portions of code i do not understand. Moreover, i noticed that
> sometimes it gets broken when upgrading snd. This prevented me to share my code
> with others, but i understand it could be very useful for many of us. So i'll
> make an effort... maybe at the end of august you'll get a not too dirty scheme
> file.
>
> This is the right time to expose some problems i have to improve my code, if
> something can be done from your side:
> * Ctrl + mouse click works with buttons 1, 2, 3 but not with 4 and 5 (wheel). In
> SoundForge the wheel zooms horizontally, and ctrl+wheel zooms vertically. Is it
> a X, gtk, gtk-guile or a snd bug?
Yes, I see that too. It seems like (.state (GDK_EVENT_BUTTON e)) doesn't
work with the scroll_event signal:
(g_signal_connect w "scroll_event"
(lambda (w e i)
(c-display "scrolleventstate" (.state (GDK_EVENT_BUTTON e)))
Anyone knows how to do this with gtk, if possible?
> * I don't know how to handle double-click... is it possible?
Should be, but I can't get it to work. I guess it will work without
gui.scm loaded. There seems to be some problems.
The following code should work, but doesn't.
(let ((start (cons 0 0)))
(define (mouse-press-callback snd pix-x pix-y button stat);;snd ch x y button state)
(c-display "press")
(set! start (gettimeofday)))
(define (mouse-motion-callback snd ch x y button state)
#t)
(define (mouse-release-callback snd pix-x pix-y button stat)
(c-display "release")
(if (< (+ (* (- (car (gettimeofday)) (car start)) 1000000)
(- (cdr (gettimeofday)) (cdr start)))
100000)
(c-display "fast click")))
(-> mouse-button-press-hook add! mouse-press-callback)
(-> mouse-button-release-hook add! mouse-release-callback))