1 A basclass for audiovisualizers. Takes care of re-fitting the audio-rate to
2 video-rate. It receives audio-data at the sampling-rate. It needs to render
3 video-frames at frame-rate. The rendering needs n audio samples (depends on
4 subclass). The baseclass takes care of that.
6 Some effects could be enhanced by running geometrictransform/effecttc elements
10 * put 'Audio' to klass as well ?
14 * we have a couple of drawing helpers in gstdrawhelpers.h
15 (would be nice if we could use cairo)
16 draw_point (x,y,color);
17 draw_line (x1,x2,y1,y2,color);
18 * some more we could add:
19 draw_hline (x1,x2,y,color);
20 draw_vline (x,y1,y2,color);
21 draw_rect (x1,x2,y1,y2,color);
22 draw_box (x1,x2,y1,y2,color); // filled
24 - would be nice to use a generic 3x3 matrix operation, we don't run inplace
26 - this way we could also blur the background
29 gst-plugin-ugly/gst/synaestesia -> synaescope
30 gst-plugin-bad/gst/smoothwave -> wavescope
31 gst-plugin-good/gst/monoscope -> blend into what we have in wavescope
35 spacescope - stereo wavescope
36 - left->x, right->y - done
39 - we could have a bouncing line as a base, like a quix:
40 - two dots moving on a linear path and getting a new random dx,dy when hitting
42 - the abs(dx/dy) - speed of movement - could be scaled by the sound level
43 - we would need to rotate, stretch and clip the waveform drawing to fit the
45 - we could scratch the rotate part and just stretch/squeeze x and shift/clip y
48 - have a matrix of source and drawing-functions
49 - sources: audio, spectrum, audio-low, audio-mid, audio-hi
50 - drawing: waves (style, color), space (style,color)
51 - have the usual shade and move operations
52 - have a way to draw each operator in one or more color-channels
53 - we could calculate the sound-level (like in level element) and modulate
55 - for filtered low/mid/hi audio we could use different peak-falloffs
58 - element maker template
61 - we probably want a VisBin like the gnome video effects
62 - this way we can specify pipeline fragments
63 - VisBin can use a videomixer to switch effects based on time or song
64 - VisBin can e.g. control a text-overlay to render the title into the
65 visualisation for a while
69 GST_DEBUG="*:2,*scope*:4"
71 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-inspect scopes
73 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch audiotestsrc ! audioconvert ! wavescope ! colorspace ! ximagesink
74 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! wavescope ! colorspace ! ximagesink
75 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! wavescope style=lines shade-amount=0x00080402 ! edgetv ! vertigotv ! ximagesink
77 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! spacescope style=lines shade-amount=0x00080402 ! ximagesink
78 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! spacescope style=lines shade-amount=0x00080402 ! vertigotv ! ximagesink
80 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! spectrascope ! colorspace ! ximagesink
81 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! audioconvert ! spectrascope shader=fade-and-move-up shade-amount=0x00040302 ! colorspace ! ximagesink
83 GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD gst-launch filesrc location=$HOME/Music/1.mp3 ! decodebin2 ! tee name=t ! queue ! audioconvert ! synaesthesia ! ximagesink t. ! queue ! synaescope shade-amount=0x00040404 ! colorspace ! ximagesink