[CM] Scheme S7 convert float to string

2014-01-02 Thread James Hearon
Hi,
I'm a bit stuck on finding info for scheme s7 format conversion from float to 
string for output to file.  I've tried several things, mostly looking at lisp 
code, but cannot seem to come up with what it wants.  Any help or hints would 
be appreciated.

Thank you.

 
(define ouf1 (open-output-file myfloats.txt))
(define outstring init)
 
(define (myfloats total)
(let ((test 0))
 (process  with mytable = (make-heap '(.5 1 2.5 3))
  until (= test total)
  do
(set! outstring (next mytable))   ;***stuck here with format conversion ***
(set! outstring (string-append outstring (string #\newline)))
(display outstring ouf1)
(print (next mytable))
(set! test (+ test 1))  
)))
 
(sprout (myfloats 10) )
 
(close-output-port ouf1)
  ___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


[CM] cm beta5

2014-01-02 Thread Heinrich Taube
Ive completed a beta5 of the cm 3.9.0 that i almost finished last fall. Im 
going to start teaching with this in the next few weeks so Ill only be adding 
bug fixes at this point.  new things in this update:

1. builds in the latest s7 (3.3) and juce (3.0.0)
2. both scheme and sal versions of all examples and tutorials are available for 
the first time.
3. examples and tutorials checked to make sure they work
4. new app icon working on mac and window.  I've left an 256x256 icon for linux 
in res/etc/cm.png but i have no idea how to get icons associated with apps on 
linux.

prebuilt mac (include oscpack):
http://camil.music.illinois.edu/software/grace/Grace-3.9.0-beta5-osx.zip

prebuilt win (includes oscpack):

http://camil.music.illinois.edu/software/grace/Grace-3.9.0-beta5-win32.zip

sources (equivalent to svn revision 2111):
http://camil.music.illinois.edu/software/grace/cm-3.9.0-beta5.zip



___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


Re: [CM] Scheme S7 convert float to string

2014-01-02 Thread Halim Beere
I think you need to use (number-string . . . ) to make this work.


On Thu, Jan 2, 2014 at 12:46 PM, James Hearon j_hea...@hotmail.com wrote:

 Hi,
 I'm a bit stuck on finding info for scheme s7 format conversion from float
 to string for output to file.  I've tried several things, mostly looking at
 lisp code, but cannot seem to come up with what it wants.  Any help or
 hints would be appreciated.

 Thank you.


 (define ouf1 (open-output-file myfloats.txt))
 (define outstring init)

 (define (myfloats total)
 (let ((test 0))
  (process  with mytable = (make-heap '(.5 1 2.5 3))
   until (= test total)
   do
 (set! outstring (next mytable))   ;***stuck here with format conversion ***
 (set! outstring (string-append outstring (string #\newline)))
 (display outstring ouf1)
 (print (next mytable))
 (set! test (+ test 1))   )))

 (sprout (myfloats 10) )

 (close-output-port ouf1)

 ___
 Cmdist mailing list
 Cmdist@ccrma.stanford.edu
 http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


Re: [CM] Scheme S7 convert float to string

2014-01-02 Thread Bill Schottstaedt
are you looking for (number-string val) or (format #f ~G val)?

___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


Re: [CM] Scheme S7 convert float to string

2014-01-02 Thread Heinrich Taube
James, Im not exactly sure what you are trying to do, but you can use S7's 
object-string

 (object-string 123.45)

123.45

S7 also has a version of common lisp's format() :

 (format #f ~f 123.456)

123.456000




On Jan 2, 2014, at 12:46 PM, James Hearon j_hea...@hotmail.com wrote:

 Hi,
 I'm a bit stuck on finding info for scheme s7 format conversion from float to 
 string for output to file.  I've tried several things, mostly looking at lisp 
 code, but cannot seem to come up with what it wants.  Any help or hints would 
 be appreciated.
 
 Thank you.
 
  
 (define ouf1 (open-output-file myfloats.txt)) 
 (define outstring init) 
  
 (define (myfloats total) 
 (let ((test 0)) 
  (process  with mytable = (make-heap '(.5 1 2.5 3))
   until (= test total) 
   do 
 (set! outstring (next mytable))   ;***stuck here with format conversion ***
 (set! outstring (string-append outstring (string #\newline)))
 (display outstring ouf1)
 (print (next mytable)) 
 (set! test (+ test 1))   ))) 
  
 (sprout (myfloats 10) ) 
  
 (close-output-port ouf1)
 ___
 Cmdist mailing list
 Cmdist@ccrma.stanford.edu
 http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist