Hello,
you mean directly from a webcam ? If yes then it is possible, here is a prepared session which use the RED and GREEN channel :
https://www.fsynth.com/app/vca70al0u4
Once in the session you must :
1. Attach your webcam stream by clicking on the last toolbar icon [+] then clicking on the CAM button.
2. Un-pause by clicking on the unpause icon (the highlighted one in the toolbar), if it work you will see and hear your webcam stream at this point
Let me know if that work.
Sound work best in Chrome or with the sound server.
Here is the code (in case it is deleted) :
void main () {
vec2 uv = gl_FragCoord.xy / resolution;
vec4 rgba_cam = texture(iInput0, uv);
float gain_attenuation = 0.05;
// L = red channel
float l = rgba_cam.r;
// R = green channel
float r = rgba_cam.g;
synthOutput = vec4(l, r, 0., 0.) * gain_attenuation;
gl_FragColor = rgba_cam;
}
Some notes which may be useful :
1. By default the webcam stream will be linearly interpolated, this may be not what you want if you want a straight conversion, you can change this by clicking on the camera icon and selecting "nearest" in the settings instead of "linear"
2. The webcam stream will probably be scaled to match the score width/height, you can change this easily in the global settings (gears icon) and change "score width" and "score height" to match your stream resolution (note : higher height may involve low performances), you can also fix that in the fragment shader of course