Csound Csound-dev Csound-tekno Search About

[Csnd] default p-fields?

Date2010-08-10 20:17
FromAaron Krister Johnson
Subject[Csnd] default p-fields?
Hi all,

Is it possible to set up default p-field values (other than using conditionals and x-goto statements) so that one can have an instrument with sensible default values, and then one can change them only when it is felt necessary? I've done it with conditional branching, but I'm wondering if there isn't an easier, more 'built-in' way, analogous to the way one can have default function parameters in a programming language.

--
Best,

Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org


Date2010-08-10 22:45
FromMichael Gogins
Subject[Csnd] Re: default p-fields?

Pset opcode, use it all the time.

MKG from cell phone

On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" <aaron@akjmusic.com> wrote:

Hi all,

Is it possible to set up default p-field values (other than using conditionals and x-goto statements) so that one can have an instrument with sensible default values, and then one can change them only when it is felt necessary? I've done it with conditional branching, but I'm wondering if there isn't an easier, more 'built-in' way, analogous to the way one can have default function parameters in a programming language.

--
Best,

Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org


Date2010-08-11 05:42
FromAaron Krister Johnson
Subject[Csnd] Re: Re: default p-fields?
Hi,

Thanks for the tip.....the manual page for 'pset' is a bit confusing. p1 and p2 (instrument and onset time?) are procured from the event in MIDI, and the other values are available from the preset.....but why not in non-MIDI situations? And---doesn't MIDI always have an onset time of 0? And what do "icon1 and icon2" on that page mean??? Hardly the clearest documentation I've ever seen.....

AKJ

On Tue, Aug 10, 2010 at 4:45 PM, Michael Gogins <michael.gogins@gmail.com> wrote:

Pset opcode, use it all the time.

MKG from cell phone

On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" <aaron@akjmusic.com> wrote:

Hi all,

Is it possible to set up default p-field values (other than using conditionals and x-goto statements) so that one can have an instrument with sensible default values, and then one can change them only when it is felt necessary? I've done it with conditional branching, but I'm wondering if there isn't an easier, more 'built-in' way, analogous to the way one can have default function parameters in a programming language.

--
Best,

Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org




--
Best,

Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org


Date2010-08-11 15:52
FromMichael Gogins
Subject[Csnd] Re: Re: Re: default p-fields?
The pset opcode works without MIDI (but then there are warnings) and
it works when not using real-time, but rather rendering to a
soundfile.

Regards,
Mike

On Wed, Aug 11, 2010 at 12:42 AM, Aaron Krister Johnson
 wrote:
> Hi,
>
> Thanks for the tip.....the manual page for 'pset' is a bit confusing. p1 and
> p2 (instrument and onset time?) are procured from the event in MIDI, and the
> other values are available from the preset.....but why not in non-MIDI
> situations? And---doesn't MIDI always have an onset time of 0? And what do
> "icon1 and icon2" on that page mean??? Hardly the clearest documentation
> I've ever seen.....
>
> AKJ
>
> On Tue, Aug 10, 2010 at 4:45 PM, Michael Gogins 
> wrote:
>>
>> Pset opcode, use it all the time.
>>
>> MKG from cell phone
>>
>> On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" 
>> wrote:
>>
>> Hi all,
>>
>> Is it possible to set up default p-field values (other than using
>> conditionals and x-goto statements) so that one can have an instrument with
>> sensible default values, and then one can change them only when it is felt
>> necessary? I've done it with conditional branching, but I'm wondering if
>> there isn't an easier, more 'built-in' way, analogous to the way one can
>> have default function parameters in a programming language.
>>
>> --
>> Best,
>>
>> Aaron Krister Johnson
>> http://www.akjmusic.com
>> http://www.untwelve.org
>>
>
>
>
> --
> Best,
>
> Aaron Krister Johnson
> http://www.akjmusic.com
> http://www.untwelve.org
>
>


Date2010-08-24 10:17
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Re: default p-fields?
Hi,

I'm trying to understand pset, and I'm using the csd below, but it's
not working as I would expect. I would expect to hear three beeps but
I only hear the last one. Is pset only valid for MIDI triggered
instruments?






sr = 44100
ksmps = 128
0dbfs = 1
nchnls = 2

; By Andres Cabrera 2010

instr 1
pset 1,0, 1, 220, 0.5
asig poscil p5, p4, 1
outs asig, asig
endin



f 1 0 1024 10 1

i 1 0 1
i 1 1 1  440
i 1 2 1  440 0.1




On Wed, Aug 11, 2010 at 3:52 PM, Michael Gogins
 wrote:
> The pset opcode works without MIDI (but then there are warnings) and
> it works when not using real-time, but rather rendering to a
> soundfile.
>
> Regards,
> Mike
>
> On Wed, Aug 11, 2010 at 12:42 AM, Aaron Krister Johnson
>  wrote:
>> Hi,
>>
>> Thanks for the tip.....the manual page for 'pset' is a bit confusing. p1 and
>> p2 (instrument and onset time?) are procured from the event in MIDI, and the
>> other values are available from the preset.....but why not in non-MIDI
>> situations? And---doesn't MIDI always have an onset time of 0? And what do
>> "icon1 and icon2" on that page mean??? Hardly the clearest documentation
>> I've ever seen.....
>>
>> AKJ
>>
>> On Tue, Aug 10, 2010 at 4:45 PM, Michael Gogins 
>> wrote:
>>>
>>> Pset opcode, use it all the time.
>>>
>>> MKG from cell phone
>>>
>>> On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" 
>>> wrote:
>>>
>>> Hi all,
>>>
>>> Is it possible to set up default p-field values (other than using
>>> conditionals and x-goto statements) so that one can have an instrument with
>>> sensible default values, and then one can change them only when it is felt
>>> necessary? I've done it with conditional branching, but I'm wondering if
>>> there isn't an easier, more 'built-in' way, analogous to the way one can
>>> have default function parameters in a programming language.
>>>
>>> --
>>> Best,
>>>
>>> Aaron Krister Johnson
>>> http://www.akjmusic.com
>>> http://www.untwelve.org
>>>
>>
>>
>>
>> --
>> Best,
>>
>> Aaron Krister Johnson
>> http://www.akjmusic.com
>> http://www.untwelve.org
>>
>>
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot 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"
>
>



-- 


Andrés


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"


Date2010-08-24 12:47
Fromjoachim heintz
Subject[Csnd] Re: Re: Re: Re: Re: default p-fields?
obviously yes.
i had the same desire and tried this:


instr 1
pset 11, 12, 13, 14, 15, 16
print p1, p2, p3, p4, p5, p6
endin


i 1 0 1



it does not work; neither with -odac nor with rendering to file.
but it works with MIDI.

it would be very good if we good have it in general, not just for MIDI.

best -

	joachim


Am 24.08.2010 um 11:17 schrieb Andres Cabrera:

> Hi,
>
> I'm trying to understand pset, and I'm using the csd below, but it's
> not working as I would expect. I would expect to hear three beeps but
> I only hear the last one. Is pset only valid for MIDI triggered
> instruments?
>
> 
> 
> 
> 
>
> sr = 44100
> ksmps = 128
> 0dbfs = 1
> nchnls = 2
>
> ; By Andres Cabrera 2010
>
> instr 1
> pset 1,0, 1, 220, 0.5
> asig poscil p5, p4, 1
> outs asig, asig
> endin
>
> 
> 
> f 1 0 1024 10 1
>
> i 1 0 1
> i 1 1 1  440
> i 1 2 1  440 0.1
>
> 
> 
>
> On Wed, Aug 11, 2010 at 3:52 PM, Michael Gogins
>  wrote:
>> The pset opcode works without MIDI (but then there are warnings) and
>> it works when not using real-time, but rather rendering to a
>> soundfile.
>>
>> Regards,
>> Mike
>>
>> On Wed, Aug 11, 2010 at 12:42 AM, Aaron Krister Johnson
>>  wrote:
>>> Hi,
>>>
>>> Thanks for the tip.....the manual page for 'pset' is a bit  
>>> confusing. p1 and
>>> p2 (instrument and onset time?) are procured from the event in  
>>> MIDI, and the
>>> other values are available from the preset.....but why not in non- 
>>> MIDI
>>> situations? And---doesn't MIDI always have an onset time of 0? And  
>>> what do
>>> "icon1 and icon2" on that page mean??? Hardly the clearest  
>>> documentation
>>> I've ever seen.....
>>>
>>> AKJ
>>>
>>> On Tue, Aug 10, 2010 at 4:45 PM, Michael Gogins >> >
>>> wrote:
>>>>
>>>> Pset opcode, use it all the time.
>>>>
>>>> MKG from cell phone
>>>>
>>>> On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" >>> >
>>>> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> Is it possible to set up default p-field values (other than using
>>>> conditionals and x-goto statements) so that one can have an  
>>>> instrument with
>>>> sensible default values, and then one can change them only when  
>>>> it is felt
>>>> necessary? I've done it with conditional branching, but I'm  
>>>> wondering if
>>>> there isn't an easier, more 'built-in' way, analogous to the way  
>>>> one can
>>>> have default function parameters in a programming language.
>>>>
>>>> --
>>>> Best,
>>>>
>>>> Aaron Krister Johnson
>>>> http://www.akjmusic.com
>>>> http://www.untwelve.org
>>>>
>>>
>>>
>>>
>>> --
>>> Best,
>>>
>>> Aaron Krister Johnson
>>> http://www.akjmusic.com
>>> http://www.untwelve.org
>>>
>>>
>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot 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"
>>
>>
>
>
>
> -- 
>
>
> Andrés
>
>
> 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"


Date2010-08-24 13:19
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Re: default p-fields?
I was wandering over this code this morning and it looked as if it was
written to work on non-MIDI.  I optimised the code.
Will look again

> obviously yes.
> i had the same desire and tried this:
> 
> 
> instr 1
> pset 11, 12, 13, 14, 15, 16
> print p1, p2, p3, p4, p5, p6
> endin
> 
> 
> i 1 0 1
> 
> 
>
> it does not work; neither with -odac nor with rendering to file.
> but it works with MIDI.
>
> it would be very good if we good have it in general, not just for MIDI.
>
> best -
>
> 	joachim
>
>
> Am 24.08.2010 um 11:17 schrieb Andres Cabrera:
>
>> Hi,
>>
>> I'm trying to understand pset, and I'm using the csd below, but it's
>> not working as I would expect. I would expect to hear three beeps but
>> I only hear the last one. Is pset only valid for MIDI triggered
>> instruments?
>>
>> 
>> 
>> 
>> 
>>
>> sr = 44100
>> ksmps = 128
>> 0dbfs = 1
>> nchnls = 2
>>
>> ; By Andres Cabrera 2010
>>
>> instr 1
>> pset 1,0, 1, 220, 0.5
>> asig poscil p5, p4, 1
>> outs asig, asig
>> endin
>>
>> 
>> 
>> f 1 0 1024 10 1
>>
>> i 1 0 1
>> i 1 1 1  440
>> i 1 2 1  440 0.1
>>
>> 
>> 
>>
>> On Wed, Aug 11, 2010 at 3:52 PM, Michael Gogins
>>  wrote:
>>> The pset opcode works without MIDI (but then there are warnings) and
>>> it works when not using real-time, but rather rendering to a
>>> soundfile.
>>>
>>> Regards,
>>> Mike
>>>
>>> On Wed, Aug 11, 2010 at 12:42 AM, Aaron Krister Johnson
>>>  wrote:
>>>> Hi,
>>>>
>>>> Thanks for the tip.....the manual page for 'pset' is a bit
>>>> confusing. p1 and
>>>> p2 (instrument and onset time?) are procured from the event in
>>>> MIDI, and the
>>>> other values are available from the preset.....but why not in non-
>>>> MIDI
>>>> situations? And---doesn't MIDI always have an onset time of 0? And
>>>> what do
>>>> "icon1 and icon2" on that page mean??? Hardly the clearest
>>>> documentation
>>>> I've ever seen.....
>>>>
>>>> AKJ
>>>>
>>>> On Tue, Aug 10, 2010 at 4:45 PM, Michael Gogins
>>>> >>> >
>>>> wrote:
>>>>>
>>>>> Pset opcode, use it all the time.
>>>>>
>>>>> MKG from cell phone
>>>>>
>>>>> On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" >>>> >
>>>>> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> Is it possible to set up default p-field values (other than using
>>>>> conditionals and x-goto statements) so that one can have an
>>>>> instrument with
>>>>> sensible default values, and then one can change them only when
>>>>> it is felt
>>>>> necessary? I've done it with conditional branching, but I'm
>>>>> wondering if
>>>>> there isn't an easier, more 'built-in' way, analogous to the way
>>>>> one can
>>>>> have default function parameters in a programming language.
>>>>>
>>>>> --
>>>>> Best,
>>>>>
>>>>> Aaron Krister Johnson
>>>>> http://www.akjmusic.com
>>>>> http://www.untwelve.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best,
>>>>
>>>> Aaron Krister Johnson
>>>> http://www.akjmusic.com
>>>> http://www.untwelve.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot 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"
>>>
>>>
>>
>>
>>
>> --
>>
>>
>> Andrés
>>
>>
>> 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"
>
>
>
>




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"

Date2010-08-24 13:30
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: default p-fields?
I use pset in all my instruments, see examples/CsoundAC.csd.

However, my scores supply a pfield for every pset pfield. The pset
values are used to supply default values of those fields for MIDI
performance. I do this because my scores always supply 11 pfields, but
MIDI performance typically supplies 5.

Regards,
Mike

On Tue, Aug 24, 2010 at 8:19 AM,   wrote:
>
> I was wandering over this code this morning and it looked as if it was
> written to work on non-MIDI.  I optimised the code.
> Will look again
>
>> obviously yes.
>> i had the same desire and tried this:
>> 
>> 
>> instr 1
>> pset 11, 12, 13, 14, 15, 16
>> print p1, p2, p3, p4, p5, p6
>> endin
>> 
>> 
>> i 1 0 1
>> 
>> 
>>
>> it does not work; neither with -odac nor with rendering to file.
>> but it works with MIDI.
>>
>> it would be very good if we good have it in general, not just for MIDI.
>>
>> best -
>>
>>       joachim
>>
>>
>> Am 24.08.2010 um 11:17 schrieb Andres Cabrera:
>>
>>> Hi,
>>>
>>> I'm trying to understand pset, and I'm using the csd below, but it's
>>> not working as I would expect. I would expect to hear three beeps but
>>> I only hear the last one. Is pset only valid for MIDI triggered
>>> instruments?
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> sr = 44100
>>> ksmps = 128
>>> 0dbfs = 1
>>> nchnls = 2
>>>
>>> ; By Andres Cabrera 2010
>>>
>>> instr 1
>>> pset 1,0, 1, 220, 0.5
>>> asig poscil p5, p4, 1
>>> outs asig, asig
>>> endin
>>>
>>> 
>>> 
>>> f 1 0 1024 10 1
>>>
>>> i 1 0 1
>>> i 1 1 1  440
>>> i 1 2 1  440 0.1
>>>
>>> 
>>> 
>>>
>>> On Wed, Aug 11, 2010 at 3:52 PM, Michael Gogins
>>>  wrote:
>>>> The pset opcode works without MIDI (but then there are warnings) and
>>>> it works when not using real-time, but rather rendering to a
>>>> soundfile.
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> On Wed, Aug 11, 2010 at 12:42 AM, Aaron Krister Johnson
>>>>  wrote:
>>>>> Hi,
>>>>>
>>>>> Thanks for the tip.....the manual page for 'pset' is a bit
>>>>> confusing. p1 and
>>>>> p2 (instrument and onset time?) are procured from the event in
>>>>> MIDI, and the
>>>>> other values are available from the preset.....but why not in non-
>>>>> MIDI
>>>>> situations? And---doesn't MIDI always have an onset time of 0? And
>>>>> what do
>>>>> "icon1 and icon2" on that page mean??? Hardly the clearest
>>>>> documentation
>>>>> I've ever seen.....
>>>>>
>>>>> AKJ
>>>>>
>>>>> On Tue, Aug 10, 2010 at 4:45 PM, Michael Gogins
>>>>> >>>> >
>>>>> wrote:
>>>>>>
>>>>>> Pset opcode, use it all the time.
>>>>>>
>>>>>> MKG from cell phone
>>>>>>
>>>>>> On Aug 10, 2010 3:18 PM, "Aaron Krister Johnson" >>>>> >
>>>>>> wrote:
>>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Is it possible to set up default p-field values (other than using
>>>>>> conditionals and x-goto statements) so that one can have an
>>>>>> instrument with
>>>>>> sensible default values, and then one can change them only when
>>>>>> it is felt
>>>>>> necessary? I've done it with conditional branching, but I'm
>>>>>> wondering if
>>>>>> there isn't an easier, more 'built-in' way, analogous to the way
>>>>>> one can
>>>>>> have default function parameters in a programming language.
>>>>>>
>>>>>> --
>>>>>> Best,
>>>>>>
>>>>>> Aaron Krister Johnson
>>>>>> http://www.akjmusic.com
>>>>>> http://www.untwelve.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best,
>>>>>
>>>>> Aaron Krister Johnson
>>>>> http://www.akjmusic.com
>>>>> http://www.untwelve.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://www.michael-gogins.com
>>>> Michael dot Gogins at gmail dot 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"
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Andrés
>>>
>>>
>>> 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"
>>
>>
>>
>>
>
>
>
>
> 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"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot 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"