FLmenu?
Date | 2007-10-24 14:18 |
From | Lou Cohen |
Subject | FLmenu? |
I’m considering implementing a new GUI for my csound improvisation orchestra. I’m impressed by the FLxxx series of opcodes and in my tentative experiments they behave well. One GUI object that I would have expected to see, however, seems to be missing: a menu. What I mean is a kind of popup menu in which the current selection appears in somewhere in the body of a panel. The user clicks on it, and set of text-identified choices appears. When one of them is selected, the menu outputs a value that tells the csound orchestra which menu item was selected (or is currently selected.) I’m reading documentation for 5.04, and I’m wondering whether the FL opcodes might have been extended after this version. Or perhaps there’s another way to implement such a menu? As always, thanks in advance for your help! -Lou Cohen --------------------------- Permanent email: loucohen@jolc.net Music and video: http://ruccas.org/wiki.pl/Lou_Cohen More music and video: http://www.youtube.com/loucohen Astronomy: http://www.jolc.net ---------------------------- |
Date | 2007-10-24 14:52 |
From | Rory Walsh |
Subject | Re: FLmenu? |
I'm not sure if this exists. From what I can tell fltk has not really been updated in quite a while. A lot of people who required GUI's these days seem to build them themselves using their preferred GUI toolkit and then link to Csound using the API. More and more people seem to be using Python for this as it is pretty easy to learn. In fact I would imagine that after learning Csound Python should not prove difficult at all. Finally, if you are working on windows Lettuce has a menu object you can use. Lettuce GUI components are different than fltk opcodes as they use the channel software bus to communicate with Csound. They're are some simple examples of the menu item in the installation directory. Note that to implement the menu you have to hard code it rather than drop it onto a GUI frame. The latest unreleased version of lettuce is available here: http://rorywalsh.ear.ie/Lettuce32Setup.exe The reason why this version hasn't been publically released is that I don't have time to support it! Rory. p.s. if you want cross-platform-ness use fltk! Lou Cohen wrote: > Hi, everyone, > > I’m considering implementing a new GUI for my csound improvisation > orchestra. > > I’m impressed by the FLxxx series of opcodes and in my tentative > experiments they behave well. One GUI object that I would have expected > to see, however, seems to be missing: a menu. What I mean is a kind of > popup menu in which the current selection appears in somewhere in the > body of a panel. The user clicks on it, and set of text-identified > choices appears. When one of them is selected, the menu outputs a value > that tells the csound orchestra which menu item was selected (or is > currently selected.) > > I’m reading documentation for 5.04, and I’m wondering whether the FL > opcodes might have been extended after this version. > > Or perhaps there’s another way to implement such a menu? > > As always, thanks in advance for your help! > > -Lou Cohen > > --------------------------- > Permanent email: loucohen@jolc.net > Music and video: http://ruccas.org/wiki.pl/Lou_Cohen > More music and video: http://www.youtube.com/loucohen > Astronomy: http://www.jolc.net > ---------------------------- > |
Date | 2007-10-24 23:19 |
From | "Oeyvind Brandtsegg" |
Subject | Re: FLmenu? |
Attachments | None |
Date | 2007-10-25 01:09 |
From | Lou Cohen |
Subject | Re: FLmenu? |
Having been burnt on other (non-csound) projects, my goal is stay with cross-platform tools as much as possible. So it would seem that fltk should be the way for me. Despite the lack of menus, there are many strengths to the widgets, including the ability for the user to modify sliders with arrow keys. And I like the idea of all the code being in the orchestra, not spread across more than one IDE. BTW, I am working on OSX, so Lettuce does not appear to be an option. I have been using MacCsound, but I’m contemplating upgrading to an intel Mac. As far as I can tell, I won’t be able to use MacCsound on an intel Mac, so it seems to be time to move the GUI implementation to a platform-independent base. cheers! -Lou On 10/24/07 18:19, "Oeyvind Brandtsegg " <obrandts@gmail.com> wrote: I agree to the suggestions about Python/GUI, using Lettuce, and about --------------------------- Permanent email: loucohen@jolc.net Music and video: http://ruccas.org/wiki.pl/Lou_Cohen More music and video: http://www.youtube.com/loucohen Astronomy: http://www.jolc.net ---------------------------- |
Date | 2007-10-25 01:19 |
From | Rory Walsh |
Subject | Re: FLmenu? |
MacCsound is available on Intel Mac's afaik but cross-platform GUI's are great so if you don't feel like learning python or another GUI toolkit go ahead with fltk. Iain McCurdy has posted a load of great fltk instruments at http://iainmccurdy.org, perhaps they can give you more ideas. All the best. Rory. Lou Cohen wrote: > Thanks for your replies, Oeyvind and Rory. > > Having been burnt on other (non-csound) projects, my goal is stay with > cross-platform tools as much as possible. > > So it would seem that fltk should be the way for me. Despite the lack of > menus, there are many strengths to the widgets, including the ability > for the user to modify sliders with arrow keys. And I like the idea of > all the code being in the orchestra, not spread across more than one IDE. > > BTW, I am working on OSX, so Lettuce does not appear to be an option. I > have been using MacCsound, but I’m contemplating upgrading to an intel > Mac. As far as I can tell, I won’t be able to use MacCsound on an intel > Mac, so it seems to be time to move the GUI implementation to a > platform-independent base. > > cheers! > > -Lou > > > On 10/24/07 18:19, "Oeyvind Brandtsegg " |
Date | 2007-10-25 18:10 |
From | Anthony Kozar |
Subject | Re: FLmenu? |
MacCsound is still only available as a PowerPC binary. However, you can usually run PPC binaries just fine on an Intel Mac due to Rosetta. The important thing to take into account is that you must install a PPC version of Csound, not the Intel version. Someone did recently report having trouble with MacCsound on an Intel Mac (something about Csound not loading plugins), but I don't think it was clear whether this was a universal issue. Personally, I have to disagree with the many suggestions to implement a GUI in C++ or Python. If you are used to MacCsound's GUI widgets and just want something similar that gives you the option to move to other platforms, then using the FLTK opcodes is the obvious choice. They are a bit clunkier to use since you have to write code to create and position them (i.e. more experimentation to get the layout you want), but the results will be comparible. Writing a host application on the other hand and trying to mix Csound with an FLTK interface in C++ or some other toolkit has seemed like a tricky project from the many questions and problems posted to the lists. I have not tried it, and perhaps some of the stickier issues have been solved now, but it always seemed like there were issues with threading or GUI toolkits conflicting, etc. I am not saying that this route should be avoided completely, just that I think the learning curve is much steeper than others have estimated. Anthony Kozar Providing custom open-source software services for musicians: http://services.anthonykozar.net/ Rory Walsh wrote on 10/24/07 8:19 PM: > MacCsound is available on Intel Mac's afaik but cross-platform GUI's are > great so if you don't feel like learning python or another GUI toolkit > go ahead with fltk. > Lou Cohen wrote: >> So it would seem that fltk should be the way for me. Despite the lack of >> menus, there are many strengths to the widgets, including the ability >> for the user to modify sliders with arrow keys. And I like the idea of >> all the code being in the orchestra, not spread across more than one IDE. |
Date | 2007-10-25 20:41 |
From | Lou Cohen |
Subject | Re: FLmenu? |
I think a lot has to do with the tools each person is already familiar with. I was a software engineer during a period where everything was done in machine language, and I never worked in C or C++. In recent years I picked a language to work with that would be around for a long time and platform independent (as much as possible) -- Java. I use it for generating score files, which is really dealing with Csound at arm’s length. But I haven’t been able to figure out how to access the Csound API from Java, probably because I have no familiarity with C. At my age, and with other things in life to spend time on besides hacking code. After getting comfortable with Java, I’m not willing or able to climb new learning curves if I can avoid them, not even the Python curve. I think I’ve learned a lot about Csound as a programming language, and figuring out the FL opcodes has been a simple step, since the syntax is the same as everything else in Csound. I like the idea of writing code for each GUI widget; it gives me very fine control of their sizes and placement. So my personal choice is in line with Anthony’s note, just use FLTK opcodes. Once again, this community has been extremely helpful to me, and has allowed me to make an informed decision about how to take my next step. Thanks! -Lou On 10/25/07 13:10, " Anthony Kozar" <anthonykozar@sbcglobal.net> wrote: MacCsound is still only available as a PowerPC binary. However, you can --------------------------- Permanent email: loucohen@jolc.net Music and video: http://ruccas.org/wiki.pl/Lou_Cohen More music and video: http://www.youtube.com/loucohen Astronomy: http://www.jolc.net ---------------------------- |
Date | 2007-10-26 18:38 |
From | Iain McCurdy |
Subject | Re: FLmenu? |
Sorry for the late reply to the initial question. A workaround for a drop down menu functionality is to use the FL button bank and conditional interrogation in the instrument to determine the outcome. Below a simple example. <CsoundSynthesizer> <CsOptions> -odevaudio -B4096 </CsOptions> <CsInstruments> sr = 44100 kr = 44100 ksmps = 1 nchnls = 2 FLpanel " ",200, 200 ;LABELS MADE INVISIBLE FLlabel 13, 1, 1, 190, 190,190 gktype,ih FLbutBank 4, 1, 3, 25, 75, 25, 25, -1 ;LABELS MADE VISIBLE AGAIN FLlabel 13, 5, 4, 0, 0, 0 ih FLbox "sine ", 1, 1, 12, 20, 30, 50, 23 ih FLbox "saw ", 1, 1, 12, 20, 30, 50, 48 ih FLbox "noise", 1, 1, 12, 20, 30, 50, 73 FLpanel_end FLrun gisine ftgen 1,0,131072,10,1 instr 1 asine oscil 10000,200,gisine asaw vco 10000,200, 1, 0 anoise pinkish 10000 if gktype==0 then a1 = asine elseif gktype==1 then a1 = asaw elseif gktype==2 then a1 = anoise endif outs a1,a1 endin </CsInstruments> <CsScore> i 1 .001 3600 </CsScore> </CsoundSynthesizer>
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now! |
Date | 2007-10-28 13:17 |
From | Lou Cohen |
Subject | Re: FLmenu? |
Many thanks for the this helpful idea. The orchestra I’m modifying is quite large (about 2700 lines of code), and it will take a while before I'm at the stage where I can use your suggestion, but I’ll let you know when I get there. -Lou On 10/26/07 13:38, " Iain McCurdy" <i_mccurdy@hotmail.com> wrote: Sorry for the late reply to the initial question. --------------------------- Permanent email: loucohen@jolc.net Music and video: http://ruccas.org/wiki.pl/Lou_Cohen More music and video: http://www.youtube.com/loucohen Astronomy: http://www.jolc.net ---------------------------- |