Csound Csound-dev Csound-tekno Search About

[Csnd] problem with following csd..

Date2010-02-11 10:28
FromRory Walsh
Subject[Csnd] problem with following csd..
A friend of mine is having a problem with the following csd file. It
runs for me fine on windows but stops for him on his OSX machine with
a Csound bus error, I can't see what the problem is, I get no errors.
He's just updated Csound and is using the latest version, as am I.
Here is the csd file, the console output is below.



-odevaudio1 -b10 -idevaudio1


sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

instr 1
;read the pulses from the function table
krate = 4	;number of beats per second

kmet metro krate	;output a trigger once a second

kndx phasor 1/(16/krate)	;table index		

;read each of the tables, you'll need to add more of these
ktbl1 tab kndx, 2, 1	;set mode to one so that table length is normalised
ktbl2 tab kndx, 3, 1

;if any of the tables has a pulse when metro is on, enter this loop
and play the sound
if(kmet==1) then
	if(ktbl1==1) then	;if there is a pulse in table 1 play it
	; play first sound
	;			instr	        delay	duration	ifn/soundfile
	event "i", 	2, 		0, 		2,		1
	endif
	if(ktbl2==1) then	;inf there is a pulse in table 2 play it
	;play second second
	event "i", 	2,		0,		2,		2
	endif
endif
endin


instr 2
Sfilename = "kick.wav"
;p4 is the sound you want to play as determined from the instrument
;above. Add as many of these if statement as you want sounds

if(p4==1) then	;1 for kick
Sfilename = "kick.wav"
elseif(p4==2) then 	;2 for snare
Sfilename  = "ride.wav"
endif

klen strlenk Sfilename
;check valid string for filename
if(klen>0) then
	;check for stero of mono
	ir filenchnls Sfilename
	if(ir==1) then
	a1 diskin Sfilename, 1, 0, 0
	outs a1, a1
	elseif(ir==2) then
	a1, a2 diskin Sfilename, 1, 0, 0
	outs a1, a2
	endif
endif

endin



f1 0 1024 10 1
f2 0 -16 2 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1
f3 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1
f4 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1
f5 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1
f6 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1
f7 0 -16 2 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
i1 0 100



This is the output when run from either command line or through a frontend:

-+rtaudio=portaudio -iadc -odac --env:CSNOSTOP=yesPortMIDI real time
MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.10 (float samples) Dec 18 2008
libsndfile-1.0.16
UnifiedCSD:  /Users/broganmartin/mycsound/DrumPlayer.csd
STARTING FILE
Creating orchestra
Creating score
orchname:  /tmp/tmp.0.5MbTQ5.orc
scorename: /tmp/tmp.1.oKZjaG.sco
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
108 lines read
        instr   1
        instr   2
LABELS list is full...extending to 10
Elapsed time at end of orchestra compile: real: 0.050s, CPU: 0.020s
sorting score ...
        ... done
Elapsed time at end of score sort: real: 0.158s, CPU: 0.030s
Csound version 5.10 (float samples) Dec 18 2008
0dBFS level = 32768.0
orch now loaded
audio buffered in 512 sample-frame blocks
reading 2048-byte blks of shorts from adc (RAW)
PortAudio V19-devel
PortAudio: available input devices:
   0: Built-in Audio
PortAudio: selected input device 'Built-in Audio'
PortAudio: available output devices:
   0: Built-in Audio
PortAudio: selected output device 'Built-in Audio'
WARNING: buffer size should be an integer multiple of ksmps in full-duplex mode
writing 2048-byte blks of shorts to dac
SECTION 1:
ftable 1:
ftable 2:
ftable 3:
ftable 4:
ftable 5:
ftable 6:
ftable 7:
new alloc for instr 1:
  rtevent:         T  1.750 TT  1.750 M:      0.0      0.0
new alloc for instr 2:
diskin: opened '/Users/broganmartin/mycsound/kick.wav':
        44100 Hz, 1 channel(s), 10624 sample frames
bufsize 4096
new alloc for instr 2:
diskin: opened '/Users/broganmartin/mycsound/ride.wav':
        44100 Hz, 1 channel(s), 42864 sample frames
bufsize 4096
Csound tidy up: Bus error
inactive allocs returned to freespace
end of score.              overall amps:  60780.0  60780.0
           overall samples out of range:      378      378
0 errors in performance
Elapsed time at end of performance: real: 10.778s, CPU: 0.530s
167 2048-byte soundblks of shorts written to dac


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-11 10:30
FromAndres Cabrera
Subject[Csnd] Re: problem with following csd..
Hi,

I think the problem is diskin. Try diskin2.


Cheers,
Andrés

On Thu, Feb 11, 2010 at 10:28 AM, Rory Walsh  wrote:
> A friend of mine is having a problem with the following csd file. It
> runs for me fine on windows but stops for him on his OSX machine with
> a Csound bus error, I can't see what the problem is, I get no errors.
> He's just updated Csound and is using the latest version, as am I.
> Here is the csd file, the console output is below.
>
> 
> 
> -odevaudio1 -b10 -idevaudio1
> 
> 
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 2
>
> instr 1
> ;read the pulses from the function table
> krate = 4       ;number of beats per second
>
> kmet metro krate        ;output a trigger once a second
>
> kndx phasor 1/(16/krate)        ;table index
>
> ;read each of the tables, you'll need to add more of these
> ktbl1 tab kndx, 2, 1    ;set mode to one so that table length is normalised
> ktbl2 tab kndx, 3, 1
>
> ;if any of the tables has a pulse when metro is on, enter this loop
> and play the sound
> if(kmet==1) then
>        if(ktbl1==1) then       ;if there is a pulse in table 1 play it
>        ; play first sound
>        ;                       instr           delay   duration        ifn/soundfile
>        event "i",      2,              0,              2,              1
>        endif
>        if(ktbl2==1) then       ;inf there is a pulse in table 2 play it
>        ;play second second
>        event "i",      2,              0,              2,              2
>        endif
> endif
> endin
>
>
> instr 2
> Sfilename = "kick.wav"
> ;p4 is the sound you want to play as determined from the instrument
> ;above. Add as many of these if statement as you want sounds
>
> if(p4==1) then  ;1 for kick
> Sfilename = "kick.wav"
> elseif(p4==2) then      ;2 for snare
> Sfilename  = "ride.wav"
> endif
>
> klen strlenk Sfilename
> ;check valid string for filename
> if(klen>0) then
>        ;check for stero of mono
>        ir filenchnls Sfilename
>        if(ir==1) then
>        a1 diskin Sfilename, 1, 0, 0
>        outs a1, a1
>        elseif(ir==2) then
>        a1, a2 diskin Sfilename, 1, 0, 0
>        outs a1, a2
>        endif
> endif
>
> endin
>
> 
> 
> f1 0 1024 10 1
> f2 0 -16 2 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1
> f3 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1
> f4 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1
> f5 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1
> f6 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1
> f7 0 -16 2 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
> i1 0 100
> 
> 
>
> This is the output when run from either command line or through a frontend:
>
> -+rtaudio=portaudio -iadc -odac --env:CSNOSTOP=yesPortMIDI real time
> MIDI plugin for Csound
> PortAudio real-time audio module for Csound
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 5.10 (float samples) Dec 18 2008
> libsndfile-1.0.16
> UnifiedCSD:  /Users/broganmartin/mycsound/DrumPlayer.csd
> STARTING FILE
> Creating orchestra
> Creating score
> orchname:  /tmp/tmp.0.5MbTQ5.orc
> scorename: /tmp/tmp.1.oKZjaG.sco
> rtaudio: PortAudio module enabled ... using callback interface
> rtmidi: PortMIDI module enabled
> orch compiler:
> 108 lines read
>        instr   1
>        instr   2
> LABELS list is full...extending to 10
> Elapsed time at end of orchestra compile: real: 0.050s, CPU: 0.020s
> sorting score ...
>        ... done
> Elapsed time at end of score sort: real: 0.158s, CPU: 0.030s
> Csound version 5.10 (float samples) Dec 18 2008
> 0dBFS level = 32768.0
> orch now loaded
> audio buffered in 512 sample-frame blocks
> reading 2048-byte blks of shorts from adc (RAW)
> PortAudio V19-devel
> PortAudio: available input devices:
>   0: Built-in Audio
> PortAudio: selected input device 'Built-in Audio'
> PortAudio: available output devices:
>   0: Built-in Audio
> PortAudio: selected output device 'Built-in Audio'
> WARNING: buffer size should be an integer multiple of ksmps in full-duplex mode
> writing 2048-byte blks of shorts to dac
> SECTION 1:
> ftable 1:
> ftable 2:
> ftable 3:
> ftable 4:
> ftable 5:
> ftable 6:
> ftable 7:
> new alloc for instr 1:
>  rtevent:         T  1.750 TT  1.750 M:      0.0      0.0
> new alloc for instr 2:
> diskin: opened '/Users/broganmartin/mycsound/kick.wav':
>        44100 Hz, 1 channel(s), 10624 sample frames
> bufsize 4096
> new alloc for instr 2:
> diskin: opened '/Users/broganmartin/mycsound/ride.wav':
>        44100 Hz, 1 channel(s), 42864 sample frames
> bufsize 4096
> Csound tidy up: Bus error
> inactive allocs returned to freespace
> end of score.              overall amps:  60780.0  60780.0
>           overall samples out of range:      378      378
> 0 errors in performance
> Elapsed time at end of performance: real: 10.778s, CPU: 0.530s
> 167 2048-byte soundblks of shorts written to dac
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>



-- 


Andrés


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-11 10:43
FromPeiman Khosravi
Subject[Csnd] Re: Re: problem with following csd..
Hello,

There is a bug in diskin. It crashes if the note length is longer than  
the loaded  sound-file. Note that this happens in the non-loop mode  
only.
Best,

Peiman

On 11 Feb 2010, at 10:30, Andres Cabrera wrote:

> Hi,
>
> I think the problem is diskin. Try diskin2.
>
>
> Cheers,
> Andrés
>
> On Thu, Feb 11, 2010 at 10:28 AM, Rory Walsh  wrote:
>> A friend of mine is having a problem with the following csd file. It
>> runs for me fine on windows but stops for him on his OSX machine with
>> a Csound bus error, I can't see what the problem is, I get no errors.
>> He's just updated Csound and is using the latest version, as am I.
>> Here is the csd file, the console output is below.
>>
>> 
>> 
>> -odevaudio1 -b10 -idevaudio1
>> 
>> 
>> sr = 44100
>> kr = 4410
>> ksmps = 10
>> nchnls = 2
>>
>> instr 1
>> ;read the pulses from the function table
>> krate = 4       ;number of beats per second
>>
>> kmet metro krate        ;output a trigger once a second
>>
>> kndx phasor 1/(16/krate)        ;table index
>>
>> ;read each of the tables, you'll need to add more of these
>> ktbl1 tab kndx, 2, 1    ;set mode to one so that table length is  
>> normalised
>> ktbl2 tab kndx, 3, 1
>>
>> ;if any of the tables has a pulse when metro is on, enter this loop
>> and play the sound
>> if(kmet==1) then
>>        if(ktbl1==1) then       ;if there is a pulse in table 1 play  
>> it
>>        ; play first sound
>>        ;                       instr           delay    
>> duration        ifn/soundfile
>>        event "i",      2,              0,               
>> 2,              1
>>        endif
>>        if(ktbl2==1) then       ;inf there is a pulse in table 2  
>> play it
>>        ;play second second
>>        event "i",      2,              0,               
>> 2,              2
>>        endif
>> endif
>> endin
>>
>>
>> instr 2
>> Sfilename = "kick.wav"
>> ;p4 is the sound you want to play as determined from the instrument
>> ;above. Add as many of these if statement as you want sounds
>>
>> if(p4==1) then  ;1 for kick
>> Sfilename = "kick.wav"
>> elseif(p4==2) then      ;2 for snare
>> Sfilename  = "ride.wav"
>> endif
>>
>> klen strlenk Sfilename
>> ;check valid string for filename
>> if(klen>0) then
>>        ;check for stero of mono
>>        ir filenchnls Sfilename
>>        if(ir==1) then
>>        a1 diskin Sfilename, 1, 0, 0
>>        outs a1, a1
>>        elseif(ir==2) then
>>        a1, a2 diskin Sfilename, 1, 0, 0
>>        outs a1, a2
>>        endif
>> endif
>>
>> endin
>>
>> 
>> 
>> f1 0 1024 10 1
>> f2 0 -16 2 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1
>> f3 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1
>> f4 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1
>> f5 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1
>> f6 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1
>> f7 0 -16 2 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
>> i1 0 100
>> 
>> 
>>
>> This is the output when run from either command line or through a  
>> frontend:
>>
>> -+rtaudio=portaudio -iadc -odac --env:CSNOSTOP=yesPortMIDI real time
>> MIDI plugin for Csound
>> PortAudio real-time audio module for Csound
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> Csound version 5.10 (float samples) Dec 18 2008
>> libsndfile-1.0.16
>> UnifiedCSD:  /Users/broganmartin/mycsound/DrumPlayer.csd
>> STARTING FILE
>> Creating orchestra
>> Creating score
>> orchname:  /tmp/tmp.0.5MbTQ5.orc
>> scorename: /tmp/tmp.1.oKZjaG.sco
>> rtaudio: PortAudio module enabled ... using callback interface
>> rtmidi: PortMIDI module enabled
>> orch compiler:
>> 108 lines read
>>        instr   1
>>        instr   2
>> LABELS list is full...extending to 10
>> Elapsed time at end of orchestra compile: real: 0.050s, CPU: 0.020s
>> sorting score ...
>>        ... done
>> Elapsed time at end of score sort: real: 0.158s, CPU: 0.030s
>> Csound version 5.10 (float samples) Dec 18 2008
>> 0dBFS level = 32768.0
>> orch now loaded
>> audio buffered in 512 sample-frame blocks
>> reading 2048-byte blks of shorts from adc (RAW)
>> PortAudio V19-devel
>> PortAudio: available input devices:
>>   0: Built-in Audio
>> PortAudio: selected input device 'Built-in Audio'
>> PortAudio: available output devices:
>>   0: Built-in Audio
>> PortAudio: selected output device 'Built-in Audio'
>> WARNING: buffer size should be an integer multiple of ksmps in full- 
>> duplex mode
>> writing 2048-byte blks of shorts to dac
>> SECTION 1:
>> ftable 1:
>> ftable 2:
>> ftable 3:
>> ftable 4:
>> ftable 5:
>> ftable 6:
>> ftable 7:
>> new alloc for instr 1:
>>  rtevent:         T  1.750 TT  1.750 M:      0.0      0.0
>> new alloc for instr 2:
>> diskin: opened '/Users/broganmartin/mycsound/kick.wav':
>>        44100 Hz, 1 channel(s), 10624 sample frames
>> bufsize 4096
>> new alloc for instr 2:
>> diskin: opened '/Users/broganmartin/mycsound/ride.wav':
>>        44100 Hz, 1 channel(s), 42864 sample frames
>> bufsize 4096
>> Csound tidy up: Bus error
>> inactive allocs returned to freespace
>> end of score.              overall amps:  60780.0  60780.0
>>           overall samples out of range:      378      378
>> 0 errors in performance
>> Elapsed time at end of performance: real: 10.778s, CPU: 0.530s
>> 167 2048-byte soundblks of shorts written to dac
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>>
>
>
>
> -- 
>
>
> Andrés
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-11 11:14
FromRory Walsh
Subject[Csnd] Re: Re: Re: problem with following csd..
Thanks guys, I hadn't spotted that before although I can remember
seeing threads about diskin2. Might a note be put into the manual
about this? Cheers,

Rory.


On 11 February 2010 10:43, Peiman Khosravi  wrote:
> Hello,
>
> There is a bug in diskin. It crashes if the note length is longer than the
> loaded  sound-file. Note that this happens in the non-loop mode only.
> Best,
>
> Peiman
>
> On 11 Feb 2010, at 10:30, Andres Cabrera wrote:
>
>> Hi,
>>
>> I think the problem is diskin. Try diskin2.
>>
>>
>> Cheers,
>> Andrés
>>
>> On Thu, Feb 11, 2010 at 10:28 AM, Rory Walsh  wrote:
>>>
>>> A friend of mine is having a problem with the following csd file. It
>>> runs for me fine on windows but stops for him on his OSX machine with
>>> a Csound bus error, I can't see what the problem is, I get no errors.
>>> He's just updated Csound and is using the latest version, as am I.
>>> Here is the csd file, the console output is below.
>>>
>>> 
>>> 
>>> -odevaudio1 -b10 -idevaudio1
>>> 
>>> 
>>> sr = 44100
>>> kr = 4410
>>> ksmps = 10
>>> nchnls = 2
>>>
>>> instr 1
>>> ;read the pulses from the function table
>>> krate = 4       ;number of beats per second
>>>
>>> kmet metro krate        ;output a trigger once a second
>>>
>>> kndx phasor 1/(16/krate)        ;table index
>>>
>>> ;read each of the tables, you'll need to add more of these
>>> ktbl1 tab kndx, 2, 1    ;set mode to one so that table length is
>>> normalised
>>> ktbl2 tab kndx, 3, 1
>>>
>>> ;if any of the tables has a pulse when metro is on, enter this loop
>>> and play the sound
>>> if(kmet==1) then
>>>       if(ktbl1==1) then       ;if there is a pulse in table 1 play it
>>>       ; play first sound
>>>       ;                       instr           delay   duration
>>>  ifn/soundfile
>>>       event "i",      2,              0,              2,              1
>>>       endif
>>>       if(ktbl2==1) then       ;inf there is a pulse in table 2 play it
>>>       ;play second second
>>>       event "i",      2,              0,              2,              2
>>>       endif
>>> endif
>>> endin
>>>
>>>
>>> instr 2
>>> Sfilename = "kick.wav"
>>> ;p4 is the sound you want to play as determined from the instrument
>>> ;above. Add as many of these if statement as you want sounds
>>>
>>> if(p4==1) then  ;1 for kick
>>> Sfilename = "kick.wav"
>>> elseif(p4==2) then      ;2 for snare
>>> Sfilename  = "ride.wav"
>>> endif
>>>
>>> klen strlenk Sfilename
>>> ;check valid string for filename
>>> if(klen>0) then
>>>       ;check for stero of mono
>>>       ir filenchnls Sfilename
>>>       if(ir==1) then
>>>       a1 diskin Sfilename, 1, 0, 0
>>>       outs a1, a1
>>>       elseif(ir==2) then
>>>       a1, a2 diskin Sfilename, 1, 0, 0
>>>       outs a1, a2
>>>       endif
>>> endif
>>>
>>> endin
>>>
>>> 
>>> 
>>> f1 0 1024 10 1
>>> f2 0 -16 2 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1
>>> f3 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1
>>> f4 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1
>>> f5 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1
>>> f6 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1
>>> f7 0 -16 2 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
>>> i1 0 100
>>> 
>>> 
>>>
>>> This is the output when run from either command line or through a
>>> frontend:
>>>
>>> -+rtaudio=portaudio -iadc -odac --env:CSNOSTOP=yesPortMIDI real time
>>> MIDI plugin for Csound
>>> PortAudio real-time audio module for Csound
>>> virtual_keyboard real time MIDI plugin for Csound
>>> 0dBFS level = 32768.0
>>> Csound version 5.10 (float samples) Dec 18 2008
>>> libsndfile-1.0.16
>>> UnifiedCSD:  /Users/broganmartin/mycsound/DrumPlayer.csd
>>> STARTING FILE
>>> Creating orchestra
>>> Creating score
>>> orchname:  /tmp/tmp.0.5MbTQ5.orc
>>> scorename: /tmp/tmp.1.oKZjaG.sco
>>> rtaudio: PortAudio module enabled ... using callback interface
>>> rtmidi: PortMIDI module enabled
>>> orch compiler:
>>> 108 lines read
>>>       instr   1
>>>       instr   2
>>> LABELS list is full...extending to 10
>>> Elapsed time at end of orchestra compile: real: 0.050s, CPU: 0.020s
>>> sorting score ...
>>>       ... done
>>> Elapsed time at end of score sort: real: 0.158s, CPU: 0.030s
>>> Csound version 5.10 (float samples) Dec 18 2008
>>> 0dBFS level = 32768.0
>>> orch now loaded
>>> audio buffered in 512 sample-frame blocks
>>> reading 2048-byte blks of shorts from adc (RAW)
>>> PortAudio V19-devel
>>> PortAudio: available input devices:
>>>  0: Built-in Audio
>>> PortAudio: selected input device 'Built-in Audio'
>>> PortAudio: available output devices:
>>>  0: Built-in Audio
>>> PortAudio: selected output device 'Built-in Audio'
>>> WARNING: buffer size should be an integer multiple of ksmps in
>>> full-duplex mode
>>> writing 2048-byte blks of shorts to dac
>>> SECTION 1:
>>> ftable 1:
>>> ftable 2:
>>> ftable 3:
>>> ftable 4:
>>> ftable 5:
>>> ftable 6:
>>> ftable 7:
>>> new alloc for instr 1:
>>>  rtevent:         T  1.750 TT  1.750 M:      0.0      0.0
>>> new alloc for instr 2:
>>> diskin: opened '/Users/broganmartin/mycsound/kick.wav':
>>>       44100 Hz, 1 channel(s), 10624 sample frames
>>> bufsize 4096
>>> new alloc for instr 2:
>>> diskin: opened '/Users/broganmartin/mycsound/ride.wav':
>>>       44100 Hz, 1 channel(s), 42864 sample frames
>>> bufsize 4096
>>> Csound tidy up: Bus error
>>> inactive allocs returned to freespace
>>> end of score.              overall amps:  60780.0  60780.0
>>>          overall samples out of range:      378      378
>>> 0 errors in performance
>>> Elapsed time at end of performance: real: 10.778s, CPU: 0.530s
>>> 167 2048-byte soundblks of shorts written to dac
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> --
>>
>>
>> Andrés
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-11 11:19
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: problem with following csd..
No, I think we need to fix diskin instead.
On 11 Feb 2010, at 11:14, Rory Walsh wrote:

> Thanks guys, I hadn't spotted that before although I can remember
> seeing threads about diskin2. Might a note be put into the manual
> about this? Cheers,
>
> Rory.
>
>
> On 11 February 2010 10:43, Peiman Khosravi  
>  wrote:
>> Hello,
>>
>> There is a bug in diskin. It crashes if the note length is longer  
>> than the
>> loaded  sound-file. Note that this happens in the non-loop mode only.
>> Best,
>>
>> Peiman
>>
>> On 11 Feb 2010, at 10:30, Andres Cabrera wrote:
>>
>>> Hi,
>>>
>>> I think the problem is diskin. Try diskin2.
>>>
>>>
>>> Cheers,
>>> Andrés
>>>
>>> On Thu, Feb 11, 2010 at 10:28 AM, Rory Walsh   
>>> wrote:
>>>>
>>>> A friend of mine is having a problem with the following csd file.  
>>>> It
>>>> runs for me fine on windows but stops for him on his OSX machine  
>>>> with
>>>> a Csound bus error, I can't see what the problem is, I get no  
>>>> errors.
>>>> He's just updated Csound and is using the latest version, as am I.
>>>> Here is the csd file, the console output is below.
>>>>
>>>> 
>>>> 
>>>> -odevaudio1 -b10 -idevaudio1
>>>> 
>>>> 
>>>> sr = 44100
>>>> kr = 4410
>>>> ksmps = 10
>>>> nchnls = 2
>>>>
>>>> instr 1
>>>> ;read the pulses from the function table
>>>> krate = 4       ;number of beats per second
>>>>
>>>> kmet metro krate        ;output a trigger once a second
>>>>
>>>> kndx phasor 1/(16/krate)        ;table index
>>>>
>>>> ;read each of the tables, you'll need to add more of these
>>>> ktbl1 tab kndx, 2, 1    ;set mode to one so that table length is
>>>> normalised
>>>> ktbl2 tab kndx, 3, 1
>>>>
>>>> ;if any of the tables has a pulse when metro is on, enter this loop
>>>> and play the sound
>>>> if(kmet==1) then
>>>>       if(ktbl1==1) then       ;if there is a pulse in table 1  
>>>> play it
>>>>       ; play first sound
>>>>       ;                       instr           delay   duration
>>>>  ifn/soundfile
>>>>       event "i",      2,              0,               
>>>> 2,              1
>>>>       endif
>>>>       if(ktbl2==1) then       ;inf there is a pulse in table 2  
>>>> play it
>>>>       ;play second second
>>>>       event "i",      2,              0,               
>>>> 2,              2
>>>>       endif
>>>> endif
>>>> endin
>>>>
>>>>
>>>> instr 2
>>>> Sfilename = "kick.wav"
>>>> ;p4 is the sound you want to play as determined from the instrument
>>>> ;above. Add as many of these if statement as you want sounds
>>>>
>>>> if(p4==1) then  ;1 for kick
>>>> Sfilename = "kick.wav"
>>>> elseif(p4==2) then      ;2 for snare
>>>> Sfilename  = "ride.wav"
>>>> endif
>>>>
>>>> klen strlenk Sfilename
>>>> ;check valid string for filename
>>>> if(klen>0) then
>>>>       ;check for stero of mono
>>>>       ir filenchnls Sfilename
>>>>       if(ir==1) then
>>>>       a1 diskin Sfilename, 1, 0, 0
>>>>       outs a1, a1
>>>>       elseif(ir==2) then
>>>>       a1, a2 diskin Sfilename, 1, 0, 0
>>>>       outs a1, a2
>>>>       endif
>>>> endif
>>>>
>>>> endin
>>>>
>>>> 
>>>> 
>>>> f1 0 1024 10 1
>>>> f2 0 -16 2 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1
>>>> f3 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1
>>>> f4 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1
>>>> f5 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1
>>>> f6 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1
>>>> f7 0 -16 2 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
>>>> i1 0 100
>>>> 
>>>> 
>>>>
>>>> This is the output when run from either command line or through a
>>>> frontend:
>>>>
>>>> -+rtaudio=portaudio -iadc -odac --env:CSNOSTOP=yesPortMIDI real  
>>>> time
>>>> MIDI plugin for Csound
>>>> PortAudio real-time audio module for Csound
>>>> virtual_keyboard real time MIDI plugin for Csound
>>>> 0dBFS level = 32768.0
>>>> Csound version 5.10 (float samples) Dec 18 2008
>>>> libsndfile-1.0.16
>>>> UnifiedCSD:  /Users/broganmartin/mycsound/DrumPlayer.csd
>>>> STARTING FILE
>>>> Creating orchestra
>>>> Creating score
>>>> orchname:  /tmp/tmp.0.5MbTQ5.orc
>>>> scorename: /tmp/tmp.1.oKZjaG.sco
>>>> rtaudio: PortAudio module enabled ... using callback interface
>>>> rtmidi: PortMIDI module enabled
>>>> orch compiler:
>>>> 108 lines read
>>>>       instr   1
>>>>       instr   2
>>>> LABELS list is full...extending to 10
>>>> Elapsed time at end of orchestra compile: real: 0.050s, CPU: 0.020s
>>>> sorting score ...
>>>>       ... done
>>>> Elapsed time at end of score sort: real: 0.158s, CPU: 0.030s
>>>> Csound version 5.10 (float samples) Dec 18 2008
>>>> 0dBFS level = 32768.0
>>>> orch now loaded
>>>> audio buffered in 512 sample-frame blocks
>>>> reading 2048-byte blks of shorts from adc (RAW)
>>>> PortAudio V19-devel
>>>> PortAudio: available input devices:
>>>>  0: Built-in Audio
>>>> PortAudio: selected input device 'Built-in Audio'
>>>> PortAudio: available output devices:
>>>>  0: Built-in Audio
>>>> PortAudio: selected output device 'Built-in Audio'
>>>> WARNING: buffer size should be an integer multiple of ksmps in
>>>> full-duplex mode
>>>> writing 2048-byte blks of shorts to dac
>>>> SECTION 1:
>>>> ftable 1:
>>>> ftable 2:
>>>> ftable 3:
>>>> ftable 4:
>>>> ftable 5:
>>>> ftable 6:
>>>> ftable 7:
>>>> new alloc for instr 1:
>>>>  rtevent:         T  1.750 TT  1.750 M:      0.0      0.0
>>>> new alloc for instr 2:
>>>> diskin: opened '/Users/broganmartin/mycsound/kick.wav':
>>>>       44100 Hz, 1 channel(s), 10624 sample frames
>>>> bufsize 4096
>>>> new alloc for instr 2:
>>>> diskin: opened '/Users/broganmartin/mycsound/ride.wav':
>>>>       44100 Hz, 1 channel(s), 42864 sample frames
>>>> bufsize 4096
>>>> Csound tidy up: Bus error
>>>> inactive allocs returned to freespace
>>>> end of score.              overall amps:  60780.0  60780.0
>>>>          overall samples out of range:      378      378
>>>> 0 errors in performance
>>>> Elapsed time at end of performance: real: 10.778s, CPU: 0.530s
>>>> 167 2048-byte soundblks of shorts written to dac
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Andrés
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-11 11:19
FromPeiman Khosravi
Subject[Csnd] Re: Re: Re: Re: problem with following csd..
Well if it's a bug shouldn't it be fixed?

I don't remember it being the case a couple of years ago so it's  
relatively new.

Best,

P

On 11 Feb 2010, at 11:14, Rory Walsh wrote:

> Thanks guys, I hadn't spotted that before although I can remember
> seeing threads about diskin2. Might a note be put into the manual
> about this? Cheers,
>
> Rory.
>
>
> On 11 February 2010 10:43, Peiman Khosravi  
>  wrote:
>> Hello,
>>
>> There is a bug in diskin. It crashes if the note length is longer  
>> than the
>> loaded  sound-file. Note that this happens in the non-loop mode only.
>> Best,
>>
>> Peiman
>>
>> On 11 Feb 2010, at 10:30, Andres Cabrera wrote:
>>
>>> Hi,
>>>
>>> I think the problem is diskin. Try diskin2.
>>>
>>>
>>> Cheers,
>>> Andrés
>>>
>>> On Thu, Feb 11, 2010 at 10:28 AM, Rory Walsh   
>>> wrote:
>>>>
>>>> A friend of mine is having a problem with the following csd file.  
>>>> It
>>>> runs for me fine on windows but stops for him on his OSX machine  
>>>> with
>>>> a Csound bus error, I can't see what the problem is, I get no  
>>>> errors.
>>>> He's just updated Csound and is using the latest version, as am I.
>>>> Here is the csd file, the console output is below.
>>>>
>>>> 
>>>> 
>>>> -odevaudio1 -b10 -idevaudio1
>>>> 
>>>> 
>>>> sr = 44100
>>>> kr = 4410
>>>> ksmps = 10
>>>> nchnls = 2
>>>>
>>>> instr 1
>>>> ;read the pulses from the function table
>>>> krate = 4       ;number of beats per second
>>>>
>>>> kmet metro krate        ;output a trigger once a second
>>>>
>>>> kndx phasor 1/(16/krate)        ;table index
>>>>
>>>> ;read each of the tables, you'll need to add more of these
>>>> ktbl1 tab kndx, 2, 1    ;set mode to one so that table length is
>>>> normalised
>>>> ktbl2 tab kndx, 3, 1
>>>>
>>>> ;if any of the tables has a pulse when metro is on, enter this loop
>>>> and play the sound
>>>> if(kmet==1) then
>>>>       if(ktbl1==1) then       ;if there is a pulse in table 1  
>>>> play it
>>>>       ; play first sound
>>>>       ;                       instr           delay   duration
>>>>  ifn/soundfile
>>>>       event "i",      2,              0,               
>>>> 2,              1
>>>>       endif
>>>>       if(ktbl2==1) then       ;inf there is a pulse in table 2  
>>>> play it
>>>>       ;play second second
>>>>       event "i",      2,              0,               
>>>> 2,              2
>>>>       endif
>>>> endif
>>>> endin
>>>>
>>>>
>>>> instr 2
>>>> Sfilename = "kick.wav"
>>>> ;p4 is the sound you want to play as determined from the instrument
>>>> ;above. Add as many of these if statement as you want sounds
>>>>
>>>> if(p4==1) then  ;1 for kick
>>>> Sfilename = "kick.wav"
>>>> elseif(p4==2) then      ;2 for snare
>>>> Sfilename  = "ride.wav"
>>>> endif
>>>>
>>>> klen strlenk Sfilename
>>>> ;check valid string for filename
>>>> if(klen>0) then
>>>>       ;check for stero of mono
>>>>       ir filenchnls Sfilename
>>>>       if(ir==1) then
>>>>       a1 diskin Sfilename, 1, 0, 0
>>>>       outs a1, a1
>>>>       elseif(ir==2) then
>>>>       a1, a2 diskin Sfilename, 1, 0, 0
>>>>       outs a1, a2
>>>>       endif
>>>> endif
>>>>
>>>> endin
>>>>
>>>> 
>>>> 
>>>> f1 0 1024 10 1
>>>> f2 0 -16 2 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1
>>>> f3 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1
>>>> f4 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1
>>>> f5 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1
>>>> f6 0 -16 2 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1
>>>> f7 0 -16 2 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1
>>>> i1 0 100
>>>> 
>>>> 
>>>>
>>>> This is the output when run from either command line or through a
>>>> frontend:
>>>>
>>>> -+rtaudio=portaudio -iadc -odac --env:CSNOSTOP=yesPortMIDI real  
>>>> time
>>>> MIDI plugin for Csound
>>>> PortAudio real-time audio module for Csound
>>>> virtual_keyboard real time MIDI plugin for Csound
>>>> 0dBFS level = 32768.0
>>>> Csound version 5.10 (float samples) Dec 18 2008
>>>> libsndfile-1.0.16
>>>> UnifiedCSD:  /Users/broganmartin/mycsound/DrumPlayer.csd
>>>> STARTING FILE
>>>> Creating orchestra
>>>> Creating score
>>>> orchname:  /tmp/tmp.0.5MbTQ5.orc
>>>> scorename: /tmp/tmp.1.oKZjaG.sco
>>>> rtaudio: PortAudio module enabled ... using callback interface
>>>> rtmidi: PortMIDI module enabled
>>>> orch compiler:
>>>> 108 lines read
>>>>       instr   1
>>>>       instr   2
>>>> LABELS list is full...extending to 10
>>>> Elapsed time at end of orchestra compile: real: 0.050s, CPU: 0.020s
>>>> sorting score ...
>>>>       ... done
>>>> Elapsed time at end of score sort: real: 0.158s, CPU: 0.030s
>>>> Csound version 5.10 (float samples) Dec 18 2008
>>>> 0dBFS level = 32768.0
>>>> orch now loaded
>>>> audio buffered in 512 sample-frame blocks
>>>> reading 2048-byte blks of shorts from adc (RAW)
>>>> PortAudio V19-devel
>>>> PortAudio: available input devices:
>>>>  0: Built-in Audio
>>>> PortAudio: selected input device 'Built-in Audio'
>>>> PortAudio: available output devices:
>>>>  0: Built-in Audio
>>>> PortAudio: selected output device 'Built-in Audio'
>>>> WARNING: buffer size should be an integer multiple of ksmps in
>>>> full-duplex mode
>>>> writing 2048-byte blks of shorts to dac
>>>> SECTION 1:
>>>> ftable 1:
>>>> ftable 2:
>>>> ftable 3:
>>>> ftable 4:
>>>> ftable 5:
>>>> ftable 6:
>>>> ftable 7:
>>>> new alloc for instr 1:
>>>>  rtevent:         T  1.750 TT  1.750 M:      0.0      0.0
>>>> new alloc for instr 2:
>>>> diskin: opened '/Users/broganmartin/mycsound/kick.wav':
>>>>       44100 Hz, 1 channel(s), 10624 sample frames
>>>> bufsize 4096
>>>> new alloc for instr 2:
>>>> diskin: opened '/Users/broganmartin/mycsound/ride.wav':
>>>>       44100 Hz, 1 channel(s), 42864 sample frames
>>>> bufsize 4096
>>>> Csound tidy up: Bus error
>>>> inactive allocs returned to freespace
>>>> end of score.              overall amps:  60780.0  60780.0
>>>>          overall samples out of range:      378      378
>>>> 0 errors in performance
>>>> Elapsed time at end of performance: real: 10.778s, CPU: 0.530s
>>>> 167 2048-byte soundblks of shorts written to dac
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Andrés
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-11 11:29
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: problem with following csd..
> No, I think we need to fix diskin instead.

I agree.



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"