running two c-sounds at the same time …

Aug 29, 2011 at 8:31am

running two c-sounds at the same time …

Hi,

I wonder if any of you have managed to have two c-sound synths running at the same time in max?

When trying out the help file for c-sound, I cannot figure out how to have two c-sound patches at the same time in one max patch – I am also looking at the c-sound code for the help file … perhaps it needs to be defined there, somehow? Does anyone have a working example?

Thanks for your help,

Kasper

#58624
Aug 29, 2011 at 11:15am

Hi
I just copied the fof example into the main help patch tweaked parameters andit worked.
Two seperate csound objects with seperate instruments seems to work fine
Mac OS 10.6.8 Max 5.1.9 csound~ v1.1
Cheers
MM

#210777
Aug 30, 2011 at 12:37pm

Hi again,

Thanks for your reply, I did what you suggested and yes, it is possible, but what if I want two of the same c-sound instrument in one patch? What in the attached c-sound-code examples that are now identical (and in the corresponding max patch (see below) do I need to change? I looked closely at the c-sound code, but it was not clear to me what to change (something about the midichannels and the corresponding “pattrforward IN” in max … ?)

Thanks again for your help!

– Pasted Max Patch, click to expand. –
Attachments:
  1. csoundinstr2.csd
#210778
Aug 30, 2011 at 4:58pm

Hi
Got it sorted . . .

I needed to get the .csd names to match first, there were minor diffs from the csound message – must be identical . . this was not much off an issue . . .
Next I made sure that the FM parameters and ADSR were set on the RH copy – they get lost during cut and paste. And without them set the orc wont sound . . .

With this done it plays but still through LH patch still, so I looked at pattrforward – these names want to be different on either side otherwise they send to the same place. ie the LH side in this case.

So rename them all to patrrforward IN1f or LH & IN2 on RH sides, then set the scripting name of the tiny little [t l] trigger object next to the csound~ objs to IN1 (LH) and IN2 (RH) and add a 1 & 2 to the ‘IN’ label next to them so you remember . . .

Oh and you will have to do something with the preset objects to sort them out – the copied one is still talking to the original patch and they are both set to capture all objects – set them up how you want them . . . .

Could send an edited patch but I think you can sort it out easy enough . .

Cheers
MM

#210779
Aug 31, 2011 at 6:24am

Hi again,

Thank you for the instruction. I tried to do what you mentoned, but I still have problems finding the right places in the c-code to do this:

“Next I made sure that the FM parameters and ADSR were set on the RH copy – they get lost during cut and paste. And without them set the orc wont sound . . .”

See the max patch posted below, how I changed it according to your instructions, and the two attached c-sound codes …

Thanks for your help,

Kaspar

– Pasted Max Patch, click to expand. –
Attachments:
  1. csoundtwo.csd
#210780
Aug 31, 2011 at 6:27am

Oops, I made a mistake, I still needed to add the right pattrforward names in multiple places in the max patch, however, it still doesn’t work:

– Pasted Max Patch, click to expand. –
#210781
Aug 31, 2011 at 7:05am

Hi
Give us a few minutes and I’ll post a patch . .
Cheers
MM

#210782
Aug 31, 2011 at 7:24am

Hi Again
Sorry – The main issue was that the [t l] trigger object ‘scripting name’ needed to be set in the Inspector for that object ( not in the object parameters). Added a few more preset connections to – you want to get the ADSR and Output parameters as well
This works now for me . . .

– Pasted Max Patch, click to expand. –
#210783
Aug 31, 2011 at 7:56am

Hi MM,

Thanks for your help. I see. I copy pasted your patch and instrument two works, while instrument one now doesn’t work. I wonder if this is because my c-sound code files are identical … what do I need to change in the c-sound code? (see attached). I think that I don’t really understand your instruction:

Next I made sure that the FM parameters and ADSR were set on the RH copy – they get lost during cut and paste. And without them set the orc wont sound . . .

Thanks again!

Kaspar

PS. Yes, I know that I need to dive into the csound manual and do all the tutorials. I just thought that it wouldn’t be a big deal to build two of the same kind of c-sound instrument in one patch …

Attachments:
  1. csoundtwo.csd
#210784
Aug 31, 2011 at 9:08am

Hi
It should work – Should not need to change anything in .csd
The instructions referred to when you first copiy/pasted the RH part of the patch – it lost values. I simply had to give it the necessary ADSR, FM parameters and Volume.
Make sure ALL user interactions are at sensible values . .
Any error messages in max window? Maybe a typo somewhere . . .
Added a few more things to the presets and gave the presets seperate scripting names via the Inspector.
Try the stuff in the attached zip file – patch plus .csd’s . . . Put them all in Max path obviously.
This should work.
Cheers
MM

Attachments:
  1. Archive.zip
#210785
Aug 31, 2011 at 11:10am

Hi

Thanks for the zip file – on my laptop I still only get sound from the second one. It must be something (some dsp settings … ?) or outside max that bugs me. I tried the files you just sent and my cpu peaks at 70% then after a while it falls to 30%.

I think I need someone here locally to look at how my laptop is set to run sound … if it works on your computer, it should work on mine too.

Thanks for your time!

Kaspar

#210786
Aug 31, 2011 at 2:07pm

Hi
Are you using the onscreen keyboards? or midiin?
If it is the midiin check that its port is assigned properly . ..
InValues , ADSR , Outvalues and Volume faders all should be set too . . . Volumes should be up quite a way.
If you are on a Mac we may be able to set things up so I can share your screen and work it out for you, maybe Skype ?
But it should work – both csounds are sending to the same dac~ so it should not be that because you can here one.
. You should see both orcs being processed in the Max window – there should mentions of both scores and a waveform for each. If this is not happening – hit the ‘start’ or bang to actually start the csound engine, but then we would have to work out why it is not doing it automatically via the loadmessage.

have a bit more of a play and get back to us – maybe send us the post from the Max window from when you start the patch . . . .
Cheers
MM

#210787

You must be logged in to reply to this topic.