Csound Csound-dev Csound-tekno Search About

[Csnd] outch

Date2009-08-14 14:05
FromCharles Gran
Subject[Csnd] outch
The use of inch and outch with nchnls isn't clear to me from those
topics in the manual.  For instance, I can't get the csd below to
work.  I have tested an instrument that is set for nchnls=8 that works
correctly with things like outc ganull, ganull, ganull, ganull,
asound1, asound2.

It would seem that nchnls can be set to other vaules than those
documented in the manual.  It states

"nchnls = (optional) -- set number of channels of audio output to
iarg. (1 = mono, 2 = stereo, 4 = quadraphonic.) The default value is 1
(mono). "

What isn't clear from this is if any value is possible and in what
circumstances.  A related concern is that in seems to need out and ins
seems to need outs.  Is some kind of overall clarification on this
available, or am I just not seeing it.  If not, it would be helpful.

[This is probably a follow-up to a thread that Joachim Heintz was
helping me with more than a month ago that I let drop.  Apologies to
you, sir.]

-Charles



-odac4 -iadc4 -b128 -B512



sr = 44100
ksmps = 8
nchnls = 6
0dbfs = 1

instr 1
ain1 inch 1
outch 5,ain1, 6,ain1
endin



i1 0 3600
e



Date2009-08-14 14:15
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: outch
> The use of inch and outch with nchnls isn't clear to me from those
> topics in the manual.  For instance, I can't get the csd below to
> work.  I have tested an instrument that is set for nchnls=8 that works
> correctly with things like outc ganull, ganull, ganull, ganull,
> asound1, asound2.
>
> It would seem that nchnls can be set to other vaules than those
> documented in the manual.  It states
>
> "nchnls = (optional) -- set number of channels of audio output to
> iarg. (1 = mono, 2 = stereo, 4 = quadraphonic.) The default value is 1
> (mono). "
>
> What isn't clear from this is if any value is possible and in what
> circumstances.  A related concern is that in seems to need out and ins
> seems to need outs.  Is some kind of overall clarification on this
> available, or am I just not seeing it.  If not, it would be helpful.
>

Any (integer) value is valid.  Clerly ther are memory implications.....


> [This is probably a follow-up to a thread that Joachim Heintz was
> helping me with more than a month ago that I let drop.  Apologies to
> you, sir.]
>
> -Charles
>
> 
> 
> -odac4 -iadc4 -b128 -B512
> 
>
> 
> sr = 44100
> ksmps = 8
> nchnls = 6
> 0dbfs = 1
>
> instr 1
> ain1 inch 1
> outch 5,ain1, 6,ain1
> endin
> 
>
> 
> i1 0 3600
> e
> 
> 
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>



Date2009-08-14 14:39
Fromjoachim heintz
Subject[Csnd] Re: outch
You said you can't get the csd you have sended to work.
What are the error messages?

	joachim



Am 14.08.2009 um 15:05 schrieb Charles Gran:

> The use of inch and outch with nchnls isn't clear to me from those
> topics in the manual.  For instance, I can't get the csd below to
> work.  I have tested an instrument that is set for nchnls=8 that works
> correctly with things like outc ganull, ganull, ganull, ganull,
> asound1, asound2.
>
> It would seem that nchnls can be set to other vaules than those
> documented in the manual.  It states
>
> "nchnls = (optional) -- set number of channels of audio output to
> iarg. (1 = mono, 2 = stereo, 4 = quadraphonic.) The default value is 1
> (mono). "
>
> What isn't clear from this is if any value is possible and in what
> circumstances.  A related concern is that in seems to need out and ins
> seems to need outs.  Is some kind of overall clarification on this
> available, or am I just not seeing it.  If not, it would be helpful.
>
> [This is probably a follow-up to a thread that Joachim Heintz was
> helping me with more than a month ago that I let drop.  Apologies to
> you, sir.]
>
> -Charles
>
> 
> 
> -odac4 -iadc4 -b128 -B512
> 
>
> 
> sr = 44100
> ksmps = 8
> nchnls = 6
> 0dbfs = 1
>
> instr 1
> ain1 inch 1
> outch 5,ain1, 6,ain1
> endin
> 
>
> 
> i1 0 3600
> e
> 
> 
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>


Date2009-08-14 15:52
FromCharles Gran
Subject[Csnd] Re: Re: outch
Here is the log. I'm not sure why it writes every line twice (because
of the double samples?):

PortMIDI real time MIDI plugin for Csound
PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
0dBFS level = 32768.0
Csound version 5.10 (double samples) Jan  9 2009
Csound version 5.10 (double samples) Jan  9 2009
libsndfile-1.0.18pre24
libsndfile-1.0.18pre24
Reading options from $CSOUNDRC: C:\Csound\.csoundrc
Reading options from $CSOUNDRC: C:\Csound\.csoundrc
UnifiedCSD:  inch-outch.csd
UnifiedCSD:  inch-outch.csd
STARTING FILE
STARTING FILE
Creating options
Creating options
Creating orchestra
Creating orchestra
Creating score
Creating score
orchname:  c:\temp\cs1345.orc
orchname:  c:\temp\cs1345.orc
scorename: c:\temp\cs1363.sco
scorename: c:\temp\cs1363.sco
rtaudio: PortAudio module enabled ... rtaudio: PortAudio module
enabled ... using callback interface
using callback interface
rtmidi: PortMIDI module enabled
rtmidi: PortMIDI module enabled
orch compiler:
orch compiler:
9 lines read
9 lines read
		instr	instr	1	1	

Elapsed time at end of orchestra compile: real: 0.617s, CPU: 0.625s
Elapsed time at end of orchestra compile: real: 0.617s, CPU: 0.625s
sorting score ...
sorting score ...
	... done
	... done
Elapsed time at end of score sort: real: 0.633s, CPU: 0.641s
Elapsed time at end of score sort: real: 0.633s, CPU: 0.641s
Csound version 5.10 (double samples) Jan  9 2009
Csound version 5.10 (double samples) Jan  9 2009
displays suppressed
displays suppressed
0dBFS level = 1.0
0dBFS level = 1.0
orch now loaded
orch now loaded
audio buffered in 128 sample-frame blocks
audio buffered in 128 sample-frame blocks
reading 1536-byte blks of shorts from adc4 (RAW)
reading 1536-byte blks of shorts from adc4 (RAW)
PortAudio V19-devel (built Jan  6 2009 21:14:14)
PortAudio V19-devel (built Jan  6 2009 21:14:14)
PortAudio: available input devices:
PortAudio: available input devices:
   0: Microsoft Sound Mapper - Input
   0: Microsoft Sound Mapper - Input
   1: E-DSP Wave [EC00]
   1: E-DSP Wave [EC00]
   2: Primary Sound Capture Driver
   2: Primary Sound Capture Driver
   3: E-DSP Wave [EC00]
   3: E-DSP Wave [EC00]
   4: E-MU ASIO
   4: E-MU ASIO
PortAudio: selected input device 'E-MU ASIO'
PortAudio: selected input device 'E-MU ASIO'
PortAudio: available output devices:
PortAudio: available output devices:
   0: Microsoft Sound Mapper - Output
   0: Microsoft Sound Mapper - Output
   1: E-DSP Wave [EC00]
   1: E-DSP Wave [EC00]
   2: Primary Sound Driver
   2: Primary Sound Driver
   3: E-DSP Wave [EC00]
   3: E-DSP Wave [EC00]
   4: E-MU ASIO
   4: E-MU ASIO
PortAudio: selected output device 'E-MU ASIO'
PortAudio: selected output device 'E-MU ASIO'
 *** PortAudio: error: -9998: Invalid number of channels
Failed to initialise real time audio output
inactive allocs returned to freespace
inactive allocs returned to freespace
end of score.		   overall amps:end of score.		   overall amps:
0.00000  0.00000  0.00000  0.00000  0.00000  0.00000  0.00000  0.00000
 0.00000  0.00000  0.00000  0.00000
	   overall samples out of range:
	   overall samples out of range:        0        0        0        0
      0        0        0        0        0        0        0        0
1 errors in performance

1 errors in performance
Elapsed time at end of performance: real: 3.179s, CPU: 3.188s


On Fri, Aug 14, 2009 at 8:39 AM, joachim heintz wrote:
> You said you can't get the csd you have sended to work.
> What are the error messages?
>
>        joachim
>
>
>
> Am 14.08.2009 um 15:05 schrieb Charles Gran:
>
>> The use of inch and outch with nchnls isn't clear to me from those
>> topics in the manual.  For instance, I can't get the csd below to
>> work.  I have tested an instrument that is set for nchnls=8 that works
>> correctly with things like outc ganull, ganull, ganull, ganull,
>> asound1, asound2.
>>
>> It would seem that nchnls can be set to other vaules than those
>> documented in the manual.  It states
>>
>> "nchnls = (optional) -- set number of channels of audio output to
>> iarg. (1 = mono, 2 = stereo, 4 = quadraphonic.) The default value is 1
>> (mono). "
>>
>> What isn't clear from this is if any value is possible and in what
>> circumstances.  A related concern is that in seems to need out and ins
>> seems to need outs.  Is some kind of overall clarification on this
>> available, or am I just not seeing it.  If not, it would be helpful.
>>
>> [This is probably a follow-up to a thread that Joachim Heintz was
>> helping me with more than a month ago that I let drop.  Apologies to
>> you, sir.]
>>
>> -Charles
>>
>> 
>> 
>> -odac4 -iadc4 -b128 -B512
>> 
>>
>> 
>> sr = 44100
>> ksmps = 8
>> nchnls = 6
>> 0dbfs = 1
>>
>> instr 1
>> ain1 inch 1
>> outch 5,ain1, 6,ain1
>> endin
>> 
>>
>> 
>> i1 0 3600
>> e
>> 
>> 
>>
>>
>> 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"
>


Date2009-08-14 16:54
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: outch
That says that the output device cannot deal with the 8 channels.  I tried
your .csd to disk and it worked.  But I do not have any 8-channel devices
to test real-time

==John ff

> Here is the log. I'm not sure why it writes every line twice (because
> of the double samples?):
>
....

> PortAudio: selected output device 'E-MU ASIO'
>  *** PortAudio: error: -9998: Invalid number of channels
> Failed to initialise real time audio output



Date2009-08-15 03:01
FromCharles Gran
Subject[Csnd] Re: Re: Re: Re: outch
I currently have my E-MU 0404 set up with 2ins and 16 outs.  It seems
that when I am using real-time ins and outs I can only have as many
outs as I do ins, so in this case I can't get more that 2 outs because
I have 2 physical ins.  So this does not work:

sr = 44100
ksmps = 8
nchnls = 4

instr 1
anull = 0
a1 inch 1
outc anull, anull, a1, a1
endin


Neither does this:

sr = 44100
ksmps = 8
nchnls = 4
0dbfs = 1

instr 1
ain1 inch 1
outch 3,ain1, 4,ain1
endin


Both get:

 *** PortAudio: error: -9998: Invalid number of channels


It above will run with:

nchnls = 2
outch 3,ain1, 4,ain1

though the outs are discarded as documented in the manual

nchnls = 2
outch 1,ain1, 2,ain1

works fine.


This plays fine (though I don't have -iadc enabled):


sr = 44100
ksmps = 8
nchnls = 6
0dbfs = 1

instr 1
anull = 0
a1 oscil .25, 440, 1
outc anull, anull, anull, anull, a1, a1
endin



f1 0 16384 10 1
i1 0 1
e


I can trick my software mixer into thinking I have 4 physical ins.
The above instruments behave the same, but with a four channel
limitation rather than 2.

-Charles

Date2009-08-15 12:22
FromRory Walsh
Subject[Csnd] Re: Re: Re: Re: Re: outch
I'm pretty sure that this is the case with asio, i.e., your number of
inputs must match your number of outputs which is quite frustrating,
I'm not sure how this works with other audio drivers.

Rory.

2009/8/15 Charles Gran :
> I currently have my E-MU 0404 set up with 2ins and 16 outs.  It seems
> that when I am using real-time ins and outs I can only have as many
> outs as I do ins, so in this case I can't get more that 2 outs because
> I have 2 physical ins.  So this does not work:
>
> sr = 44100
> ksmps = 8
> nchnls = 4
>
> instr 1
> anull = 0
> a1 inch 1
> outc anull, anull, a1, a1
> endin
>
>
> Neither does this:
>
> sr = 44100
> ksmps = 8
> nchnls = 4
> 0dbfs = 1
>
> instr 1
> ain1 inch 1
> outch 3,ain1, 4,ain1
> endin
>
>
> Both get:
>
>  *** PortAudio: error: -9998: Invalid number of channels
>
>
> It above will run with:
>
> nchnls = 2
> outch 3,ain1, 4,ain1
>
> though the outs are discarded as documented in the manual
>
> nchnls = 2
> outch 1,ain1, 2,ain1
>
> works fine.
>
>
> This plays fine (though I don't have -iadc enabled):
>
> 
> sr = 44100
> ksmps = 8
> nchnls = 6
> 0dbfs = 1
>
> instr 1
> anull = 0
> a1 oscil .25, 440, 1
> outc anull, anull, anull, anull, a1, a1
> endin
> 
>
> 
> f1 0 16384 10 1
> i1 0 1
> e
> 
>
> I can trick my software mixer into thinking I have 4 physical ins.
> The above instruments behave the same, but with a four channel
> limitation rather than 2.
>
> -Charles
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2009-08-18 15:04
FromCharles Gran
Subject[Csnd] Re: Re: Re: Re: Re: Re: outch
I've been working on this problem, and have a solution for my setup:
windows XP, EMU 0404 soundcard.

When I originally posted I had my E-MU 0404 set up with 4 mono ins and
16 virtual outs mixing to 2 physical outs.  It seems that when I am
using real-time ins and outs I can only have as many outs as I do ins,
otherwise I get:

 *** PortAudio: error: -9998: Invalid number of channels

This is only an issue when I am using real-time input.  I can have as
many outputs as my soundcard will allow when using csound for
synthesis to multiple outs.  This works with the described set up
above:

a1 oscil .05, 440, 1
outc a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1

I'm guessing this IN/OUT issue when using -odac -adc has to do with
the way the EMU software mixer tells csound what's avaliable (an ASIO
thing as Rory says). With the E-MU mixer each input is mapped to an
ASIO Host.

What I've done is mapped the inputs to multiple outputs some of which
are beyond the number of channels strips I set in the mixer (16 out of
a possible 32).  I set up four inputs, two which are physical and two
which are S/PDIF.  Each channel is actually mono, but I have the mixer
set them as stereo.
- The first PCI card in (L) is mapped to ASIO Host 1/2 and 25/26.
- The second PCI card in (R) is mapped to ASIO Host 3/4 and 27/28.
- The first S/PDIF in (L) is mapped to ASIO Host 5/6 and 29/30.
- The second S/PDIF in (L) is mapped to ASIO Host 7/8 and 31/32.

This seems to work fine for csound, I don't get any error messages and
csds like those below work.  I haven't tested my other music software
to see if this causes any havoc.

a1 inch 1
a1 = a1*(1/16)
outc a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1,a1

a1 inch 1
a1 = a1*(1/4)
outch 1,a1,2,a1,15,a1,16,a1

-Charles


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