How I Created the Glitch Effect in Python Inspired by the Ryuichi Sakamoto Exhibition

Ryuichi Sakamoto Exhibition glitch effect

In 2025, the Museum of Contemporary Art in Tokyo was graced with a powerful and immersive experience—the Ryuichi Sakamoto Exhibition: Seeing Sound, Hearing Time. This exhibition, which spanned multiple art installations, celebrated the life and work of the legendary Japanese composer and musician, Ryuichi Sakamoto. As part of this remarkable showcase, visitors were invited to explore the interconnected themes of sound, time, and perception in ways that were both meditative and visually striking. For the glitch effect check 2:38 min.

For those who weren’t able to experience it in person, I wanted to share how the glitch effect—a visual representation of time and sound—came to life through a custom Python code. This effect was inspired by the “Seeing Sound, Hearing Time” installations, offering a unique way to digitally interpret these concepts. Here, I’ll walk you through how I created the glitch effect that mirrors the spirit of the exhibition and the connection between sound and time.

The Intersection of Sound and Time: A Glimpse into Sakamoto’s Vision

Before diving into the technical details of the glitch effect, it helps to understand the conceptual foundation of the exhibition. Seeing Sound, Hearing Time was more than an exploration of Sakamoto’s musical work. It examined the relationship between sound and its physical presence in time, inviting visitors to consider how auditory experiences shift and accumulate. The exhibition brought together interactive pieces that blended soundscapes with visual responses, encouraging audiences to reflect on how sound can shape perception and emotion.

One installation, for example, allowed participants to manipulate audio fragments and watch their transformations unfold in real time. As visitors altered pitch, texture, or duration, the corresponding visuals morphed with equal subtlety. This approach highlighted the idea of time as something both heard and seen, expressed through evolving patterns, pulses, and interruptions. The use of glitch effects underscored this theme by revealing the fragile and unpredictable nature of temporal flow. Distortions and visual breaks made the passing of time feel almost physical, as if each moment left a visible trace before dissolving into the next.

Glitch Effect: A Digital Homage to Time and Sound

Inspired by Sakamoto’s use of multimedia to convey temporal experience in the Ryuichi Sakamoto Exhibition, I set out to create a glitch effect in Python that could echo those ideas in a simple, visual form. My intention was to represent the passage of time through controlled distortion, allowing an image to emerge gradually as if it were unfolding in synchrony with shifting sound. The glitch technique became a way to translate abstract concepts into something tangible, much like the exhibition’s approach to blending audio and visual expression.

In Seeing Sound, Hearing Time, each installation invited visitors to consider how sound gains shape when paired with visual cues. The synchronization between audio elements and projected imagery encouraged audiences to observe sonic change as a physical event. I wanted my glitch effect to reflect that same interplay. Instead of revealing the entire image at once, the program draws it row by row and pixel by pixel. Each column appears incrementally, creating brief moments of fragmentation before the complete picture settles into place. This progression illustrates how sound can evolve, scatter, and reassemble, while also offering a straightforward technical challenge that pushed me to think more carefully about how code can evoke sensory ideas.

Python Code: Creating the Glitch Effect

To give you a better sense of how I achieved this effect, here is the full Python script I used to generate the glitch animation. The concept behind the code is straightforward. The program loads an image, then reveals it progressively by copying the current pixel into every remaining column to its right. This creates a cascading distortion that moves across the frame, producing a visual pattern that resembles temporal drift or a shifting audio waveform.

My interest in building this effect comes from both artistic and technical experience. I studied computer science in Japan, where I was introduced to creative coding practices and the role of computation in media art. That background shaped the way I understand visual distortion, time-based processes, and algorithmic aesthetics. Now, working in a software engineering position, I continue exploring how technical methods can express conceptual ideas. Developing this glitch effect gave me a practical way to merge those interests. It allowed me to draw on my engineering training while experimenting with a visual language inspired by Sakamoto’s approach to sound and time.

By reconstructing the image column by column, the script demonstrates how a single pixel can influence the visual state of the entire frame. This mirrors the way small variations in sound can accumulate into recognizable changes over time. The method is simple, but it highlights a core idea I wanted to express. Even minimal data, when repeated or shifted, can create a sense of movement, rhythm, and transformation.

Step-by-Step Code Breakdown

from PIL import Image
import numpy as np
import matplotlib.pyplot as plt

# Load the image
image_path = 'image.jpg'  # Path to the uploaded image
image = Image.open(image_path)

# Convert the image to a numpy array
image_data = np.array(image)

# Get image dimensions
height, width, channels = image_data.shape

# Create a copy of the image data to modify for the glitch effect
glitch_data = np.zeros_like(image_data)

# Function to apply the glitch effect
def apply_glitch_effect(image_data, glitch_data):
    # Set the initial value for x
    x = 0

    # Display the initial image
    fig, ax = plt.subplots()
    ax.axis('off')

    # Display an initial blank image
    im = ax.imshow(np.zeros_like(image_data))

    # Apply the glitch effect: update the image data progressively
    while x < width:
        # Modify the glitch_data for each row at the current x position
        for i in range(height):
            # Set the current pixel for all rows from the current column to the end
            glitch_data[i, x:] = image_data[i, x]

        # Update the image displayed on the canvas
        im.set_data(glitch_data)
        plt.draw()  # Update the figure
        plt.pause(0.0001)  # Pause to create a 100ms delay between each frame

        # Move to the next column
        x += 1

# Enable interactive mode
plt.ion()

# Apply the glitch effect
apply_glitch_effect(image_data, glitch_data)

# Disable interactive mode after the glitch effect is done
plt.ioff()

# Show the final image with glitch effect
plt.show()

Code Explanation

  1. Image Loading: The script starts by loading an image using the PIL library, which is converted into a NumPy array for easy manipulation.
  2. Glitch Effect: The glitch effect itself works by updating one column of pixels at a time and replacing all columns to the right of the current one with that same pixel.
  3. Interactive Mode: Using matplotlib, the glitch effect is displayed interactively with updates every 100ms, allowing for a smooth transition of the glitchy image.
  4. Dynamic Updates: The image is progressively updated using the imshow function and set_data, which allows efficient rendering without redrawing the entire figure.

The Artistic Impact of Glitch Art

Glitch art is a genre of digital art that involves the aesthetic manipulation of digital media to create an intentional malfunction or “glitch.” This form of art aligns well with Sakamoto’s approach of sound and time, as it introduces a deliberate sense of imperfection into a medium that is typically seen as precise and orderly.

By creating the glitch effect in Python, I wanted to contribute my interpretation of Sakamoto’s work in a digital form. The fragmented display of pixels mirrors the gradual and sometimes unpredictable nature of sound, much like how sound can skip, break, or distort in the real world. The glitch effect becomes a metaphor for how we experience time and sound—not as a smooth progression, but as a series of breaks, pauses, and distortions that shape our perception.

Exploring Sakamoto’s Influence on Art and Technology

Sakamoto’s influence on both music and visual art is profound. As a composer, he was known for integrating various elements of sound—sometimes unexpected or chaotic—into his work. His focus on human consciousness and technological advancement led him to explore themes of environmentalism and the impact of technology on our daily lives. In his exhibition, these themes were explored through sound installations that incorporated both natural and synthetic sounds.

The glitch effect I created in Python was not just an exercise in coding but a homage to how Sakamoto used technology to blend sound and visual elements. Like the glitch in the image, the fusion of technology and nature in his work invited us to rethink our relationship with the world around us. The exhibition served as a reminder that while technology can sometimes cause disruption, it can also open new ways of experiencing the world—much like glitch art opens up a new way of seeing digital media.

Conclusion

The glitch effect I created using Python served as a personal digital homage to Sakamoto’s work, reflecting the relationship between time and sound in a unique way. While the museum exhibition allowed me to explore his avant-garde side, I recently had the chance to experience his cinematic legacy firsthand. I wrote a deep dive into The Last Emperor Cinema Concert at the Tokyo International Forum, where the Tokyo Philharmonic Orchestra brought his most famous score to life. Seeing the live orchestration was the perfect physical counterpart to the digital experiments I’ve conducted here.

If you ever find yourself in Tokyo or at an exhibition inspired by Sakamoto’s creative legacy, I highly recommend exploring the installations in person. They offer a chance to interact with sound and time in ways that challenge our conventional understanding of both. The glitch effect is just one small interpretation of these grand ideas, but it’s a testament to the power of art and technology working hand in hand to create something truly extraordinary.

Author

  • maxintokyo

    Max lives in Tokyo, where he studies Computer Science and continues to explore the world through travel. His interest in global cultures has shaped both his personal and academic journey. He completed his bachelor’s and master’s degrees in Switzerland, then spent a year in South Korea as an exchange student. He later pursued a master’s program at Waseda University in Japan, which deepened his expertise and broadened his international perspective.

    Max now works in Tokyo in a high skilled role as a senior software engineer in the banking and finance sector. His work combines technical problem solving with industry specific knowledge. He has traveled to more than thirty countries, which adds meaningful real world experience to the projects he takes on.

Get My Personal Travel Maps

Get access to my personal travel maps with 200+ hidden spots across Japan, Switzerland, and other destinations around the world, including real local tips, food recommendations, photo locations, and places most tourists completely miss. 🚀✈️

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
×