<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Sonification practices - Soundscapes Forum				            </title>
            <link>https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/</link>
            <description>Soundscapes Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 07 Jun 2026 23:49:52 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Sonifying a video</title>
                        <link>https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/sonifying-a-video/</link>
                        <pubDate>Fri, 12 Jul 2024 07:46:26 +0000</pubDate>
                        <description><![CDATA[There are many different ways to sonify a video. One possible manner is to map de average RGB values in each video frame to a frequency range or scale and atribute a different instrument to ...]]></description>
                        <content:encoded><![CDATA[<p>There are many different ways to sonify a video. One possible manner is to map de average RGB values in each video frame to a frequency range or scale and atribute a different instrument to each color value. The following Python code exports the RGB data to a .csv file that can be uploaded to a software like <a href="http://twotone.io" target="_blank" rel="noopener">TwoTone</a>.</p>
<p>You just need to change the the file name 'file.mp4'.</p>
<pre contenteditable="false">import cv2
import csv

# Open the video file
cap = cv2.VideoCapture('file.mp4')

# Check if the video file is opened successfully
if not cap.isOpened():
    print("Error opening video file")
    exit()

# Create and open a CSV file for writing
with open('average_rgb_values.csv', mode='w', newline='') as file:
    writer = csv.writer(file)
    writer.writerow()

    while cap.isOpened():
        # Read a frame from the video
        ret, frame = cap.read()

        # If the frame was not read successfully, break the loop
        if not ret:
            break

        # Calculate the average RGB value for the frame
        average_color = cv2.mean(frame)

        # Write the average RGB value for the frame to the CSV file
        writer.writerow([int(cap.get(cv2.CAP_PROP_POS_FRAMES)), average_color, average_color, average_color])

# Release the video capture object and close the video file
cap.release()
cv2.destroyAllWindows()
</pre>
<p> </p>]]></content:encoded>
						                            <category domain="https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/">Sonification practices</category>                        <dc:creator>David Sousa</dc:creator>
                        <guid isPermaLink="true">https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/sonifying-a-video/</guid>
                    </item>
				                    <item>
                        <title>Converting CSV to MIDI / Sonification using Online Sequencer</title>
                        <link>https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/converting-csv-to-midi-sonification-using-online-sequencer/</link>
                        <pubDate>Wed, 10 Jul 2024 21:38:20 +0000</pubDate>
                        <description><![CDATA[The following practice follows steps for sonifying data-sequence after obtaining a multi-column .csv file.
The csv example uploaded here, comes from the &quot;light&quot; sensor of a micro:bit.
 
S...]]></description>
                        <content:encoded><![CDATA[<p>The following practice follows steps for sonifying data-sequence after obtaining a multi-column .csv file.</p>
<p>The csv example<a href="https://soundscapes.nuclio.org/wp-content/uploads/wpforo/default_attachments/1720601061-microbit-data-2024-07-10T07-38-39-492Z.csv" target="_blank" rel="noopener"> uploaded here</a>, comes from the "light" sensor of a micro:bit.</p>
<p> </p>
<p>STEP 1</p>
<p>Identify the number of columns in the csv file. Save each of the columns in a single file within a single sheet in MS-DOS CSV format. Name each file according to the column-name. In the case of the csv coming from the light sensor, 6 columns are produced. Therefore 6 files should be produced accordingly (x,y,z along with their corresponding timelines).</p>
<p>Note: Every file represents a musical line that can be converted to a MIDI file which eventually can be converted to a track. Tracks can then be modified in a Digital Audio Workstation supporting MIDI tracks. Timeline can correspond to the "metronome" change as a separate track-tempo line.</p>
<p> </p>
<p>STEP 2</p>
<p>Upload the first non-timeline csv file on this <a href="https://csv-to-midi.evanking.io/" target="_blank" rel="noopener">online csv to midi converter</a>. A the "COLUMN-MAPPINGS" sector, select the first value available. Choose time, duration, octave and range accordingly. (e.g. Duration could be 64th notes if the csv file contains numerous entries). The diskette icon becomes available. Download the MIDI file.</p>
<p> </p>
<p>STEP 3</p>
<p>Use any sequencer, or MIDI player, to play the MIDI file. The <a href="https://onlinesequencer.net" target="_blank" rel="noopener">Online Sequencer</a> is one of the online options. Upload the MIDI file using the  "Import MIDI/Sequence Files" option at the three-dot drop-down menu. Choose the default option (----) or other options at the right part of the tool.</p>
<p>__________</p>
<p> </p>
<p>The permanent link result for the 'x' column of the example can be consulted here: https://onlinesequencer.net/4094919</p>
<p>The corresponding MIDI file is attached in this post.</p>
<p> </p>
<div id="wpfa-313" class="wpforo-attached-file"><a class="wpforo-default-attachment" title="b5without-y-z3-oct3-range-4.csv.mid" href="//soundscapes.nuclio.org/wp-content/uploads/wpforo/default_attachments/1720649265-b5without-y-z3-oct3-range-4csv.mid" target="_blank" rel="noopener"><i class="fas fa-paperclip"></i> b5without-y-z3-oct3-range-4.csv.mid</a></div>]]></content:encoded>
						                            <category domain="https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/">Sonification practices</category>                        <dc:creator>Petros - Plagiavlitis</dc:creator>
                        <guid isPermaLink="true">https://soundscapes.nuclio.org/index.php/community/sonification-in-steam-sonification-in-steam-share-resources/converting-csv-to-midi-sonification-using-online-sequencer/</guid>
                    </item>
							        </channel>
        </rss>
		