Thanks Steven for giving it a go - I'm going to try to use the Csound API instead and limit my py-opcode use to pyassign, ala the WxController.py example. Anyone else tried something like this? b On 5/16/06, Steven Yi wrote: > Hi Ben, > > Just gave it a go and didn't get so far. I had to modify the CSD to > even get Csound to compile (I'm assumed it's reduced from something > else you were working on) and beyond that, just got a seg fault too. > Running in gdb, I get: > > Program received signal SIGSEGV, Segmentation fault. > 0x7c918fea in libsndfile_1_dll_iname () > (gdb) bt > #0 0x7c918fea in libsndfile_1_dll_iname () > #1 0x7c36b417 in libsndfile_1_dll_iname () > #2 0x7c90104b in libsndfile_1_dll_iname () > #3 0x1e0a73ce in libsndfile_1_dll_iname () > #4 0xe87c3822 in ?? () > #5 0x00b5d220 in ?? () > (gdb) Cannot access memory at address 0xb5d220 > > I'm not sure what's going on here though, and since I'm not compiled > with debug on, can't be more helpful than that. > > Anyone else with ideas? > > steven > > > On 5/15/06, Ben McAllister wrote: > > Did this go through last time? It wasn't reflected back to me from the list: > > > > ---------- Forwarded message ---------- > > From: Ben McAllister > > Date: May 11, 2006 4:05 PM > > Subject: pyexec > > To: csound@lists.bath.ac.uk > > > > > > Hi Folks - > > > > I'm seeing a seg fault when I try to use a gui written in Python, > > launching it via pyexeci in te global section of my orch. My shell > > output, csd, and py source are pasted below. > > > > I launch the .py containing a simple gui with the pyexeci opcode (see > > below). The catch (possibly) is that I'm using pyFltk, a python > > wrapper for fltk. > > > > I've got FLTK 1.1.7 on my machine, which is running Winxp pro on an > > 2GHz Intel Pentium M. > > > > One assumption I have, is I should be able to access the global vars > > here via pyassign. True? If anyone can straighten me out as to what > > I'm doing wrong, I'd appreciate it. > > > > Thanks so much - Ben > > http://www.listenfaster.com > > > > --------------------------------------- > > Complete Shell output: > > Localisation of messages is disabled, using default language. > > time resolution is 279.365 ns > > PortMIDI real time MIDI plugin for Csound > > WARNING: 'c:\csound5\plugins\portaudio.dll' is not a Csound plugin library > > PortAudio real-time audio module for Csound > > Windows MME real time audio and MIDI module for Csound by Istvan Varga > > 0dBFS level = 32768.0 > > Csound version 5.02.0 beta (float samples) Apr 9 2006 > > libsndfile-1.0.15 > > UnifiedCSD: pytest2.csd > > STARTING FILE > > Creating orchestra > > Creating score > > orchname: C:\DOCUME~1\benm\LOCALS~1\Temp\cs9.orc > > scorename: C:\DOCUME~1\benm\LOCALS~1\Temp\cs10.sco > > rtaudio: PortAudio module enabled ... using callback interface > > rtmidi: PortMIDI module enabled > > orch compiler: > > 9 lines read > > instr 1 > > Elapsed time at end of orchestra compile: real: 0.035s, CPU: 0.031s > > sorting score ... > > ... done > > Elapsed time at end of score sort: real: 0.038s, CPU: 0.031s > > Csound version 5.02.0 beta (float samples) Apr 9 2006 > > displays suppressed > > 0dBFS level = 32768.0 > > Csound tidy up: Segmentation violation > > inactive allocs returned to freespace > > end of score. overall amps: 0.0 > > overall samples out of range: 0 > > 0 errors in performance > > > > ---------------------------------------- > > > > ---------------------------------------- > > My csd: > > > > > > sr=44100 > > kr=4410 > > ksmps=10 > > nchnls=1 > > pyinit > > pyexeci "dial.py" > > instr 1 > > pyassign "aDial.value", kvalue > > oscili 10000, kvalue, 1 > > endin > > > > > > f 1 0 16384 9 1 1 0 > > i1 0 3600 > > e > > > > > > > > ---------------------------------------- > > dial.py: > > from fltk import * > > # global object names > > aDial = None # type 'Fl_Dial' from '()' > > aText = None # type 'Fl_Line_Dial' from '()' > > > > def dialChanged(dial): > > aDial.value(dial.value()) # code > > aText.value(dial.value()*800) # code > > > > def main(): > > global aDial > > global aText > > o_1_0 = Fl_Window(550, 247, 269, 116) > > o_1_0.pyChildren=[] > > > > aDial = Fl_Dial(20, 15, 45, 45, "Dial") > > aDial.pyChildren=[] > > aDial.label('Dial') > > aDial.callback(dialChanged) > > o_1_0.pyChildren.append(aDial) > > > > aText = Fl_Value_Output(190, 15, 45, 45, "freq") > > aText.pyChildren=[] > > aText.label('Freq') > > aText.value(10) > > o_1_0.pyChildren.append(aText) > > > > o_1_0.color(215) > > o_1_0.end() > > return o_1_0 > > > > if __name__=='__main__': > > import sys > > window = main() > > window.show(len(sys.argv), sys.argv) > > Fl.run() > > -- > > Send bugs reports to this list. > > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk > > > -- > Send bugs reports to this list. > To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk >