[Csnd] An xout Subtlety
| Date | 2011-10-03 04:48 | 
| From | Jim Aikin  | 
| Subject | [Csnd] An xout Subtlety | 
It would be nice if someone who can read and understand the C code or has
more experience writing UDOs could confirm this.
My tests seem to indicate that in a UDO, the line containing xout is
actually running last (at the end of the UDO code), even though I parked a
couple of important lines of code after it. When I move those lines of code
from the end of the UDO to the top (where they will run at the beginning of
the next k-cycle rather than at the end of the current k-cycle) the UDO
behaves differently.
The manual implies this behavior when it states the xin and xout "actually
run only at i-time ... skipping xin or xout with kgoto has no effect...." My
usage didn't involve skipping it, but I seem to be seeing a similar effect.
Is my inference correct? Thanks!
--Jim Aikin
--
View this message in context: http://csound.1045644.n5.nabble.com/An-xout-Subtlety-tp4863750p4863750.html
Sent from the Csound - General mailing list archive at Nabble.com.
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"
 | 
| Date | 2011-10-03 05:36 | 
| From | andreas russo  | 
| Subject | [Csnd] Max + csound~ | 
| I'm moving my first steps in the Max/MSP world and I'm trying to use Csound as a synthesizer (thanks to the csound~ object). I'm actually having a hard time triggering the Csound instruments in real time. my .csd file has instruments with the pitch being assigned to be controlled by cpsdmidi. I have massign assigning MIDI channel 1 to the first instrument. I have tried different objects combinations in Max, but every time I get some problems (clicks, no velocity, wrong duration). is there some sort of "standard" procedure to do this? as in the objects to use and their arguments? specifically, I'm trying to control the Csound instruments with the itable object. I thought I should specify in the csound~ object's argument settings like which instrument to control, but by reading che csound~ manual it seems that that is not the case. help or info on where to find manuals/tutorials and such are much appreciated. andreas  | 
| Date | 2011-10-03 08:51 | 
| From | Victor Lazzarini  | 
| Subject | Re: [Csnd] An xout Subtlety | 
When you say 'behave differenty', what do you mean? Can you give us an  
example?
Victor
On 3 Oct 2011, at 04:48, Jim Aikin wrote:
> It would be nice if someone who can read and understand the C code  
> or has
> more experience writing UDOs could confirm this.
>
> My tests seem to indicate that in a UDO, the line containing xout is
> actually running last (at the end of the UDO code), even though I  
> parked a
> couple of important lines of code after it. When I move those lines  
> of code
> from the end of the UDO to the top (where they will run at the  
> beginning of
> the next k-cycle rather than at the end of the current k-cycle) the  
> UDO
> behaves differently.
>
> The manual implies this behavior when it states the xin and xout  
> "actually
> run only at i-time ... skipping xin or xout with kgoto has no  
> effect...." My
> usage didn't involve skipping it, but I seem to be seeing a similar  
> effect.
>
> Is my inference correct? Thanks!
>
> --Jim Aikin
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/An-xout-Subtlety-tp4863750p4863750.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> 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"
>
Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie
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"
 | 
| Date | 2011-10-03 08:52 | 
| From | peiman khosravi  | 
| Subject | Re: [Csnd] Max + csound~ | 
Hi Andreas, Would you mind sending your non-working patch and csd here? I'll take a look and comment the patch for you. Best, Peiman On 3 October 2011 05:36, andreas russo  | 
| Date | 2011-10-03 14:21 | 
| From | Steven Yi  | 
| Subject | Re: [Csnd] An xout Subtlety | 
I took a quick look and yes the code for xout runs at init-time. Essentially, it's wiring the xout variables to the udo's output at init-time, then after that, it's done. I think then that whatever the value of the variable is at the end of a perf pass is what you'll get out from the UDO that pass, so order of what is before and after the xout statement won't affect the output. On Mon, Oct 3, 2011 at 4:48 AM, Jim Aikin  | 
| Date | 2011-10-03 14:29 | 
| From | Anthony Palomba  | 
| Subject | Re: [Csnd] Max + csound~ | 
| Attachments | max-csound-example.rar | 
| Hey Andreas, Here is an example patch I use as a template for using csound and Max. It may be of help to you. Anthony On Mon, Oct 3, 2011 at 2:52 AM, peiman khosravi <peimankhosravi@gmail.com> wrote: Hi Andreas,  | 
| Date | 2011-10-03 15:24 | 
| From | andreas russo  | 
| Subject | Re: [Csnd] Max + csound~ | 
| peiman, I've tried several diverse patches, I'll make one that kind of makes sense to me and send it. anthony, thanks so much for the patch. unfortunately what happens when I tried to play notes with kslider is that no sounds comes out and I only get the "MIDI buffer is full" message. any thoughts? On Oct 3, 2011, at 09:29, Anthony Palomba wrote: Hey Andreas,  | 
| Date | 2011-10-03 15:27 | 
| From | andreas russo  | 
| Subject | Re: [Csnd] Max + csound~ | 
| sorry for the multiple emails, I just noticed the patch didn't have a DAC. I'll start studying it right away. thank you! On Oct 3, 2011, at 09:29, Anthony Palomba wrote: Hey Andreas,  | 
| Date | 2011-10-03 15:47 | 
| From | peiman khosravi  | 
| Subject | Re: [Csnd] Max + csound~ | 
Thanks Andreas, That way I would know exactly what you have in mind. Best, P On 3 October 2011 15:24, andreas russo  | 
| Date | 2011-10-03 16:27 | 
| From | Jim Aikin  | 
| Subject | [Csnd] Re: An xout Subtlety | 
Here's a stripped-down example that shows the behavior I encountered:
opcode Mult, k, kk
kval1, kval2 xin
kresult = kval1* kval2
kstorage = kresult
kresult = 0
xout kresult
kresult = kstorage
endop
If you run this in an instrument and give it a couple of numerical inputs,
you'll find that the output is always the product of the inputs, NOT zero.
This is presumably because xout is implicitly being moved to the end of the
code block for the opcode. kresult has been restored to its original value
(by the final statement) BEFORE the result is transmitted to the calling
instrument.
The same thing is true, in reverse, of xin:
opcode Mult, k, kk
kval1 = 0
kval1, kval2 xin
kresult = kval1* kval2
xout kresult
endop
With this code, the output (kresult) is always 0, because the value of kval1
is changed AFTER it's loaded by xin, even though the way the code is written
would lead one to believe that the first line was rendered irrelevant by the
second line.
I don't think this is a problem, or should be changed, because the
functionality is clear and sensible. I do think the situation could be
elucidated a little more fully in the manual. (I don't have current
information on how to make changes in the manual, or I'd take care of it
myself.)
--Jim Aikin
--
View this message in context: http://csound.1045644.n5.nabble.com/An-xout-Subtlety-tp4863750p4865306.html
Sent from the Csound - General mailing list archive at Nabble.com.
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"
 | 
| Date | 2011-10-03 18:17 | 
| From | andreas russo  | 
| Subject | Re: [Csnd] Max + csound~ | 
| Attachments | maxcsound.zip | 
peiman,
actually, I'd love to get some feedback on this patch.
it seems pretty straightforward, but all I get is either silence or clicks.
andreas
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"
On Oct 3, 2011, at 10:47, peiman khosravi wrote:
> Thanks Andreas,
> 
> That way I would know exactly what you have in mind.
> 
> Best,
> 
> P
> 
> 
> 
> On 3 October 2011 15:24, andreas russo  | 
| Date | 2011-10-03 22:28 | 
| From | joachim heintz  | 
| Subject | Re: [Csnd] Max + csound~ | 
davis pyon has written an excellent chapter in the floss csound manual
about the csound~ opject:
http://en.flossmanuals.net/csound/ch053_csound-in-maxmsp
is contains also links to other resources.
hope this helps -
	joachim
Am 03.10.2011 06:36, schrieb andreas russo:
> I'm moving my first steps in the Max/MSP world and I'm trying to use
> Csound as a synthesizer (thanks to the *csound~* object).
> I'm actually having a hard time triggering the Csound instruments in
> real time.
> my .csd file has instruments with the pitch being assigned to be
> controlled by *cpsdmidi*.
> I have *massign *assigning MIDI channel 1 to the first instrument.
> I have tried different objects combinations in Max, but every time I get
> some problems (clicks, no velocity, wrong duration).
> is there some sort of "standard" procedure to do this? as in the objects
> to use and their arguments?
> specifically, I'm trying to control the Csound instruments with the
> *itable* object.
> I thought I should specify in the *csound~* object's argument settings
> like which instrument to control, but by reading che csound~ manual it
> seems that that is not the case.
> 
> help or info on where to find manuals/tutorials and such are much
> appreciated.
> 
> andreas
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"
 | 
| Date | 2011-10-03 23:09 | 
| From | peiman khosravi  | 
| Subject | Re: [Csnd] Max + csound~ | 
Hi, Actually there are two problem here. 1- This is in the csd itself not the patch. You're initiating midi controller 74 (which is controlling the center frequency of moogladder) to 8000. But remember that this should be a midi value not frequency. So it should fall within the range 0-127. Changing line 10 of your code from: ctrlinit 1, 74, 8000 to something like ctrlinit 1, 74, 100 fixes this. 2- [makenote] in the patch is missing two arguments: velocity and duration. Change to [makenote 60 500] or something like that and it will work. Obviously you still get a click at the start and end of the notes because there is no envelope to smooth the edges. You mentioned that you wanted to use itable to control the instrument. Exactly what did you mean by that? Best, Peiman On 3 October 2011 18:17, andreas russo  |