From: Kenny Tilton
Subject: Cello Screen Shots
Date: 
Message-ID: <BNXWb.200626$4F2.26276463@twister.nyc.rr.com>
http://www.tilton-technology.com/cellophane.html


-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application

From: Bulent Murtezaoglu
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <87ad3n4m6r.fsf@cubx.internal>
Looks lovely!  Are the slider widgets constructed from lisp?  Did you
do the lights by the monkey method are you no longer afraid of the OpenGL
book?

cheers,

BM
 
From: Kenny Tilton
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <JP5Xb.202013$4F2.26454901@twister.nyc.rr.com>
Bulent Murtezaoglu wrote:

> Looks lovely!

Thx. Mind you, those lovely backdrops combined with a couple of lights 
knocks my 3ghz laptop to its knees when the window first opens or a 
lighting param changes. But as Stefan guessed, i was just having fun. 
Mind you, for all I know I am just guilty of something moronic 
OpenGL-wise that would make it faster.

   Are the slider widgets constructed from lisp?

GTK? We don't need no stinkin GTK!:


(in-package :cello)

(defun make-slider (md-name &key (md-value-fn 'identity) (width (uin 1)) 
(height (u8ths 1))
                      (bar-color +lt-gray+)
                      (drag-dir :hz) (dragger-size (u8ths 1)) 
(dragger-color +gray+))
   (make-part md-name 'IXFamily
     :lL 0 :lT 0 :lR width :lB (downs height)
     :lighting :on
     :md-value (c? (funcall md-value-fn (^dragPct (second (^kids)))))
     :kids (c? (theKids
                (mkPart :bar (ct-jumper)
                  :px 0 :py 0
                  :lL 0 :lR width
                  :lT 0 :lB (downs height)
                  :layers (list bar-color :on (frame-sunken (u96ths 4)))
                  :controlaction (lambda (self e)
                                   (setf (dragPct (nsib))
                                     (v2-in-rect-ratio
                                      (v2-in-rect (v2-subtract
                                                   (v2-xlate .w. self 
(evtwhere e))
                                                   (mkv2 (round (lwidth 
(nsib)) 2)
                                                     (downs (round 
(lheight (nsib)) 2)))
                                                   )
                                        (^dragRange (nsib)))
                                      (^dragRange (nsib))))))

                (mkPart :dragger (CTDrag)
                  :dragPct (cv8 (mkv2 .50 .50))
                  :lighting :on
                  :lL 0 :lr dragger-size
                  :lT 0 :lB (downs dragger-size)
                  :layers (list (outs 24) dragger-color :on
                            (make-instance 'Frame3D
                              :3dStyle :EDGE-RAISED
                              :thickness (u96ths 4))))))))

(defmodel CTDrag (Control Image)
   ((dragPct :initarg :dragPct :accessor dragPct :initform (cv (mkv2 0 0)))
    (dragRange :initarg :dragRange :reader dragRange
      :initform (c? (let ((dl (- (lL .parent) (^ll)))
                          (dt (- (lT .parent) (^lt)))
                          (dr (- (lR .parent) (^lr)))
                          (db (- (lB .parent) (^lb))))
                      (mkr dl dt dr db)))))
    (dragPos :initarg :dragPos :accessor dragPos :initform (mkv2 0 0)))
   (:default-initargs
       :click-tolerance (mkv2 (u8ths 4)(u8ths 4))
     :px (c? (v2-h (^dragPos)))
     :pY (c? (v2-v (^dragPos)))
     :dragPos (c? (bIf (e (^clickEvt))
                    (v2-in-rect
                     (v2-add (v2-subtract (^mousePos .w.)
                               (evtWhere (osEvent e)))
                       (clickeePXY e))
                     (^dragRange))
                    (mkv2 (+ (r-left (^dragRange))
                            (* (v2-h (dragPct self)) (r-width 
(^dragRange))))
                      (+ (r-bottom (^dragRange))
                        (* (v2-v (dragPct self)) (r-height 
(^dragRange)))))))
     ))

(def-c-echo dragpos ((self CTDrag))
   (setf (dragPct self)
     (mkv2 (div-safe (- (v2-h new-value) (r-left (^dragRange)))
             (r-width (^dragRange)))
       (div-safe (- (v2-v new-value) (r-bottom (^dragRange)))
         (r-height (^dragRange))))))

   Did you
> do the lights by the monkey method ...


Eeeeep! Monkey no read book. Monkey just exposed every frickin light 
parameter and created those control panels so I could figger out what 
they did via <scratch-scratch-spit> the monkey method. No luck: I did 
not actually work out what alpha does or the difference between ambience 
and diffusion or get any effect from specular, but:

      Monkey see, monkey screen capture.

I was surprised to learn that I got the best results by making the 
widgets' native color simply shades of gray and letting the coloration 
come from the lights. Not sure what the performance considerations are. 
What Cello needs most once it is ported to the land of X is an OpenGL 
whiz. Maybe the combo of Lisp+OpenGL+portability will suck in some 
hardcore gamer for the project and bless us with their expertise.

One thing I want to do is add a master slider which tracks the max of R, 
G, and B, with the master increasing the intensity of all those 
proportionately so I can increase the brightness without changing the hue.

But the lighting panel was just a project for the flight back from 
Boulder, so now I've lost interest. But it occurs to me this is a nice 
way of letting the user play with the appearance. I could even write the 
results out to a user prefs directory somewhere so all Cello apps would 
pick up the same scheme.

(defparameter *Bright* (make-ff-array :float 1 1 1 1))
(defparameter *BRed* (make-ff-array :float 1 0 0 1))

(defparameter *Average* (make-ff-array :float 0.5f0 0.5f0 0.5f0 1.0f0))
(defparameter *Dim* (make-ff-array :float 0.25f0 0.25f0 0.25f0 1.0f0))
(defparameter *Dusk* (make-ff-array :float 0.10f0 0.10f0 0.10f0 1.0f0))
(defparameter *blackout* (make-ff-array :float 0f0 0f0 0f0 1.0f0))
(defparameter *LightPosTR* (make-ff-array :float 640 0 (outs 100) 1))
(defparameter *LightPosTL* (make-ff-array :float 0 0 (outs 100) 1))

(defmodel ix-light (ixstack)
   ()
   )

(defmodel light ()
   ((id :cell nil :initarg :id :initform nil :accessor id)
    (enabled :initarg :enabled :initform nil :accessor enabled)
    (pos :initarg :pos :initform nil :accessor pos)
    (ambient :initarg :ambient :initform nil :accessor ambient)
    (diffuse :initarg :diffuse :initform nil :accessor diffuse)
    (specular :initarg :specular :initform nil :accessor specular)))


(defun light-install (self)
   (trc nil "lightinst" (id self) (^enabled) 
(^pos)(^ambient)(^diffuse)(^specular))
   (funcall (if (^enabled) 'gl-Enable 'gl-Disable) (id self))
   (gl-Lightfv (id self) GL_POSITION (^pos))
   (gl-Lightfv (id self) GL_AMBIENT (^ambient))
   (gl-Lightfv (id self) GL_DIFFUSE (^diffuse))
   (gl-Lightfv (id self) GL_SPECULAR (^specular)))

(defun fm-kid-named (self name)
   (find name (^kids) :key 'md-name))

(defun pct-xlate (pct v1 v2 expansion)
   (let* ((dv (round (- v2 v1) 2))
          (xv1 (- v1 (* expansion dv)))
          (xv2 (+ v2 (* expansion dv))))
     (+ xv1 (* pct (- xv2 xv1)))))

(defun make-lighting (md-name id pos)
   (declare (ignorable id pos))
   (make-part md-name 'ix-light
     :md-value (c? (make-instance 'light
                     :id id
                     :enabled (md-value (fm-other :enabled))
                     :pos (md-value (fm-other :xyz-pos))
                     :ambient (rgba-fo (md-value (fm-other :ambient)))
                     :diffuse (rgba-fo (md-value (fm-other :diffuse)))
                     :specular (rgba-fo (md-value (fm-other :specular)))))
     :justify :right
     :spacing (u16ths 1)
     :kids (c? (thekids
                (mkPart :enabled (CTCheckText)
                  :md-value (cv t)
                  :title$ (string-capitalize (string md-name))
                  :layers +white+
                  :clipped nil
                  :enabled t)
                (aRow (:md-name :xyz-pos
                        :md-value (c? (eko ("xyz c?")
                                        (let* ((ks (^kids))
                                               (xy (^md-value (car ks))))
                                          (make-ff-array :float
                                            (pct-xlate (v2-h xy) (ll 
.w.) (lr .w.) .50)
                                            (pct-xlate (v2-v xy) (lb 
.w.) (lt .w.) .50)
                                            (pct-xlate (v2-v (^md-value 
(second ks)))
                                              *mgw-znear* *mgw-zfar* .50)
                                            1)))))
                  (make-slider :xy-pos
                    :width (uin 1)
                    :height (uin 1))
                  (make-slider :z-pos
                    :width (u8ths 1)
                    :height (uin 1)))
                (astack (:justify :right)
                  (alabel "ambience" :layers +white+)
                  (make-rgba-mixer :ambient))
                (astack (:justify :right)
                  (alabel "diffusion" :layers +white+)
                  (make-rgba-mixer :diffuse))
                (astack (:justify :right)
                  (alabel "specular" :layers +white+)
                  (make-rgba-mixer :specular))))))

(defun make-rgba-mixer (md-name)
   (make-part md-name 'IXStack
     :justify :right
     :md-value (c? (eko (nil "rgba mixer color" md-name)
                     (make-opengl-rgba (v2-h (^md-value (fm-other :red)))
                       (v2-h (^md-value (fm-other :green)))
                       (v2-h (^md-value (fm-other :blue)))
                       (v2-h (^md-value (fm-other :alpha))))))
     :kids (c? (thekids
                (arow (:spacing (u16ths 1) :justify :center)
                  (alabel "r:" :layers +white+) (make-slider :red))
                (arow (:spacing (u16ths 1) :justify :center)
                  (alabel "g:" :layers +white+) (make-slider :green))
                (arow (:spacing (u16ths 1) :justify :center)
                  (alabel "b:" :layers +white+) (make-slider :blue))
                (arow (:spacing (u16ths 1) :justify :center)
                  (alabel "a:" :layers +white+) (make-slider :alpha))))))


are you no longer afraid of the OpenGL
> book?
> 
> cheers,
> 
> BM
>  

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Stefan Scholl
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <19qbdcus2wu6j.dlg@parsec.no-spoon.de>
On 2004-02-13 04:47:45, Kenny Tilton wrote:

> http://www.tilton-technology.com/cellophane.html

http://www.hackles.org/cgi-bin/archives.pl?request=10
http://www.hackles.org/cgi-bin/archives.pl?request=11
From: Kenny Tilton
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <x95Xb.201673$4F2.26437763@twister.nyc.rr.com>
Stefan Scholl wrote:
> On 2004-02-13 04:47:45, Kenny Tilton wrote:
> 
> 
>>http://www.tilton-technology.com/cellophane.html
> 
> 
> http://www.hackles.org/cgi-bin/archives.pl?request=10
> http://www.hackles.org/cgi-bin/archives.pl?request=11

You did not like the last skin? :)

Looks like I infringed the hackles IP.

kt

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Rainer Joswig
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <joswig-E54F56.11122815022004@news-50.sjc.giganews.com>
In article <·················@parsec.no-spoon.de>,
 Stefan Scholl <······@no-spoon.de> wrote:

> On 2004-02-13 04:47:45, Kenny Tilton wrote:
> 
> > http://www.tilton-technology.com/cellophane.html
> 
> http://www.hackles.org/cgi-bin/archives.pl?request=10
> http://www.hackles.org/cgi-bin/archives.pl?request=11

Hmm, looking at the screenshots I decided to take
my medicaments and felt the need of hacking
with plain old CLIM.
From: Kenny Tilton
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <wHLXb.205478$4F2.27250086@twister.nyc.rr.com>
Rainer Joswig wrote:
> In article <·················@parsec.no-spoon.de>,
>  Stefan Scholl <······@no-spoon.de> wrote:
> 
> 
>>On 2004-02-13 04:47:45, Kenny Tilton wrote:
>>
>>
>>>http://www.tilton-technology.com/cellophane.html
>>
>>http://www.hackles.org/cgi-bin/archives.pl?request=10
>>http://www.hackles.org/cgi-bin/archives.pl?request=11
> 
> 
> Hmm, looking at the screenshots I decided to take
> my medicaments ....

How dare you judge a GUI by its cover!?

Today I commence a serious effort to add another groovy library (don't 
ya just love libraries?) to Cello so interfaces can include real-time 
synthesized sound, via the Supercollider server: http://www.audiosynth.com/

If you think my graphic design sucks, wait till you hear the noise I 
will make with Lisp + real-time audio synth. Woo-hoo! But this came 
about thru the lisp-nyc music sig activities:

   http://www.lispnyc.org/

...(then look for the music sig link) which includes Actual Composers, 
so I might be able to get professional help with the sounds.

Lord knows I need professional help.


kenny

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Tayssir John Gabbour
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <866764be.0402151356.178d5cc4@posting.google.com>
Kenny Tilton <·······@nyc.rr.com> wrote in message news:<·························@twister.nyc.rr.com>...
> How dare you judge a GUI by its cover!?

Actually I found it quite beautiful, especially the one with the hand
used as background.  A friend who just passed by thought so too. 
Can't something good also be pretty?  When I browsed over to the
screenshots, I thought it would be some tacky-looking thing which
proved again that programmers should not try their hand at graphic
design.  (The old screenshots you had were pretty depressing.)  But it
turned out to be good eyecandy.

As a gui it's obviously rough, not something you'd want to use
everyday, but you were obviously showing a technical proof of concept.
From: Kenny Tilton
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <RHSXb.205522$4F2.27425609@twister.nyc.rr.com>
Tayssir John Gabbour wrote:
> Kenny Tilton <·······@nyc.rr.com> wrote in message news:<·························@twister.nyc.rr.com>...
> 
>>How dare you judge a GUI by its cover!?
> 
> 
> Actually I found it quite beautiful, especially the one with the hand
> used as background.  A friend who just passed by thought so too. 
> Can't something good also be pretty?

I'm just getting my just deserts for ragging on CLIM. :)

   When I browsed over to the
> screenshots, I thought it would be some tacky-looking thing which
> proved again that programmers should not try their hand at graphic
> design.  (The old screenshots you had were pretty depressing.)  But it
> turned out to be good eyecandy.
> 
> As a gui it's obviously rough, not something you'd want to use
> everyday, but you were obviously showing a technical proof of concept.

Right, and I think I am done with functional* "proof of concept" now 
that nested windows (with their own OpenGL context for efficiency) are 
back in hand. Adding real-time algorithmically-generated sound is just a 
frill (but I think it could become an interesting one). The next task is 
to round out the widget set any newbie would expect: scroll bars, menus, 
pop-up menus, list boxes, tree views, tab controls, text entry, and 
multi-line text display and entry.

kenny

* Porting to other Lisps and OSes remains to be proved out, tho the 
LW/win32 port gives me some confidence Cello is 
Lisp-implementation-agnostic.

kt

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Rainer Joswig
Subject: Re: Cello Screen Shots
Date: 
Message-ID: <joswig-53F7AB.18364115022004@news.cis.dfn.de>
In article <·························@twister.nyc.rr.com>,
 Kenny Tilton <·······@nyc.rr.com> wrote:

> Rainer Joswig wrote:
> > In article <·················@parsec.no-spoon.de>,
> >  Stefan Scholl <······@no-spoon.de> wrote:
> > 
> > 
> >>On 2004-02-13 04:47:45, Kenny Tilton wrote:
> >>
> >>
> >>>http://www.tilton-technology.com/cellophane.html
> >>
> >>http://www.hackles.org/cgi-bin/archives.pl?request=10
> >>http://www.hackles.org/cgi-bin/archives.pl?request=11
> > 
> > 
> > Hmm, looking at the screenshots I decided to take
> > my medicaments ....
> 
> How dare you judge a GUI by its cover!?
> 
> Today I commence a serious effort to add another groovy library (don't 
> ya just love libraries?) to Cello so interfaces can include real-time 
> synthesized sound, via the Supercollider server: http://www.audiosynth.com/
> 
> If you think my graphic design sucks, wait till you hear the noise I 
> will make with Lisp + real-time audio synth. Woo-hoo! But this came 
> about thru the lisp-nyc music sig activities:
> 
>    http://www.lispnyc.org/
> 
> ...(then look for the music sig link) which includes Actual Composers, 
> so I might be able to get professional help with the sounds.
> 
> Lord knows I need professional help.

Haha. Sure. A crazy Lisp lunatic. Haha.

This commercial may help: ;-)

http://www.cupertino.de/pages/filme/mov_18/td.html