Csound Csound-dev Csound-tekno Search About

[Csnd] Wiki page on score preprocessors

Date2012-03-18 09:21
FromAndres Cabrera
Subject[Csnd] Wiki page on score preprocessors
Hi all,

I've started a wiki page on score preprocessing, in the hope that
people add more info to it:
https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing

I think score preprocessing is a very interesting proposition that
should be better known and explored!

Cheers,
Andrés


Date2012-03-18 14:05
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
It seems I do not have access to the wiki, so I'll log it here.

The csd preprocessor framework:
https://github.com/jacobjoaquin/csd

And within this, there is pysco, a work-in-progress that collates
python and sco in a CSD. This is found in /csd/demos/pysco.

Below is a working example. Notice there is no separation between
python code and sco code. Granted, there still needs to be better
regular expressions to differentiate the two languages in the same
space. In cases where a line of code is both valid python and score
code, the score code will take precedence. At least that's the idea.

Included in this example is a pfield function mapper that maps the dB
converter to instr 1 p4 and cpspch to instr 1 p5.

And finally, a granular score generator.



sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
0dbfs = 1.0

instr 1
    idur = p3   ; Duration
    iamp = p4   ; Amplitude
    ifreq = p5  ; Frequency

    kenv line iamp, idur, 0       ; Line envelope
    a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
    out a1
endin

instr 2
    idur = p3   ; Duration
    iamp = p4   ; Amplitude
	ifreq = p5  ; Frequency

    aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
    a1 oscil aenv, ifreq, 1
    out a1
endin




def grain_gen(time, dur):
	end_time = time + dur
	base_freq = random() * 100 + 200

	while time < end_time:
		grain_dur = random() * 0.1 + 0.02
		amp = random() * 0.0125
		freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
		i_event(2, time, grain_dur, amp, freq)
		time += random() * 0.1 + 0.01

f 1 0 8192 10 1
t 0 120

i 1 0 0.5 -3 9.02
i 1 + .   .  8.07
i 1 + .   .  8.09
i 1 + .   .  8.11
i 1 + .   .  9.00
i 1 + .   .  8.09
i 1 + .   .  8.11
i 1 + .   .  8.07

for i_ in range(5):
	 grain_gen(i_ * 3, 2)

pmap('i', 1, 4, dB)
pmap('i', 1, 5, cpspch)





Here is a direct link to the pysco files:
https://github.com/jacobjoaquin/csd/tree/master/demo/pysco

Best,
Jake


On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera  wrote:
> Hi all,
>
> I've started a wiki page on score preprocessing, in the hope that
> people add more info to it:
> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>
> I think score preprocessing is a very interesting proposition that
> should be better known and explored!
>
> Cheers,
> 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"
>



-- 
codehop.com | #code #art #music


Date2012-03-18 18:16
Frompeiman khosravi
SubjectRe: [Csnd] Wiki page on score preprocessors
nice! I had no idea about specifying a binary in the score.

Thanks

P

On 18 March 2012 09:21, Andres Cabrera <mantaraya36@gmail.com> wrote:
Hi all,

I've started a wiki page on score preprocessing, in the hope that
people add more info to it:
https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing

I think score preprocessing is a very interesting proposition that
should be better known and explored!

Cheers,
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"



Date2012-03-18 18:46
FromJ Clements
SubjectRe: [Csnd] Wiki page on score preprocessors

Thanks, this is really cool!

John

On Mar 18, 2012 10:05 AM, "Jacob Joaquin" <jacobjoaquin@gmail.com> wrote:
It seems I do not have access to the wiki, so I'll log it here.

The csd preprocessor framework:
https://github.com/jacobjoaquin/csd

And within this, there is pysco, a work-in-progress that collates
python and sco in a CSD. This is found in /csd/demos/pysco.

Below is a working example. Notice there is no separation between
python code and sco code. Granted, there still needs to be better
regular expressions to differentiate the two languages in the same
space. In cases where a line of code is both valid python and score
code, the score code will take precedence. At least that's the idea.

Included in this example is a pfield function mapper that maps the dB
converter to instr 1 p4 and cpspch to instr 1 p5.

And finally, a granular score generator.

<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
0dbfs = 1.0

instr 1
   idur = p3   ; Duration
   iamp = p4   ; Amplitude
   ifreq = p5  ; Frequency

   kenv line iamp, idur, 0       ; Line envelope
   a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
   out a1
endin

instr 2
   idur = p3   ; Duration
   iamp = p4   ; Amplitude
       ifreq = p5  ; Frequency

   aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
   a1 oscil aenv, ifreq, 1
   out a1
endin

</CsInstruments>
<CsScore bin="./pysco.py">

def grain_gen(time, dur):
       end_time = time + dur
       base_freq = random() * 100 + 200

       while time < end_time:
               grain_dur = random() * 0.1 + 0.02
               amp = random() * 0.0125
               freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
               i_event(2, time, grain_dur, amp, freq)
               time += random() * 0.1 + 0.01

f 1 0 8192 10 1
t 0 120

i 1 0 0.5 -3 9.02
i 1 + .   .  8.07
i 1 + .   .  8.09
i 1 + .   .  8.11
i 1 + .   .  9.00
i 1 + .   .  8.09
i 1 + .   .  8.11
i 1 + .   .  8.07

for i_ in range(5):
        grain_gen(i_ * 3, 2)

pmap('i', 1, 4, dB)
pmap('i', 1, 5, cpspch)

</CsScore>
</CsoundSynthesizer>


Here is a direct link to the pysco files:
https://github.com/jacobjoaquin/csd/tree/master/demo/pysco

Best,
Jake


On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
> Hi all,
>
> I've started a wiki page on score preprocessing, in the hope that
> people add more info to it:
> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>
> I think score preprocessing is a very interesting proposition that
> should be better known and explored!
>
> Cheers,
> 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"
>



--
codehop.com | #code #art #music


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"


Date2012-03-19 10:52
FromAndres Cabrera
SubjectRe: [Csnd] Wiki page on score preprocessors
Hi Jacob,

Nice, I've now added it to the wiki. If you ask John, he'll be able to
give you access to modify the wiki.

Have you had a look at the python API in CsoundQt? It might be a nice
idea to integrate "csd" into it. What do you think?

Cheers,
Andrés

On Sun, Mar 18, 2012 at 2:05 PM, Jacob Joaquin  wrote:
> It seems I do not have access to the wiki, so I'll log it here.
>
> The csd preprocessor framework:
> https://github.com/jacobjoaquin/csd
>
> And within this, there is pysco, a work-in-progress that collates
> python and sco in a CSD. This is found in /csd/demos/pysco.
>
> Below is a working example. Notice there is no separation between
> python code and sco code. Granted, there still needs to be better
> regular expressions to differentiate the two languages in the same
> space. In cases where a line of code is both valid python and score
> code, the score code will take precedence. At least that's the idea.
>
> Included in this example is a pfield function mapper that maps the dB
> converter to instr 1 p4 and cpspch to instr 1 p5.
>
> And finally, a granular score generator.
>
> 
> 
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 1
> 0dbfs = 1.0
>
> instr 1
>    idur = p3   ; Duration
>    iamp = p4   ; Amplitude
>    ifreq = p5  ; Frequency
>
>    kenv line iamp, idur, 0       ; Line envelope
>    a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
>    out a1
> endin
>
> instr 2
>    idur = p3   ; Duration
>    iamp = p4   ; Amplitude
>        ifreq = p5  ; Frequency
>
>    aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
>    a1 oscil aenv, ifreq, 1
>    out a1
> endin
>
> 
> 
>
> def grain_gen(time, dur):
>        end_time = time + dur
>        base_freq = random() * 100 + 200
>
>        while time < end_time:
>                grain_dur = random() * 0.1 + 0.02
>                amp = random() * 0.0125
>                freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
>                i_event(2, time, grain_dur, amp, freq)
>                time += random() * 0.1 + 0.01
>
> f 1 0 8192 10 1
> t 0 120
>
> i 1 0 0.5 -3 9.02
> i 1 + .   .  8.07
> i 1 + .   .  8.09
> i 1 + .   .  8.11
> i 1 + .   .  9.00
> i 1 + .   .  8.09
> i 1 + .   .  8.11
> i 1 + .   .  8.07
>
> for i_ in range(5):
>         grain_gen(i_ * 3, 2)
>
> pmap('i', 1, 4, dB)
> pmap('i', 1, 5, cpspch)
>
> 
> 
>
>
> Here is a direct link to the pysco files:
> https://github.com/jacobjoaquin/csd/tree/master/demo/pysco
>
> Best,
> Jake
>
>
> On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera  wrote:
>> Hi all,
>>
>> I've started a wiki page on score preprocessing, in the hope that
>> people add more info to it:
>> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>>
>> I think score preprocessing is a very interesting proposition that
>> should be better known and explored!
>>
>> Cheers,
>> 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"
>>
>
>
>
> --
> codehop.com | #code #art #music
>
>
> 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"
>


Date2012-03-19 15:04
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
I haven't looked into the Python API in CsoundQT, but I am aware of
its existence.

One of the original ideas behind the csd python framework was to build
a tool that could be used to build other tools. My initial target was
as a command-line utility, because it's the easiest thing to develop
for. Though I wanted to make certain that the design was flexible
enough that it could be integrated into text editors, including the
one formally known as QuteCsound. I've also made sure that my unit
tests passed with Jython, the java python implementation.

Three years go, after about a 2 weeks of development, I stopped
working on it. Mostly, because I think I got it to a point where it
didn't what I needed it to do, and do well. After building this
library, I ended up only using it for one thing, to auto-align my
scores. I'm not a fan of space-down-left x 20. :)  I eventually mapped
that script to a shortcut in textmate, and will now eventually do for
vim since that's what I use now.

As for an environment like CsoundQT, I'm hoping it could provide some
benefit. Besides score alignment, I could see the potential for a
series of pull-down menu functions that could aid a user in managing
score. For example, if a Csounder wants to swap p6 with p11 in an
instrument, they could pull down the function "swap column" which
would bring up a modal window that asked the instrument number and the
two pfields to swap.

Anyways, just thinking out loud. To answer your question, yes, I think
it would be nice.

There is one known issue, that it either doesn't support named
instruments or instruments numbered with a macro. Either way, it
should be an easy fix.

Best,
Jake






On Mon, Mar 19, 2012 at 3:52 AM, Andres Cabrera  wrote:
> Hi Jacob,
>
> Nice, I've now added it to the wiki. If you ask John, he'll be able to
> give you access to modify the wiki.
>
> Have you had a look at the python API in CsoundQt? It might be a nice
> idea to integrate "csd" into it. What do you think?
>
> Cheers,
> Andrés
>
> On Sun, Mar 18, 2012 at 2:05 PM, Jacob Joaquin  wrote:
>> It seems I do not have access to the wiki, so I'll log it here.
>>
>> The csd preprocessor framework:
>> https://github.com/jacobjoaquin/csd
>>
>> And within this, there is pysco, a work-in-progress that collates
>> python and sco in a CSD. This is found in /csd/demos/pysco.
>>
>> Below is a working example. Notice there is no separation between
>> python code and sco code. Granted, there still needs to be better
>> regular expressions to differentiate the two languages in the same
>> space. In cases where a line of code is both valid python and score
>> code, the score code will take precedence. At least that's the idea.
>>
>> Included in this example is a pfield function mapper that maps the dB
>> converter to instr 1 p4 and cpspch to instr 1 p5.
>>
>> And finally, a granular score generator.
>>
>> 
>> 
>> sr = 44100
>> kr = 4410
>> ksmps = 10
>> nchnls = 1
>> 0dbfs = 1.0
>>
>> instr 1
>>    idur = p3   ; Duration
>>    iamp = p4   ; Amplitude
>>    ifreq = p5  ; Frequency
>>
>>    kenv line iamp, idur, 0       ; Line envelope
>>    a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
>>    out a1
>> endin
>>
>> instr 2
>>    idur = p3   ; Duration
>>    iamp = p4   ; Amplitude
>>        ifreq = p5  ; Frequency
>>
>>    aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
>>    a1 oscil aenv, ifreq, 1
>>    out a1
>> endin
>>
>> 
>> 
>>
>> def grain_gen(time, dur):
>>        end_time = time + dur
>>        base_freq = random() * 100 + 200
>>
>>        while time < end_time:
>>                grain_dur = random() * 0.1 + 0.02
>>                amp = random() * 0.0125
>>                freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
>>                i_event(2, time, grain_dur, amp, freq)
>>                time += random() * 0.1 + 0.01
>>
>> f 1 0 8192 10 1
>> t 0 120
>>
>> i 1 0 0.5 -3 9.02
>> i 1 + .   .  8.07
>> i 1 + .   .  8.09
>> i 1 + .   .  8.11
>> i 1 + .   .  9.00
>> i 1 + .   .  8.09
>> i 1 + .   .  8.11
>> i 1 + .   .  8.07
>>
>> for i_ in range(5):
>>         grain_gen(i_ * 3, 2)
>>
>> pmap('i', 1, 4, dB)
>> pmap('i', 1, 5, cpspch)
>>
>> 
>> 
>>
>>
>> Here is a direct link to the pysco files:
>> https://github.com/jacobjoaquin/csd/tree/master/demo/pysco
>>
>> Best,
>> Jake
>>
>>
>> On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera  wrote:
>>> Hi all,
>>>
>>> I've started a wiki page on score preprocessing, in the hope that
>>> people add more info to it:
>>> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>>>
>>> I think score preprocessing is a very interesting proposition that
>>> should be better known and explored!
>>>
>>> Cheers,
>>> 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"
>>>
>>
>>
>>
>> --
>> codehop.com | #code #art #music
>>
>>
>> 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"
>



-- 
codehop.com | #code #art #music


Date2012-03-19 15:18
FromSteven Yi
SubjectRe: [Csnd] Wiki page on score preprocessors
Hi Jake,

This is nice to know it works in Jython, as that is the interpeter I
bundle with blue.  I've included Maurizio's pmask and my own orchestra
library with blue for a long while; I'm happy to add others to blue.
The nice thing about having things work with Jython is that I'm able
to encapsulate everything in blue, so the user doesn't need to have
python installed as it just all comes with blue.  Like Andres, I'd be
happy to add this, just let me know if you're interested!

steven

On Mon, Mar 19, 2012 at 3:04 PM, Jacob Joaquin  wrote:
> I haven't looked into the Python API in CsoundQT, but I am aware of
> its existence.
>
> One of the original ideas behind the csd python framework was to build
> a tool that could be used to build other tools. My initial target was
> as a command-line utility, because it's the easiest thing to develop
> for. Though I wanted to make certain that the design was flexible
> enough that it could be integrated into text editors, including the
> one formally known as QuteCsound. I've also made sure that my unit
> tests passed with Jython, the java python implementation.
>
> Three years go, after about a 2 weeks of development, I stopped
> working on it. Mostly, because I think I got it to a point where it
> didn't what I needed it to do, and do well. After building this
> library, I ended up only using it for one thing, to auto-align my
> scores. I'm not a fan of space-down-left x 20. :)  I eventually mapped
> that script to a shortcut in textmate, and will now eventually do for
> vim since that's what I use now.
>
> As for an environment like CsoundQT, I'm hoping it could provide some
> benefit. Besides score alignment, I could see the potential for a
> series of pull-down menu functions that could aid a user in managing
> score. For example, if a Csounder wants to swap p6 with p11 in an
> instrument, they could pull down the function "swap column" which
> would bring up a modal window that asked the instrument number and the
> two pfields to swap.
>
> Anyways, just thinking out loud. To answer your question, yes, I think
> it would be nice.
>
> There is one known issue, that it either doesn't support named
> instruments or instruments numbered with a macro. Either way, it
> should be an easy fix.
>
> Best,
> Jake
>
>
>
>
>
>
> On Mon, Mar 19, 2012 at 3:52 AM, Andres Cabrera  wrote:
>> Hi Jacob,
>>
>> Nice, I've now added it to the wiki. If you ask John, he'll be able to
>> give you access to modify the wiki.
>>
>> Have you had a look at the python API in CsoundQt? It might be a nice
>> idea to integrate "csd" into it. What do you think?
>>
>> Cheers,
>> Andrés
>>
>> On Sun, Mar 18, 2012 at 2:05 PM, Jacob Joaquin  wrote:
>>> It seems I do not have access to the wiki, so I'll log it here.
>>>
>>> The csd preprocessor framework:
>>> https://github.com/jacobjoaquin/csd
>>>
>>> And within this, there is pysco, a work-in-progress that collates
>>> python and sco in a CSD. This is found in /csd/demos/pysco.
>>>
>>> Below is a working example. Notice there is no separation between
>>> python code and sco code. Granted, there still needs to be better
>>> regular expressions to differentiate the two languages in the same
>>> space. In cases where a line of code is both valid python and score
>>> code, the score code will take precedence. At least that's the idea.
>>>
>>> Included in this example is a pfield function mapper that maps the dB
>>> converter to instr 1 p4 and cpspch to instr 1 p5.
>>>
>>> And finally, a granular score generator.
>>>
>>> 
>>> 
>>> sr = 44100
>>> kr = 4410
>>> ksmps = 10
>>> nchnls = 1
>>> 0dbfs = 1.0
>>>
>>> instr 1
>>>    idur = p3   ; Duration
>>>    iamp = p4   ; Amplitude
>>>    ifreq = p5  ; Frequency
>>>
>>>    kenv line iamp, idur, 0       ; Line envelope
>>>    a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
>>>    out a1
>>> endin
>>>
>>> instr 2
>>>    idur = p3   ; Duration
>>>    iamp = p4   ; Amplitude
>>>        ifreq = p5  ; Frequency
>>>
>>>    aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
>>>    a1 oscil aenv, ifreq, 1
>>>    out a1
>>> endin
>>>
>>> 
>>> 
>>>
>>> def grain_gen(time, dur):
>>>        end_time = time + dur
>>>        base_freq = random() * 100 + 200
>>>
>>>        while time < end_time:
>>>                grain_dur = random() * 0.1 + 0.02
>>>                amp = random() * 0.0125
>>>                freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
>>>                i_event(2, time, grain_dur, amp, freq)
>>>                time += random() * 0.1 + 0.01
>>>
>>> f 1 0 8192 10 1
>>> t 0 120
>>>
>>> i 1 0 0.5 -3 9.02
>>> i 1 + .   .  8.07
>>> i 1 + .   .  8.09
>>> i 1 + .   .  8.11
>>> i 1 + .   .  9.00
>>> i 1 + .   .  8.09
>>> i 1 + .   .  8.11
>>> i 1 + .   .  8.07
>>>
>>> for i_ in range(5):
>>>         grain_gen(i_ * 3, 2)
>>>
>>> pmap('i', 1, 4, dB)
>>> pmap('i', 1, 5, cpspch)
>>>
>>> 
>>> 
>>>
>>>
>>> Here is a direct link to the pysco files:
>>> https://github.com/jacobjoaquin/csd/tree/master/demo/pysco
>>>
>>> Best,
>>> Jake
>>>
>>>
>>> On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera  wrote:
>>>> Hi all,
>>>>
>>>> I've started a wiki page on score preprocessing, in the hope that
>>>> people add more info to it:
>>>> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>>>>
>>>> I think score preprocessing is a very interesting proposition that
>>>> should be better known and explored!
>>>>
>>>> Cheers,
>>>> 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"
>>>>
>>>
>>>
>>>
>>> --
>>> codehop.com | #code #art #music
>>>
>>>
>>> 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"
>>
>
>
>
> --
> codehop.com | #code #art #music
>
>
> 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"
>


Date2012-03-19 15:53
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
I'm certainly interested, though I must confess I'm not familiar
enough with Blue to know how the csd python framework could be
integrated. I'll investigate later.


On Mon, Mar 19, 2012 at 8:18 AM, Steven Yi  wrote:
> Hi Jake,
>
> This is nice to know it works in Jython, as that is the interpeter I
> bundle with blue.  I've included Maurizio's pmask and my own orchestra
> library with blue for a long while; I'm happy to add others to blue.
> The nice thing about having things work with Jython is that I'm able
> to encapsulate everything in blue, so the user doesn't need to have
> python installed as it just all comes with blue.  Like Andres, I'd be
> happy to add this, just let me know if you're interested!
>
> steven
>
> On Mon, Mar 19, 2012 at 3:04 PM, Jacob Joaquin  wrote:
>> I haven't looked into the Python API in CsoundQT, but I am aware of
>> its existence.
>>
>> One of the original ideas behind the csd python framework was to build
>> a tool that could be used to build other tools. My initial target was
>> as a command-line utility, because it's the easiest thing to develop
>> for. Though I wanted to make certain that the design was flexible
>> enough that it could be integrated into text editors, including the
>> one formally known as QuteCsound. I've also made sure that my unit
>> tests passed with Jython, the java python implementation.
>>
>> Three years go, after about a 2 weeks of development, I stopped
>> working on it. Mostly, because I think I got it to a point where it
>> didn't what I needed it to do, and do well. After building this
>> library, I ended up only using it for one thing, to auto-align my
>> scores. I'm not a fan of space-down-left x 20. :)  I eventually mapped
>> that script to a shortcut in textmate, and will now eventually do for
>> vim since that's what I use now.
>>
>> As for an environment like CsoundQT, I'm hoping it could provide some
>> benefit. Besides score alignment, I could see the potential for a
>> series of pull-down menu functions that could aid a user in managing
>> score. For example, if a Csounder wants to swap p6 with p11 in an
>> instrument, they could pull down the function "swap column" which
>> would bring up a modal window that asked the instrument number and the
>> two pfields to swap.
>>
>> Anyways, just thinking out loud. To answer your question, yes, I think
>> it would be nice.
>>
>> There is one known issue, that it either doesn't support named
>> instruments or instruments numbered with a macro. Either way, it
>> should be an easy fix.
>>
>> Best,
>> Jake
>>
>>
>>
>>
>>
>>
>> On Mon, Mar 19, 2012 at 3:52 AM, Andres Cabrera  wrote:
>>> Hi Jacob,
>>>
>>> Nice, I've now added it to the wiki. If you ask John, he'll be able to
>>> give you access to modify the wiki.
>>>
>>> Have you had a look at the python API in CsoundQt? It might be a nice
>>> idea to integrate "csd" into it. What do you think?
>>>
>>> Cheers,
>>> Andrés
>>>
>>> On Sun, Mar 18, 2012 at 2:05 PM, Jacob Joaquin  wrote:
>>>> It seems I do not have access to the wiki, so I'll log it here.
>>>>
>>>> The csd preprocessor framework:
>>>> https://github.com/jacobjoaquin/csd
>>>>
>>>> And within this, there is pysco, a work-in-progress that collates
>>>> python and sco in a CSD. This is found in /csd/demos/pysco.
>>>>
>>>> Below is a working example. Notice there is no separation between
>>>> python code and sco code. Granted, there still needs to be better
>>>> regular expressions to differentiate the two languages in the same
>>>> space. In cases where a line of code is both valid python and score
>>>> code, the score code will take precedence. At least that's the idea.
>>>>
>>>> Included in this example is a pfield function mapper that maps the dB
>>>> converter to instr 1 p4 and cpspch to instr 1 p5.
>>>>
>>>> And finally, a granular score generator.
>>>>
>>>> 
>>>> 
>>>> sr = 44100
>>>> kr = 4410
>>>> ksmps = 10
>>>> nchnls = 1
>>>> 0dbfs = 1.0
>>>>
>>>> instr 1
>>>>    idur = p3   ; Duration
>>>>    iamp = p4   ; Amplitude
>>>>    ifreq = p5  ; Frequency
>>>>
>>>>    kenv line iamp, idur, 0       ; Line envelope
>>>>    a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
>>>>    out a1
>>>> endin
>>>>
>>>> instr 2
>>>>    idur = p3   ; Duration
>>>>    iamp = p4   ; Amplitude
>>>>        ifreq = p5  ; Frequency
>>>>
>>>>    aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
>>>>    a1 oscil aenv, ifreq, 1
>>>>    out a1
>>>> endin
>>>>
>>>> 
>>>> 
>>>>
>>>> def grain_gen(time, dur):
>>>>        end_time = time + dur
>>>>        base_freq = random() * 100 + 200
>>>>
>>>>        while time < end_time:
>>>>                grain_dur = random() * 0.1 + 0.02
>>>>                amp = random() * 0.0125
>>>>                freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
>>>>                i_event(2, time, grain_dur, amp, freq)
>>>>                time += random() * 0.1 + 0.01
>>>>
>>>> f 1 0 8192 10 1
>>>> t 0 120
>>>>
>>>> i 1 0 0.5 -3 9.02
>>>> i 1 + .   .  8.07
>>>> i 1 + .   .  8.09
>>>> i 1 + .   .  8.11
>>>> i 1 + .   .  9.00
>>>> i 1 + .   .  8.09
>>>> i 1 + .   .  8.11
>>>> i 1 + .   .  8.07
>>>>
>>>> for i_ in range(5):
>>>>         grain_gen(i_ * 3, 2)
>>>>
>>>> pmap('i', 1, 4, dB)
>>>> pmap('i', 1, 5, cpspch)
>>>>
>>>> 
>>>> 
>>>>
>>>>
>>>> Here is a direct link to the pysco files:
>>>> https://github.com/jacobjoaquin/csd/tree/master/demo/pysco
>>>>
>>>> Best,
>>>> Jake
>>>>
>>>>
>>>> On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera  wrote:
>>>>> Hi all,
>>>>>
>>>>> I've started a wiki page on score preprocessing, in the hope that
>>>>> people add more info to it:
>>>>> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>>>>>
>>>>> I think score preprocessing is a very interesting proposition that
>>>>> should be better known and explored!
>>>>>
>>>>> Cheers,
>>>>> 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"
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> codehop.com | #code #art #music
>>>>
>>>>
>>>> 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"
>>>
>>
>>
>>
>> --
>> codehop.com | #code #art #music
>>
>>
>> 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"
>



-- 
codehop.com | #code #art #music


Date2012-03-19 16:07
FromSteven Yi
SubjectRe: [Csnd] Wiki page on score preprocessors
If you're curious, just email me off list and I'd be happy to walk
through it with you.  There's info at the blue wiki:

http://blue.kunstmusik.com/wiki/index.php/PythonObject

for using python code within blue, including where to put libraries.
Right now there are only two global locations for placing library
code, with blue and within the BLUE_HOME/pythonLib folder (BLUE_HOME
being ~/.blue).  I should probably add an extra location relative to
the project file.  Anyways, python scripting has been a big part of my
own composing for a while within blue, and I'm always happy to work
with others with it.

Thanks!
steven

On Mon, Mar 19, 2012 at 3:53 PM, Jacob Joaquin  wrote:
> I'm certainly interested, though I must confess I'm not familiar
> enough with Blue to know how the csd python framework could be
> integrated. I'll investigate later.
>
>
> On Mon, Mar 19, 2012 at 8:18 AM, Steven Yi  wrote:
>> Hi Jake,
>>
>> This is nice to know it works in Jython, as that is the interpeter I
>> bundle with blue.  I've included Maurizio's pmask and my own orchestra
>> library with blue for a long while; I'm happy to add others to blue.
>> The nice thing about having things work with Jython is that I'm able
>> to encapsulate everything in blue, so the user doesn't need to have
>> python installed as it just all comes with blue.  Like Andres, I'd be
>> happy to add this, just let me know if you're interested!
>>
>> steven
>>
>> On Mon, Mar 19, 2012 at 3:04 PM, Jacob Joaquin  wrote:
>>> I haven't looked into the Python API in CsoundQT, but I am aware of
>>> its existence.
>>>
>>> One of the original ideas behind the csd python framework was to build
>>> a tool that could be used to build other tools. My initial target was
>>> as a command-line utility, because it's the easiest thing to develop
>>> for. Though I wanted to make certain that the design was flexible
>>> enough that it could be integrated into text editors, including the
>>> one formally known as QuteCsound. I've also made sure that my unit
>>> tests passed with Jython, the java python implementation.
>>>
>>> Three years go, after about a 2 weeks of development, I stopped
>>> working on it. Mostly, because I think I got it to a point where it
>>> didn't what I needed it to do, and do well. After building this
>>> library, I ended up only using it for one thing, to auto-align my
>>> scores. I'm not a fan of space-down-left x 20. :)  I eventually mapped
>>> that script to a shortcut in textmate, and will now eventually do for
>>> vim since that's what I use now.
>>>
>>> As for an environment like CsoundQT, I'm hoping it could provide some
>>> benefit. Besides score alignment, I could see the potential for a
>>> series of pull-down menu functions that could aid a user in managing
>>> score. For example, if a Csounder wants to swap p6 with p11 in an
>>> instrument, they could pull down the function "swap column" which
>>> would bring up a modal window that asked the instrument number and the
>>> two pfields to swap.
>>>
>>> Anyways, just thinking out loud. To answer your question, yes, I think
>>> it would be nice.
>>>
>>> There is one known issue, that it either doesn't support named
>>> instruments or instruments numbered with a macro. Either way, it
>>> should be an easy fix.
>>>
>>> Best,
>>> Jake
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Mar 19, 2012 at 3:52 AM, Andres Cabrera  wrote:
>>>> Hi Jacob,
>>>>
>>>> Nice, I've now added it to the wiki. If you ask John, he'll be able to
>>>> give you access to modify the wiki.
>>>>
>>>> Have you had a look at the python API in CsoundQt? It might be a nice
>>>> idea to integrate "csd" into it. What do you think?
>>>>
>>>> Cheers,
>>>> Andrés
>>>>
>>>> On Sun, Mar 18, 2012 at 2:05 PM, Jacob Joaquin  wrote:
>>>>> It seems I do not have access to the wiki, so I'll log it here.
>>>>>
>>>>> The csd preprocessor framework:
>>>>> https://github.com/jacobjoaquin/csd
>>>>>
>>>>> And within this, there is pysco, a work-in-progress that collates
>>>>> python and sco in a CSD. This is found in /csd/demos/pysco.
>>>>>
>>>>> Below is a working example. Notice there is no separation between
>>>>> python code and sco code. Granted, there still needs to be better
>>>>> regular expressions to differentiate the two languages in the same
>>>>> space. In cases where a line of code is both valid python and score
>>>>> code, the score code will take precedence. At least that's the idea.
>>>>>
>>>>> Included in this example is a pfield function mapper that maps the dB
>>>>> converter to instr 1 p4 and cpspch to instr 1 p5.
>>>>>
>>>>> And finally, a granular score generator.
>>>>>
>>>>> 
>>>>> 
>>>>> sr = 44100
>>>>> kr = 4410
>>>>> ksmps = 10
>>>>> nchnls = 1
>>>>> 0dbfs = 1.0
>>>>>
>>>>> instr 1
>>>>>    idur = p3   ; Duration
>>>>>    iamp = p4   ; Amplitude
>>>>>    ifreq = p5  ; Frequency
>>>>>
>>>>>    kenv line iamp, idur, 0       ; Line envelope
>>>>>    a1 vco2 kenv, ifreq, 12, 0.5  ; Triangle wave
>>>>>    out a1
>>>>> endin
>>>>>
>>>>> instr 2
>>>>>    idur = p3   ; Duration
>>>>>    iamp = p4   ; Amplitude
>>>>>        ifreq = p5  ; Frequency
>>>>>
>>>>>    aenv linseg 0, idur * 0.5, 1, idur * 0.5, 0
>>>>>    a1 oscil aenv, ifreq, 1
>>>>>    out a1
>>>>> endin
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>> def grain_gen(time, dur):
>>>>>        end_time = time + dur
>>>>>        base_freq = random() * 100 + 200
>>>>>
>>>>>        while time < end_time:
>>>>>                grain_dur = random() * 0.1 + 0.02
>>>>>                amp = random() * 0.0125
>>>>>                freq = base_freq * (3 ** (int(random() * 26) / 13.0) )
>>>>>                i_event(2, time, grain_dur, amp, freq)
>>>>>                time += random() * 0.1 + 0.01
>>>>>
>>>>> f 1 0 8192 10 1
>>>>> t 0 120
>>>>>
>>>>> i 1 0 0.5 -3 9.02
>>>>> i 1 + .   .  8.07
>>>>> i 1 + .   .  8.09
>>>>> i 1 + .   .  8.11
>>>>> i 1 + .   .  9.00
>>>>> i 1 + .   .  8.09
>>>>> i 1 + .   .  8.11
>>>>> i 1 + .   .  8.07
>>>>>
>>>>> for i_ in range(5):
>>>>>         grain_gen(i_ * 3, 2)
>>>>>
>>>>> pmap('i', 1, 4, dB)
>>>>> pmap('i', 1, 5, cpspch)
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>>
>>>>> Here is a direct link to the pysco files:
>>>>> https://github.com/jacobjoaquin/csd/tree/master/demo/pysco
>>>>>
>>>>> Best,
>>>>> Jake
>>>>>
>>>>>
>>>>> On Sun, Mar 18, 2012 at 2:21 AM, Andres Cabrera  wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> I've started a wiki page on score preprocessing, in the hope that
>>>>>> people add more info to it:
>>>>>> https://sourceforge.net/apps/mediawiki/csound/index.php?title=Score_Preprocessing
>>>>>>
>>>>>> I think score preprocessing is a very interesting proposition that
>>>>>> should be better known and explored!
>>>>>>
>>>>>> Cheers,
>>>>>> 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"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> codehop.com | #code #art #music
>>>>>
>>>>>
>>>>> 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"
>>>>
>>>
>>>
>>>
>>> --
>>> codehop.com | #code #art #music
>>>
>>>
>>> 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"
>>
>
>
>
> --
> codehop.com | #code #art #music
>
>
> 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"
>


Date2012-03-19 16:27
FromTito Latini
SubjectRe: [Csnd] Wiki page on score preprocessors
AttachmentsNone  

Date2012-03-19 17:47
FromAndres Cabrera
SubjectRe: [Csnd] Wiki page on score preprocessors
Nice example Tito, I've added it to the wiki.

Cheers,
Andrés

On Mon, Mar 19, 2012 at 4:27 PM, Tito Latini  wrote:
> Here is an example with score statements, `bash' and external.
>
> 
> 
>
> sr     = 44100
> ksmps  = 1
> nchnls = 1
> 0dbfs  = 1
>
> instr 1
>  kamp expon ampdb(p5), p3, 0.001
>  aosc poscil3 kamp, p4, 2
>  aw1  poscil3 1, 1/p3, 1
>  acnv dconv aw1, 64, 3
>  aout dcblock2 aw1 + acnv*0.002
>  aout butlp aout + aosc, 12000
>  out  aout*0.3
> endin
>
> 
> 
>
> # redirect stdout to score file
> exec > "$1"
>
> # shortcuts for the used score statements
> f() { echo "f $@"; }
> i() { echo "i $@"; }
>
> TEMPO="t"
> BPM=""
> fsize=8192
>
> # usage: tempo at bpm
> tempo()
> {
>    if [ -n "$BPM" ]; then
>        TEMPO="$TEMPO $1 $BPM $1 $2"
>    else
>        TEMPO="$TEMPO $1 $2"
>    fi
>    BPM=$2
> }
>
> # waveform from score file
> f 1 0 256 1 \"$1\" 0 1 0
>
> # usage: ftable at name
> ftable()
> {
>    if [[ "$2" == "sine" ]]; then
>        f 2 $1 $fsize 10 1
>    else
>        f 2 $1 $fsize 10 5 4 3 2 1
>    fi
> }
>
> tempo 0 30
>
> ftable  0    blabla
> ftable  6.4  sine
>
> f 3 0 $fsize 11 10 1 .75
>
> # normal i-statement
> i 1 0 1 880 -12
>
> # usage: arpeggio at dur freq amp
> arpeggio()
> {
>    i 1  $1  $2  $3           $4
>    i 1   +   .  [$3 \* 5/4]   .
>    i 1   +   .  [$3 \* 1.5]   .
>    i 1   +   .  [$3 \* 7/4]   .
>    i 1   +   .  [$3 \* 12/5]  .
> }
>
> arpeggio 0    0.5   440   -8
> arpeggio 2.5 0.25 1216 -9
> arpeggio 4.6  0.29  700    .
>
> tempo 4 135
> tempo 7 30
>
> for i in 0.11 0.27 0.56 0.79; do
>    frq=`echo "377 * (1 + $i)"|bc -l`
>    arpeggio "[2.6 + $i]"  $i  $frq  -9
> done
>
> i 1 4   3  4777  -12
> i 1 4.8 3  6666  -9
>
> # usage: bass at [skip]
> bass()
> {
>    i 1  $1  1   75   -7
>    i 1   +  .   44    .
>
>    if [ -z "$2" ]; then
>        i 1   +  .   33  -12
>        i 1   +  .   66   -8
>    fi
> }
>
> bass 0
> bass 4 skip_tail
>
> # external
> python < for istmt in [(0, 4, 100, -9), (4, 2, 103, -13), (4, 3, 106, -11)]:
>  print "i1 %f %f %f %d" % istmt
> EOF
>
> echo "$TEMPO"
>
> 
> 
>
> tito
>
>
> 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"
>


Date2012-03-20 18:16
Fromalves
Subject[Csnd] csounds.com down?
I get a "500 Internal server error" when I try to access csounds.com this morning.

--
Bill Alves
Professor of Music, The Claremont Colleges
Harvey Mudd College
301 Platt Blvd.
Claremont CA 91711
http://www2.hmc.edu/~alves/
http://www.billalves.com/

Date2012-03-20 18:31
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] csounds.com down?
wow.  me too.  I will check it out.

thanks

Hope you are well.

Richard


On Mar 20, 2012, at 2:16 PM, alves wrote:

I get a "500 Internal server error" when I try to access csounds.com this morning.

-- 
Bill Alves
Professor of Music, The Claremont Colleges
Harvey Mudd College
301 Platt Blvd.
Claremont CA 91711
http://www2.hmc.edu/~alves/
http://www.billalves.com/


Date2012-03-27 20:44
FromToby
SubjectRe: [Csnd] Wiki page on score preprocessors
I'm a little miffed about 'psyco'.  I put 'psycops' on
sourceforge in 2006.  I had searched for conflicts at
that time.

Tobiah

Date2012-03-27 21:04
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
Pysco is only a temp name. Honestly I gave it 2 seconds of consideration. 

Sent from my Tricorder

On Mar 27, 2012, at 12:44 PM, Toby  wrote:

> I'm a little miffed about 'psyco'.  I put 'psycops' on
> sourceforge in 2006.  I had searched for conflicts at
> that time.
> 
> Tobiah
> 
> 
> 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"
> 


Date2012-03-27 21:09
FromToby
SubjectRe: [Csnd] Wiki page on score preprocessors
On 03/27/2012 01:04 PM, Jacob Joaquin wrote:
> Pysco is only a temp name. Honestly I gave it 2 seconds of consideration. 

No prob.  Cool idea.  I wrote something like that
long ago so I could mix shell and foxpro commands on an SCO box.
It worked out pretty well.

Tobiah

Date2012-03-27 21:12
FromRory Walsh
SubjectRe: [Csnd] Wiki page on score preprocessors
Any chance they could be merged together? If the library was set up in
such a way that users could easily contribute
modules/classes/functions whatever it would be pretty neat. Maybe host
it on github? I guess something like this would also make learning
python fun. Hell, I'd even try it myself!

python>>> "Regards, Rory."

Date2012-03-27 22:07
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
Just quickly scanning psycops, it seems there is potential for integration.

What I'm calling pysco is shaping up to be a streamlined lightweight
interface for generating and preprocessing scores. The design I'm
shooting will easily allow modules/classes/functions to be easily
imported. Whether they're part of the "pysco" library or from users.
Also, I want this very accesible to Csounders who know the score, but
may not necessarily know any python. That's why the first thing I did
was to ensure that they'll be able to more or less create scores
nearly identically to how scores are done now.  For example:

t 0 120
f 1 0 8192 10 1
i 1 0 4 0.707 8.07
...
i 37 320 0.125  8.00
i 99 0 330

Would be written as

score('''
t 0 120
f 1 0 8192 10 1
i 1 0 4 0.707 8.07
...
i 37 320 0.125  8.00
i 99 0 330
''')

And then users could slowly integrate new tools and concepts to their
repertoire of score writing instruments. I was hoping for a release
tonight. I'll double my efforts to make it so.


On Tue, Mar 27, 2012 at 1:12 PM, Rory Walsh  wrote:
> Any chance they could be merged together? If the library was set up in
> such a way that users could easily contribute
> modules/classes/functions whatever it would be pretty neat. Maybe host
> it on github? I guess something like this would also make learning
> python fun. Hell, I'd even try it myself!
>
> python>>> "Regards, Rory."
>
>
> 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"
>



-- 
codehop.com | #code #art #music


Date2012-03-28 00:29
FromDave Seidel
SubjectRe: [Csnd] Wiki page on score preprocessors
Looking forward to seeing where this goes! I happen to be quite 
comfortable with Python and often use it within blue. I think Steven 
may have already expressed interest in the possibility of integrating 
these tools with blue, and I think that would be great, but I will 
absolutely check out the standalone versions as well.

- Dave

On Tuesday, March 27, 2012 5:07:33 PM, Jacob Joaquin wrote:
> Just quickly scanning psycops, it seems there is potential for integration.
>
> What I'm calling pysco is shaping up to be a streamlined lightweight
> interface for generating and preprocessing scores. The design I'm
> shooting will easily allow modules/classes/functions to be easily
> imported. Whether they're part of the "pysco" library or from users.
> Also, I want this very accesible to Csounders who know the score, but
> may not necessarily know any python. That's why the first thing I did
> was to ensure that they'll be able to more or less create scores
> nearly identically to how scores are done now.  For example:
>
> t 0 120
> f 1 0 8192 10 1
> i 1 0 4 0.707 8.07
> ...
> i 37 320 0.125  8.00
> i 99 0 330
>
> Would be written as
>
> score('''
> t 0 120
> f 1 0 8192 10 1
> i 1 0 4 0.707 8.07
> ...
> i 37 320 0.125  8.00
> i 99 0 330
> ''')
>
> And then users could slowly integrate new tools and concepts to their
> repertoire of score writing instruments. I was hoping for a release
> tonight. I'll double my efforts to make it so.
>
>
> On Tue, Mar 27, 2012 at 1:12 PM, Rory Walsh  wrote:
>> Any chance they could be merged together? If the library was set up in
>> such a way that users could easily contribute
>> modules/classes/functions whatever it would be pretty neat. Maybe host
>> it on github? I guess something like this would also make learning
>> python fun. Hell, I'd even try it myself!
>>
>> python>>> "Regards, Rory."
>>
>>
>> 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"
>>
>
>
>

Date2012-03-28 02:35
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
Just updated github.

In my previous email, I posted an example of the basics. Now I'm going
to post something much more advanced to showcase some of the features
that a scripting language brings to the table. For those who don't
know Python, it may or may not be overwhelming. No worries, tutorials
that focus on individual features will come.

Let's start with the files. drum.csd (the pysco enhanced csd):
https://gist.github.com/ef1606ea8056784ca30b#file_drum.csd

The generated file, which you can run in Csound.
https://gist.github.com/ef1606ea8056784ca30b#file_drum_rendered.csd

And here's the relevant part of the repo:
https://github.com/jacobjoaquin/csd/tree/master/demo/pysco

Here's a list of some of the functions and concepts presented:

1) Importing python libraries.
The full power of python is in your hand.

2) Functions as instrument wrappers
kick() is much easier to deal with than "i 1 0 0.5" and is easier to read

3) score()
Writing traditional Csound score code is as easy as writing
traditional Csound score code.

4) functions as reusable score code.
pattern_1() and pattern_2() are drum patterns that can be used over
and over. Much like clips in Ableton live.

5) Time stack.
You'll see statements such as "with t(0): pattern_1()". This is a time
stack, which allows reusable sections of code possible. This construct
allows composers to better organize their sections and measure by
allowing them to next time like other programming constructs like
if-statements and for-loops. For example:

with t(4):
    with time(1):
        foo()

The function foo would play at 5 beats into the score. That's 4 + 1.
You can have multiple layers of nests, too.

6) Algorithmic patterns
pattern_2 adds a bit of algorithmic composition into the mix by
randomly playing either the kick or snare at predetermined time
intervals. The function also takes a parameter for determining the
odds of a random note being triggered.

7) functions as sections
Just like a pattern, sections of music can be placed into functions. And reused.

8) Final processing
At the end, I've applied a mixer that increases the amplitudes of all the notes.


That's where it's at. Now I'm going to go play with some csGrain.

Best,
Jake




On Tue, Mar 27, 2012 at 4:29 PM, Dave Seidel  wrote:
> Looking forward to seeing where this goes! I happen to be quite
> comfortable with Python and often use it within blue. I think Steven
> may have already expressed interest in the possibility of integrating
> these tools with blue, and I think that would be great, but I will
> absolutely check out the standalone versions as well.
>
> - Dave
>
> On Tuesday, March 27, 2012 5:07:33 PM, Jacob Joaquin wrote:
>> Just quickly scanning psycops, it seems there is potential for integration.
>>
>> What I'm calling pysco is shaping up to be a streamlined lightweight
>> interface for generating and preprocessing scores. The design I'm
>> shooting will easily allow modules/classes/functions to be easily
>> imported. Whether they're part of the "pysco" library or from users.
>> Also, I want this very accesible to Csounders who know the score, but
>> may not necessarily know any python. That's why the first thing I did
>> was to ensure that they'll be able to more or less create scores
>> nearly identically to how scores are done now.  For example:
>>
>> t 0 120
>> f 1 0 8192 10 1
>> i 1 0 4 0.707 8.07
>> ...
>> i 37 320 0.125  8.00
>> i 99 0 330
>>
>> Would be written as
>>
>> score('''
>> t 0 120
>> f 1 0 8192 10 1
>> i 1 0 4 0.707 8.07
>> ...
>> i 37 320 0.125  8.00
>> i 99 0 330
>> ''')
>>
>> And then users could slowly integrate new tools and concepts to their
>> repertoire of score writing instruments. I was hoping for a release
>> tonight. I'll double my efforts to make it so.
>>
>>
>> On Tue, Mar 27, 2012 at 1:12 PM, Rory Walsh  wrote:
>>> Any chance they could be merged together? If the library was set up in
>>> such a way that users could easily contribute
>>> modules/classes/functions whatever it would be pretty neat. Maybe host
>>> it on github? I guess something like this would also make learning
>>> python fun. Hell, I'd even try it myself!
>>>
>>> python>>> "Regards, Rory."
>>>
>>>
>>> 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"
>>>
>>
>>
>>



-- 
codehop.com | #code #art #music


Date2012-03-30 00:11
FromJacob Joaquin
SubjectRe: [Csnd] Wiki page on score preprocessors
Hey everyone,

I want to start breaking things down into smaller chunks. I still
won't get into the nitty gritty of how the code works, but will
instead focus on the kinds of features Csounders can expect to have
available to them when working with a scripting language.

I modified the drum example from two days ago by adding swing using 4
lines of code. First I created a transfer function.

def swing_test(x):
	int, frac = divmod(x, 1)
	return int + sin(frac * (pi / 2.0))


Then I used pmap() to apply this transfer function to pfield-2 for
i-events 1, 2, and 3.

pmap('i', [1, 2, 3], 2, swing_test)


The end result is this (this is a normal Csound CSD you can run):
https://gist.github.com/2244631#file_drum_swing_rendered.csd

Here's the original psyco enabled csd:
https://gist.github.com/2244631#file_drum_swing.csd

In cases where the traditional score doesn't have a particular tool
for shaping score data, users will be able to quickly write one. I'm
probably a bad test case for this since I'm intimately familiar with
the inner workings of pysco, but adding the swing function took 5
minutes. Granted, it isn't the best transfer function in the world for
creating swing, but it does show what one can do with just a little
bit of know how in a time efficient manner.

The same principle could be applied to add random variations to start
times, note durations, amplitude, frequency, pan, etc.

Best,
Jake



On Tue, Mar 27, 2012 at 6:35 PM, Jacob Joaquin  wrote:
>
> Just updated github.
>
> In my previous email, I posted an example of the basics. Now I'm going
> to post something much more advanced to showcase some of the features
> that a scripting language brings to the table. For those who don't
> know Python, it may or may not be overwhelming. No worries, tutorials
> that focus on individual features will come.
>
> Let's start with the files. drum.csd (the pysco enhanced csd):
> https://gist.github.com/ef1606ea8056784ca30b#file_drum.csd
>
> The generated file, which you can run in Csound.
> https://gist.github.com/ef1606ea8056784ca30b#file_drum_rendered.csd
>
> And here's the relevant part of the repo:
> https://github.com/jacobjoaquin/csd/tree/master/demo/pysco
>
> Here's a list of some of the functions and concepts presented:
>
> 1) Importing python libraries.
> The full power of python is in your hand.
>
> 2) Functions as instrument wrappers
> kick() is much easier to deal with than "i 1 0 0.5" and is easier to read
>
> 3) score()
> Writing traditional Csound score code is as easy as writing
> traditional Csound score code.
>
> 4) functions as reusable score code.
> pattern_1() and pattern_2() are drum patterns that can be used over
> and over. Much like clips in Ableton live.
>
> 5) Time stack.
> You'll see statements such as "with t(0): pattern_1()". This is a time
> stack, which allows reusable sections of code possible. This construct
> allows composers to better organize their sections and measure by
> allowing them to next time like other programming constructs like
> if-statements and for-loops. For example:
>
> with t(4):
>    with time(1):
>        foo()
>
> The function foo would play at 5 beats into the score. That's 4 + 1.
> You can have multiple layers of nests, too.
>
> 6) Algorithmic patterns
> pattern_2 adds a bit of algorithmic composition into the mix by
> randomly playing either the kick or snare at predetermined time
> intervals. The function also takes a parameter for determining the
> odds of a random note being triggered.
>
> 7) functions as sections
> Just like a pattern, sections of music can be placed into functions. And reused.
>
> 8) Final processing
> At the end, I've applied a mixer that increases the amplitudes of all the notes.
>
>
> That's where it's at. Now I'm going to go play with some csGrain.
>
> Best,
> Jake
>
>
>
>
> On Tue, Mar 27, 2012 at 4:29 PM, Dave Seidel  wrote:
> > Looking forward to seeing where this goes! I happen to be quite
> > comfortable with Python and often use it within blue. I think Steven
> > may have already expressed interest in the possibility of integrating
> > these tools with blue, and I think that would be great, but I will
> > absolutely check out the standalone versions as well.
> >
> > - Dave
> >
> > On Tuesday, March 27, 2012 5:07:33 PM, Jacob Joaquin wrote:
> >> Just quickly scanning psycops, it seems there is potential for integration.
> >>
> >> What I'm calling pysco is shaping up to be a streamlined lightweight
> >> interface for generating and preprocessing scores. The design I'm
> >> shooting will easily allow modules/classes/functions to be easily
> >> imported. Whether they're part of the "pysco" library or from users.
> >> Also, I want this very accesible to Csounders who know the score, but
> >> may not necessarily know any python. That's why the first thing I did
> >> was to ensure that they'll be able to more or less create scores
> >> nearly identically to how scores are done now.  For example:
> >>
> >> t 0 120
> >> f 1 0 8192 10 1
> >> i 1 0 4 0.707 8.07
> >> ...
> >> i 37 320 0.125  8.00
> >> i 99 0 330
> >>
> >> Would be written as
> >>
> >> score('''
> >> t 0 120
> >> f 1 0 8192 10 1
> >> i 1 0 4 0.707 8.07
> >> ...
> >> i 37 320 0.125  8.00
> >> i 99 0 330
> >> ''')
> >>
> >> And then users could slowly integrate new tools and concepts to their
> >> repertoire of score writing instruments. I was hoping for a release
> >> tonight. I'll double my efforts to make it so.
> >>
> >>
> >> On Tue, Mar 27, 2012 at 1:12 PM, Rory Walsh  wrote:
> >>> Any chance they could be merged together? If the library was set up in
> >>> such a way that users could easily contribute
> >>> modules/classes/functions whatever it would be pretty neat. Maybe host
> >>> it on github? I guess something like this would also make learning
> >>> python fun. Hell, I'd even try it myself!
> >>>
> >>> python>>> "Regards, Rory."
> >>>
> >>>
> >>> 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"
> >>>
> >>
> >>
> >>
>
>
>
> --
> codehop.com | #code #art #music




--
codehop.com | #code #art #music