OpenGL uGen

Hey everyone! Recently i had time to update the render engine i was writing for sc. it’s wrapped in a uGen and fully threaded. This is the repo if anybody wants to fork it/use it, GitHub - aleksandarkoruga/opengltest: opengl test as SuperCollider UGen

otherwise on my github you can also find a compiled version public-extensions/OpenGLTest at main · aleksandarkoruga/public-extensions · GitHub

Recently i was als able to launch cuda code from a ugen, so I hope to post something soon about that when i find the time.

As a bonus here’s also a “frequency shifter” based on the analog JH FS-1A GitHub - aleksandarkoruga/fs1

All of them are compiled on windows :slight_smile:

Happy new year y’all!

6 Likes

The frequency shifter is a welcome addition to SC (as is the OpenGL ugen).

BUT:

  1. the ugen requires c++14 or later since it needs std::make_unique but your Makefile requests c++11, so it won’t build
  2. a helpfile (or at least an example!) would be incredibly helpful for a plugin that has 12 arguments. I have no idea what anything does.

Sam

3 Likes

Hey Sam,
I think the makefile just stayed there from the init of the repo, i changed c++ standard in my ide, so i’ll update it when i’ll have time.
Same for the pitch shifter example.
Thanks for letting me know!

1 Like

Hey just fyi openFrameworks might be a great option for extending SC to graphics and etc. It has tons of graphics capabilities, it’s actively maintained, has a forum and a lively GitHub page.

1 Like

Thanks! I’ve used it extensively in the past and it’s an excellent framework. I already tried some time ago to include it but had problems compiling it (if i remember correctly it was about windows headers and some other linking issues). Maybe worthwhile to spend some time on it again :slight_smile: cheers!

I’ve used OF tons. There is an option of using SC (server) from the command line in an OF app. And I think someone built an OF addon that uses the SC server. It might be easier to get SC into OF than trying to get OF into SC. But if you continue to build your own openGL and related code for SC, don’t hesitate to borrow from OF (functions, classes, etc) as needed.

Hey y’all just a quick update:

  1. Did a complete overhaul of the render engine. Now it has a user specifiable folder for the shaders as an argument. read audio out from texture with triple buffering to avoid tears, 1 channel audio in. Multiple instances are possible. Rendering is v synced. There are 2 pairs of frag + vert shaders, the first is for the drawing and where the audio gets pulled out (you also have 2 frames of feedback/history), the second pair is for post processing and renders to the window.
    Check out the scd example+shaders (windows): public-extensions/OpenGLTest at main · aleksandarkoruga/public-extensions · GitHub
    or the code: GitHub - aleksandarkoruga/opengltest: opengl test as SuperCollider UGen
    ->next up probably compute shaders and dynamic number of input and output channels

  2. I added an example to the plugin folder of the fs1, and also added a compiled version for windows in public-extensions/fs1 at main · aleksandarkoruga/public-extensions · GitHub

Hope someone finds this useful! Cheers!

4 Likes