[Tkinter-discuss] getting started - canvas - "multislider" / function editor

Tim Mortimer timmortimer at d2.net.au
Mon Feb 4 03:49:48 CET 2008


I guess the only thing to add is that i would like to recieve out an 
[index,value] for each slider, but assumedly this simply needs to be 
updated for the slider currently being adjusted

eg

[0,1.] => first slider, all the way up
[0,0.] => first slider, all the way down

go & tweak the third slider...

[2,.5678] => etc etc....

& the value is simply written to the csound function table / "generic 
array" accordingly...

when hosting python in csound only a fairly limited number of return 
values can be passed... so linking the display "by direct association" 
to the table data is probably not possible.

& this shouldn't be a problem, as long as both the array & the display 
are initialsised to the same relative values.. (& keeping the value 
restricted to 0. <= val <= 1. should allow for a range of applications & 
rescaling of the output ...)



Tim Mortimer wrote:

>
> Hello,
>
> I'm new to GUI programming, & self taught at Python which is the only 
> "real world" programming language i know - I picked it up last year to 
> try and work with Csound to make "algorithmically assisted" 
> compositions, & now hopefully through tkinter some basic interfacing 
> options. (Csound is accesible via python through an api, &/or vice 
> versa...)
>
> What i want to do is use the Canvas object (assumedly with a series of 
> rectangles on it, let's say 64 or 128 or 256 being the likely number 
> of candidates depending on the editing task..) so that i can 
> graphically edit the contents of function tables in csound.
>
> The rectangles on the canvas will simply be lenghtened or shortened in 
> the vertical direction, & all sit one next to the other (so it looks 
> like the interface from an EQ on a stereo, or a "skyline" type 
> appearance...maybe coloured rectangles will identify every 8 or 10 or 
> 12 index values or something...
>
> But i've got no experience of this, have run some very simple examples 
> illustrating some basic tkinter behaviour ("hello world" that type of 
> thing...) - but surely there is something around showing some simple 
> canvas operations so i can start hacking it & getting this started, & 
> learning something about tkinter in the process??
>
> Does anyone know or have an implementation of this type of thing in 
> tkinter, or alternately some simple & pedagogically useful examples of 
> basic canvas & user interfacing types of operations? (resizing boxes 
> on a canvas with the mouse & reporting values being the general idea...)
>
> many thanks
>
> Tim
>


More information about the Tkinter-discuss mailing list