Csound Csound-dev Csound-tekno Search About

Re: PMAX

Date1998-08-26 09:34
FromMark Polishook
SubjectRe: PMAX
Matt,

Matt J. Ingalls wrote:
> 
> > I'm assuming that the table should look like
> >
> > f1 0 512 -1 "voss" 0 4 0
> 
>         this was an old bug i thought was fixed -- what version are you
> running?

I tried, actually, to run p7 in the snippet above with values 0 - 6, all
without success.

(1) Csound - 3.1b0 (the most recent, i think...?)
(2) perf - 3.47 - the perf that downloaded with Cecelia
> 
>         i am also curious how you are creating "voss" file..

see below - it's a translation to tcl/tk from the c++ in Dodge's book. (I
added another procedure to write the output to a file).
 
> (a workaround is use soundin for 'voss' and just output to a new file with
> a header)

Interesting...I'll give this a try.

Mark

*********************
proc Voss { npnts } {

        set nbits 1
        set np 1
        set nr $npnts
        set nr [expr $nr / 2 ]
        
        while { $nr > 1 } {
                incr nbits
                set np [expr 2 * $np]
                set nr [expr $nr / 2 ]
        }
        
        for { set i 0 } { $i < $nbits } { incr i } {
                set rg($i) [expr double(rand()*1)]
        }
        
        for { set i 0 } { $i < $npnts } { incr i } {
                set threshold $np
                set ng $nbits
                while { [expr $i % $threshold] != 0 } {
                        incr ng -1
                        set threshold [expr $threshold / 2]
                }
                set sum 0
                for { set j 0 } { $j < $nbits } { incr j } {
                        if { $j < $ng } {
                                set rg($j) [expr double(rand()*1)]
                        }
                        set sum [expr $sum + $rg($j)]
                }
                lappend output [expr $sum / $nbits]
        }
        return $output

Date1998-08-27 17:23
From"Matt J. Ingalls"
SubjectRe: PMAX

gen1 with headerless soundfile works fine in 3.485...

> > 
> > > I'm assuming that the table should look like
> > >
> > > f1 0 512 -1 "voss" 0 4 0
> > 


-matt