[CM] Making changes to snd's gui

Kjetil Svalastog Matheussen k.s.matheussen@notam02.no
Sun, 11 Jul 2004 21:12:44 +0200 (CEST)

Guillaume Germain:
> Hi all,
> I'm currently working on developing a voice synthesis extension for snd.
> I would like to be able to select a region in the transform graph 
> (specifically on a sonogram). In fact the best for me would be to mirror 
> marks and selection between the time domain graph and the transform 
> graph. Also another alternative could be to replace the time domain 
> graph by a sonogram with the same selection / marking capabilities as 
> the time domain graph.
> I'd be grateful if someone could point me at the places in the sources 
> where I could make modifications and/or give me hints on how I can 
> accomplish what I want to do.

It should be quite easy to do this in scheme. Take a look at the
mark and selection handling code I have made in gui.scm and 

Something like this could be a start:

(add-hook! after-graph-hook
	     (lambda (snd ch)
                 (let ((das-marks (get-selection-data snd ch))
                       (das-selection (get-selection-data snd ch))
                       (das-sonogram (get-sonogram-position snd ch)))
                    (for-each (lambda (mark-info)
                                 (put-mark-in-sonogram das-sonogram mark-info))
                    (put-selection-in-sonogram das-sonogram das-selection))))