Csound Csound-dev Csound-tekno Search About

[Csnd] Help with multiple tracks audio playing

Date2011-11-01 13:47
FromMichele Nasti
Subject[Csnd] Help with multiple tracks audio playing
Hi all, 
as always I'm asking your help. 
I have to create a csound file where I put many tracks of the same lenght to play together (for example, ten tracks). I have to play all of them simultaneously, and I have to modify the time stretching of all of them simoultaneously. 
Also, I have to control every single track (mute / un-mute). 

I have had 2 ideas: 

1) instantiate every track in the score with something like this: 

i 1 0 3600 "track01.wav" 
i 1 0 3600 "track02.wav" 
.... etc

In this way I can write a single instrument that takes the name of the track as a parameter. I can use chnget opcode to control global time stretching. In this way I am not sure on how to implement track mute/unmute. Also, I don't know if I can pass strings as parameters in the score. (It seems I can't).

2) Instantiate all the tracks in the orchestra part, put them in a function table, and then create an instrument that will play all this tracks simoultaneously. This time, since I know the number of the tracks, I can do mute/unmute of the single tracks, and maybe I can do time stretching, however I don't know how to play all of them simoultaneously. 

What am I doing wrong is there any other smarter way to do this? 
Thank you all.



Date2011-11-01 13:53
Frompeiman khosravi
SubjectRe: [Csnd] Help with multiple tracks audio playing
hello, you can pass strings as p-fields like this:

Sfile = p4

P

On 1 November 2011 13:47, Michele Nasti  wrote:
> Hi all,
> as always I'm asking your help.
> I have to create a csound file where I put many tracks of the same lenght to
> play together (for example, ten tracks). I have to play all of them
> simultaneously, and I have to modify the time stretching of all of them
> simoultaneously.
> Also, I have to control every single track (mute / un-mute).
> I have had 2 ideas:
> 1) instantiate every track in the score with something like this:
> i 1 0 3600 "track01.wav"
> i 1 0 3600 "track02.wav"
> .... etc
> In this way I can write a single instrument that takes the name of the track
> as a parameter. I can use chnget opcode to control global time stretching.
> In this way I am not sure on how to implement track mute/unmute. Also, I
> don't know if I can pass strings as parameters in the score. (It seems I
> can't).
> 2) Instantiate all the tracks in the orchestra part, put them in a function
> table, and then create an instrument that will play all this tracks
> simoultaneously. This time, since I know the number of the tracks, I can do
> mute/unmute of the single tracks, and maybe I can do time stretching,
> however I don't know how to play all of them simoultaneously.
> What am I doing wrong is there any other smarter way to do this?
> Thank you all.
>
>


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"

Date2011-11-01 15:29
FromAdam Puckett
SubjectRe: [Csnd] Help with multiple tracks audio playing
Also, have a look at the strset/strget opcodes. You will need to put
the numbers you assign to strings into f-tables and index them using
the table opcode.

On 11/1/11, peiman khosravi  wrote:
> hello, you can pass strings as p-fields like this:
>
> Sfile = p4
>
> P
>
> On 1 November 2011 13:47, Michele Nasti  wrote:
>> Hi all,
>> as always I'm asking your help.
>> I have to create a csound file where I put many tracks of the same lenght
>> to
>> play together (for example, ten tracks). I have to play all of them
>> simultaneously, and I have to modify the time stretching of all of them
>> simoultaneously.
>> Also, I have to control every single track (mute / un-mute).
>> I have had 2 ideas:
>> 1) instantiate every track in the score with something like this:
>> i 1 0 3600 "track01.wav"
>> i 1 0 3600 "track02.wav"
>> .... etc
>> In this way I can write a single instrument that takes the name of the
>> track
>> as a parameter. I can use chnget opcode to control global time stretching.
>> In this way I am not sure on how to implement track mute/unmute. Also, I
>> don't know if I can pass strings as parameters in the score. (It seems I
>> can't).
>> 2) Instantiate all the tracks in the orchestra part, put them in a
>> function
>> table, and then create an instrument that will play all this tracks
>> simoultaneously. This time, since I know the number of the tracks, I can
>> do
>> mute/unmute of the single tracks, and maybe I can do time stretching,
>> however I don't know how to play all of them simoultaneously.
>> What am I doing wrong is there any other smarter way to do this?
>> Thank you all.
>>
>>
>
>
> 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"

Date2011-11-01 20:48
Fromjoachim heintz
SubjectRe: [Csnd] Help with multiple tracks audio playing
hi michele -
i think both ways are possible.
i am not sure what you mean by muting/unmuting. doing this live, during
the performance?
what is the difficulty in your second choice? playing different tracks
simultaneously can be done simply by adding audio signals, or by routing
via the outch opcode.
perhaps you should give a concrete example?
best -
	joachim


Am 01.11.2011 14:47, schrieb Michele Nasti:
> Hi all, 
> as always I'm asking your help. 
> I have to create a csound file where I put many tracks of the same
> lenght to play together (for example, ten tracks). I have to play all of
> them simultaneously, and I have to modify the time stretching of all of
> them simoultaneously. 
> Also, I have to control every single track (mute / un-mute). 
> 
> I have had 2 ideas: 
> 
> 1) instantiate every track in the score with something like this: 
> 
> i 1 0 3600 "track01.wav" 
> i 1 0 3600 "track02.wav" 
> .... etc
> 
> In this way I can write a single instrument that takes the name of the
> track as a parameter. I can use chnget opcode to control global time
> stretching. In this way I am not sure on how to implement track
> mute/unmute. Also, I don't know if I can pass strings as parameters in
> the score. (It seems I can't).
> 
> 2) Instantiate all the tracks in the orchestra part, put them in a
> function table, and then create an instrument that will play all this
> tracks simoultaneously. This time, since I know the number of the
> tracks, I can do mute/unmute of the single tracks, and maybe I can do
> time stretching, however I don't know how to play all of them
> simoultaneously. 
> 
> What am I doing wrong is there any other smarter way to do this? 
> Thank you all.
> 
> 


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"

Date2011-11-03 13:37
FromMichele Nasti
SubjectRe: [Csnd] Help with multiple tracks audio playing
Thanks Joachim, the outch opcode (and the outXX family opcodes) are helping me. I've almost ended my work. 
I also want to thank you because many of the examples I found on the internet were yours. 
I must offer you a beer!
Michele 

2011/11/1 joachim heintz <jh@joachimheintz.de>
hi michele -
i think both ways are possible.
i am not sure what you mean by muting/unmuting. doing this live, during
the performance?
what is the difficulty in your second choice? playing different tracks
simultaneously can be done simply by adding audio signals, or by routing
via the outch opcode.
perhaps you should give a concrete example?
best -
       joachim


Am 01.11.2011 14:47, schrieb Michele Nasti:
> Hi all,
> as always I'm asking your help.
> I have to create a csound file where I put many tracks of the same
> lenght to play together (for example, ten tracks). I have to play all of
> them simultaneously, and I have to modify the time stretching of all of
> them simoultaneously.
> Also, I have to control every single track (mute / un-mute).
>
> I have had 2 ideas:
>
> 1) instantiate every track in the score with something like this:
>
> i 1 0 3600 "track01.wav"
> i 1 0 3600 "track02.wav"
> .... etc
>
> In this way I can write a single instrument that takes the name of the
> track as a parameter. I can use chnget opcode to control global time
> stretching. In this way I am not sure on how to implement track
> mute/unmute. Also, I don't know if I can pass strings as parameters in
> the score. (It seems I can't).
>
> 2) Instantiate all the tracks in the orchestra part, put them in a
> function table, and then create an instrument that will play all this
> tracks simoultaneously. This time, since I know the number of the
> tracks, I can do mute/unmute of the single tracks, and maybe I can do
> time stretching, however I don't know how to play all of them
> simoultaneously.
>
> What am I doing wrong is there any other smarter way to do this?
> Thank you all.
>
>


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"



Date2011-11-03 22:00
Fromjoachim heintz
SubjectRe: [Csnd] Help with multiple tracks audio playing
hi michele -
i accept your offer ... =)
thanks for your nice feedback. have fun, and let's drink some beers
anywhere at any time -
	joachim


Am 03.11.2011 14:37, schrieb Michele Nasti:
> Thanks Joachim, the outch opcode (and the outXX family opcodes) are
> helping me. I've almost ended my work. 
> I also want to thank you because many of the examples I found on the
> internet were yours. 
> I must offer you a beer!
> Michele 
> 
> 2011/11/1 joachim heintz >
> 
>     hi michele -
>     i think both ways are possible.
>     i am not sure what you mean by muting/unmuting. doing this live, during
>     the performance?
>     what is the difficulty in your second choice? playing different tracks
>     simultaneously can be done simply by adding audio signals, or by routing
>     via the outch opcode.
>     perhaps you should give a concrete example?
>     best -
>            joachim
> 
> 
>     Am 01.11.2011 14 :47, schrieb Michele Nasti:
>     > Hi all,
>     > as always I'm asking your help.
>     > I have to create a csound file where I put many tracks of the same
>     > lenght to play together (for example, ten tracks). I have to play
>     all of
>     > them simultaneously, and I have to modify the time stretching of
>     all of
>     > them simoultaneously.
>     > Also, I have to control every single track (mute / un-mute).
>     >
>     > I have had 2 ideas:
>     >
>     > 1) instantiate every track in the score with something like this:
>     >
>     > i 1 0 3600 "track01.wav"
>     > i 1 0 3600 "track02.wav"
>     > .... etc
>     >
>     > In this way I can write a single instrument that takes the name of the
>     > track as a parameter. I can use chnget opcode to control global time
>     > stretching. In this way I am not sure on how to implement track
>     > mute/unmute. Also, I don't know if I can pass strings as parameters in
>     > the score. (It seems I can't).
>     >
>     > 2) Instantiate all the tracks in the orchestra part, put them in a
>     > function table, and then create an instrument that will play all this
>     > tracks simoultaneously. This time, since I know the number of the
>     > tracks, I can do mute/unmute of the single tracks, and maybe I can do
>     > time stretching, however I don't know how to play all of them
>     > simoultaneously.
>     >
>     > What am I doing wrong is there any other smarter way to do this?
>     > Thank you all.
>     >
>     >
> 
> 
>     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"