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