How to use String filenames, filelen and diskin2 with OSC?
Date | 2016-01-22 15:33 |
From | Anton Kholomiov |
Subject | How to use String filenames, filelen and diskin2 with OSC? |
Attachments | flow.csd test_flow.py |
I'm trying to write an OSC-server with Csound.
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
The service should receive the name of the wav-file and the length of crossfade. On receive it should stop playing any previous wavs and start a loop that plays next wav file. The two loops should crossfade. While trying to write such a thing I'm getting into trouble with receiving String message with OSC. I receive a string-field then assign it to a global String var. But when I try to use it with diskin2 or filelen I get INIT errors like this INIT ERROR in instr 100: diskinfo cannot open ilen filelen gSFile 1 What can be wrong with my code? I attach the two files. csd with server and python with client to test the server. The python uses pyOSC library Thanks, Anton |
Date | 2016-01-22 15:45 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
String assignment is i-time only. Use strcpyk gSFile strcpyk SFile ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 22 Jan 2016, at 15:33, Anton Kholomiov |
Date | 2016-01-22 15:52 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Thank you for clarification. It was a blind spot for me is S behaves like I or like K. So the assignment operation works only at init time and for k-rate we should use strcpyk. Anton 2016-01-22 18:45 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: String assignment is i-time only. Use strcpyk |
Date | 2016-01-22 15:56 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Strings are updated generally at i-time, but with special provisions for perf-time. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 22 Jan 2016, at 15:52, Anton Kholomiov |
Date | 2016-01-23 21:54 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Attachments | flow.csd test_flow.py |
It's done. Just in case if anyone interested in the end result. I post a code for service. It can play continuously wav files on several channels. Channels are identified by numbers. User can for the given channel * start playing a wav file in the loop. The wav files are played with xfade at the ends so that user percieves it like a continuous flow. * stop playing a file * resume playback * set the volume for the given channel * set a global fade in/out time Also there is a python file that makes it easy to trigger the service from the code. There are some test remnants of file names you can substitute it with your own files. This combo of OSC service and python client makes it easy to livecode with python. Anton 2016-01-22 18:56 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: Strings are updated generally at i-time, but with special provisions for perf-time. |
Date | 2016-01-23 21:55 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Unfortunately after several minutes of playing the service breaks
Any ideas? 2016-01-24 0:54 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 22:06 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Can you run it under a debugger?
|
Date | 2016-01-23 22:07 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
How to do it? 2016-01-24 1:06 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
|
Date | 2016-01-23 22:20 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Use gdb. Are you using the csound command? Do gdb csound, then use the run command with the arguments you need eg run mycsd.csd when it crashes you can try using the backtrace command to show where it stopped. On 23 Jan 2016, at 22:07, Anton Kholomiov <anton.kholomiov@GMAIL.COM> wrote:
|
Date | 2016-01-23 22:24 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Thanks for the quick reply, Victor. I'll report back if I encounter the problem again! Though I'm not that good with gdb 2016-01-24 1:20 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
|
Date | 2016-01-23 22:32 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Here is message from gdb:
2016-01-24 1:24 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 22:33 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
The last message I've sent was to set the volume on channel. It assigns a value to the cell of global array. 2016-01-24 1:32 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 22:36 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Here I'm reading the same file with diskin2 in the two instances of the same instrument. It's triggered with fractional numbers. 80.001 and 80.005 2016-01-24 1:33 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 22:58 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
And another message:
2016-01-24 1:36 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 22:59 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Can you post the Csound code? I see no global arrays in your earlier flow.csd ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 22:36, Anton Kholomiov |
Date | 2016-01-23 23:00 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Here is the code ~~~ <CsoundSynthesizer> <CsOptions> -odac -d </CsOptions> <CsInstruments> sr = 44100 ksmps = 64 nchnls = 2 0dbfs = 1 #ifndef PORT #define PORT # 7700 # #end #ifndef SIZE #define SIZE # 8 # #end gkVolume init 1 gSFile init "" gSFiles[] init $SIZE gkVolumes[] init $SIZE gaL init 0 gaR init 0 gihandle OSCinit $PORT gkFadeTime init 1 opcode FracInstr, k, ik iInstrNum, kChannel xin kres = iInstrNum + ((kChannel + 1) / 1000) xout kres endop instr PlayMsg SFile = "" kVolume init 0 kChannel init 0 kk init 0 nxtmsg: kk OSClisten gihandle, "/play", "is", kChannel, SFile if (kk == 0 || kChannel >= $SIZE) goto ex kSched FracInstr 100, kChannel kRun FracInstr 80, kChannel printk 0,kSched printk 0,kRun turnoff2 kSched, 4, 0 turnoff2 kRun, 4, gkFadeTime gSFiles[kChannel] strcpyk SFile event "i", kSched, 0, -1, kChannel kgoto nxtmsg ex: endin instr StopMsg kChannel init 0 kk init 0 nxtmsg: kk OSClisten gihandle, "/stop", "i", kChannel if (kk == 0 || kChannel >= $SIZE) goto ex kSched FracInstr 100, kChannel kRun FracInstr 80, kChannel turnoff2 kSched, 4, 0 turnoff2 kRun, 4, gkFadeTime kgoto nxtmsg ex: endin instr ResumeMsg kChannel init 0 kk init 0 nxtmsg: kk OSClisten gihandle, "/resume", "i", kChannel if (kk == 0 || kChannel >= $SIZE) goto ex kSched FracInstr 100, kChannel kRun FracInstr 80, kChannel turnoff2 kSched, 4, 0 turnoff2 kRun, 4, gkFadeTime event "i", kSched, 0, -1, kChannel kgoto nxtmsg ex: endin instr SetVolMsg kVolume init 0 kChannel init 0 kk init 0 nxtmsg: kk OSClisten gihandle, "/set_volume", "if", kChannel, kVolume if (kk == 0 || kChannel >= $SIZE) goto ex gkVolumes[kChannel] = kVolume kgoto nxtmsg ex: endin instr SetFadeMsg kFade init 0 kk init 0 nxtmsg: kk OSClisten gihandle, "/set_fade", "f", kFade if (kk == 0) goto ex gkFadeTime = kFade kgoto nxtmsg ex: endin instr 80 print p1 idur = p3 iFadeTime = i(gkFadeTime) iChannel = p4 ichan filenchnls gSFiles[iChannel] if (ichan == 1) then al diskin2 gSFiles[iChannel], 1 ar = al else al, ar diskin2 gSFiles[iChannel], 1 endif kenv linsegr 0, iFadeTime, 1, idur - 2 * iFadeTime, 1, iFadeTime, 0, iFadeTime, 0 kvol port gkVolumes[iChannel], 0.05 gaL = gaL + kenv * kvol * al gaR = gaR + kenv * kvol * ar endin instr 100 iChannel = p4 iFadeTime = i(gkFadeTime) ilen filelen gSFiles[iChannel] km metro (1 / (ilen - iFadeTime)) kRun FracInstr 80, iChannel if (km == 1) then event "i", kRun, 0, ilen, iChannel endif endin instr 110 outs gaL, gaR gaL = 0 gaR = 0 endin instr Init kCount = 0 until (kCount == lenarray(gkVolumes)) do gkVolumes[kCount] = 1 kCount = kCount + 1 od endin </CsInstruments> <CsScore> f0 1000000 i "Init" 0 0.01 i "PlayMsg" 0 -1 i "SetVolMsg" 0 -1 i "SetFadeMsg" 0 -1 i "StopMsg" 0 -1 i "ResumeMsg" 0 -1 i 110 0 -1 e </CsScore> </CsoundSynthesizer> ~~~ 2016-01-24 1:59 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: Can you post the Csound code? I see no global arrays in your earlier flow.csd |
Date | 2016-01-23 23:02 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
If you are building Csound, you should set theCMAKE_BUILD_TYPE to Debug so we can see better diagnostics. Otherwise you could post your CSD here and give me instructions on how it crashes. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 22:58, Anton Kholomiov |
Date | 2016-01-23 23:06 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Could you try this again, but now commenting out the array assignment? If it does not crash, then that’s the problem. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 22:33, Anton Kholomiov |
Date | 2016-01-23 23:09 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Attachments | flow.csd test_flow.py |
I'm sorry I don't know how to build csound. There are two files. One flow.csd with osc-server. and second one is test_flow.py with client. The py-file makes it easy to test the csound file. You can just run > csound flow.csd It will start the OSC-listener on the prort 7700 with 8 channels. Then you can start to send messages with python: > python > from test_flow import * > c = Flow(7700, 8) > c.play(0, wav_file_name) > c.play(1, another_wav_file_name) > c.set_volume(0, 0.2) > c.stop(0) ..etc.. 2016-01-24 2:02 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: If you are building Csound, you should set theCMAKE_BUILD_TYPE to Debug so we can see |
Date | 2016-01-23 23:09 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Which array assignment should I comment out? 2016-01-24 2:09 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 23:10 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
A couple of things that may (or may not) be useful: 1. This post discusses the victim error message: http://stackoverflow.com/questions/9123064/int-malloc-assertion-error 2. There is an i-time if-then used that wraps perf-time code (the diskin's). Could you try: ichan filenchnls gSFiles[iChannel] kchan init ichan if (kchan == 1) then On Sat, Jan 23, 2016 at 6:00 PM, Anton Kholomiov |
Date | 2016-01-23 23:16 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Steven Then I get Maybe it's better to create two separate instruments for mono and stereo diskins ~~~ INIT ERROR in instr 80: diskin2: number of output args inconsistent with number of file channels ~~~ 2016-01-24 2:10 GMT+03:00 Steven Yi <stevenyi@gmail.com>: A couple of things that may (or may not) be useful: |
Date | 2016-01-23 23:17 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
The one with the volume message. btw I’ve run your code here with no crashes so far. Does it take long to crash? I’ve used play and set_volume messages. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:09, Anton Kholomiov |
Date | 2016-01-23 23:20 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Victor It takes some time to make it crash. Thank you for the help I'll try it tomorrow. Do you mean the assignment in the Init instrument or in the Osc message instrument SetVolMsg? 2016-01-24 2:16 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-23 23:23 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Interesting, that's the opposite of what I was expecting. I guess I need to review what's happening there. I had thought that maybe both diskin's were getting used somehow in the i-rate if-then. Anyways, can cross that idea off. Trying separate instruments for mono and stereo could be interesting to have more information. On Sat, Jan 23, 2016 at 6:16 PM, Anton Kholomiov |
Date | 2016-01-23 23:23 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I think the if-then gets translated into an i & perf time check (cggoto). But I am thinking here the crash might be to do with accessing arrays out of bounds. I can’t reproduce it though. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:10, Steven Yi |
Date | 2016-01-23 23:25 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
There have to be no out of bounds array assignment. Since I check the messages for being in the right interval. 2016-01-24 2:23 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: I think the if-then gets translated into an i & perf time check (cggoto). |
Date | 2016-01-23 23:28 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I mean in the instrument that receives the set_volume message (if that is how you made it crash), ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:20, Anton Kholomiov |
Date | 2016-01-23 23:28 |
From | jpff |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Double frees are best identified in valgrind rather than gdb ==John ff On Sun, 24 Jan 2016, Anton Kholomiov wrote: > There have to be no out of bounds array assignment. Since I check the messages > for being in the right interval. > > 2016-01-24 2:23 GMT+03:00 Victor Lazzarini |
Date | 2016-01-23 23:30 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I think if i-expr then => cggoto if k-expr then => ckgoto That’s why the second does not work. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:23, Steven Yi |
Date | 2016-01-23 23:30 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Oh know it's not related. It can happen after any message. It can happen without any message being sent It takes 5 to 15 minute to crash but time can pass quicker if you have good samples ) 2016-01-24 2:28 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: I mean in the instrument that receives the set_volume message (if that is how you made it crash), |
Date | 2016-01-23 23:33 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
It does not check if it is below 0. (but Csound does. I get a warning if I sent a negative channel). ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:25, Anton Kholomiov |
Date | 2016-01-23 23:37 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Well, I have been running for longer than that. Still playing. And I am sending messages. What version of Csound are you using? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:30, Anton Kholomiov |
Date | 2016-01-23 23:38 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
One other off-chance possibility, I noticed the libsndfile in the trace is in: /usr/lib/x86_64-linux-gnu/libsndfile.so.1 but csound is in: /usr/lib/libcsound64.so.6.0 Any chance one could be 32-bit (i686) and the other 64-bit (x86_64)? I'm not sure if that'd even runtime link... What version of libsndfile and csound are being used? On Sat, Jan 23, 2016 at 6:33 PM, Victor Lazzarini |
Date | 2016-01-23 23:38 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
It's Csound version 6.03.2 2016-01-24 2:37 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: Well, I have been running for longer than that. Still playing. And I am sending messages. |
Date | 2016-01-23 23:41 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
The csound is 6.03.2. How can I find out the version of libsndfile? 2016-01-24 2:38 GMT+03:00 Steven Yi <stevenyi@gmail.com>: One other off-chance possibility, I noticed the libsndfile in the trace is in: |
Date | 2016-01-23 23:43 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Well, that’s old. It will be hard for us to assess if there is a problem with the current code. For what’s worth, I’ve been running your CSD for about half an hour with no issues. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:38, Anton Kholomiov |
Date | 2016-01-23 23:45 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Thanks for your patience with me. I think I need to find out how to build the csound... Anton 2016-01-24 2:43 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: Well, that’s old. It will be hard for us to assess if there is a problem with the current code. For what’s worth, I’ve been running your |
Date | 2016-01-23 23:51 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
https://github.com/csound/csound/blob/develop/BUILD.md ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 Jan 2016, at 23:45, Anton Kholomiov |
Date | 2016-01-24 00:30 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Csound should report the version of libsndfile, for example on my system: $ csound --help virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 6.07 (double samples) Jan 19 2016 libsndfile-1.0.25-exp As Victor mentioned, 6.03.2 is a bit old and using a newer version would help eliminate some possibilities. On Sat, Jan 23, 2016 at 6:41 PM, Anton Kholomiov |
Date | 2016-01-24 08:06 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
2016-01-24 3:30 GMT+03:00 Steven Yi <stevenyi@gmail.com>: Csound should report the version of libsndfile, for example on my system: |
Date | 2016-01-24 08:10 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Attachments | config-log.txt |
@ Victor I've got as far as ~~~ [ 79%] Building C object CMakeFiles/csound64.dir/Engine/cs_par_dispatch.c.o [ 80%] Linking C shared library libcsound64.so [ 80%] Built target csound64 make: *** [all] Error 2 ~~~ I've failed to install libpulse-dev and libjack-dev on my system. It says I have some unmet deps that it fails to install(( My system is Ubuntu 14.04. My config log is in the attachment. 2016-01-24 11:06 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-24 08:11 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Steven It's libsndfile-1.0.25 virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 6.03.2 (double samples) Aug 23 2014 libsndfile-1.0.25 2016-01-24 11:10 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-24 10:20 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
What is the build error? Set verbose mode in Cmake (-DCMAKE_MAKEFILE_VERBOSE=1) to show it if it is not showing.
|
Date | 2016-01-24 15:00 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Alternatively you can use "make VERBOSE=1 -j1". I use this whenever there is an error so that the results are verbose and also the build is single threaded. I find when multithreaded the error message gets intermixed with other messages. On Sun, Jan 24, 2016, 5:20 AM Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2016-01-24 19:50 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
This is what I get with "make VERBOSE=1 -j1" : ~~~ [ 73%] Building CXX object InOut/CMakeFiles/virtual.dir/virtual_keyboard/SliderData.cpp.o cd /home/anton/tools/cs6make/InOut && /usr/bin/c++ -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLINUX -DNO_FLTK_THREADS -DPIPES -DUSE_LRINT -D_CSOUND_RELEASE_ -D_GNU_SOURCE -Dvirtual_EXPORTS -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -fopenmp -fPIC -I/home/anton/tools/csound/./H -I/home/anton/tools/csound/./include -I/home/anton/tools/csound/./Engine -I/home/anton/tools/csound/. -I/home/anton/tools/cs6make -I/home/anton/tools/cs6make/include -I/home/anton/tools/csound/InOut/. -I/usr/local/include -Wno-format -o CMakeFiles/virtual.dir/virtual_keyboard/SliderData.cpp.o -c /home/anton/tools/csound/InOut/virtual_keyboard/SliderData.cpp [ 74%] Linking CXX shared module ../libvirtual.so cd /home/anton/tools/cs6make/InOut && /home/anton/tools/cmake-3.3.0/bin/cmake -E cmake_link_script CMakeFiles/virtual.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -fopenmp -fopenmp -shared -Wl,-soname,libvirtual.so -o ../libvirtual.so CMakeFiles/virtual.dir/virtual_keyboard/FLTKKeyboard.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/FLTKKeyboardWindow.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/FLTKKeyboardWidget.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/virtual_keyboard.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/Bank.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/KeyboardMapping.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/Program.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/SliderBank.cpp.o CMakeFiles/virtual.dir/virtual_keyboard/SliderData.cpp.o -L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXcursor -lXfixes -lXext -lXinerama -lpthread -ldl -lm -lX11 /usr/bin/ld: /usr/local/lib/libfltk.a(Fl.o): relocation R_X86_64_32 against `.bss._ZL13first_timeout' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libfltk.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [libvirtual.so] Error 1 make[2]: Leaving directory `/home/anton/tools/cs6make' make[1]: *** [InOut/CMakeFiles/virtual.dir/all] Error 2 make[1]: Leaving directory `/home/anton/tools/cs6make' make: *** [all] Error 2 ~~~ Anton 2016-01-24 18:00 GMT+03:00 Steven Yi <stevenyi@gmail.com>:
|
Date | 2016-01-24 20:37 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
It’s a problem with the FLTK library in your system. Do you need the FLTK opcodes? If so, rebuild it by adding -fPIC to the build as it says (or just build a shared libfltk, I think that would solve it). Otherwise just disable the build by saying -DUSE_FLTK=0 to Cmake. Regards ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 24 Jan 2016, at 19:50, Anton Kholomiov |
Date | 2016-01-24 21:02 |
From | Guillermo Senna |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Hi Anton, Do you have libfltk1.1-dev installed? On 24/01/16 17:37, Victor Lazzarini wrote: > It’s a problem with the FLTK library in your system. > Do you need the FLTK opcodes? If so, rebuild it by adding -fPIC to the build as it says (or just > build a shared libfltk, I think that would solve it). Otherwise just disable the build by saying > -DUSE_FLTK=0 to Cmake. > > Regards > ======================== > Dr Victor Lazzarini > Dean of Arts, Celtic Studies and Philosophy, > Maynooth University, > Maynooth, Co Kildare, Ireland > Tel: 00 353 7086936 > Fax: 00 353 1 7086952 > >> On 24 Jan 2016, at 19:50, Anton Kholomiov |
Date | 2016-01-25 12:46 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ok, I've built the fltk with --enable-shared. Then make & sudo make install was a success story for csound! Do you know why Csound doesn't want to build Jack opcodes? I've installed jack2 from sources. What can I miss? I suspect that I installed jack headers to /usr/local/include but cmakes searches for headers at /usr/include. Do you know how can I fix it? Anton 2016-01-25 0:02 GMT+03:00 Guillermo Senna <gsenna@gmail.com>: Hi Anton, |
Date | 2016-01-25 12:55 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Unfotunately this doesn't fix the original problem for me. My code breaks even with brand new csound(( I'll try the Steven's hint on init rate diskin2. Though it makes code more complicated. 2016-01-25 15:46 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-25 13:08 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
It works here though. I tested it with no crashes even after 40mins. Are you sure you are running the latest? Have you removed the other version?
|
Date | 2016-01-25 13:30 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Yes I did. Maybe it's something with my distro. I use low-letency linux kernel . Maybe I configured it improperly. Though it was only once that I saw behavior like this with my other csound programs. Th usual behavior for me is to crash at the start. But if csound runs it can run for long time. 2016-01-25 16:08 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
|
Date | 2016-01-25 13:46 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I can't see this problem as a result of low latency kernel. Now that you are building your own, you can set the CMAKE_BUILD_TYPE="Debug" and run it in gdb, so we can get better backtraces
|
Date | 2016-01-25 17:59 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Should I write it like this? : > cmake -DCMAKE_BUILD_TYPE=Debug ../csound 2016-01-25 16:46 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
|
Date | 2016-01-25 18:08 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Here is make trace: ~~~ diskin2: opened '/home/anton/Seashore.wav': 44100 Hz, 2 channel(s), 546731 sample frames i 1 time 220.31819: 100.00100 i 1 time 220.31819: 80.00100 *** Error in `/usr/local/bin/csound': free(): invalid next size (fast): 0x0000000000843840 *** Program received signal SIGABRT, Aborted. 0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff72e20d8 in __GI_abort () at abort.c:89 #2 0x00007ffff731b394 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff7429b28 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007ffff732766e in malloc_printerr (ptr=<optimized out>, str=0x7ffff7429cc8 "free(): invalid next size (fast)", action=1) at malloc.c:4996 #4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840 #5 0x00007ffff78e911f in mfree (csound=0x604040, p=0x843850) at /home/anton/tools/csound/Engine/memalloc.c:172 #6 0x00007ffff78fdd44 in string_copy_value (csound=0x604040, dest=0x8cc1c8, src=0x7b5a70) at /home/anton/tools/csound/Engine/csound_standard_types.c:70 #7 0x00007ffff79cc2d3 in array_get (csound=0x604040, p=0x8d12d0) at /home/anton/tools/csound/Opcodes/arrays.c:264 #8 0x00007ffff7a4e8f5 in kperf_nodebug (csound=0x604040) at /home/anton/tools/csound/Top/csound.c:1552 #9 0x00007ffff7a500a3 in csoundPerform (csound=0x604040) at /home/anton/tools/csound/Top/csound.c:2044 #10 0x000000000040181d in main (argc=2, argv=0x7fffffffd7b8) at /home/anton/tools/csound/frontends/csound/csound_main.c:318 ~~~ 2016-01-25 20:59 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-25 18:11 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I mean **here is my trace My session in ipython to get this error: ~~~ In [1]: from test_flow import * In [2]: c = Flow(7700, 8) In [3]: c.play(0, pad(hams)) In [4]: c.play(1, file_name) In [5]: c.stop(1) In [6]: c.set_volume(1, 0.25) In [7]: In [7]: In [7]: c.play(1, file_name) In [8]: c.play(2, pad(overt)) In [9]: c.stop(0) In [10]: c.resume(0) In [11]: c.play(0, pad(hams)) ~~~ file_name -- some wav files pad(hams) pad(overt) 2016-01-25 21:08 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-25 18:26 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
A shorter script to get the error: ~~~ > python > from test_flow import * > c = Flow(7700, 8) > c.play(0, fileA) > c.play(1, fileB) > c.stop(0) > c.resume(0) > c.play(0, fileA) ~~~ Though error is slightly different: ~~~ Assertion 'p->write.current->type == PA_PSTREAM_ITEM_MEMBLOCK' failed at pulsecore/pstream.c:513, function prepare_next_write_item(). Aborting. Program received signal SIGABRT, Aborted. [Switching to Thread 0x7fffe30ee700 (LWP 9425)] 0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) (gdb) (gdb) bt #0 0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff72e20d8 in __GI_abort () at abort.c:89 #2 0x00007fffe9b08708 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so #3 0x00007fffe9fa6b87 in pa_mainloop_dispatch () from /usr/lib/x86_64-linux-gnu/libpulse.so.0 #4 0x00007fffe9fa6f8c in pa_mainloop_iterate () from /usr/lib/x86_64-linux-gnu/libpulse.so.0 #5 0x00007fffe9fa7030 in pa_mainloop_run () from /usr/lib/x86_64-linux-gnu/libpulse.so.0 #6 0x00007fffe9fb53f6 in ?? () from /usr/lib/x86_64-linux-gnu/libpulse.so.0 #7 0x00007fffe9b18628 in ?? () from /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so #8 0x00007ffff7675182 in start_thread (arg=0x7fffe30ee700) at pthread_create.c:312 #9 0x00007ffff73a247d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 ~~~ 2016-01-25 21:11 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-25 18:34 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
That's different alright. It looks like pulseaudio failing in this one. Are you using pulseaudio? The first backtrace seemed to point to an array read.
|
Date | 2016-01-25 19:02 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I'm not setting any flags. I'm usiing the default for linux. I guess it's alsa. And cmake says I have no pulseaudio support ~~~ -- USE_ALSA is enabled -- PULSEAUDIO_HEADER="", so disabling USE_PULSEAUDIO -- PULSEAUDIO_LIBRARY="PULSEAUDIO_LIBRARY-NOTFOUND", so disabling USE_PULSEAUDIO -- PULSESIMPLE_LIBRARY="PULSESIMPLE_LIBRARY-NOTFOUND", so disabling USE_PULSEAUDIO -- USE_PULSEAUDIO is disabled ~~~ 2016-01-25 21:34 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
|
Date | 2016-01-25 19:09 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ok. As I said, I can't reproduce it, but maybe if any of the developers on Linux can help to track this down.
|
Date | 2016-01-25 19:14 |
From | Anders Genell |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
In almost all flavours of Ubuntu the default audio backend is pulse nowadays, so if you're building csound without pulse that might complicate things... Did you do sudo apt-get build-dep csound at any point? That should install a lot of things useful for building csound including pulse development libraries I believe. Regards, Anders
|
Date | 2016-01-25 19:16 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Unfortunately this step fails for me. I've installed as much packages as I could separately. ~~~ $ sudo apt-get build-dep csound Reading package lists... Done Building dependency tree Reading state information... Done The following packages have unmet dependencies: libpulse-dev : Depends: libpulse0 (= 1:4.0-0ubuntu11.1) but 1:4.0-0ubuntu22 is to be installed Depends: libpulse-mainloop-glib0 (= 1:4.0-0ubuntu11.1) but 1:4.0-0ubuntu22 is to be installed Depends: libavahi-client-dev but it is not going to be installed E: Build-dependencies for csound could not be satisfied. ~~~ 2016-01-25 22:14 GMT+03:00 Anders Genell <anders.genell@gmail.com>:
|
Date | 2016-01-25 19:46 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Maybe Anders can test your code to confirm the problem?
|
Date | 2016-01-25 19:58 |
From | Guillermo Senna |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ubuntu Studio 14.04.3 -> Works! Tested with Csound 6.06; "fox.wav"; both, jack and alsa. On 25/01/16 16:46, Victor Lazzarini
wrote:
|
Date | 2016-01-25 20:04 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Guillermo have you tried a failure scenario? It works for me too but when I send some commands it breaks 2016-01-25 22:58 GMT+03:00 Guillermo Senna <gsenna@gmail.com>:
|
Date | 2016-01-25 20:05 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I've posted it before My session in ipython to get this error: ~~~ In [1]: from test_flow import * In [2]: c = Flow(7700, 8) In [3]: c.play(0, fileA) In [4]: c.play(1, fileB) In [5]: c.stop(1) In [6]: c.set_volume(1, 0.25) In [7]: In [7]: In [7]: c.play(1, fileA) In [8]: c.play(2, fileC) In [9]: c.stop(0) In [10]: c.resume(0) In [11]: c.play(0, fileA) ~~~ 2016-01-25 23:04 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-25 20:05 |
From | Anders Genell |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Oh, yes, you already said so, sorry. Could you try aptitude instead? Sometimes it works better... sudo aptitude build-dep csound Regards, Anders
|
Date | 2016-01-25 20:06 |
From | Anders Genell |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I can try it tomorrow. Regards Anders
|
Date | 2016-01-25 20:25 |
From | jpff |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
That backtrace looks like a double free in string_copy_value where id attempts to delete the space in the dst arument. Really I would love tis run under valgrind or ElectricFence or similar On Mon, 25 Jan 2016, Anton Kholomiov wrote: > Here is make trace: > ~~~ > diskin2: opened '/home/anton/Seashore.wav': > 44100 Hz, 2 channel(s), 546731 sample frames > i 1 time 220.31819: 100.00100 > i 1 time 220.31819: 80.00100 > *** Error in `/usr/local/bin/csound': free(): invalid next size (fast): > 0x0000000000843840 *** > > Program received signal SIGABRT, Aborted. > 0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6) > at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 > 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. > (gdb) bt > #0 0x00007ffff72decc9 in __GI_raise (sig=sig@entry=6) > at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 > #1 0x00007ffff72e20d8 in __GI_abort () at abort.c:89 > #2 0x00007ffff731b394 in __libc_message (do_abort=do_abort@entry=1, > fmt=fmt@entry=0x7ffff7429b28 "*** Error in `%s': %s: 0x%s ***\n") > at ../sysdeps/posix/libc_fatal.c:175 > #3 0x00007ffff732766e in malloc_printerr (ptr= |
Date | 2016-01-25 20:33 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
It's probably caused by the following line in my code: ~~~ gSFiles[kChannel] strcpyk SFile ~~~ Where kChannel and SFile are filled with values that I receive in the OSC message 2016-01-25 23:25 GMT+03:00 jpff <jpff@codemist.co.uk>: That backtrace looks like a double free in string_copy_value where id attempts to delete the space in the dst arument. Really I would love tis run under valgrind or ElectricFence or similar |
Date | 2016-01-25 20:34 |
From | Guillermo Senna |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Got this twice: instr 80: p1 = 80.003 *** Error in `/opt/csound-6.06/bin/csound': corrupted double-linked list: 0x000000000079e100 *** Program received signal SIGABRT, Aborted. 0x00007ffff72f2cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff72f2cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff72f60d8 in __GI_abort () at abort.c:89 #2 0x00007ffff732f394 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff743db28 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007ffff733aac2 in malloc_printerr (ptr= |
Date | 2016-01-25 20:38 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Wow! I'm not alone) someone can reproduce it. 2016-01-25 23:34 GMT+03:00 Guillermo Senna <gsenna@gmail.com>: Got this twice: |
Date | 2016-01-25 20:42 |
From | jpff |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
So error most likely in OSX code readig a string. I may ave time to look, but nit really my area. On Mon, 25 Jan 2016, Anton Kholomiov wrote: > It's probably caused by the following line in my code: > ~~~ > gSFiles[kChannel] strcpyk SFile > ~~~ > > Where kChannel and SFile are filled with values that I receive in the OSC > message > > 2016-01-25 23:25 GMT+03:00 jpff |
Date | 2016-01-25 20:47 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
OSX? It only crashes on Linux. > On 25 Jan 2016, at 20:42, jpff |
Date | 2016-01-25 20:49 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I think it's a typo. It should be: *OSC C and X are really close on keyboard 2016-01-25 23:47 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: OSX? It only crashes on Linux. |
Date | 2016-01-25 20:50 |
From | Guillermo Senna |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
So Anton, would it be too difficult to replace the OSC part with pure time-triggered Csound code? I mean as a way to confirm that the problem has to do with OSC. On 25/01/16 17:42, jpff wrote: > So error most likely in OSX code readig a string. I may ave time to > look, but nit really my area. > > On Mon, 25 Jan 2016, Anton Kholomiov wrote: > >> It's probably caused by the following line in my code: >> ~~~ >> gSFiles[kChannel] strcpyk SFile >> ~~~ >> >> Where kChannel and SFile are filled with values that I receive in >> the OSC >> message >> >> 2016-01-25 23:25 GMT+03:00 jpff |
Date | 2016-01-25 20:58 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Good idea. That will help us narrow it down. > On 25 Jan 2016, at 20:50, Guillermo Senna |
Date | 2016-01-25 20:59 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ok. I'll try to do it with notes. It will take some time to rewrite it this way. I'll report back later 2016-01-25 23:50 GMT+03:00 Guillermo Senna <gsenna@gmail.com>: So Anton, would it be too difficult to replace the OSC part with pure time-triggered Csound code? I mean as a way to confirm that the problem has to do with OSC. |
Date | 2016-01-25 21:02 |
From | jpff |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Found an oddity in OSC receiving strings -- investigating. Also code is weak on tye checking On Mon, 25 Jan 2016, Anton Kholomiov wrote: > It's probably caused by the following line in my code: > ~~~ > gSFiles[kChannel] strcpyk SFile > ~~~ > > Where kChannel and SFile are filled with values that I receive in the OSC > message > > 2016-01-25 23:25 GMT+03:00 jpff |
Date | 2016-01-25 21:16 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I’ve made instruments with notes for messages. It works fine with bad python scenario emulated with score.:
2016-01-26 0:02 GMT+03:00 jpff <jpff@codemist.co.uk>: Found an oddity in OSC receiving strings -- investigating. |
Date | 2016-01-25 21:39 |
From | jpff |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I have pushed a small fix to git in file Opcodes/OSC.c It _might_ fix it. On Mon, 25 Jan 2016, jpff wrote: > Found an oddity in OSC receiving strings -- investigating. > Also code is weak on tye checking > > > On Mon, 25 Jan 2016, Anton Kholomiov wrote: > >> It's probably caused by the following line in my code: >> ~~~ >> gSFiles[kChannel] strcpyk SFile >> ~~~ >> >> Where kChannel and SFile are filled with values that I receive in the OSC >> message >> >> 2016-01-25 23:25 GMT+03:00 jpff |
Date | 2016-01-26 09:05 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
The code with no osc also fails when I wrap it to python interface((( I guess Steven is right. For at least one source of errors. When I comment out conditional code for diskin2 the original bad scenario produces no errors, even with OSC:
2016-01-26 0:39 GMT+03:00 jpff <jpff@codemist.co.uk>: I have pushed a small fix to git in file Opcodes/OSC.c |
Date | 2016-01-26 09:09 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
One more note is that new Csound is a bit slower. Some programs that I was able to run with 6.03 are produce a lot of Buffer underruns. The Csound that I install with apt-get is faster then the thing that I've build myself. 2016-01-26 12:05 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-26 09:25 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
That is because you have a debug build, with not a lot of optimisations. If you set it to ‘Release’, it will be faster. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 09:09, Anton Kholomiov |
Date | 2016-01-26 11:09 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@jpff Thanks for the fix. I've tried with your updates, but error remains present 2016-01-26 12:25 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: That is because you have a debug build, with not a lot of optimisations. If you set it to ‘Release’, it will be faster. |
Date | 2016-01-26 11:28 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
So what you are saying is that, without the if … then, there is no crash? Note that the condition will be checked both at i-time and perf-time, so it should affect the code at all. If the crash is not happening, the reason might be different. We know that it seems to be triggered by an array_get(), which is called whenever you are trying to read from an array (as in the filenchnls and diskin2 lines). If we can track down which one of the two is responsible, we should be able to locate the problem. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 09:05, Anton Kholomiov |
Date | 2016-01-26 11:35 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I'm sorry for misinformation. The error is tricky to manifest. Tere was no crash by some happy accident when I've commented the if/thens. But then later I've made a version with no if/then for diskin2 (I've put mono and stereo versions at separate instruments) and it fails too with the same error. 2016-01-26 14:28 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: So what you are saying is that, without the if … then, there is no crash? |
Date | 2016-01-26 11:47 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
yes, I wouldn’t think that was the problem. I’ve pushed a new version with some changes that could stop the crash (but are not the final solution, just diagnostics). Can you try them? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 11:35, Anton Kholomiov |
Date | 2016-01-26 11:59 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Actually, I manage to get a crash now. I am looking at it. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 11:47, Victor Lazzarini |
Date | 2016-01-26 12:11 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ok, here’s the problem (it looks like). When you start, some of the strings of the array are NULL, and if you try to read them, you get a crash. If you initialise them to empty strings, then it goes away (it appears). Add these lines to the top, before your instrument definitions: ii init 0 while ii < $SIZE do gSFiles[ii] strcpy "" ii += 1 od From our (devs) perspective, I think we need to consider whether string arrays need to be initialised by default to empty strings. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 11:59, Victor Lazzarini |
Date | 2016-01-26 12:30 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I don't think this is the true cause of the problem. In my script I always use the function *play* before any command. And play fills the array's cell with the value. I've tried your solution it crashes too, though I didn't pull your last changes Should I do it? ~~~ *** Error in `csound': corrupted double-linked list: 0x00000000008ddd00 *** ~~~ 2016-01-26 15:11 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: Ok, here’s the problem (it looks like). When you start, some of the strings of the array are NULL, and if you |
Date | 2016-01-26 12:34 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Did you try it? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 12:30, Anton Kholomiov |
Date | 2016-01-26 12:37 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Wow, that's a good find Victor. I took a quick to diagnose what would be necessary for initialisation of each data member of an array. It's a bit technical so I've just put it in a github issue (https://github.com/csound/csound/issues/588) to keep it off this list. We should probably discuss on the dev list or through the github issue. On Tue, Jan 26, 2016 at 7:11 AM, Victor Lazzarini |
Date | 2016-01-26 12:44 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I had a look, and we could add a new initvar function to S types as we do for numeric types? Do you think that would do it? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 12:37, Steven Yi |
Date | 2016-01-26 12:58 |
From | Steven Yi |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ah, I see it now. A couple things: 1. we should add init functions for strings and f-sigs (in createString and createFsig in csound_standard_types.c). They should set the default values. 2. for places we create initialise or resize arrays, we should check the array sub type to see if it's init function is set and, if so, iterate over the member data and call the init function. On Tue, Jan 26, 2016 at 7:44 AM, Victor Lazzarini |
Date | 2016-01-26 13:28 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Victor I'm sorry to say it but it fails still (with your recent commit and proposal to set values for string array). The scenario I've posted before is working but if I proceed there is always a point where there is a crash. One of the recent messages csound: malloc.c:3695: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed. Sometimes it segfaults. I'd better make an issue on github. I'll try to make a minimal example. 2016-01-26 15:58 GMT+03:00 Steven Yi <stevenyi@gmail.com>: Ah, I see it now. A couple things: |
Date | 2016-01-26 13:31 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
anyway thanks for all the help and support. At least I know how to build csound from sources It's really smart error that can jump at you when you are about to post to mailing list that it's gone. Anton 2016-01-26 16:28 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-26 13:38 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I managed to make it crash again and I am examining possibilities. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 13:28, Anton Kholomiov |
Date | 2016-01-26 14:10 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I think I found the bug, I fixed in git. Try to pull, compile and see if it works for you now. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 13:31, Anton Kholomiov |
Date | 2016-01-26 14:37 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
One question before I try to test. I see changes for strcpy in the commit, but in the code I use strcpyk. Is it ok for the fix? 2016-01-26 17:10 GMT+03:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>: I think I found the bug, I fixed in git. Try to pull, compile and see if it works for you now. |
Date | 2016-01-26 14:45 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
It uses the same function. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 26 Jan 2016, at 14:37, Anton Kholomiov |
Date | 2016-01-26 17:27 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Victor With all those reinstalls from sources I somehow managed to broke my distro. The step into abyss was to install jack from sources to the system dir. I don't know why but my system wasn't able to identify jack libs so I decided to help it and broke everything. I'll report my take on your update a bit later when I get sound going from my speakers again. Thanks for all your efforts! 2016-01-26 17:37 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-26 18:31 |
From | Rory Walsh |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Hi Anton. Are you running an audio specific distro? On 26 January 2016 at 17:27, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
|
Date | 2016-01-28 15:03 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Hi, Rory! 2016-01-26 21:31 GMT+03:00 Rory Walsh <rorywalsh@ear.ie>:
|
Date | 2016-01-28 15:17 |
From | Rory Walsh |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
Ouch, that's not a nice situation. Rather than install the full desktop version of KXStudio I simply install what I need from it over my existing distro. That way I can tailor it to me needs. Have you asked at the Linux Musicians forums? fallTx, the creator of KXStudio can be found there a lot and is usually very responsive to questions. On 28 January 2016 at 15:03, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
|
Date | 2016-01-28 15:23 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
I haven't. Thanks for suggestion I'll try it out.. 2016-01-28 18:17 GMT+03:00 Rory Walsh <rorywalsh@ear.ie>:
|
Date | 2016-01-29 18:18 |
From | Anton Kholomiov |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
@Viictor I'm back again. The brand new version segfaults with no messages being sent(( Sometimes it can recieve a 4 to 10 messages and segfault. I've opened an issue on the github: I've made a test suite to simplify testing (it sends random messages) Also do you know how to install two versions of csound? One for release and one for testing. Is there a `make install` command where I can specify a directory here to install. So that I can use fast csound and supply backtraces if there is a need in them. Anton 2016-01-26 17:37 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
|
Date | 2016-01-29 18:42 |
From | Victor Lazzarini |
Subject | Re: How to use String filenames, filelen and diskin2 with OSC? |
OK, we can track this on github. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 29 Jan 2016, at 18:18, Anton Kholomiov |