Cabbage Logo
Back to Cabbage Site

Basic info about FLTK

What’s it all about with FLTK?

Whenever I try running any .csd files that make use of any FLTK-widget-opcodes I get errors like:

error: syntax error, unexpected STRING_TOKEN  (token """)
 from file G:\file.csd (1), line 51:
 >>>   <<<
Unexpected untyped word FLpanel when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure
cannot compile orchestra
end of score.

(I tried at least 5 different .csd files that use FLTK widgets, the error is always thrown on the very first line a FLTK-opcode is placed. Are the opcodes missing?)

  • I tried the csound version installed with cabbage and the one from csound.com’s download section ( 64bit Binaries v6.17.0 )
  • Is it still supported in the current csound version (6.17)?
  • I’m working under Windows 10.
  • Does it take any additional installation? A custom build maybe?
  • Should it work “out of the box”?

I read all I could find about it in the manual and google searching, not finding much about FLTK at all really.

It’s really not that I intend to use FLTK to build GUI, it’s only that several csound examples found on the internet use them (like some from Iain McCurdy’s marvellous catalog or ones that get shared here on the forum) and I would really love to run them when studying them :slight_smile:

Thank you in advance for any hints!

Kind regards,
Stefan Mayer

FLTK is no long part of the main Csound package. It was becoming a nightmare to maintain for the core devs. The simplest way to experiment with FLTK is to install an older version of Csound, maybe 6.15 or something like that. Before that however, you can try this package:


I can’t remember if I included the FLTK stuff in the windows installer. But check it out. I can’t guarantee good results, but it’s worth trying at least.

hi @rorywalsh
that explains a lot - and definitely deserves a mention in the manual, no? I’d volunteer. I have (basic) experience with versioning tools etc. :smile:

however, I didn’t get it working with older 6.x versions, also tried a 5 something version, no luck. I downloaded the windows .zip-packages from github. Could it be that I have to take even earlier versions? Are the packed binaries maybe generally different from the installer versions? I’ll try out some more tomorrow.

I also installed the plugins with the installer you mentioned, also no luck. I still have to find out where I can set / change the environment variables for csound (like the mentioned CS_USER_PLUGINDIR), didn’t have time for that today.

Did I understand it correctly, you’re not only THE driving force behind cabbage but you also take care of the csound code repo, building the release assets, installers and such?

In any case, thank you, once again, for your tireless efforts here on the forum. I wouldn’t have gotten so far without your help!

Kind regards,
stefan

That plugin opcodes should work with version 6.15 as far as I recall. What you can do is simply install them to someplace, and then copy the ones you want to place them into the Csound_x64 plugins folder. Csound will find them then on startup. (should find them…)

Oh God no! I merely help out when I can with Csound. A bit here or there, but nothing in comparison to the other developers.

I like the FLTK stuff, it’s really easy to make ui’s with it.
On my latest ubuntu linux (20.04) FLTK worked straight out of the box in csound (apt-get install csound)
I’ve also just build/installed csound 6.17 on my older ubuntu 18.04 linuxmachine.

Afterwards I cloned the plugins-repo (linked above) and executed:

$ cd plugins
$ mkdir build
$ cd build
$ cmake -DUSE_FLTK=ON ..
$ sudo make install
$ csound ../ianmcurdy/FLKnob.csd

Voila it runs…csound detected this plugin, and therefore the FL* opcodes.
The good thing about FLTK (1.1) is that it’s easy to compile, so there’s not much to maintain.
And yes, it makes total sense to let the community maintain these plugins.

ps. it’s not a crazy idea to put an .appveyor.yml in the plugins-repo and have it build all these plugins for mac/windows/linux-users.

The FLTK opcodes can’t run any more on Mac.

It would only be relevant for Windows and Linux, but yah, so CI builds would be useful.

hm sad to see FLTK not working on mac.
Perhaps the mcurdy examples could some day be wrapped into #ifdef FLTK blocks, like csound for android supports:

btw is cabbage the defacto way these days to hint sliders & buttons inside .csd to frontends?
Does csound android scan for variables starting with ‘gk’?
diaclaimer: i don’t know a lot about cabbage

No, there is no defacto standard.

I have no idea, although I use Csound on Android quite a lot, I’ve used that frontend.

That’s Ok :slight_smile:

Interesting. I am on Mac and just gave the FL* opcodes a shot. Worked out of the box (brew install csound) without the plugins. I used CSoundQt, but the resulting window runs outside of Qt…

Interesting. I never tried but was basing my comment on this github issue.

From reading that thread I guess the issue is not so much that it won’t run on Mac, but the fact that it can lead to horrible performance.

Ah, ok, that makes sense. I did not get that deep into it.