a friend sent over a supercollider synth he built with a functional gui, im trying to use it on bela, could anybody provide some light examples of how i might change something like a popdown menu or gui knob to a digital in so i could use rotary encoders? im also trying to display the gui knob values and oscillator frequency's on a 40x4 lcd via i2c
any suggestions welcome/still noob
encoder/lcd
vivian rotary encoders
that'll be an interesting task to do in Supercollider without a custom UGen. @RafaeleAndrade @jonathan @nescivi did any of you try this? Alternatively, using a potentiometer - if possible - would be much easier.
vivian im also trying to display the gui knob values and oscillator frequency's on a 40x4 lcd via i2c
One could set up a little program that receives OSC and displays content on the LCD. We've done something similar for an OLED display https://forum.bela.io/d/314-is-anyone-successfully-using-i2c-oled-lcd/72 . I believe there is some library around for a 4x20 LCD which could be wrapped with an OSC receiver in a similar way.
vivian change something like a popdown menu or gui knob to a digital in so i could use rotary encoders
the process of translating a Sc GUI to something controllable in other means is obscure to me, but I guess if the GUI is controlled by the language, you'll have to send some message from the server back to the language using SendReply
.
thanks for the suggestions, im actually trying to control some of the gui parameters with a trill bar, you think potentiometer would be an easier workaround? ill be taking a deep dive tonight after work.
Trill Bar would be fine!
giuliomoro oh great! I’m guessing I can find some examples in trill library?
these are the UGens for Trill: https://github.com/jreus/Trill_SC
If you are a bit familiar with the terminal, you should be able to follow the installation instructions in the README. Let me know if you have troubles with that.
It comes with examples that should help you understand how it works.
@giuliomoro sorry so basic but im struggling to run the sh script
no worries, try this:
- download these three files to your computer:
- open the Bela IDE, add the three files to the currently open project by drag and drop. You may one or more warnings about "couldn't open binary files". Ignore them. You should now see the three files among the files in your project. Verify that the extension of the last one is indeed
.sc
or rename it with the rename button next to it. - run the following in the console at the bottom of the IDE (one line at a time, and replacing
PROJECTNAME
with the name of the currently open project):mkdir -p /usr/share/SuperCollider/Extensions/TrillUGens mv projects/PROJECTNAME/Trill* /usr/share/SuperCollider/Extensions/TrillUGens
- give it a few seconds and those files should have now disappeared from your project
- test it by running one of the example projects starting with
SC_
from here https://github.com/jreus/Trill_SC/tree/master/BelaProjects
giuliomoro hi again, sorry ivebeen focusing on other SC stuff but i just returned to using trill remotely and im not having much luck with those examples, im sure its something very obvs.
i am getting full functionality in bela ide trill examples but not using sc remote, i keep getting these.
- Edited
I see this error is from the Sc IDE. Did you try running the provided examples on Bela itself as suggested above?
this is the bela ide using the trill centroid example
Ok let me have a look
giuliomoro also giulio, when defining digital inputs on SC with bela, do i define the digital inputs in a seperate synth def to the existing synth engine def im working on?
is there an existing example of digital in with send reply i could study?
many thanks
giuliomoro Ok let me have a look
I fixed it now. Can you udpate your Bela core code following the procedure here https://learn.bela.io/using-bela/bela-techniques/updating-bela/ ?
vivian do i define the digital inputs in a seperate synth def to the existing synth engine def im working on?
Either should work.
vivian is there an existing example of digital in with send reply i could study?
not yet. I think it should be something like this to send on positive transitions (DigitalIn
value going from 0 to 1):
~ctrl = {
var a = DigitalIn.kr(0);
SendReply.kr(a, '/ctrl', [a]);
}.play;
and maybe the following to trigger for both 0 -> 1 and 1 -> 0?
~ctrl = {
var a = DigitalIn.kr(0);
SendReply.kr(a, '/ctrl', [a]);
SendReply.kr((1 - a) , '/ctrl', [a]);
}.play;
there are surely more classy way of doing it (e.g.: with a one-sample delay that could implement a one-zero filter?), but I don't know supercollider!
wow ok great, working well in the BELA ide, the trill remote example is still perplexing tho.
thanks for this light example, i will try this tonight with a few ec11 rotary encoders. also assigning trill bars to synth defs is the same in that we define them in a similar way to digital in?
giuliomoro yeah thats great, thanks guilio
giuliomoro late response, but i am still getting these errors when using trills remotely,
have i not compiled something correctly?
it looks like you need to install the TrillUGens.sc file on your host so that your sclang
knows about it: https://github.com/jreus/Trill_SC/blob/master/ext/Trill/TrillUGens.sc
giuliomoro guhhh