# 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)
-
# ex1D13.py # Simple Algorithmic Note Generator from moduleCsound import * tags( 1 ) header(ksmps =32 , nch =1 ) # --- global # G...
-
# ex1D10.py # Rejection Sampling from moduleCsound import * tags( 1 ) header(nch =1 ) # --- user defined opcodes add( "...
-
# ex3A02.py # Performance pass increment from moduleCsound import * tags( 1 ) # Each k-time is 0.1 sec header(ksmps =4410 ) add(...
No comments:
Post a Comment