Csound Csound-dev Csound-tekno Search About

[Csnd] Including Csound files within another Csound file

Date2019-05-31 23:07
FromDavid Bellows
Subject[Csnd] Including Csound files within another Csound file
My question is purely theoretical right now as I haven't reached the
point yet in my project where I might want to do something like this,
but I thought I would go ahead and ask the question as it might help
guide what I'm doing.

Here's my idea. I would have several Csound files with the instrument
definitions and scores: A.csd, B.csd, C.csd. Each of these can be
played back as any other Csound file.

And then I'd have a main.csd that would call each of those other
Csound files and would control when each would start, stop, and the
volume (maybe tempo?).

I guess each Csound file would be an instrument?

I'm thinking I could do something similar by converting those Csound
files to audio files and then use diskin2 but I would prefer something
that works faster (ie, without compiling the Csound files to audio and
the delay that causes) and it would seem that something like this
might be more flexible?

It's worth noting that my Csound files are generated automatically via
various algorithms and what I'm trying to do is treat the results as
modules that can be combined in arbitrary ways instead of planning out
ahead of time how to combine specific Csound files.

Thanks for any ideas that someone might have.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-06-01 05:15
FromRichard
SubjectRe: [Csnd] Including Csound files within another Csound file
You could use the Python API (ctcsound) for that. This way, you could 
first load your main csd, and then additionally load instruments or just 
score files to be executed...

Build a nice GUI and you could change the parameters via 
setControlChannel("channelname", value)

Richard

On 01/06/2019 00:07, David Bellows wrote:
> My question is purely theoretical right now as I haven't reached the
> point yet in my project where I might want to do something like this,
> but I thought I would go ahead and ask the question as it might help
> guide what I'm doing.
>
> Here's my idea. I would have several Csound files with the instrument
> definitions and scores: A.csd, B.csd, C.csd. Each of these can be
> played back as any other Csound file.
>
> And then I'd have a main.csd that would call each of those other
> Csound files and would control when each would start, stop, and the
> volume (maybe tempo?).
>
> I guess each Csound file would be an instrument?
>
> I'm thinking I could do something similar by converting those Csound
> files to audio files and then use diskin2 but I would prefer something
> that works faster (ie, without compiling the Csound files to audio and
> the delay that causes) and it would seem that something like this
> might be more flexible?
>
> It's worth noting that my Csound files are generated automatically via
> various algorithms and what I'm trying to do is treat the results as
> modules that can be combined in arbitrary ways instead of planning out
> ahead of time how to combine specific Csound files.
>
> Thanks for any ideas that someone might have.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-06-01 08:23
FromPete Goodeve
SubjectRe: [Csnd] Including Csound files within another Csound file
AttachmentsNone  

Date2019-06-01 12:30
Fromjohn
SubjectRe: [Csnd] Including Csound files within another Csound file
>

> I was hoping one could use macros to have the same harness for all the 
> instruments, but experimentally '#include' and macros don't like each 
> other at all -- seems you can only use a plain filename.
>


Quoting the manual:

The form #includestr is the same as #include except the deliminator must 
be a double quote and the file name may contain macro calls.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-06-01 20:53
FromPete Goodeve
SubjectRe: [Csnd] Including Csound files within another Csound file
AttachmentsNone  

Date2019-06-03 17:38
FromDavid Bellows
SubjectRe: [Csnd] Including Csound files within another Csound file
Richard, Pete, and John, thanks for your suggestions on this. It looks
like I'll need to do some extra programming on my end then in order to
combine them smoothly. I'm a lazy programmer so I was hoping for
something that would require no work on my part. Oh well.

Dave Bellows
www.platonicmusicengine.com

On Sat, Jun 1, 2019 at 12:53 PM Pete Goodeve  wrote:
>
> On Sat, Jun 01, 2019 at 12:30:54PM +0100, john wrote:
> > >
> >
> > >I was hoping one could use macros to have the same harness for all the
> > >instruments, but experimentally '#include' and macros don't like each
> > >other at all -- seems you can only use a plain filename.
> > >
> > Quoting the manual:
> >
> > The form #includestr is the same as #include except the deliminator must be a double quote and the file name may contain macro calls.
> >
> Heh... Only seeing what I expect to see again. Though I may have
> been looking in an older manual.
>
> Works perfectly.
>
> Thanks.
>
>         -- Pete --
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-06-04 07:42
FromRichard van Bemmelen
SubjectRe: [Csnd] Including Csound files within another Csound file
Well, I am working on a project that has all these features. I'll share it when it is done....

Richard

Op ma 3 jun. 2019 om 18:38 schreef David Bellows <davebellows@gmail.com>:
Richard, Pete, and John, thanks for your suggestions on this. It looks
like I'll need to do some extra programming on my end then in order to
combine them smoothly. I'm a lazy programmer so I was hoping for
something that would require no work on my part. Oh well.

Dave Bellows
www.platonicmusicengine.com

On Sat, Jun 1, 2019 at 12:53 PM Pete Goodeve <pete.goodeve@computer.org> wrote:
>
> On Sat, Jun 01, 2019 at 12:30:54PM +0100, john wrote:
> > >
> >
> > >I was hoping one could use macros to have the same harness for all the
> > >instruments, but experimentally '#include' and macros don't like each
> > >other at all -- seems you can only use a plain filename.
> > >
> > Quoting the manual:
> >
> > The form #includestr is the same as #include except the deliminator must be a double quote and the file name may contain macro calls.
> >
> Heh... Only seeing what I expect to see again. Though I may have
> been looking in an older manual.
>
> Works perfectly.
>
> Thanks.
>
>         -- Pete --
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here