Last active
October 6, 2018 01:39
-
-
Save furenku/769e7ed81c2296f04a1f3ab8e3f9e784 to your computer and use it in GitHub Desktop.
melodia de loop con supercollider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| m = [60,65,70,75,62]; | |
| // para extraer nota del arreglo con un indice, | |
| // crear variable contador | |
| // en el bucle, | |
| // usarla para tocar nota | |
| // incrementar contador | |
| // mantenerla en el rango 0-4 | |
| Tdef(\melodia,{ | |
| var contador; | |
| contador=0; | |
| z = Synth(\bass_test); | |
| inf.do{ | |
| z.set(\freq,m[contador].midicps); | |
| 0.25.wait; | |
| contador=contador+1; | |
| if( contador >= m.size, { | |
| contador = 0; | |
| }); | |
| } | |
| }).play; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| m = [60,65,70,75]; | |
| m = [60,61]; | |
| m = [60,61,63,61]; | |
| m = [60,65,67,68,70,75]; | |
| t = [ 0.25, 0.5, 1 ]; | |
| // para extraer nota del arreglo con un indice, | |
| // crear variable contador | |
| // en el bucle, | |
| // usarla para tocar nota | |
| // incrementar contador | |
| // mantenerla en el rango 0-4 | |
| Tdef(\melodia,{ | |
| z = Synth(\bass_test); | |
| inf.do{|contador| | |
| if( contador % 16 == 0, { | |
| t=[ 0.25, 0.5, 1 ]; | |
| }); | |
| if( contador % 16 == 6, { | |
| t = [ 0.25, 0.125, 0.06225 ]; | |
| }); | |
| z.set(\freq,m[contador%m.size].midicps); | |
| t[contador%t.size].wait; | |
| } | |
| }).play; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment