[CM] remainder function?

Randolph Latimer rdlatimer at tjhsst.edu
Tue May 12 12:15:16 PDT 2009


I think I've got a basic start now with cm3 on Windows, thanks for your
help.
I'm using Grace and SAL for now, though I'd like to do these in scheme too.

Here's a simple first question...I want to do the high note sequence
followed by the low note sequence.

The way I've got this, it plays the two sequences simultaneously
How would I do simple() followed by simplelow()?  thanks

define process simple()
  run repeat 40
    send "mp:midi", key: between(60, 96)
    wait .1
  end

define process simplelow()
  run repeat 20
    send "mp:midi", key: between(20, 56)
    wait .1
  end

sprout list(simple(),simplelow()),
"C:\\Program Files\\CLMWindows\\cm-3.2.4-win32\\cm\\MyProgs\\test.mid"



On Mon, 11 May 2009 16:45:59 -0500, Heinrich Taube <taube at uiuc.edu> wrote:
> cm3 (scheme):     modulo
> 
> cm2 (common lisp):  mod
> 
> 
> if you are using Grace (cm3) you can use the  
> Help>Documentation>Scheme  menu item to read the scheme manual
> also in the Grace's editor use  Command-D  to lookup documentation on  
> the symbol under the cursor
> 
> 
> otherwise the scheme manual is here:
> http://schemers.org/Documents/Standards/R5RS/HTML/
> 
> 
> 
> 
> 
> On May 11, 2009, at 2:26 PM, Randolph Latimer wrote:
> 
>> What's the new version for remainder (mod)?
>>
>> For example, (from "Notes" text)
>> (loop for k from 0 downto -12 collect (mod k 12))
>>
>> mod doesn't work
>> I tried rem
>>
>> (/ 11 12) returns the fraction
>>
>>
>> On Mon, 11 May 2009 13:10:55 -0500, Heinrich Taube <taube at uiuc.edu>  
>> wrote:
>>> this is terrific news, and just in time for summer music making... i
>>> cant wait to do a piece with this stuff!
>>>
>>> On May 11, 2009, at 1:05 PM, Bill Schottstaedt wrote:
>>>
>>>> also in that regard, I've made some progress in speeding up the run
>>>> macro:
>>>>
>>>> fm-violin:  1071   694
>>>> expandn:    1198   770
>>>> fullmix:     257   225
>>>> piano:      6964  3126
>>>> animals:   15034 11129
>>>>
>>>> These are callgrind numbers (divided by a million, or maybe a
>>>> billion).
>>>> Still many things to optimize...
>>>>
>>>>
>>>> _______________________________________________
>>>> Cmdist mailing list
>>>> Cmdist at ccrma.stanford.edu
>>>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>>>
>>> _______________________________________________
>>> Cmdist mailing list
>>> Cmdist at ccrma.stanford.edu
>>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list