# ex1D07.py # Markov Basics from moduleCsound import * tags(1) header(ksmps=32) # score written with python loop rather using r # --- globals add("seed 0") # --- instrument add(r""" instr 1 iLine[] array .2, .5, .3 iVal random 0, 1 iAccum = iLine[0] iIndex = 0 until iAccum >= iVal do iIndex += 1 iAccum += iLine[iIndex] enduntil printf_i "Random number = %.3f, next element = %c!\n", 1, iVal, iIndex+97 endin """) tags(2) # --- score for i in range(10): add("i 1 0 0") tags(3) writeRun(__file__)
Tuesday, July 11, 2017
ex1D07. Markov Basics
Subscribe to:
Post Comments (Atom)
-
Amplitudes should follow the dB scale and change via the log function. # ex1C01.py # dB vs linear from moduleCsound import * tag...
-
# ex1D09.py # Random Walk from moduleCsound import * tags( 1 ) header(ksmps =32 ) # --- globals add( r""" seed 1...
-
# ex2C03.py # Midi All In from moduleCsound import * add(startSyn) add(startOpt) add( "-+rtmidi=virtual -Ma -odac" ) add(...
No comments:
Post a Comment