[Cs-dev] python and csound6 strange freeze
Date | 2013-05-17 23:50 |
From | peiman khosravi |
Subject | [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
H Pello, I'm trying an instrument, which works in csound but seems to freeze python, like an infinite loop or something. I've pasted both, the csd and the python code. p2 is small (.0001) but that's only a frequency of 10000Hz, and it works in real time in a normal csd. Best, eiman
import csnd6 cs = csnd6.csoundCreate(None) csnd6.csoundSetOption(cs,"-odac") csnd6.csoundStart(cs) perf = csnd6.CsoundPerformanceThread(cs) perf.Play() csnd6.csoundCompileOrc(cs, ''' event_i "i", 1, 0, 1 ;;;;;;; instr 1 schedule 1, .0001, .001 endin ''') <CsoundSynthesizer> <CsOptions> -odac -d -+msg_color=0 ;-o test.aif -d -+msg_color=0 -A -3 </CsOptions> ; ============================================== <CsInstruments> sr = 96000 ksmps = 10 nchnls = 1 0dbfs = 1 event_i "i", 1, 0, 1 instr 1 schedule 1, .0001, .001 endin </CsInstruments> ; ============================================== <CsScore> </CsScore> </CsoundSynthesizer> |
Date | 2013-05-18 00:14 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Could it be the printout? www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 17 May 2013 23:50, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 01:14 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
The attached csd freezes csound too (ran in the terminal without python). Is there a limit somewhere?
Thanks Peiman www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 00:14, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 02:27 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
So the question is, why does A freeze but B doesn't. I'll test it on csound5 on my other machine tomorrow too. --A-- <CsoundSynthesizer> <CsOptions> -odac -d -+msg_color=0
;-o test.aif -d -+msg_color=0 -A -3 </CsOptions> ; ==============================================
<CsInstruments> sr = 96000
ksmps = 10 nchnls = 1
0dbfs = 1 event_i "i", 1, 0, 1
instr 1 schedule 1, .00005, .001 endin </CsInstruments> ; ============================================== <CsScore>
</CsScore> </CsoundSynthesizer> --B-- <CsoundSynthesizer> <CsOptions> -odac -d -+msg_color=0 ;-o test.aif -d -+msg_color=0 -A -3
</CsOptions> ; ============================================== <CsInstruments> sr = 96000 ksmps = 10
nchnls = 1 0dbfs = 1
event_i "i", 1, 0, 10 instr 1 ktrigger metro 200000
schedkwhen ktrigger, .000005, 5000, 2, 0, .01 endin instr 2
idummy = 666 print idummy endin </CsInstruments> ; ==============================================
<CsScore> </CsScore> </CsoundSynthesizer> www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 17 May 2013 23:50, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 02:51 |
From | Justin Smith |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
just a hunch, but the latter may be stalling because you are trying to spawn 200000 instruments a second having a metro at a higher frequency than your k rate doesn't really make sense anyway, since it only produces a 1 when the phase is exactly 0, the likely behavior would be to get ticks from it when its rate and k cycles are in phase(?) On Fri, May 17, 2013 at 6:27 PM, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 07:43 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
A does not freeze on the command-line here. Victor On 18 May 2013, at 02:27, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 09:54 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I found the problem. It had to do with the control rate being too low as Justin mentioned. It makes sense. Thanks Peiman www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 07:43, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 09:59 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
The "freeze" in Python is an infinite loop in i-time. It's pretty much like setting start time to 0 (as in Rory's code). The reason for this is that the interval between one event and the next is less than 1-kcycle, so the start times are quantized to 0, and you're stuck in i-time. It's not a real "freeze", because you can exit Csound by calling csoundReset() (perf.Stop() will not do anything as the performance is stuck in i-time). If you want to do start times that short, you will need to put in a counter with a check for a max number of instances and cuttoff at that point. Or reduce ksmps. Effectively, because you're not doing any check to come out of the i-time loop, you need to observe the minimum 1/ksmps interval between spawn events. On 18 May 2013, at 02:27, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 10:06 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Thanks Victor,
A couple of questions below. On 18 May 2013 09:59, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Would this be the case with the sample-accurate mode too?
I tried this and it works. But after I've called csoundReset(), the next time I try to compile and instrument nothing happens. In fact csoundReset() followed by Stop() doesn't work either. Is this normal?
I see. I'll put some checks in place then!
Thanks very much Peiman
|
Date | 2013-05-18 10:46 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
OK reset works as long as it is the first thing I do. For instance, if I recompile an empty instrument with the same number and then try reset, it doesn't do anything.
www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 10:06, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 10:57 |
From | Steven Yi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
I get the impression that the issue of calling schedule with effective 0 start gets us the loop due to appending to the event chain. If we prepended instead, that might be a way to never run into this problem, as Csound would keep going down the chain (not sure what would happen in the parallel case). If we're scheduling for another instrument, the behavior should be the same where it will get rendered in the same k-pass. I imagine there could be issues with prepending, so this just might be a user coding issue to solve. On Sat, May 18, 2013 at 11:46 AM, peiman khosravi |
Date | 2013-05-18 11:07 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Wouldn't an easy solution be to have an internal check in place so that all the event opcodes have a minimum of one k-period, while printing a warning?
I'm just thinking that in a live-coding situation it is easy to make a mistake and set the value to 0, and it wouldn't be so good if the entire performance was halted as a result.
P www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 10:57, Steven Yi <stevenyi@gmail.com> wrote: I get the impression that the issue of calling schedule with effective |
Date | 2013-05-18 11:13 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Also, with --sample-accurate option on, shouldn't the events be quantised to the sample period? www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 11:07, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 11:25 |
From | Steven Yi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
I don't think that'd quite work. Currently, if you have an instrument that then calls, say, 2 others, a user might expect that all 3 play in tandem. If they're on ksmps off, the other 2 will be off, and if the user is relying on them being in sync it could cause unexpected beating, etc. Granted, I'm not sure that's a great use of schedule, but I also don't want to break anyone's pieces if they did use it that way. On Sat, May 18, 2013 at 12:13 PM, peiman khosravi |
Date | 2013-05-18 11:25 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I can confirm that csoundReset() is behaving erratically. I can't really predict it's outcome. www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 11:13, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 11:32 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Yes, I see. www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 11:25, Steven Yi <stevenyi@gmail.com> wrote: I don't think that'd quite work. Currently, if you have an instrument |
Date | 2013-05-18 12:25 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Sample accurate does not come into play here, because the events are always scheduled to start at a given kcycle, sample accuracy only makes the actual synthesis start at the right time in the cycle. The problem is that this is an infinite loop. If you reset, you will need to start csound and a new thread again to perform, otherwise, nothing happens. Victor On 18 May 2013, at 10:06, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 12:27 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
No, events start at the kcycle, but synthesis commences at the correct sample. On 18 May 2013, at 11:13, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 12:28 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Behaving erratically how? You need to give an example. Just saying this does not help. On 18 May 2013, at 11:25, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 12:37 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Just to note, when you're using the API, be careful with the order of operations, etc, because you can easily create programs that don't work or break down, and it is not the API's fault. This is a level down from using Csound as a language. If you have found a bug, make sure it is not your program and it is a genuine one, then report through the bug tracking system. Doing the tests etc before reporting, will allow us to use our time more efficiently, esp. now at this point when we are busy getting the new release into shape. Victor On 18 May 2013, at 12:28, Victor Lazzarini wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 12:38 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I see. Thanks for the info Victor.
This is all very new but I'm getting my head around it. the workflow is amazing! P www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 12:25, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 12:45 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
yes, that might be a solution alright. Victor On 18 May 2013, at 10:57, Steven Yi wrote: > I get the impression that the issue of calling schedule with effective > 0 start gets us the loop due to appending to the event chain. If we > prepended instead, that might be a way to never run into this problem, > as Csound would keep going down the chain (not sure what would happen > in the parallel case). If we're scheduling for another instrument, > the behavior should be the same where it will get rendered in the same > k-pass. I imagine there could be issues with prepending, so this just > might be a user coding issue to solve. > > On Sat, May 18, 2013 at 11:46 AM, peiman khosravi > |
Date | 2013-05-18 12:46 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
OK, so here's an example.
1.1- Start the python shell and compile and instrument. All runs well. 2.1- Reset csound. Performance is stopped and Python is exited. I'm left with the bash shell. (Not sure if this is normal.)
1.2- Start csound as above but this time compile an instrument that leads to an infinite loop (using the code I sent earlier). Csound freezes.
2.2- Reset csound, performance stops but python has not been exited. (inconsistent in relation to above.)
3.2-I recompile the entire code, including import csnd6, csoundCreate(), and Paly(), nothing happens.
Am I missing something? Thanks
Peiman www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 12:28, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 12:49 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Sure things, noted. Thank!
P www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 12:37, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 12:50 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
BTW I'm hoping it's not a bug but my programme! www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 12:49, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-18 13:49 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Can you give us a program to test? From your description, I am not sure what API calls you are calling. When exiting the infinite loop, you are probably left with a hanging perf thread and that is whrere the problem is. Ideally, after perf.Stop() you should call perf.Join() just to make sure the perf thread is exited cleanly. On 18 May 2013, at 12:46, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 13:52 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Sure, I'll send the progarmme but I'll do some more testing first.
Thanks! P www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 13:49, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 13:58 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
This is a test of csoundReset(), shows that it works as expected: import csnd6 cs = csnd6.csoundCreate(None) for i in range(0,4): csnd6.csoundSetOption(cs, "-odac") csnd6.csoundCompileOrc(cs, "instr 1 \n a1 oscils p4, p5, 0 \n out a1 \n endin \n") csnd6.csoundReadScore(cs, "i1 0 1 16000 440 \n") csnd6.csoundStart(cs) csnd6.csoundPerform(cs) csnd6.csoundReset(cs) On 18 May 2013, at 13:52, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 14:14 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Here's my test: import csnd6 cs = csnd6.csoundCreate(None) csnd6.csoundSetOption(cs,"-odac")
csnd6.csoundStart(cs) perf = csnd6.CsoundPerformanceThread(cs) perf.Play()
csnd6.csoundCompileOrc(cs, ''' event_i "i", 1, 0, 100 instr 1 ;schedule 1, 0, .001
endin ''') perf.Stop() perf.Join()
csnd6.csoundReset(cs)
I run this programme and then run the csnd6.csoundReset(sc) line (ignoring perf.Stop() and perf.Join()). I get the following result (why is python terminating?): In [5]: perf = csnd6.CsoundPerformanceThread(cs) In [6]: perf.Play() In [7]: csnd6.csoundCompileOrc(cs, ''' ...: event_i "i", 1, 0, 100
...: instr 1 ...: ;schedule 1, 0, .001
...: endin ...: ''') Parsing successful!
rtevent: T 2.276 TT 2.276 M: 0.0 new alloc for instr 1:
Out[7]: 0
In [8]: csnd6.csoundReset(cs) inactive allocs returned to freespace
end of score. overall amps: 0.0 overall samples out of range: 0
0 errors in performance Elapsed time at end of performance: real: 7.434s, CPU: 0.321s
closing device 278 1024 sample blks of 64-bit floats written to dac
Csound tidy up: Segmentation fault CoreMIDI real time MIDI plugin for Csound
PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound Error: define environment variable RAWWAVE_PATH
(points to rawwaves directory) to use STK opcodes. rtaudio: PortAudio module enabled ...
using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0
Csound version 6.00rc1 (double samples) May 15 2013 libsndfile-1.0.21
In [9]: end of score. overall amps: 0.0
overall samples out of range: 0 0 errors in performance
Elapsed time at end of performance: real: 0.200s, CPU: 0.005s bash-3.2$
www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 13:58, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 14:22 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Your example doesn't seem to be working here. Am I right to expect to hear 4 beeps, one per second? I get this, and no sound:
rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0
Csound version 6.00rc1 (double samples) May 15 2013 libsndfile-1.0.21 In [3]: for i in range(0,4):
...: csnd6.csoundSetOption(cs, "-odac") ...: csnd6.csoundCompileOrc(cs, "instr 1 \n a1 oscils p4, p5, -1 \n out a1 \n endin \n")
...: csnd6.csoundReadScore(cs, "i1 0 1 16000 440 \n") ...: csnd6.csoundStart(cs) ...: csnd6.csoundPerform(cs)
...: csnd6.csoundReset(cs) ...: www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 13:58, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 16:15 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Run this as a program in the command-line, python test.py On 18 May 2013, at 14:22, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 16:17 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
If you ignore perf.Stop() and perf.Join(), the processing thread will be zombified. On 18 May 2013, at 14:14, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 16:19 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Yes that works as expected. www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 16:15, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 16:21 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I see. So csnd6.csoundReset(cs) should be used after or before perf.Stop()?
www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 16:17, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 16:21 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
On the ipython interpreter, if I cut and paste the code there and press enter, it works: coltrane:debug victor$ ipython Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) Type "copyright", "credits" or "license" for more information. IPython 0.13.2 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import csnd6 In [2]: cs = csnd6.csoundCreate(None) CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0 Csound version 6.00rc1 (double samples) May 17 2013 libsndfile-1.0.21 In [3]: for i in range(0,4): ...: csnd6.csoundSetOption(cs, "-odac") ...: csnd6.csoundCompileOrc(cs, "instr 1 \n a1 oscils p4, p5, 0 \n out a1 \n endin \n") ...: csnd6.csoundReadScore(cs, "i1 0 1 16000 440 \n") ...: csnd6.csoundStart(cs) ...: csnd6.csoundPerform(cs) ...: csnd6.csoundReset(cs) ...: Parsing successful! Csound version 6.00rc1 (double samples) May 17 2013 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 1024 sample-frame blocks PortAudio V19-devel (built Oct 3 2012 09:31:53) 0: dac0 (Built-in Output) 1: dac1 (Soundflower (2ch)) 2: dac2 (Soundflower (64ch)) 3: dac3 (Aggregate Device) 4: dac4 (output device) PortAudio: selected output device 'Built-in Output' writing 1024 sample blks of 64-bit floats to dac SECTION 1: new alloc for instr 1: B 0.000 .. 1.000 T 1.000 TT 1.000 M: 16000.0 Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 16000.0 overall samples out of range: 0 0 errors in performance Elapsed time at end of performance: real: 3.135s, CPU: 0.149s closing device 44 1024 sample blks of 64-bit floats written to dac CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0 Csound version 6.00rc1 (double samples) May 17 2013 libsndfile-1.0.21 Parsing successful! Csound version 6.00rc1 (double samples) May 17 2013 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 1024 sample-frame blocks PortAudio V19-devel (built Oct 3 2012 09:31:53) 0: dac0 (Built-in Output) 1: dac1 (Soundflower (2ch)) 2: dac2 (Soundflower (64ch)) 3: dac3 (Aggregate Device) 4: dac4 (output device) PortAudio: selected output device 'Built-in Output' writing 1024 sample blks of 64-bit floats to dac SECTION 1: new alloc for instr 1: B 0.000 .. 1.000 T 1.000 TT 1.000 M: 16000.0 Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 16000.0 overall samples out of range: 0 0 errors in performance Elapsed time at end of performance: real: 1.028s, CPU: 0.053s closing device 44 1024 sample blks of 64-bit floats written to dac CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0 Csound version 6.00rc1 (double samples) May 17 2013 libsndfile-1.0.21 Parsing successful! Csound version 6.00rc1 (double samples) May 17 2013 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 1024 sample-frame blocks PortAudio V19-devel (built Oct 3 2012 09:31:53) 0: dac0 (Built-in Output) 1: dac1 (Soundflower (2ch)) 2: dac2 (Soundflower (64ch)) 3: dac3 (Aggregate Device) 4: dac4 (output device) PortAudio: selected output device 'Built-in Output' writing 1024 sample blks of 64-bit floats to dac SECTION 1: new alloc for instr 1: B 0.000 .. 1.000 T 1.000 TT 1.000 M: 16000.0 Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 16000.0 overall samples out of range: 0 0 errors in performance Elapsed time at end of performance: real: 1.028s, CPU: 0.053s closing device 44 1024 sample blks of 64-bit floats written to dac CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0 Csound version 6.00rc1 (double samples) May 17 2013 libsndfile-1.0.21 Parsing successful! Csound version 6.00rc1 (double samples) May 17 2013 graphics suppressed, ascii substituted 0dBFS level = 32768.0 orch now loaded audio buffered in 1024 sample-frame blocks PortAudio V19-devel (built Oct 3 2012 09:31:53) 0: dac0 (Built-in Output) 1: dac1 (Soundflower (2ch)) 2: dac2 (Soundflower (64ch)) 3: dac3 (Aggregate Device) 4: dac4 (output device) PortAudio: selected output device 'Built-in Output' writing 1024 sample blks of 64-bit floats to dac SECTION 1: new alloc for instr 1: B 0.000 .. 1.000 T 1.000 TT 1.000 M: 16000.0 Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 16000.0 overall samples out of range: 0 0 errors in performance Elapsed time at end of performance: real: 1.028s, CPU: 0.053s closing device 44 1024 sample blks of 64-bit floats written to dac CoreMIDI real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound rtaudio: PortAudio module enabled ... using callback interface rtmidi: PortMIDI module enabled 0dBFS level = 32768.0 Csound version 6.00rc1 (double samples) May 17 2013 libsndfile-1.0.21 In [4]: On 18 May 2013, at 14:22, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 16:32 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Not here. pasting the code directly in the ipython interpreter (no macvim or middle man) doesn't work for me. I'll send a video in a sec.
Strange. I must be doing something wrong. www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 16:21, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 16:36 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 16:21, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 17:01 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
If you are using CsoundPerformanceThread to run a performance thread, then you need to stop it, and ideally join it, before reseting csound. On 18 May 2013, at 16:21, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 17:08 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
It could be to do with the cut and paste. I cut from emacs and pasted into ipython. When I tried to cut and paste from Mail, there were strange characters and the whole thing did not work. On 18 May 2013, at 16:36, peiman khosravi wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-18 18:16 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I see. I'll give it another try.
Thanks P www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 17:08, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 18:16 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I see. Thanks www.peimankhosravi.co.uk || Subscribe to RSS Feed
To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 17:01, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2013-05-18 18:33 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
Even when I copy and paste from a plane text document it doesn't work. But don't let me detain you from more important stuff, I'll keep fiddling with it and report back in a few days. I'm sure there is a simple explanation.
Thanks
Peiman www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 18:16, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-19 14:51 |
From | peiman khosravi |
Subject | Re: [Cs-dev] python and csound6 strange freeze |
Attachments | None None |
I found the problem. There was an indentation after the last line in the 'for' block so python was waiting for more lines. Thanks
Peiman www.peimankhosravi.co.uk || Subscribe to RSS Feed To receive emails about upcoming concerts visit this page & enter your email address in the 'follow' section. On 18 May 2013 18:33, peiman khosravi <peimankhosravi@gmail.com> wrote:
|