4 Spotlight Beam like Modes

Hello

I uploaded an zip archive with four variations of the mode s_perspective_lines
https://patchstorage.com/s_perspective_lines_fa/
Number 1 is nearly identical to the original but the movement is done automatically
The modes 2, 3, and 4 simulate the usual stage lights. The spotlight is moving over the screen, controlled mostly by two "LFO"s. The faster the LFO moves the “lamp”, the more you will get the impression, that several spotlights are used.
The beam can be spreaded and also moved around. At modes 2,3, and 4 the beam is controlled by the audio signal. In those three modes, the brightness of the “beam” is also controlled by the audiosignal. If you don’t have an audio signal you will see only the wandering spotlight “lamp”, but not the beam. For a preview press the trigger button.

I think there are some small ideas, you may use for your own modes.
first, the LFO
It is basically like this:

import os
import pygame

count_x = 160
dir_x = 0

def setup(screen, etc):
    pass

def draw(screen, etc):
    global count_x,dir_x

    if count_x > 319 :
        dir_x = 1
        count_x = 320
    if count_x < 1 :
        dir_x = 0
        count_x = 0
    if dir_x == 0 :
        count_x = int(count_x + etc.knob1 * 80 )
    if dir_x == 1 :
        count_x = int(count_x - etc.knob1 * 80 )

The value count_x is used then for your parameter. Knob1 controls the speed of the LFO.

The other idea is the audiocontrol for the colors. It works like that:

def draw(screen, etc):
    red=int(etc.color_picker()[0])
    grn=int(etc.color_picker()[1])
    blu=int(etc.color_picker()[2])

    for i in range(0, 100) :
        audio = (etc.audio_in[i])
        audiocolor = abs(int(audio/129))

        audiored = int(red * audiocolor / 255)
        audiogrn = int(grn * audiocolor / 255)
        audioblu = int(blu * audiocolor / 255)

        color = (audiored,audiogrn,audioblu)

The definition of red/grn/blu shows, how to derive the three colors from the etc.color_picker.

audiocolor is a value between 0 and 255 which represents the audiolevel.

the audiored/audiogrn/audioblu are the three colors selected by the color_picker but now with the brightness of the audio-signal.

Enjoy!




PS: I use an Alesis Filtre as lowpassfilter for the audiosignal. This is very useful for getting optically nice waveforms.

3 Likes