contact | 1 Mar 2005 17:41
Picon
Gravatar

cancelling OSC messages

hi,

maybe this is a stupid question, but how do i actually cancel messages
that have been send to scsynth with a future time tag? i'm finishing a
small sound editor that uses scsynth to playback the regions. now since
/b_read is asynchronous and takes a while to finish, i'm using "double
buffering", i.e. two buffers are interchangingly used by a disk-in 
synth. say, a new region starts after 4 seconds, then i'm sending a
/b_read  for the currently not playing buffer to open the next sound
file chunk and starting a second disk-in synth after 4 seconds. now the
user may press the stop button on the transport before this synth is
actually started (since it's timetag is current system time plus 4
seconds). do i just free the synth's group or ... ?

thanks, -sciss-
Till Bovermann | 1 Mar 2005 18:26

Re: cancelling OSC messages

I think cancelling a sent OSC message isn't possible...
freeing the group would work, if you have sent a n_set message to an 
existing synth.
When creating a synth after 4 secs this does not work.

hope that helps
Till

On 01 Mar 2005, at 17:41, contact@... wrote:

> hi,
>
> maybe this is a stupid question, but how do i actually cancel messages
> that have been send to scsynth with a future time tag? i'm finishing a
> small sound editor that uses scsynth to playback the regions. now since
> /b_read is asynchronous and takes a while to finish, i'm using "double
> buffering", i.e. two buffers are interchangingly used by a disk-in
> synth. say, a new region starts after 4 seconds, then i'm sending a
> /b_read  for the currently not playing buffer to open the next sound
> file chunk and starting a second disk-in synth after 4 seconds. now the
> user may press the stop button on the transport before this synth is
> actually started (since it's timetag is current system time plus 4
> seconds). do i just free the synth's group or ... ?
>
> thanks, -sciss-
> _______________________________________________
> sc-dev mailing list
> sc-dev@...
> http://www.create.ucsb.edu/mailman/listinfo/sc-dev
>
(Continue reading)

James Harkins | 1 Mar 2005 19:34
Picon
Favicon

Re: cancelling OSC messages

I would do something like this. It assumes that you
have a boolean flag in a variable isPlaying that could
be set by a button like so:

playButton = SCButton(view, bounds).action_({ |btn|
  isPlaying = #[false, true][btn.value]
});

// prepare buffer
b[1].read(...);
// start synth in 4 sec
thisThread.clock.sched(3.9, {
  if(isPlaying) {
    s.sendBundle(0.1, [ ... your msg here ... ]);
  }
});

I would tend to use client scheduling for anything
that requires conditions, loops etc. and server
timestamps to control network jitter only.

hjh

--- contact@... wrote:

> hi,
> 
> maybe this is a stupid question, but how do i
> actually cancel messages
> that have been send to scsynth with a future time
(Continue reading)

contact | 1 Mar 2005 22:03
Picon
Gravatar

Re: cancelling OSC messages

again,

sorry, i should have RTFM . it's /clearSched , simple as that. now i have
the next problem, being sample accurate node runs/stops. i have modified
my OSC classes to calculate sample accurate timetags, however i get around
12...16 samples jitter . anyway, i'll post the programme (sample editor)
soon, it's not too serious, but almost working now, i hope someone will be
interested in continuing to develop.

best, - sciss-
Joshua Parmenter | 1 Mar 2005 22:05

Re: Re: cancelling OSC messages

You could try using OffsetOut for sample accurate timings.

Josh

******************************************
Joshua D. Parmenter
Graduate Student, Music Composition
http://students.washington.edu/joshp

"...Some people think a composer's supposed to please them, but in a 
way a composer is a chronicler... He's supposed to report on what he's 
seen and lived."
                                                         					-Charles 
Mingus
On Mar 1, 2005, at 1:03 PM, contact@... wrote:

> again,
>
> sorry, i should have RTFM . it's /clearSched , simple as that. now i 
> have
> the next problem, being sample accurate node runs/stops. i have 
> modified
> my OSC classes to calculate sample accurate timetags, however i get 
> around
> 12...16 samples jitter . anyway, i'll post the programme (sample 
> editor)
> soon, it's not too serious, but almost working now, i hope someone 
> will be
> interested in continuing to develop.
>
(Continue reading)

Till Bovermann | 1 Mar 2005 22:23

Re: Re: cancelling OSC messages

Be patient with this since it will remove _all_ (not only your) future 
events on the server...

regards
Till

On 01 Mar 2005, at 22:03, contact@... wrote:

> sorry, i should have RTFM . it's /clearSched , simple as that.
kazumits13 | 2 Mar 2005 01:40
Picon
Favicon

how to become a member of SC3 WIN32 porters?

hi, all.

I'm interested in SC3, and now especially on Windows.
So I'd love to help porting to Win32(Psycollider).

up to now, I made several changes to the Python's SCLang
and some sources of UGen plugins to build all correctly on MSVC.
but, it was quite personal affairs at that time...

The other day, I read a post from Benjamin here.
then I got in touch with him at once and ask to commit
some of my modified files to the SF(SourceForge).
thanks! Benjamin.

Hence, I want to help more and work on the SF as a WIN32 developer.
in a case like this, whom should I contact? please let me inform.

Kazumitsu (yssr)
Mario Lang | 2 Mar 2005 10:02
Favicon
Gravatar

Re: assignment / reference

Julian Rohrhuber <rohrhuber@...> writes:

> the implicit way of access that SC has in several places, like in
> environments and arrays
>
> a[0] <-> a[0] = 3,
> ~x vs. ~x = 3,
>
> and, deriving from it,
>
> Pdef(\x, 3) vs. Pdef(\x)
>
> - what is this really called in computer science?

It kind of reminds me of Lisp's "generalized variables":

(get 'ball 'color) <-> (setf (get 'ball 'color) 'red)

(see Chapter 12 of Paul Grahams "On Lisp")

But its not quite the same...

--

-- 
CYa,
  Mario
Julian Rohrhuber | 2 Mar 2005 10:33
Picon
Favicon

[commit?] dictionary-order

should I add this?

Dictionary - order { arg func;
		var assoc;
		this.keysValuesDo { arg key, val;
			assoc = assoc.add(key -> val);
		};
		^assoc.order(func)
	}

--

-- 

.
Julian Rohrhuber | 2 Mar 2005 10:38
Picon
Favicon

Synth.useLatency

Synth.useLatency = true; // etc.

I've had these changes in my files for a while (switch on and off 
accurate scheduling for synths/groups globally).

Thinking it over, I'd say that to make Synth really useful and 
general, latency should be an instance variable, taking maybe a 
classvar default (or maybe not).

A synth should have latency as a last arg, because one might want to 
create synths from tasks (sample accurate) at the same time as 
controlling others from a slider or so. A global classvar is not such 
a good compromise then.

opinions?
--

-- 

.

Gmane