Csound Csound-dev Csound-tekno Search About

[Csnd] Can't read score events from stdin

Date2010-08-02 03:35
FromDaniel Lopez
Subject[Csnd] Can't read score events from stdin
Hi list,

I'm having a problem using the -L option to read score events from stdin 
in realtime. When I type, the characters don't appear in the console 
window - only later when CSound exits, do the things I typed suddenly 
burst through to the command line all at once (to be rejected by the 
shell as invalid commands).

I'm effectively a newbie (used CSound before but years ago) so maybe I'm 
missing something simple.

I'm on Windows XP, with CSound 5.11 float. My command line is:

csound -L stdin -d -o dac test5.csd

test5.csd is a simple test score which just plays 3 short notes and also 
has a "f 0 36000" in it to stop CSound from exiting. I hear the notes 
play, and the lines showing time, duration, etc appear in the console 
for those notes. After that is when I try to type and it doesn't take 
the input (I also tried typing a fully-formed i statement blindly and 
pressing return but it doesn't trigger a sound).

I'm pasting the CSound output and the actual CSD at the end of this 
message. Anyone have an idea?

Daniel


---------------

D:\Temp\csound>csound -L stdin -d -o dac test5.csd
PortMIDI 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.11 (float samples) Nov  1 2009
libsndfile-1.0.20
UnifiedCSD:  test5.csd
STARTING FILE
Creating orchestra
Creating score
orchname:  C:\DOCUME~1\Daniel\LOCALS~1\Temp\cs7.orc
scorename: C:\DOCUME~1\Daniel\LOCALS~1\Temp\cs8.sco
RAWWAVE_PATH: D:\Programs\Sound\Synth\CSound\bin\5.11\samples/
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
5 lines read
         instr   1
Elapsed time at end of orchestra compile: real: 0.004s, CPU: 0.000s
sorting score ...
         ... done
Elapsed time at end of score sort: real: 0.005s, CPU: 0.016s
Csound version 5.11 (float samples) Nov  1 2009
displays suppressed
0dBFS level = 32768.0
orch now loaded
stdmode = 00000000 Linefd = 0
audio buffered in 4096 sample-frame blocks
Constructor
Init ASIO Jack
Stop ASIO Jack
Stop ASIO Jack
Destructor
no message buffer overruns
PortAudio V19-devel (built Jun 18 2009 20:08:20)
PortAudio: available output devices:
    0: Microsoft Sound Mapper - Output
    1: Realtek HD Audio output
    2: Bluetooth AV/HS Audio
    3: Primary Sound Driver
    4: Realtek HD Audio output
    5: Bluetooth AV/HS Audio
    6: JackRouter
PortAudio: selected output device 'Realtek HD Audio output'
writing 8192-byte blks of shorts to dac
SECTION 1:
ftable 1:
new alloc for instr 1:
B  0.000 ..  0.500 T  0.500 TT  0.500 M:   9987.9
B  0.500 ..  1.000 T  1.000 TT  1.000 M:   9977.1

<< Here's where I type, nothing happens, eventually I press Ctrl-C >>

Csound tidy up: Interrupt
Early return from csoundPerform().
inactive allocs returned to freespace
end of score.              overall amps:   9987.9
            overall samples out of range:        0
0 errors in performance
Elapsed time at end of performance: real: 6.530s, CPU: 6.532s
stdmode = 00000000 Linefd = 0
69 8192-byte soundblks of shorts written to dac

-----------------




     instr 1
kenv    linseg    10000, p3, 0
ar    oscil    kenv, p4, 1
     out    ar
     endin



f 0 36000
f 1 0 1024 10 1

i 1 0   0.5 387
i 1 0.5 0.5 220
i 1 1   0.5 387







Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-08-02 03:48
FromSteven Yi
Subject[Csnd] Re: Can't read score events from stdin
This is a known issue with Windows and pipes; essentially, -L and
stdin is not usable on Windows.

On Sun, Aug 1, 2010 at 10:35 PM, Daniel Lopez  wrote:
> Hi list,
>
> I'm having a problem using the -L option to read score events from stdin in
> realtime. When I type, the characters don't appear in the console window -
> only later when CSound exits, do the things I typed suddenly burst through
> to the command line all at once (to be rejected by the shell as invalid
> commands).
>
> I'm effectively a newbie (used CSound before but years ago) so maybe I'm
> missing something simple.
>
> I'm on Windows XP, with CSound 5.11 float. My command line is:
>
> csound -L stdin -d -o dac test5.csd
>
> test5.csd is a simple test score which just plays 3 short notes and also has
> a "f 0 36000" in it to stop CSound from exiting. I hear the notes play, and
> the lines showing time, duration, etc appear in the console for those notes.
> After that is when I try to type and it doesn't take the input (I also tried
> typing a fully-formed i statement blindly and pressing return but it doesn't
> trigger a sound).
>
> I'm pasting the CSound output and the actual CSD at the end of this message.
> Anyone have an idea?
>
> Daniel
>
>
> ---------------
>
> D:\Temp\csound>csound -L stdin -d -o dac test5.csd
> PortMIDI 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.11 (float samples) Nov  1 2009
> libsndfile-1.0.20
> UnifiedCSD:  test5.csd
> STARTING FILE
> Creating orchestra
> Creating score
> orchname:  C:\DOCUME~1\Daniel\LOCALS~1\Temp\cs7.orc
> scorename: C:\DOCUME~1\Daniel\LOCALS~1\Temp\cs8.sco
> RAWWAVE_PATH: D:\Programs\Sound\Synth\CSound\bin\5.11\samples/
> rtaudio: PortAudio module enabled ... using callback interface
> rtmidi: PortMIDI module enabled
> orch compiler:
> 5 lines read
>        instr   1
> Elapsed time at end of orchestra compile: real: 0.004s, CPU: 0.000s
> sorting score ...
>        ... done
> Elapsed time at end of score sort: real: 0.005s, CPU: 0.016s
> Csound version 5.11 (float samples) Nov  1 2009
> displays suppressed
> 0dBFS level = 32768.0
> orch now loaded
> stdmode = 00000000 Linefd = 0
> audio buffered in 4096 sample-frame blocks
> Constructor
> Init ASIO Jack
> Stop ASIO Jack
> Stop ASIO Jack
> Destructor
> no message buffer overruns
> PortAudio V19-devel (built Jun 18 2009 20:08:20)
> PortAudio: available output devices:
>   0: Microsoft Sound Mapper - Output
>   1: Realtek HD Audio output
>   2: Bluetooth AV/HS Audio
>   3: Primary Sound Driver
>   4: Realtek HD Audio output
>   5: Bluetooth AV/HS Audio
>   6: JackRouter
> PortAudio: selected output device 'Realtek HD Audio output'
> writing 8192-byte blks of shorts to dac
> SECTION 1:
> ftable 1:
> new alloc for instr 1:
> B  0.000 ..  0.500 T  0.500 TT  0.500 M:   9987.9
> B  0.500 ..  1.000 T  1.000 TT  1.000 M:   9977.1
>
> << Here's where I type, nothing happens, eventually I press Ctrl-C >>
>
> Csound tidy up: Interrupt
> Early return from csoundPerform().
> inactive allocs returned to freespace
> end of score.              overall amps:   9987.9
>           overall samples out of range:        0
> 0 errors in performance
> Elapsed time at end of performance: real: 6.530s, CPU: 6.532s
> stdmode = 00000000 Linefd = 0
> 69 8192-byte soundblks of shorts written to dac
>
> -----------------
>
> 
>
> 
>    instr 1
> kenv    linseg    10000, p3, 0
> ar    oscil    kenv, p4, 1
>    out    ar
>    endin
> 
>
> 
> f 0 36000
> f 1 0 1024 10 1
>
> i 1 0   0.5 387
> i 1 0.5 0.5 220
> i 1 1   0.5 387
> 
>
> 
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2010-08-02 04:05
FromDaniel Lopez
Subject[Csnd] Re: Can't read score events from stdin
Ah, okay. Thanks.

Daniel

On 02/08/2010 03:48, Steven Yi wrote:
> This is a known issue with Windows and pipes; essentially, -L and
> stdin is not usable on Windows.
>
> On Sun, Aug 1, 2010 at 10:35 PM, Daniel Lopez  wrote:
>    
>> Hi list,
>>
>> [...]
>>      




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-08-02 04:09
FromJacob Joaquin
Subject[Csnd] Re: Re: Can't read score events from stdin
On Sun, Aug 1, 2010 at 8:05 PM, Daniel Lopez  wrote:
> Ah, okay. Thanks.

I'm not sure if this would work, but perhaps you could install cygwin.
It's what I used for years when I was still using windows, but needed
a decent bash style command prompt.

http://www.cygwin.com/

Best,
Jake

Date2010-08-02 05:28
FromDaniel Lopez
Subject[Csnd] Re: Re: Re: Can't read score events from stdin
On 02/08/2010 04:09, Jacob Joaquin wrote:
> On Sun, Aug 1, 2010 at 8:05 PM, Daniel Lopez  wrote:
>    
>> Ah, okay. Thanks.
>>      
> I'm not sure if this would work, but perhaps you could install cygwin.
> It's what I used for years when I was still using windows, but needed
> a decent bash style command prompt.
>
> http://www.cygwin.com/
>
> Best,
> Jake
>    
I have Cygwin installed already, so I tried it now but unfortunately it 
does the same thing. I also tried with some alternative terminals (rxvt, 
mintty) and they did behave slightly differently, but still failed 
overall. Good idea though; maybe if I compiled CSound under Cygwin it 
might work, though I'm sure that could turn out to be quite complicated 
in its own right.

Fortunately as an alternative I can try to use the API as this is for a 
program that I'm writing; and using the API was my ultimate intention 
anyway, I just wanted stdin as a short-term test.

Daniel



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"