Learning to Program the ETC Video Synthesizer


#1

Kirk Kaiser from www.makeartwithpython.com posted this great tutorial on programming Python on the ETC!

Be sure to check out his full post which features some new modes for the ETC:

Thanks Kirk!


#2

:heart_eyes: Brilliant! Don’t know the first place to start with ETC, this is a godsend!


#3

Great introduction. The Zach Liebermann lecture he quotes is worth to watch too.
I had to adopt his Zach Liebermann Mode immediately:

import pygame
import random
import time
import math

# code adapted by Florian Anwander from Kirk Kaiser
# https://www.makeartwithpython.com/blog/critter-guitari-etc-review-code/
# who adapted it from zach lieberman's talk
# https://www.youtube.com/watch?v=bmztlO9_Wvo

    
white=(255,255,255)

def setup(screen, etc):
    pass

def draw(screen, etc):
    for i in range(160):
        i=i*4
        
        red= int(127 + 120 * math.sin(i * .01 + time.time()))
        grn= int(127 + 120 * math.sin(i * (.01 + etc.knob4*.01) + time.time()))
        blu= int(127 + 120 * math.sin(i * (.01 + etc.knob4*.02)+ time.time()))
        color = (red,grn,blu)
        colorinv = (255-red,255-grn,255-blu)
        radius_1 = int(60 + 40 * math.sin(i * (.11-(etc.knob2 * .1) )+.0001 + time.time()))
        #increase      ^^   ^^ to get more drastic figures
        radius_2 = int(70 - 30 * math.sin(i * (etc.knob2 * .09)+.0001 + time.time()*5))
        #------------------------------------------------------------set speed here ^
        radius1 = int(etc.knob3 * radius_1)
        radius2 = int(etc.knob3 * radius_2)
        xoffset1 = i
        xpos1 = int((640-i) * math.sin(i * .01 + time.time()*.2) + (640-i) + xoffset1)
        xpos2 = int(1280 // 2 + 100 * math.sin(i * .02 + time.time()* .1))+360
        xpos3 = int(1280 // 2 + 100 * math.sin(i * .02 + time.time()* .2))-360
        #switch between filled circles and not filled by using here  either "<" or ">":
        if 1 < 0.5 :
            pygame.gfxdraw.circle(screen, xpos1, i, radius1, colorinv)
            pygame.gfxdraw.circle(screen, xpos2, i, radius2, color)
            pygame.gfxdraw.circle(screen, xpos3, i, radius2, color)
        else :
            pygame.gfxdraw.filled_circle(screen, xpos1, i, radius1, colorinv)
            pygame.gfxdraw.filled_circle(screen, xpos2, i, radius2, color)
            pygame.gfxdraw.filled_circle(screen, xpos3, i, radius2, color)
    pygame.gfxdraw.circle(screen, xpos1, i, radius1, white )
    pygame.gfxdraw.circle(screen, xpos2, i, radius2, white )
    pygame.gfxdraw.circle(screen, xpos3, i, radius2, white )

#4

I have to admit - the existence of your videos definitely factored in to my decision to get an ETC. While I have some very light programming experience, I plan to (hopefully) program my own and actually conceptualize something and maybe even achieve it. Thanks for offering the spark of accessibility.


#5

this looks fun
i have python skills but need a simple tutorial like this to get inspired