cl:ratio_is_perfect   scheme


Defined in:  https://github.com/lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm

Implementation

;; convoluted way to check if a ratio is a perfect integer
;; (todo: improve?)
;; essenzialmente creo una stringa (from the ratio) , poi la splitto, poi controllo che la seconda parte sia uguale a 0 trasformandola in numero di nuovo
(define cl:ratio_is_perfect
   (lambda (f)
      (equal? 0 (string->number (cadr (cl:string-split (number->string (rational->real f)) "." ))))))


Back to Index

Similar Entries

  • :mklist    macro    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • cl:expand-list    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • cl:expand-list2    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • cl:list-flatten    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • cl:list-to-string    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • cl:sublis    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • cosratio    macro    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • helper:mplayp_play_list_v2    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_playp.xtm
  • helper:play-plist    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_midi.xtm
  • list-flatten    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • list-split-after    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • list-split-from    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • rectratio    macro    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • sum_list    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm
  • zblue-fil-distorsion*    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_bento.xtm
  • zblue-fil-saturation*    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_bento.xtm
  • zblue-gen-noise*    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_bento.xtm
  • zred-fil-distorsion*    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_bento.xtm
  • zred-fil-saturation*    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_bento.xtm
  • zred-gen-noise*    scheme    /lambdamusic/extempore-extensions/blob/main/init/init_bento.xtm