From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #288 Reply-To: sc-users Sender: owner-sc-users-digest@lists.io.com Errors-To: owner-sc-users-digest@lists.io.com Precedence: bulk sc-users-digest Friday, May 11 2001 Volume 01 : Number 288 ---------------------------------------------------------------------- Date: Wed, 09 May 2001 11:48:55 +0100 From: "fabrice mogini" <---@---.---> Subject: Re: London Supercollider I am willing to attend the supercollider forum. I have ideas to exchange and can even prepare a kind of workshop. I have some material as well to play live I just need the dates. end Fabrice Mogini ------------------------------ Date: Wed, 09 May 2001 12:19:14 +0100 From: Andy Wilson <---@---.---> Subject: Re: London Supercollider fabrice, that's excellent - i'll let you know as soon as we have any details..... On 9/5/01 11:48 am, "fabrice mogini" said: > I am willing to attend the supercollider forum. > I have ideas to exchange and can even > prepare a kind of workshop. > I have some material as well to play live I just need the dates. > end > Fabrice Mogini - -- { andy wilson << managing director << LShift << www.lshift.net } { www.andyw.com && www.faust-pages.com && www.directorxml.com } ------------------------------ Date: Wed, 9 May 2001 19:35:09 +0200 From: Julian Rohrhuber <---@---.---> Subject: == typo in Collection == { arg aCollection; if (aCollection.isKindOf(this.class), { ^false }); if (this.size != aCollection.size, { ^false }); this.do({ arg item, i; if (item != aCollection.at(i), { ^false }); }); ^true } should be: == { arg aCollection; if (aCollection.isKindOf(this.class).not, { ^false }); if (this.size != aCollection.size, { ^false }); this.do({ arg item, i; if (item != aCollection.at(i), { ^false }); }); ^true } similar in Association: == { arg anAssociation; if (anAssociation.isKindOf(this.class), { ^false }); ^key == anAssociation.key } ------------------------------ Date: Wed, 9 May 2001 20:10:14 +0200 From: Julian Rohrhuber <---@---.---> Subject: understanding assignment How to know when "=" (which is no message?) will copy the reciever and when it will just create a pointer to it? What kind of system is behind that? I have listed a number of examples to test it. //copied a = 1.2; b = a; [a, b].postln; a = 0; [a, b].postln; //copied a = 1.2; b = `a; [a, b.dereference].postln; a = 0; [a, b.dereference].postln; //no lost reference a = [1, 2]; b = a; [a, b].postln; a.put(0, 22); [a, b].postln; //no lost reference a = [1, 2]; b = a; f = { arg array; array.put(0, \ff) }; [a, b].postln; f.value(a); [a, b].postln; //no lost reference a = [1, 2]; b = a; f = { arg array; array.put(0, \ff) }; [a, b].postln; a = f.value(a); [a, b].postln; //lost reference a = [1, 2, 3, 4, 5]; b = a; [a, b].postln; a = a.scramble; [a, b].postln; //no lost reference a = [1, 2, 3, 4, 5]; b = a; [a, b].postln; a.removeAt(0); [a, b].postln; //lost reference a = [1, 2, 3, 4, 5]; b = a; [a, b].postln; a = a.copyRange(0, 3); [a, b].postln; //no lost reference a = [1, 2, 3, 4, 5]; b = a; [a, b].postln; a = a.addAll([222,333]); [a, b].postln; //no lost reference a = Rect.newBy(0, 0, 70, 80); b = a; [a, b].postln; a.left_(30); [a, b].postln; //no lost reference a = Rect.newBy(0, 0, 70, 80); b = a; [a, b].postln; a = a.set(30, 30, 100, 100); [a, b].postln; //no lost reference a = Rect.newBy(0, 0, 70, 80); b = a; [a, b].postln; a = a.setExtent(4,4); [a, b].postln; //lost reference a = [0, 0, 0]; Library.put(\a, a); b = Library.at(\a); [a, b].postln; a = [1,1,1]; Library.put(\a, a); [a, b].postln; //no lost reference a = [0, 0, 0]; ControlSpace.create(\test); ControlSpace.put(\test, \a, a); b = ControlSpace.at(\test, \a); [a, b].postln; ControlSpace.at(\test, \a).put(0, 3); [a, b].postln; //but this one is lost #{ ControlSpace.at(\test, \a).postln; }.send; ------------------------------ Date: Wed, 09 May 2001 21:14:21 -0500 From: James McCartney <---@---.---> Subject: Re: understanding assignment on 5/9/01 1:10 PM, Julian Rohrhuber at sa6a014@uni-hamburg.de wrote: > How to know when "=" (which is no message?) will copy the > reciever and when it will just create a pointer to it? > What kind of system is behind that? > > I have listed a number of examples to test it. Semantically, it never copies. Assignment always assigns a reference to the value returned by the expression on the right hand side, never a copy of it.. (The implementation is a black box, and what optimizations it uses have no effect on the semantics.) a = 1.2; // a is assigned a reference to the number 1.2 b = a; // b is assigned a reference to the value a contains [a, b].postln; a = 0; // a is assigned a reference to the number 0 [a, b].postln; a = [1, 2, 3, 4, 5]; b = a; // b is assigned a reference to the value a contains [a, b].postln; a = a.copyRange(0, 3); // you are making a copy of a range of values in 'a' // into a new object and assigning a reference to 'a' [a, b].postln; //lost reference a = [0, 0, 0]; Library.put(\a, a); b = Library.at(\a); // b gets a reference to the value that a also refers to [a, b].postln; a = [1,1,1]; // a is assigned a reference to [1,1,1] Library.put(\a, a); // that reference is put into the library [a, b].postln; // b still refers to the object it did before. //but this one is lost #{ ControlSpace.at(\test, \a).postln; }.send; The two virtual machines are in different address spaces, so when you send an object to the other address space it gets instantiated new from the message fifo. What you subsequently do to the objects in each space is unknown to the other address space. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Wed, 09 May 2001 21:24:58 -0500 From: James McCartney <---@---.---> Subject: Re: understanding assignment on 5/9/01 9:14 PM, James McCartney at asynth@io.com wrote: > (The implementation is a black box, and what optimizations it uses have no > effect on the semantics.) warning: the following could lead to confusion. Sematically an assignment is always an assignment of reference to an object. This is true in SuperCollider, Smalltalk, Python and many other languages. However the implementations differ. In Python everything is implemented as a pointer, even integers. So when you assign you get a copy of the pointer to the integer. You cannot change the value of that integer in the pointer so it is still an immutable reference to a single value. In Smalltalk integers are copied by value, all other objects are by pointer. In SuperCollider, Floats, Integers, Colors, Chars, nil, true, false, inf, and some others, are copied by value, other objects are by pointer. The semantics for all of the above languages are the same. The implementations differ. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Wed, 9 May 2001 23:24:35 -0400 (EDT) From: "Ronald J. Kuivila" <---@---.---> Subject: DiskIn anomaly Hi James, If I put DiskIn inside a spawn, it is much more prone to dropping buffers and locking up. (This cropped up using Node, but here is an example that malfunctions on a 400 MHz powerbook: RJK ( var filename, sound; filename = ":Sounds:floating_1"; sound = SoundFile.new; sound.preload(filename, 100); Synth.play({ Spawn.ar({0.4 * DiskIn.ar(sound, true)},2,1,1); // 0.4 * DiskIn.ar(sound, true); }); ) ------------------------------ Date: Thu, 10 May 2001 00:05:24 -0400 From: Jeffrey P Shell <---@---.---> Subject: Re: understanding assignment on 5/9/01 10:24 PM, James McCartney at asynth@io.com wrote: > on 5/9/01 9:14 PM, James McCartney at asynth@io.com wrote: > >> (The implementation is a black box, and what optimizations it uses have no >> effect on the semantics.) > > warning: the following could lead to confusion. > > Sematically an assignment is always an assignment of reference to an object. > This is true in SuperCollider, Smalltalk, Python and many other languages. > However the implementations differ. > > In Python everything is implemented as a pointer, even integers. > So when you assign you get a copy of the pointer to the integer. > You cannot change the value of that integer in the pointer so it is still an > immutable reference to a single value. What's interesting in Python is the pre allocated set of integers below 100. Basically, you can use the 'is' operator (similar to '===' in some languages, 'is' is the identity operator, not equality) on those numbers. It looks like the numbers over 99 are actually copied by value upon assignment. The built in function 'id()' shows that the identity of 'a' and '5' are the same, but 'b' and '401' are not. >>> a = 5 >>> a is 5 1 >>> b = 401 >>> b is 401 0 >>> 401 is 401 1 >>> c = 100 >>> c is 100 0 >>> c = 99 >>> c is 99 1 >>> id(a) 181299232 >>> id(5) 181299232 >>> id(b) 181547544 >>> id(401) 181547556 > In Smalltalk integers are copied by value, all other objects are by pointer. > > In SuperCollider, Floats, Integers, Colors, Chars, nil, true, false, inf, > and some others, are copied by value, other objects are by pointer. > > The semantics for all of the above languages are the same. The > implementations differ. ------------------------------ Date: Thu, 10 May 2001 00:32:47 -0500 From: James McCartney <---@---.---> Subject: SCd5.1 now available. on 4/29/01 5:35 PM, James McCartney at asynth@io.com wrote: SC3d5.1 MacBinary: SC3d5.1 BinHex: Sound out is fixed. Problem with updating preferences when SC is not on the boot disk is fixed. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Thu, 10 May 2001 21:48:52 +0200 From: Maurizio Giri <---@---.---> Subject: Can't launch SC3d5.1 When I try to run SC3d5.1 on a beige G3 w MacOS 8.6 the system says "cannot open SC3 because I can't find MPlibrary". What can I do? SC2 runs fine. Maurizio ------------------------------ Date: Thu, 10 May 2001 13:58:37 -0700 (PDT) From: crux xial <---@---.---> Subject: [sc] New Stuff For You All http://www.crucial-systems.com/code/SuperCollider Just put up some new stuff. It is all 2.2.10 code. None of it however will be obsolete under 3.x check out the SndFile editing system ! play sound files in patterns, edit chop skip loop sound files with gui controls. run things through blenders, re-record, re-run through blenders. blenders not included. this is i guess 0.9 code, no bugs that I can find, but the display is sometimes unclear, and there is much to do. I am looking for other people interested in sound file editing / collage who wish to contribute. _______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/ ------------------------------ Date: Thu, 10 May 2001 14:58:27 -0700 (PDT) From: Chris Brown <---@---.---> Subject: non-ugen plugins Phil Burk and I are going ahead to hack GUSI (Grand Unified Socket Interface) in order to get socket I/O working in SC in advance of OSX and SC being compatible. We have a question -- is it safe to assume that we can write plugins that are not Ugens ? for example, that calls GUSI to open a socket and read and write byte arrays ? Secondly, where can we get Pyrite docs that are referred to in Plugin Dev folder ? We tried from the uiowa server site but there was no response. Chris **************************************************** Chris Brown Assoc. Prof. of Music and Co-Director, Center for Contemporary Music (CCM) Mills College, Oakland, CA 94613 email: cbmus@mills.edu, phone: 510-430-2330; fax 510-430-3314 **************************************************** ------------------------------ Date: Thu, 10 May 2001 19:14:01 -0500 From: James McCartney <---@---.---> Subject: Re: non-ugen plugins on 5/10/01 4:58 PM, Chris Brown at cbmus@mills.edu wrote: > > Phil Burk and I are going ahead to hack GUSI (Grand Unified Socket > Interface) in order to get socket I/O working in SC in advance of OSX and > SC being compatible. We have a question -- is it safe to assume that we > can write plugins that are not Ugens ? f Yes. Many of those example projects are language primitives, not ugens. > or example, that calls GUSI to > open a socket and read and write byte arrays ? Yes you can do that, but you have to check g->canCallOS is true before you make any calls. if it is false then the user is trying to call it from inside the audio callback which is not allowed. > Secondly, where can we get Pyrite docs that are referred to in Plugin Dev > folder ? We tried from the uiowa server site but there was no response. Where are they referred to? There are none such, at least that have any relevance anymore. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Thu, 10 May 2001 17:23:08 -0700 (PDT) From: Chris Brown <---@---.---> Subject: Re: non-ugen plugins thanks! On Thu, 10 May 2001, James McCartney wrote: > > > Secondly, where can we get Pyrite docs that are referred to in Plugin Dev > > folder ? We tried from the uiowa server site but there was no response. > > Where are they referred to? There are none such, at least that have any > relevance anymore. we thought they were referred to within the project files and wanted to find more documentation -- searched and found the link on your site: http://www.audiosynth.com/scfaq.html > > --- james mccartney james@audiosynth.com > SuperCollider - a real time synthesis programming language for the PowerMac. > > > > ------------------------------ Date: Thu, 10 May 2001 19:29:00 -0500 From: James McCartney <---@---.---> Subject: Re: Can't launch SC3d5.1 on 5/10/01 2:48 PM, Maurizio Giri at m.giri@agora.stm.it wrote: > When I try to run SC3d5.1 on a beige G3 w MacOS 8.6 the system says > "cannot open SC3 because I can't find MPlibrary". > What can I do? SC2 runs fine. > > Maurizio > OS 8.6 is supposed to have the MPLibrary built in. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Thu, 10 May 2001 19:31:43 -0500 From: James McCartney <---@---.---> Subject: Re: non-ugen plugins on 5/10/01 7:23 PM, Chris Brown at cbmus@mills.edu wrote: > > we thought they were referred to within the project files and wanted to > find more documentation -- searched and found the link on your site: > > http://www.audiosynth.com/scfaq.html Oh I need to replace that page. There is no link to it. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Fri, 11 May 2001 09:54:34 +0200 From: Maurizio Giri <---@---.---> Subject: Re: Can't launch SC3d5.1 > >OS 8.6 is supposed to have the MPLibrary built in. > Yep. I've reinstalled it and now it's ok. Thanks. Maurizio ------------------------------ Date: Fri, 11 May 2001 18:15:55 +0200 From: Alberto de Campo <---@---.---> Subject: Re: pattern shifting Hi Jem, Jem Finer wrote: > I'm wondering what the 'elegant' way to do this is : > > Patterns where, given a list of notes, one plays the first 3 a certain > number of times, then increments the starting index by a number - in > this case 1. maybe not totally elegant, but anyway, some possibilities: //option 1: chop the list into chunks // and generate an array of Pseqs to play them. ( var list, pattern,notes1,notes2; list = [ 0, 4, 3, 7, 2, 11, 7, 9, 10, 6, 5 ]; notes1 = Pseq( Array.fill(list.size - 2, { arg index; Pseq(list.copyRange(index, index + 2).postln, 2) // post to debug. }) ,inf); notes2 = Pseq( Array.fill(list.size - 2, { arg index; Pseq(list.copyRange(index, index + 2), 3) }) ,inf); // rest is the same pattern.play ... ) ( // option 2: use Pser to play three notes from the list, // starting at an offset; use Pn to repeat each Pser (2 or 3x). var list, pattern, notes1, notes2; list = [ 0, 4, 3, 7, 2, 11, 7, 9, 10, 6, 5 ]; notes1 = Pseq( Array.fill(list.size - 2, { arg index; Pn( Pser(list, 3, index), 2) }) ,inf); // etc etc... ) ( // option 3: make an array of offsets; build your list // of Pn/Psers from it. (in case you ever wanted to move away // from [ 0, 1, 2, 3, 4 etc ]). var list, offsets, pattern, notes1, notes2; list = [ 0, 4, 3, 7, 2, 11, 7, 9, 10, 6, 5 ]; offsets = Array.fill(list.size - 2, { arg i; i }).postln; notes1 = Pseq( offsets.collect({ arg offset; Pn( Pser(list, 3, offset), 2) }) ,inf); // etc etc... ) best, adc > > > (// 2 instruments each playing a pattern, 3 notes at a time - 1 > changes notes every 2, the other every 3 > // list of notes is : 0,4,3,7,2,11,7,9,10,6,5 > // at each change start one index further into list > > var pattern,notes1,notes2; > > > notes1 = Pseq([ > Pseq([0,4,3],2), > Pseq([4,3,7],2), > Pseq([3,7,2],2), > Pseq([7,2,11],2), > Pseq([2,11,1],2), > Pseq([11,1,9],2), > Pseq([1,9,10],2), > Pseq([9,10,6],2), > Pseq([10,6,5],2) > ],inf); > notes2 = Pseq([ > Pseq([0,4,3],3), > Pseq([4,3,7],3), > Pseq([3,7,2],3), > Pseq([7,2,11],3), > Pseq([2,11,1],3), > Pseq([11,1,9],3), > Pseq([1,9,10],3), > Pseq([9,10,6],3), > Pseq([10,6,5],3) > ],inf); > > pattern = Ppar([ > Pbind( > \dur, 0.5, > \pan, -0.75, > \degree, notes1), > Pbind( > \dur, 0.5, > \pan, 0.75, > \degree, notes2) > ]); > > pattern.play(Event.protoEvent,2) > > ) > > > Cheers, > > Jem ------------------------------ End of sc-users-digest V1 #288 ******************************