[Clam-devel] Re: [Patch] A Python script to send OSC control in realtime
Natanael Olaiz
nolaiz at gmail.com
Sun Aug 17 16:14:08 PDT 2008
Ups... ignore the "/" in the previous mail... I wroted the code using
italic, translated to /text/ in plain text mode
El 08/17/2008 08:12 PM, Natanael Olaiz escribió:
> Nice, thanks!
>
> Just a tip... you could change this:
>
> /str_list = [ "" ]
> curr_item = 0
> for letter in text_line:
> if letter != " ":
> str_list[curr_item] += letter
> else:
> curr_item += 1
> str_list.append( "" )
> /
>
> for this:
>
> /str_list = text_line.rsplit(" ")
> curr_item = len(str_list)
> /
>
> (curr_item would be better named item_numbers on this code)
>
>
> Cheers,
> Natanael.
>
> El 08/17/2008 05:42 PM, Han, Yushen escribió:
>> Hi, Natanael and Pau
>>
>> Natanael made it possible to have variable number of arguments in OSC
>> in NE.
>>
>> To follow up this improvement, here is a Python script that I am using
>> to send OSC store in a score in realtime.
>> It may be useful for a realtime simulation of an OSC instrument.
>>
>> It reads OSC score from a txt file, each line of which has n
>> arguments(columns).
>> The score will be sent to a OSC source with target and port specified
>> by the user.
>>
>> It could run interactively or be executed from command line.
>> The syntax is: SendOSCFromScoreToPort.py [.txt score file] [target]
>> [port] [# of arguments in the score file]
>>
>> The patch will be applied to /CLAM/plugins/osc/oscpython
>>
>> Best regards,
>> Han, Yushen
>>
>
>
More information about the clam-devel
mailing list