To get most modes working with HDMI output (see note below), there is one addition and one change to the code.
Addition: You will have to add the following line to the beginning of the ‘draw’ loop:
…this line needs to go after the global variable declaration (if applicable). For example:
def draw(screen, etc):
global count, y
Change: Any instance of:
…needs to be changed to include your knob of choice. Usually with ETC, this is would be Knob4:
Here’s an example of a complete line of code (though ‘color’ may not always be used as variable name. It could be ‘col’ or ‘c’ or something else altogether…)
color = etc.color_picker(etc.knob4)
NOTE: The ETC modes are likely coded only for HDMI 1280x720 resolution. This means that there are some constants included in a ETC mode’s code like ‘360’ (for the center of the y-axis (720 ÷ 2)).
The EYESY python modes are coded to be able to switch between HDMI 1280x720 and Composite NTSC/PAL resolutions from one boot up to the next, so constants like ‘360’ will not be updated when the resolutions change. EYESY modes have constants coded a little differently. This is done with etc.xres and etc.yres For example:
x = int(etc.knob1*1280)
y = int(etc.knob2*etc.720)
…becomes EYESY Code:
x = int(etc.knob1*etc.xres)
y = int(etc.knob2*etc.yres)
If you never want to use composite video output or are fine with the composite output visuals not being in the center of screen, etc. no need to change the code.
If you aren’t OK with it, you will need to update any width and height relationships and any ‘hardcoded’ constants/positions of objects. For example, if your ETC code (based on y-axis resolution of 720) uses ‘360’ for a constant value for something like the start point of a line, you would want to add a variable to the top of the code (underneath the import…) like so:
start_point_y = ((360 * etc.yres) / 720)
…and for say ‘640’ as a constant in the x-axis at 1280 resolution:
start_point_x = ((640 * etc.xres) / 1280)
… then in Draw loop, replace that constant ‘360’ with ‘start_point_y’ and that constant ‘640’ with ‘start_point_x’.
Repeat for as many variables/constants/etc. as needed.