| Another option is to define your user interface in HTML and run your
piece in NW.js using csound.node, or in the Csound for Android app.
Both of these approaches expose Csound as a class with a more or less
identical interface, mostly a subset of the csound.hpp interface. You
can also use Csound for WebAssembly in a local Web server. I have a
version of this that has the same interface as csound.node, and the
regular Csound repository has a version of Csound for WebAssembly with
a slightly different interface.
This actually is the most powerful of all these approaches in terms of
fancy user interfaces, communicating with the Internet, accessing
databases, etc., etc., etc.,, but the learning curve is steeper and
audio performance is not quite as efficient or stable as some of the
other approaches mentioned, although I have presented several pieces
done using csound.node in concert without any problems. I was able to
generate real-time, high-quality audio at the same time as
user-controlled, 3-dimensional computer graphics. You can see a
WebAssembly version of one of these pieces here (needs a fairly
powerful computer to run):
https://gogins.github.io/csound-extended/scrims.html. A simpler and
less demanding example:
https://gogins.github.io/csound-extended/message.html.
-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com
On Sat, Aug 3, 2019 at 11:37 AM Guillermo Senna wrote:
>
> I'd like to add Open Stage Control to that list
> (https://github.com/jean-emmanuel/open-stage-control).
>
> Interfaces are easy to design and will be served through a local HTTP
> server. Communication with Csound is through OSC.
>
>
> On 3/8/19 10:50, Richard wrote:
> > I am a big fan of PySimpleGUI (based on TkInter, but much more simple...
> >
> > Richard
> >
> > On 03/08/2019 14:41, Victor Lazzarini wrote:
> >> I think the FLTK widgets are not the best option in the long run.
> >> There are better
> >> options:
> >>
> >> 1) CsoundQT widgets
> >> 2) Cabbage
> >> 3) Python (e.g. TkInter)
> >> 4) Other software using OSC or MIDI
> >>
> >> I'd suggest investigating these options.
> >>
> >> Victor Lazzarini
> >> Dean of Arts, Celtic Studies, and Philosophy
> >> Maynooth University
> >> Ireland
> >>
> >>> On 3 Aug 2019, at 13:28, Slobodan Ivanovic
> >>> wrote:
> >>>
> >>> Hello people! I trying to understand the possibility to play while I
> >>> send differents type of commands through my controller.
> >>>
> >>> What I'm currently testing is FLTK Widgets as GUI (they have a
> >>> vintage look that I like and they let you communicate with the
> >>> command-line with opcodes like "sensekey" which is not possible with
> >>> mostly Csound's front-end programs.)
> >>>
> >>> So basically what I would like to have is a Panel of
> >>> Buttons/Controllers/etc which are usable while I play. Because of
> >>> this, I thought to have 2 csound instruments, so when I want to
> >>> change the value of a controller is not instrument dependent.
> >>>
> >>> CODE
> >>> ___________________________________________________________________________________________________
> >>>
> >>>
> >>>
> >>> ; Select audio/midi flags here according to platform
> >>> -+rtmidi=portmidi -odac -Ma ;;;RT audio I/O with MIDI in
> >>> ;-iadc ;;;uncomment -iadc if RT audio input is needed too
> >>>
> >>>
> >>>
> >>> sr = 44100
> >>> ksmps = 512
> >>> nchnls = 2
> >>> 0dbfs = 1
> >>>
> >>>
> >>> FLpanel "Frequency Knob", 900, 400, 50, 50
> >>> ; Minimum value output by the knob
> >>> imin = 0
> >>> ; Maximum value output by the knob
> >>> imax = 1
> >>> ; Logarithmic type knob selected
> >>> iexp = 0
> >>> ; Knob graphic type (1=3D knob)
> >>> itype = 1
> >>> ; Display handle (-1=not used)
> >>> idisp = -1
> >>> ; Width of the knob in pixels
> >>> iwidth = 70
> >>> ; Distance of the left edge of the knob
> >>> ; from the left edge of the panel
> >>> ix = 70
> >>> ; Distance of the top edge of the knob
> >>> ; from the top of the panel
> >>> iy = 125
> >>>
> >>> gkfreq, gihandle FLknob "Vol", imin, imax, iexp, itype, idisp,
> >>> iwidth, ix, iy
> >>> ; End of panel contents
> >>> FLpanelEnd
> >>> ; Run the widget thread!
> >>> FLrun
> >>>
> >>> ; Set the widget's initial value
> >>> FLsetVal_i 0.5, gihandle
> >>>
> >>> giSine ftgen 0,0,2^12,10,1
> >>> initc7 1,1,1; initialize controller 1 on midi channel 1
> >>> to its maximum level
> >>>
> >>> instr 2
> >>> kVol ctrl7 1,1,0,1; read in controller 1, channel
> >>> 1. Re-range to be from 0 to 1
> >>> kTri changed kVol
> >>> FLsetVal kTri, kVol ,gihandle
> >>> endin
> >>>
> >>> instr 1
> >>> iCps cpsmidi ;read in midi pitch in
> >>> cycles-per-second
> >>> iAmp ampmidi 1; read in note velocity - re-range
> >>> to be from 0 to 1
> >>> kPortTime linseg 0,0.001,0.01; create a value that
> >>> quickly ramps up to 0.01
> >>> kVol2 portk gkfreq, kPortTime; create a new
> >>> version of kVol that has been filtered (smoothed) using portk
> >>> aVol interp kVol2; create an a-rate version of
> >>> kVol. Use intepolation to smooth this signal even further
> >>> aEnv madsr 0.1,0.2,.5,0.01
> >>> aSig poscil iAmp*aVol*aEnv , iCps, giSine
> >>> outs aSig, aSig
> >>> endin
> >>>
> >>>
> >>>
> >>> ;Let play both instruments
> >>> i 1 0 3600
> >>> i 2 0 3600
> >>>
> >>>
> >>>
> >>> ___________________________________________________________________________________________________
> >>>
> >>> END CODE
> >>>
> >>> If I choose a bigger ksmps it doesnt clip while I move a knob it
> >>> looks slower (kind of with lower resolution) and it sounds ok, but
> >>> when I choose a little ksmps, the sound starts to "clip" (I think it
> >>> is that) but it looks nice while I move it.
> >>> It is possible to achieve have good resolution of movement of the
> >>> knob and at the same time have good sound?
> >>>
> >>> Is there better a way to achieve this?
> >>> Am I doing something wrong?
> >>>
> >>> Maybe you can give a better way to approach this.
> >>> Thank you.
> >>>
> >>> Csound mailing list
> >>> Csound@listserv.heanet.ie
> >>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> >>> Send bugs reports to
> >>> https://github.com/csound/csound/issues
> >>> Discussions of bugs and features can be posted here
> >> Csound mailing list
> >> Csound@listserv.heanet.ie
> >> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> >> Send bugs reports to
> >> https://github.com/csound/csound/issues
> >> Discussions of bugs and features can be posted here
> >
> > Csound mailing list
> > Csound@listserv.heanet.ie
> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> > Send bugs reports to
> > https://github.com/csound/csound/issues
> > Discussions of bugs and features can be posted here
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |