| Ok, I went to look at sprintf and I found a glaring bug there in memory allocation. I fixed it and I get no more
segfaults. Thanks for this.
========================
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 2 Feb 2016, at 14:29, Karin Daum wrote:
>
> I verified that using in the code at one place
>
> Sfile sprintf "/x01/usr/daum/Csound/alphabet/v2/vokale/v%de.wav",indx+1
>
> leads to a crash of CsoundQt while
>
> Sfile sprintf "./alphabet/v2/vokale/v%de.wav",indx+1
>
> does not crash at least on my Mac.
>
> Having the full path only once does not lead to a crash when running Csound from the terminal.
>
> avoiding the full path I’m now able to load all 117 files I want to load.
>
> Thanks for your fast test.
>
> Karin
>
>
>> On 2 Feb 2016, at 14:58, Victor Lazzarini wrote:
>>
>> No max string length, but there could be a bug in sprintf.
>> ========================
>> 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 2 Feb 2016, at 13:53, Karin Daum wrote:
>>>
>>> thanks,
>>>
>>> i just prepared a tar-file with all inputs and changed the sprintf statements in the code from full path to the path in a agreement with what is in the tar file the bug disappeared. The code runs both with CsoundQt and Csound from the terminal. Is there a maximum length for a string variable?
>>>
>>> I’m not sure what this means. From my long experience in programming I know that this does not mean that there is no bug. The program may write to other memory locations which one does not realise.
>>>
>>> I will attach the tar-file of the inputs and the modified code
>>>
>>> Thanks
>>>
>>> Karin
>>>
>>> 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
>>>
>>>> On 2 Feb 2016, at 14:42, Victor Lazzarini wrote:
>>>>
>>>> I ran this here, replacing the files with whatever I had on disk and did not have a crash. I don’t think it’s
>>>> the ftgen loading. Try commenting out all the string messages and see if it does anything.
>>>>
>>>> ========================
>>>> 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 2 Feb 2016, at 13:36, Steven Yi wrote:
>>>>>
>>>>> I wonder too if this might be something that was fixed between 6.06
>>>>> and now? I ran the CSD here on Windows and it did not have files to
>>>>> open, but it also did not crash. Not a good test of the problem
>>>>> though.
>>>>>
>>>>> Could someone with 6.06 on OSX try running this CSD?
>>>>>
>>>>> On Tue, Feb 2, 2016 at 8:33 AM, Victor Lazzarini
>>>>> wrote:
>>>>>> The crash you showed here is on exit after performance, and I don’t think it is to do with the function tables. It could be something to do with the
>>>>>> string arrays.
>>>>>> ========================
>>>>>> 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 2 Feb 2016, at 13:21, Karin Daum wrote:
>>>>>>>
>>>>>>> I was too optimistic. This was tested for a few files only. When reading more files CsoundQT as well as Csound are crashing. At the moment the code is only doing the reading of the sound files via ftgen and printing the index # and the length of the individual tables. This looks o.k. to me and there is no excessive use of memory for the tables. The total length of all tables sums up to about 500000 (or 10 seconds) I don’t see what is wrong in the code, which is attached. Perhaps somebody sees something obviously wrong. The printout is below. Wasn’t there a debugging possibility in CsoundQt.
>>>>>>>
>>>>>>> Thanks for any help
>>>>>>>
>>>>>>> Karin
>>>>>>> =mbp-kd-2:/x01/usr/daum/Csound 14:15> Csound -d smallTalk.csd
>>>>>>> WARNING: STK opodes not available: define environment variable RAWWAVE_PATH
>>>>>>> (points to rawwaves directory) to use STK opcodes.
>>>>>>> 0dBFS level = 32768.0
>>>>>>> Csound version 6.06 (double samples) Sep 29 2015
>>>>>>> libsndfile-1.0.25
>>>>>>> WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libjacko.dylib' (-1)
>>>>>>> WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libjackTransport.dylib' (-1)
>>>>>>> WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/librtjack.dylib' (-1)
>>>>>>> WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libvirtual.dylib' (-1)
>>>>>>> WARNING: could not open library '/Library/Frameworks/CsoundLib64.framework/Versions/6.0/Resources/Opcodes64/libwidgets.dylib' (-1)
>>>>>>> UnifiedCSD: smallTalk.csd
>>>>>>> STARTING FILE
>>>>>>> Creating options
>>>>>>> Creating orchestra
>>>>>>> Creating score
>>>>>>> WARNING: STK opodes not available: define environment variable RAWWAVE_PATH
>>>>>>> (points to rawwaves directory) to use STK opcodes.
>>>>>>> rtaudio: PortAudio module enabled ...
>>>>>>> using callback interface
>>>>>>> rtmidi: PortMIDI module enabled
>>>>>>> Elapsed time at end of orchestra compile: real: 0.004s, CPU: 0.004s
>>>>>>> sorting score ...
>>>>>>> ... done
>>>>>>> Elapsed time at end of score sort: real: 0.005s, CPU: 0.004s
>>>>>>> --Csound version 6.06 (double samples) Sep 29 2015
>>>>>>> displays suppressed
>>>>>>> 0dBFS level = 1.0
>>>>>>> orch now loaded
>>>>>>> audio buffered in 1024 sample-frame blocks
>>>>>>> PortAudio V19-devel (built Sep 4 2014 22:30:30)
>>>>>>> 0: dac0 (Built-in Output)
>>>>>>> PortAudio: selected output device 'Built-in Output'
>>>>>>> writing 2048 sample blks of 64-bit floats to dac
>>>>>>> SECTION 1:
>>>>>>> new alloc for instr 1:
>>>>>>> ftable 101:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v1s.wav
>>>>>>> defer length 4911
>>>>>>> ftable 102:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v1c.wav
>>>>>>> defer length 7602
>>>>>>> ftable 103:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v1e.wav
>>>>>>> defer length 11683
>>>>>>> ftable 104:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v1e.wav
>>>>>>> defer length 11683
>>>>>>> ftable 105:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v2s.wav
>>>>>>> defer length 13344
>>>>>>> ftable 106:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v2c.wav
>>>>>>> defer length 21516
>>>>>>> ftable 107:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v2e.wav
>>>>>>> defer length 11683
>>>>>>> ftable 108:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v2e.wav
>>>>>>> defer length 11683
>>>>>>> ftable 109:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v3s.wav
>>>>>>> defer length 17869
>>>>>>> ftable 110:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v3c.wav
>>>>>>> defer length 2658
>>>>>>> ftable 111:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v3e.wav
>>>>>>> defer length 21190
>>>>>>> ftable 112:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v3e.wav
>>>>>>> defer length 21190
>>>>>>> ftable 113:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v4s.wav
>>>>>>> defer length 11742
>>>>>>> ftable 114:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v4c.wav
>>>>>>> defer length 7503
>>>>>>> ftable 115:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v4e.wav
>>>>>>> defer length 21190
>>>>>>> ftable 116:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v4e.wav
>>>>>>> defer length 21190
>>>>>>> ftable 117:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v5s.wav
>>>>>>> defer length 11037
>>>>>>> ftable 118:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v5c.wav
>>>>>>> defer length 2743
>>>>>>> ftable 119:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v5e.wav
>>>>>>> defer length 13506
>>>>>>> ftable 120:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v5e.wav
>>>>>>> defer length 13506
>>>>>>> ftable 121:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v6s.wav
>>>>>>> defer length 11214
>>>>>>> ftable 122:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v6c.wav
>>>>>>> defer length 7844
>>>>>>> ftable 123:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v6e.wav
>>>>>>> defer length 13506
>>>>>>> ftable 124:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v6e.wav
>>>>>>> defer length 13506
>>>>>>> ftable 125:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v7s.wav
>>>>>>> defer length 8624
>>>>>>> ftable 126:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v7c.wav
>>>>>>> defer length 5628
>>>>>>> ftable 127:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v7e.wav
>>>>>>> defer length 6419
>>>>>>> ftable 128:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v7e.wav
>>>>>>> defer length 6419
>>>>>>> ftable 129:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v8s.wav
>>>>>>> defer length 12444
>>>>>>> ftable 130:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v8c.wav
>>>>>>> defer length 4927
>>>>>>> ftable 131:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v8e.wav
>>>>>>> defer length 13578
>>>>>>> ftable 132:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v8e.wav
>>>>>>> defer length 13578
>>>>>>> ftable 133:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v9s.wav
>>>>>>> defer length 6836
>>>>>>> ftable 134:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v9c.wav
>>>>>>> defer length 4756
>>>>>>> ftable 135:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v9e.wav
>>>>>>> defer length 4073
>>>>>>> ftable 136:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v9e.wav
>>>>>>> defer length 4073
>>>>>>> ftable 137:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v10s.wav
>>>>>>> defer length 6836
>>>>>>> ftable 138:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v10c.wav
>>>>>>> defer length 4291
>>>>>>> ftable 139:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v10e.wav
>>>>>>> defer length 4073
>>>>>>> ftable 140:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v10e.wav
>>>>>>> defer length 4073
>>>>>>> ftable 141:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v11s.wav
>>>>>>> defer length 3436
>>>>>>> ftable 142:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v11c.wav
>>>>>>> defer length 3436
>>>>>>> ftable 143:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v11e.wav
>>>>>>> defer length 3436
>>>>>>> ftable 144:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v11e.wav
>>>>>>> defer length 3436
>>>>>>> ftable 145:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v12s.wav
>>>>>>> defer length 6561
>>>>>>> ftable 146:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v12c.wav
>>>>>>> defer length 8625
>>>>>>> ftable 147:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v12e.wav
>>>>>>> defer length 8625
>>>>>>> ftable 148:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v12e.wav
>>>>>>> defer length 8625
>>>>>>> ftable 149:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v13s.wav
>>>>>>> defer length 10042
>>>>>>> ftable 150:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v13c.wav
>>>>>>> defer length 15037
>>>>>>> ftable 151:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v13e.wav
>>>>>>> defer length 15037
>>>>>>> ftable 152:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v13e.wav
>>>>>>> defer length 15037
>>>>>>> ftable 153:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v14s.wav
>>>>>>> defer length 7552
>>>>>>> ftable 154:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v14c.wav
>>>>>>> defer length 4096
>>>>>>> ftable 155:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v14e.wav
>>>>>>> defer length 4096
>>>>>>> ftable 156:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v14e.wav
>>>>>>> defer length 4096
>>>>>>> ftable 157:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v15s.wav
>>>>>>> defer length 7456
>>>>>>> ftable 158:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v15c.wav
>>>>>>> defer length 4555
>>>>>>> ftable 159:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v15e.wav
>>>>>>> defer length 4555
>>>>>>> ftable 160:
>>>>>>> deferred alloc
>>>>>>> audio sr = 48000, monaural
>>>>>>> opening WAV infile /x01/usr/daum/Csound/alphabet/v2/vokale/v15e.wav
>>>>>>> defer length 4555
>>>>>>> reading vowals - length: 60 60
>>>>>>> iIndex 0 Length beginning 4911 15 centre 7602 30 end 11683 45 2nd time 11683 35879
>>>>>>> iIndex 1 Length beginning 13344 16 centre 21516 31 end 11683 46 2nd time 11683 94105
>>>>>>> iIndex 2 Length beginning 17869 17 centre 2658 32 end 21190 47 2nd time 21190 157012
>>>>>>> iIndex 3 Length beginning 11742 18 centre 7503 33 end 21190 48 2nd time 21190 218637
>>>>>>> iIndex 4 Length beginning 11037 19 centre 2743 34 end 13506 49 2nd time 13506 259429
>>>>>>> iIndex 5 Length beginning 11214 20 centre 7844 35 end 13506 50 2nd time 13506 305499
>>>>>>> iIndex 6 Length beginning 8624 21 centre 5628 36 end 6419 51 2nd time 6419 332589
>>>>>>> iIndex 7 Length beginning 12444 22 centre 4927 37 end 13578 52 2nd time 13578 377116
>>>>>>> iIndex 8 Length beginning 6836 23 centre 4756 38 end 4073 53 2nd time 4073 396854
>>>>>>> iIndex 9 Length beginning 6836 24 centre 4291 39 end 4073 54 2nd time 4073 416127
>>>>>>> iIndex 10 Length beginning 3436 25 centre 3436 40 end 3436 55 2nd time 3436 429871
>>>>>>> iIndex 11 Length beginning 6561 26 centre 8625 41 end 8625 56 2nd time 8625 462307
>>>>>>> iIndex 12 Length beginning 10042 27 centre 15037 42 end 15037 57 2nd time 15037 517460
>>>>>>> iIndex 13 Length beginning 7552 28 centre 4096 43 end 4096 58 2nd time 4096 537300
>>>>>>> iIndex 14 Length beginning 7456 29 centre 4555 44 end 4555 59 2nd time 4555 558421
>>>>>>> new alloc for instr 2:
>>>>>>> new alloc for instr 3:
>>>>>>> B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.00000 0.00000
>>>>>>> Score finished in csoundPerform().
>>>>>>> Csound(29396,0x7fff799df300) malloc: *** error for object 0x7fb04b614120: incorrect checksum for freed object - object was probably modified after being freed.
>>>>>>> *** set a breakpoint in malloc_error_break to debug
>>>>>>>
>>>>>>> csound command: Abort trap
>>>>>>> =mbp-kd-2:/x01/usr/daum/Csound 14:15>
>>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>>> On 1 Feb 2016, at 16:36, Steven Yi wrote:
>>>>>>>>
>>>>>>>> Yes, most certainly indx +=1 ! Thanks for catching that. :)
>>>>>>>>
>>>>>>>> On Mon, Feb 1, 2016 at 10:11 AM, Victor Lazzarini
>>>>>>>> wrote:
>>>>>>>>> you probably mean indx += 1
>>>>>>>>>
>>>>>>>>> That’s a good solution.
>>>>>>>>>
>>>>>>>>> To load a mono file into a k-array we probably could use this:
>>>>>>>>>
>>>>>>>>> opcode LoadArray,k[],S
>>>>>>>>> setksmps 1
>>>>>>>>> Sname xin
>>>>>>>>> iend = filelen(Sname)*filesr(Sname)
>>>>>>>>> kArr[] init iend
>>>>>>>>> kcnt init 0
>>>>>>>>> while kcnt < iend do
>>>>>>>>> asmp diskin Sname
>>>>>>>>> kArr[kcnt] = k(asmp)
>>>>>>>>> kcnt += 1
>>>>>>>>> endin
>>>>>>>>> xout kArr
>>>>>>>>> endop
>>>>>>>>>
>>>>>>>>> which should be run only once. It’s untested, but that’s the gist of 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 1 Feb 2016, at 14:53, Steven Yi wrote:
>>>>>>>>>>
>>>>>>>>>> Something I've done before is use ftgen to create tables using a 0 for
>>>>>>>>>> requested ftable number, then storing the assigned numbers to another
>>>>>>>>>> ftable (which could easily be an array). So in pseudo code, you could
>>>>>>>>>> do something like:
>>>>>>>>>>
>>>>>>>>>> ;; global code
>>>>>>>>>> gifiles[] init 200
>>>>>>>>>>
>>>>>>>>>> ;; instrument code for creating array
>>>>>>>>>> indx init 0
>>>>>>>>>> until indx >= 200 do
>>>>>>>>>> itab = ftgen(0,0,0,1, sprintf("some_file%d.wav", indx))
>>>>>>>>>> gifiles[indx] = itab
>>>>>>>>>> itab += 1
>>>>>>>>>> od
>>>>>>>>>>
>>>>>>>>>> ;; code for using array
>>>>>>>>>> asig = oscil:a(1.0, 440, gifiles[tabnum])
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Feb 1, 2016 at 9:32 AM, Karin Daum wrote:
>>>>>>>>>>> thanks,
>>>>>>>>>>>
>>>>>>>>>>> now I have to digest this, read the manual... and it reminds me how little I know about Csound up to now
>>>>>>>>>>>> On 1 Feb 2016, at 15:20, Victor Lazzarini wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Well, you can write your own UDO to load a file into an array using diskin/soundin.
>>>>>>>>>>>>
>>>>>>>>>>>> However, using ftables is easier. You can replace your array reads using table(kndx, itab).
>>>>>>>>>>>> So if your code looks like this:
>>>>>>>>>>>>
>>>>>>>>>>>> asig opcode …, kArr[kn], ...
>>>>>>>>>>>>
>>>>>>>>>>>> it can be replaced by
>>>>>>>>>>>>
>>>>>>>>>>>> asig opcode …, table(kn,ift), ...
>>>>>>>>>>>>
>>>>>>>>>>>> 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 1 Feb 2016, at 14:10, Karin Daum wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> this is a possibility, but I that using arrays with pointers would make coding easier later-on. Then I thought using ftgen to read a sound file at i-time and copying with copyf2array would do the job, but this does not work for these types.
>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 1 Feb 2016, at 15:05, Victor Lazzarini wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> GEN1 and ftgen creating function tables.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On 1 Feb 2016, at 13:48, Karin Daum wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I want to store a couple of short sound files (~ 200) in sound arrays during initialisation, such that they can be accessed via pointers from the instruments. I want to use these files to form larger entities out of them by combining them which then should be played. I don't find a method for this in the manual. Is there some possibility for it?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> cheers,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Karin
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>> 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
>>>>>
>>>>> 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
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 |