Theme Processus4 Sonification Image 2

Entendre une image, un film / Listen to a picture, a movie

 
Avec la library GEM de Pure Data
With the GEM library of Pure Data
   


Patch Pure Data:
pdExMM167-GEM-Sonification.zip (5.5M)
 
compatible:     
  Pd-"Vanilla"
   + libraries:
Gem
pddp
cyclone
zexy
iemlib
ggee
 
  Pd-0.43.4-extended  

compatible:
  MacOS
  Linux
  Windows
ExMM167b.png



Bruges1-320x240-12sec-Son-ExMM167b.jpg
Bruges1-320x240-12sec-Son-ExMM167b.mp4



 
Ce patch est constitué de modules ARGOPd et d'objets Pure Data reliés.  
 
Comment ça marche:
 
- Le module "GEM-Film" lit en boucle un film:
  "Bruges1-320x240-12sec.mov"
Image: 320x240 pixels
309 frames
309/25 image/sec = 12.3 sec

- La couleur des pixels qui sort du module est codée en RGBA (Red, Green, Blue, Alpha)

- Le film s'ouvre automatiquement car il est dans le même dossier que le patch Pd.
 
- Le module "GEM-Direct" affiche les images dans la fenêtre "GEM"
 
- Le module "GEM-Sonification" utilise l'objet pix_pix2sig~ de la library GEM pour transformer chaque couleur de chaque pixel en signal Audio.
  Les pixels sont "sonifiés".
This patch is made of ARGOPd modules and Pure Data objects interconnected.

How it works:
 
- The "GEM-Film" module plays in a loop, a movie:
  "Bruges1-320x240-12sec.mov"
Image: 320x240 pixels
309 frames
309/25 frames/sec = 12.3 sec

- The color of pixels at the output of the module is encoded in RGBA (Red, Green, Blue, Alpha)

- The movie is automatically opened because it is in the same folder as the Pd patch.

- The "GEM-Direct" module displays the pictures in the "GEM" window

- The "GEM-Sonification" module uses the pix_pix2sig~ object of GEM library to transform each color of each pixel in an Audio signal.
  Pixels are "sonified".
MM-GEM-Sonification
- Ouvrir le module "GEM-Sonification"

- L'essentiel du patch se résume à:
- Open the "GEM-Sonification" module

- The patch can be reduced to:
  ExMM167-Essentiel.png
- Attention: "Help" de l'objet pix_pix2sig~ ouvre "pix_sig2pix~-help.pd" au lieu de "pix_pix2sig~-help.pd".
  (Bug Pd-0.42.5-extended et Pd-0.43.4-extended)
  Le bon patch "Help" se trouve dans:
- Warning: "Help" of the object pix_pix2sig~ opens "pix_sig2pix~-help.pd" instead of "pix_pix2sig~-help.pd".
  (Bug Pd-0.42.5-extended and Pd-0.43.4-extended)
  The good "Help" patch is located in:
    MacOS: /Applications/Pd-extended.app/Contents/Resources/extra/Gem/
    Linux: /usr/lib/pd/pd-extended/extra/Gem/
  Windows: C:\Programmes\pd\extra\Gem\
- pix_pix2sig~ transforme les pixels des images par "block".
  La taille d'un block de pixels = la taille du DSP Audio Block du patch.
  pix_pix2sig~ est dans un subpatch avec l'objet switch~ 65536 1 1
  Donc 1 Audio Block = 65536 samples
  Donc les 65536 premiers pixels de chaque image sont transformés en 65536 samples audio.
  Le film "Bruges1-320x240-12sec.mov" a des images de 320x240 = 76800 pixels.
  Donc presque toute l'image est sonifiée.
  Les pixels sont lus de gauche à droite puis de haut en bas.
 
- 1 ligne de l'image = 320 pixels est transformée en 320 échantillons Audio.
  A 44100 échantillons/seconde, 1 ligne dure 320/44100 = 7.25ms
  1 division du module "Scope" dure 20ms.
  On "voit" donc environ 3 lignes par division.
 
- Le 2e argument (1) de "switch" est un overlap
 
- Le module "GEM-Sonification" permet de choisir:
La taille du block de 256 à 262144 (puissances de 2)
L'overlap: 1 2 4 8
 
- Le module "GEM-Sonification" possède en sortie un filtre "High-pass-filter" (50Hz) commutable pour éliminer un niveau de signal continu souvent présent (inaudible, mais pouvant saturer un DAC).
 
- La composante rouge des pixels est envoyée à gauche dans dac~ et la bleue à droite.
 
- Le module "Record" enregistre l'Audio dans un fichier wav stereo.
- pix_pix2sig~ transforms the image pixels by "block".
  The size of a pixel block = the size of the DSP Audio Block of the patch.
  pix_pix2sig~ is in a subpatch with the object switch~ 65536 1 1
  So 1 Audio Block = 65536 samples
  So the initial 65536 pixels in each image is transformed into 65536 Audio samples.
  The movie "Bruges1-320x240-12sec.mov" has images of 320x240 = 76800 pixels.
  So almost all the image is sonified.
  Pixels are read from left to right then from top to bottom.
 
- 1 line of the image = 320 pixels is converted into 320 Audio samples.
  At 44100 samples/second, the duration of a line is 320/44100 = 7.25ms.
  1 division of "Scope" module lasts 20 ms.
  So three lines per division are visible.
 
- The second argument (1) of "switch" is an overlap.

- The "GEM-Sonification" module is used to select:
The block size from 256 to 262144 (powers of 2)
The overlap: 1 2 4 8

- The "GEM-Sonification" module has at its output a switchable "high-pass-filter" (50Hz) to remove a DC signal often present (inaudible, but that can saturate a DAC).

- The red component of the pixels is sent to left in dac~ and the blue to right.

- The "Record" module records Audio in a stereo wav file.
 
 
A voir:
 
- Les objets Pure Data soundfiler + tabread4~
  Avantage: vitesse de lecture variable
 
- Sonification d'une image sans GEM:
  Sonification Image 1
To see:
 
- Pure Data objects soundfiler + tabread4~
  Advantage: variable playback speed
 
- Picture sonification without GEM:
  Sonification Image 1    
 
 
 
Autres Patches: 
Others Patches: 
   

ExMM167-GEM-Sonification.zip

Lune4.jpg
ExMM167a-GEM-Sonification-Image.pd
Sonification d'une image fixe
Sonification of a static picture
GEMWindowExMM167c.jpg
ExMM167c-GEM-Sonification-Video.pd
Sonification de l'image d'une caméra
Sonification of the image of a webcam



Liens: Links:
 
- Image matricielle    ../ARGOPd/wikipedia-16x16fr  ../ARGOPd/wikipedia-16x16en    Raster graphics
- Pd-"Vanilla" & Pd-Extended & ARGOPd
- Codelab "Convertir de la video en son"
- Olivier Baudu: Papatch Pure Data "Piano à roulette"
- ../ARGOPd/wikipedia-16x16Beffroi de Bruges   ../ARGOPd/wikipedia-16x16Belfort van Brugge   ../ARGOPd/wikipedia-16x16Belfry of Bruges
 


Paresys Accueil
18 10 2022
Valid HTML 4.01 Transitional

Paresys Home