proc trysetstate {star state value} { if [catch {statevalue $star $state initial} err] then { puts stdout "Warning: $err" } else { setstate $star $state $value } } proc trytargetparam {param value} { if [catch {targetparam $param $value} err] then { puts stdout "Warning: $err" } else { targetparam $param $value } } reset newuniverse lossySpeech domain SDF newstate prob_loss float 0.1 star UnPkInt_M1 UnPkInt_M trysetstate UnPkInt_M1 numRows 48 trysetstate UnPkInt_M1 numCols 1 star PackInt_M1 PackInt_M trysetstate PackInt_M1 numRows 48 trysetstate PackInt_M1 numCols 1 star Mux.input=21 Mux numports Mux.input=21 input 2 trysetstate Mux.input=21 blockSize 1 star MatrixInt1 MatrixInt trysetstate MatrixInt1 numRows 48 trysetstate MatrixInt1 numCols 1 trysetstate MatrixInt1 IntMatrixContents {0 [48]} star IIDUniform1 IIDUniform trysetstate IIDUniform1 lower 0.0 trysetstate IIDUniform1 upper 1.0 star Quant1 Quant trysetstate Quant1 thresholds (1-prob_loss) trysetstate Quant1 levels {} star Play1 Play trysetstate Play1 gain 4.0 trysetstate Play1 saveFile {} star ReadPCM1 PCMReadInt trysetstate ReadPCM1 fileName {$PTOLEMY/src/domains/sdf/demo/speech/sorrydave.au} trysetstate ReadPCM1 haltAtEnd YES trysetstate ReadPCM1 periodic YES connect Mux.input=21 output UnPkInt_M1 input connect PackInt_M1 output Mux.input=21 input#1 connect MatrixInt1 output Mux.input=21 input#2 connect Quant1 output Mux.input=21 control connect IIDUniform1 output Quant1 input connect ReadPCM1 output PackInt_M1 input connect UnPkInt_M1 output Play1 input