Notebook 6 - Scale sound
The following script will load the previously stored sound data files and scale them so they for a proper sound lattice.
First, the script iterates over the different files in data/sound and adds those to a list. Then a scalar is established and the whole list is stored, reshaped and exported into a CSV.
Flowchart
The flowchart as shown in Figure 47 is in the second (blue) section of the fundamental flowchart as shown in the Planning - products.
Pseudo code
This is the Pseudo code for Notebook 6.
#Load the complete lattice
create a base list of zeroes in same shape as complete lattice
for each sound file in 'data/sound'
Unpickle and save to sound list
#Use the sound list with [x, y, z, val] to make a sound lattice with only val
for each voxel in sound list
base list[x, y, z] = sound value
#Scalar so max = 1.0 and min = 0.0
scalar = max - min
#Scaling the sound value
for each voxel in base list
if val != 0
val -= min
val /= scalar
#Export sound lattice
Export sound lattice to 'sound_3_6.csv'
Last update: January 27, 2021