James McCartney | 22 Apr 17:58 2006
Picon

Re: Change / bug in series shortcut syntax?


fixed

On Mar 14, 2006, at 12:59 PM, Sergio Luque wrote:

could this be related to the problem with fold and wrap that I reported in October?



 10.fold(0.0, 3.0)

10                    // weird


 10.0.fold(0.0, 3.0)

         2                     // ok



 10.wrap(0.0, 3.0)

         10                   // weird


 10.0.wrap(0.0, 3.0)

         1                     // ok



 4.fold2(3.0)

-3


  4.wrap2(3.0)

-3


  4.wrap2(3)

4



_______________________________________________
sc-dev mailing list
sc-dev@...
http://www.create.ucsb.edu/mailman/listinfo/sc-dev
Sergio Luque | 22 Apr 18:21 2006

Re: Change / bug in series shortcut syntax?


On Apr 22, 2006, at 5:58 PM, James McCartney wrote:

> fixed

Thanks!

	
Sergio
--
Music with no commercial potential!
http://www.sergioluque.com
Julian Rohrhuber | 23 Apr 21:04 2006
Picon

[commit] Event.silent (minor change)

Event.silence returns now not a copy of parent event, but, just like 
Event.default, a new Event with the defaultParentEvent as a parent.
--

-- 

.
Julian Rohrhuber | 23 Apr 22:06 2006
Picon

Pn loop catch

In some cases, when a Pn loops an event pattern that releases itself 
(e.g. because of a Pfindur), it is caught in an infinite loop.

// here is an example:

a = Pn(Pfindur(1, Pbind.new).collect {|x| x }, 100000).asStream;

5.do { a.next(Event.default).postln };
a.next(nil); // signal an end of stream.

// this is no problem:

a = Pn(Pfindur(1, Pbind.new), 100000).asStream;
5.do { a.next(Event.default).postln };
a.next(nil); // signal an end of stream.

// as far as I see this always happens when the inner pattern uses 
embedInStream instead of asStream (like in a Pcollect).

This could be solved if we decided to find it correct to assume, when 
we pass the first value into embedInStream which is not nil, that all 
the other values we pass in are also not nil and thus we can force 
the halt.

Then this would solve the problem:

embedInStream { arg event;
		var hasInval = event.notNil;
		repeats.value.do {
			event = pattern.embedInStream(event);
			if(hasInval and: {event.isNil}) { ^nil.yield };
		};
		^event;
	}

/////////////////////////////////////////////////////////

this could cause surprise in a case like the following:

//////////

a = Pn(Pseq([1, 2, 3])).asStream;

10.do { a.next(4) }; // passing in a value signalizes that Pn always 
expects a value.

a.next(nil);
a.next(nil) // stream ends.

//////////

a = Pn(Pseq([1, 2, 3])).asStream;

10.do { a.next };

a.next(nil);
a.next(nil) // stream does not end.

/////////////////////////////////////////////////////////

so actually it would be better to write a Pne to be used explicitly 
for EventStreams.

--

-- 

.
Julian Rohrhuber | 23 Apr 22:15 2006
Picon

[approve] Object.postf

postf { arg string ... args; string.postf(this, *args); ^this }

this is useful because it returns the object itself.

e.g.

Pseq([1, 2, 3]).collect { |x| x.postf("the pattern has returned % 
\n") }.asStream.all

the pattern has returned 1
the pattern has returned 2
the pattern has returned 3

commit?

--

-- 

.
James Harkins | 23 Apr 23:36 2006
Picon

Re: [approve] Object.postf

Possibly useful, though the simple case of one value at the end can be 
handled:

Pseq((1..3)).collect { |x| x.debug("the pattern has returned") 
}.asStream.all

Or, cleaner specifically for patterns:

Pseq((1..3)).trace(prefix: "the pattern has returned ").asStream.all

hjh

On Apr 23, 2006, at 4:15 PM, Julian Rohrhuber wrote:

> postf { arg string ... args; string.postf(this, *args); ^this }
>
> this is useful because it returns the object itself.
>
> e.g.
>
> Pseq([1, 2, 3]).collect { |x| x.postf("the pattern has returned % \n") 
> }.asStream.all
>
> the pattern has returned 1
> the pattern has returned 2
> the pattern has returned 3
>
> commit?
>
> -- 
>
>
>
>
>
> .
> _______________________________________________
> sc-dev mailing list
> sc-dev@...
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>
>

: H. James Harkins
: jamshark70@...
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-dev mailing list
sc-dev@...
http://www.create.ucsb.edu/mailman/listinfo/sc-dev
Julian Rohrhuber | 24 Apr 00:40 2006
Picon

Re: [approve] Object.postf

At 17:36 Uhr -0400 23.04.2006, James Harkins wrote:
>
>Possibly useful, though the simple case of one value at the end can 
>be handled:
>
>Pseq((1..3)).collect { |x| x.debug("the pattern has returned") }.asStream.all

maybe debug should use postf so that one can compose args. well..

--

-- 

.
crucial felix | 24 Apr 11:24 2006

Re: sc userlib


Sorry but I have been traveling and do not yet have full time internet
access.
I have to resubmit the project as Quarks, then we can get rolling.

Coming soon...

-fx

On Apr 21, 2006, at 3:58 PM, Till Bovermann wrote:

> Hey all,
>
> Has something happen to go for the sc-userlib?
> Is there alreadily something running and I do not know about it?
>
> curious
>
> Till
> _______________________________________________
> sc-dev mailing list
> sc-dev@...
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
Till Bovermann | 24 Apr 14:13 2006

Re: sc userlib

looking llforward to this ;-)
I I could help you, just mail me...

regards
Till

On 24 Apr 2006, at 11:24, crucial felix wrote:

>
> Sorry but I have been traveling and do not yet have full time internet
> access.
> I have to resubmit the project as Quarks, then we can get rolling.
>
> Coming soon...
>
> -fx
>
> On Apr 21, 2006, at 3:58 PM, Till Bovermann wrote:
>
>> Hey all,
>>
>> Has something happen to go for the sc-userlib?
>> Is there alreadily something running and I do not know about it?
>>
>> curious
>>
>> Till
>> _______________________________________________
>> sc-dev mailing list
>> sc-dev@...
>> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>
> _______________________________________________
> sc-dev mailing list
> sc-dev@...
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
stefan kersten | 24 Apr 17:57 2006
Picon

sclang as TCP server

oswald berthold and i have worked a little on the sclang TCP
implementation, making it possible to handle incoming client
connections.

now the question is how to control the listening port;
currently sclang just opens a TCP socket on the same port as
the default UDP port (57120). should this be controllable
from the commandline (e.g. to turn TCP off)? how about
applications without a commandline (e.g. the OSX app)?

<sk>

Gmane