lilypond-user-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: couleurs rgb


From: Daniel Cartron
Subject: Re: couleurs rgb
Date: Thu, 26 Mar 2015 07:59:44 +0100
User-agent: KMail/4.13.3 (Linux/3.13.0-46-generic; KDE/4.13.3; x86_64; ; )

Le mercredi 25 mars 2015, 18:11:13 Daniel Cartron a écrit :
> Sinon je me la fait, mais ce serait idiot de réinventer 
> l'eau tiède...

Presque fini mais si toutes les commandes fonctionnent dans la sandbox guile 
une fois mis sous forme de fonction ça marche pas. C'est en général toujours 
là que je finis par coincer... :-(

Pourtant je me suis inspiré de 
http://www.lilypond.org/doc/v2.18/Documentation/extending/scheme-function-definitions

la fonction :

mkRGB = #(define-scheme-function (parser location lst) (list?)
 (define (convert-rgb n) (if (> n 0) (exact->inexact(/ (+ 1 n) 256)) 0 ))
 (map convert-rgb lst)
 (append '(rgb-color) lst)
 lst
)

#(define lst '(0 128 256))
(display (mkRGB test))

In expression (mkRGB test):
Wrong type to apply: #<Music function #<procedure #f (parser location lst)>>

Merci de me donner un ch'tit coup de main pour finir...

-- 
« Les cons gagnent toujours. Ils sont trop. »
François Cavanna - Coups de sang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]