瀏覽代碼

added documentation for mapped file structure

thajohns 3 年之前
父節點
當前提交
ff702c8fd5
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      render.py

+ 10 - 0
render.py

@@ -1,5 +1,15 @@
 # A visualizer for the Python client (or any other client) rendering to a mapped file
 
+# The map file format should look like the following C structure:
+# struct mapping {
+#   float disp_factor;  // scales the response to a note
+#   float last_samples[MAP_SAMPLES];  // samples from the waveform being played
+#   struct {
+#     unsigned long frequency;
+#     float amplitude;
+#   } values[STREAMS];
+# }
+
 import optparse
 import mmap
 import os