©2003 Kåre Sjölander and Jonas Beskow
Introduction Download Documentation Links Forum
WaveSurfer user forum

FAQ  FAQ
Search  Search
Memberlist  Memberlist
Register  Register
Profile  Profile
Login  Login

Pitch feature request

 
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer
View previous topic :: View next topic  
Author Message
ek



Joined: 05 Sep 2002
Posts: 30
Location: Portland OR

PostPosted: Tue Nov 18, 2003 7:02 pm    Post subject: Pitch feature request Reply with quote

I would like to be able to draw a new pitch contour (i.e. in straight line segments where <Button-1> adds a new point, and <Double-1> ends the line) in the Pitch pane without losing the display of the original pitch and then save the new pitch contour to a textfile. Is that hard to do? I'm assuming the analysis.plug file needs to be changed for that. Can you give me some hints on how I could accomplish this?
Back to top
View users profile Send private message Send email Visit posters website
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Thu Nov 27, 2003 11:15 am    Post subject: Reply with quote

This feature is very high on our wish list as well. We have in-house code that does this already, but it is not suited for distribution. Also, have code for stylization, could share that.
There is unfortunately no time to work on this currently. I'm sure we'll get around to it eventually, could be a year though..
I guess the dataplot-plugin is the place to start. Possibly it should even be a plug-in of its own.

Kåre
Back to top
View users profile Send private message Visit posters website
ek



Joined: 05 Sep 2002
Posts: 30
Location: Portland OR

PostPosted: Tue Dec 02, 2003 6:58 pm    Post subject: Reply with quote

I think many people will find this a useful function. I can understand that you don't have time to work on it right now. It is a pity that the code you have is not suited for distribution. In the meantime I have managed to include code in the dataplot.plug for drawing lines with nodes between lines, moving nodes and deleting them. But how can I make sure my drawing gets stretched when I zoom in? Below is the AddPoint procedure I wrote. I hope that you can help me.

Code:

proc dataplot::AddPoint { w pane x y } {
upvar [namespace current]::${pane}::var v

set c [$pane canvas]
set x [$c canvasx $x]
set y [$c canvasy $y]

    # if we have a line we are drawing, it has the tag "line"
    set itm [ $c find withtag line ]
    if { $itm == "" } {
        # none found - must be the first time we are clicking
        # create a line item and give it the "line" and the "drawing" tag
        $c create line $x $y $x $y -tags [list line drawing] -fill blue
   # create a rectangle to mark the new node
   $c create rect [expr $x - 5] [expr $y - 5] [expr $x + 5] [expr $y + 5] -tags node -outline blue -fill blue
    } else {
        # has an item... get its current list of points
        set points [ $c coord $itm ]
        # add this point to it
        lappend points $x $y
        # ... and set it. Note the use of the eval here, it is a useful
        # trick when you have a list of values but the command want the
        # individual values. Basically, you do substituions on it twice
        eval $c coord $itm $points
   $c create rect [expr $x - 5] [expr $y - 5] [expr $x + 5] [expr $y + 5] -tags node -fill blue -outline blue
    }
}


Thanks, Esther
Back to top
View users profile Send private message Send email Visit posters website
dzach



Joined: 03 Jul 2003
Posts: 41
Location: Athens, Greece

PostPosted: Wed Dec 03, 2003 12:06 am    Post subject: Reply with quote

Well, publish the whole thing so we too can see it!
As it is it doen't run in my tcl/tk installation.

Cheers

Dimitrios
Back to top
View users profile Send private message Send email Visit posters website
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Wed Dec 03, 2003 3:39 pm    Post subject: Reply with quote

Next release contains support for graphing data with one column specifying the time. Maybe you want a copy of this already now since it might affect your code?

Kåre
Back to top
View users profile Send private message Visit posters website
ek



Joined: 05 Sep 2002
Posts: 30
Location: Portland OR

PostPosted: Wed Dec 03, 2003 7:32 pm    Post subject: Reply with quote

yes please. All help is welcome.

I was thinking that the best approach would be to add a new column where I will insert the new coordinates. But that requires me to transform the coordinates on the canvas to match the time and y-axis. Am I right?

Esther
Back to top
View users profile Send private message Send email Visit posters website
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Fri Dec 05, 2003 3:31 pm    Post subject: Reply with quote

Check out vtcanvas.tcl for the needed coordinate transformations:
getCanvasX, getCanvasY, getCanvasTime, getCanvasValue, they are used throughout dataplot.plug.

I'm sending you the new dataplot.plug now.

Kåre
Back to top
View users profile Send private message Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.1 © 2001, 2002 phpBB Group