electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Supercollider
translations of dave cottle's tutorial for windows
Post new topic   Reply to topic Moderators: v-un-v
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Fri Aug 11, 2006 3:59 pm    Post subject: translations of dave cottle's tutorial for windows Reply with quote  Mark this post and the followings unread

since dave's tutorial uses cocoa, and windows uses java, the one or two gui based codes in the whole book don't work. i have decided to post translations of dave's tutorial as i go through it myself that are necessary for windows.

everything courtesy of the great one sciss

the wave illustration on page 75 would go like this:

(
{Out.ar(0, In.ar(JMouseY.kr(15,23).div(1),1)*0.8)}.jscope;

{ Out.ar(16,[SinOsc.ar, Saw.ar, Pulse.ar,
LFTri.ar, LFNoise0.ar(200), LFNoise1.ar(200), Dust.ar(100),
PinkNoise.ar, WhiteNoise.ar]) }
.play;

JMouseBase.makeGUI;
)


moving the mouse in the gui map changes the wave in scope :)

but what if you wanted it to look JUST LIKE the picture. check this out . . .

go into C:\SC3-Complete-v02\SCClassLibrary\SwingOSC

find jstethoscope.sc. save the attached file in place of that one. then go to menu-->lang-->compile library

after that's done run this code

(
Server.default = Server.local;
s = Server.local;
s.waitForBoot({
w = JSCWindow.new("my own scope", Rect(20, 20, 400, 500));
w.view.decorator = FlowLayout(w.view.bounds);
c = JStethoscope.new(s, view:w.view);
c.index = 16;
c.numChannels = 9;
w.onClose = { c.free; z.free; a.free; };

a = { Out.ar(16,[SinOsc.ar, Saw.ar, Pulse.ar,
LFTri.ar, LFNoise0.ar(200), LFNoise1.ar(200), Dust.ar(100),
PinkNoise.ar, WhiteNoise.ar]) }.play;

z = SynthDef( \mon, { arg channel = 0;
Out.ar( 0, In.ar( channel + 16 ) *0.8 )
}).play( s, addAction: \addToTail );

v = c.view;
v.mouseDownAction = { arg view, x, y;
var bounds, channel;
bounds = view.bounds;
channel = (((y - bounds.top) / bounds.height) * 9).asInteger;
// 9 is the size of your UGen array
z.set( \channel, channel );
};

w.front;
});
)


voila. an exact duplicate of page 75 in dave cottle's tutorial!!!!!! for those who don't know the example shows you waveforms available in sc3. you should be able to click on the wave you want to hear in the scope, then hear it :)

fucking genius sciss is.
Back to top
View user's profile Send private message
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Fri Aug 11, 2006 6:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

important ps!

if you do the second experimental oscilloscope in the above post, MAKE SURE you go back, delete your sc3 folder and REINSTALL THE REAL SONENVIR build or nothing else works right again.

that second bit was just for really cool sharing. i would go with the unaltered swingosc.

thx
Back to top
View user's profile Send private message
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Fri Aug 11, 2006 9:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Next is page 84 where dave uses the horizontal position of the mouse to control the frequency of the noise wave:

(
{SinOsc.ar(LFNoise0.ar(JMouseX.kr(1,50), 500, 600), mul: 0.5)}.play;
JMouseBase.makeGUI;
)

enjoy!
Back to top
View user's profile Send private message
v-un-v
Janitor
Janitor


Joined: May 16, 2005
Posts: 8932
Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1

PostPosted: Sat Aug 12, 2006 12:20 am    Post subject: Reply with quote  Mark this post and the followings unread

These classes only work with the PC version right?

You obviously know your stuff, but I haven't a clue what you are writing- could you be a little more specific?

SuperCollider is an awesome application but I would hope not to alienate those who are new to it Smile

_________________
ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
Back to top
View user's profile Send private message Send e-mail
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Sat Aug 12, 2006 8:19 am    Post subject: Reply with quote  Mark this post and the followings unread

this thread is for people using psycollider (which is windows supercollider), yes.

This thread is for people with psycollider trying to start out.

They need to get dave cottle's tutorial by writing him using the email given on the initial supercollider thread.

Problem is when they get that tutorial, only about 85% of the code works, because of the mac classes dave uses rather than windows classes.

I am translating dave's tutorial, when necessary, into functional psycollider code. They can cut and paste this code over the code on the page numbers mentioned so they have a functional psycollider manual! I am doing this since i have to do it anyway, and it will benefit others.

this thread would not be for you or others using mac. if you have psycollider and dave's tutorial this is real obvious. I don't need to explain what the code does or whatever because that's in the tutorial. You, of course, can just read the unaltered tutorial. I just don't want my pc brethren left out of the fun.
Back to top
View user's profile Send private message
v-un-v
Janitor
Janitor


Joined: May 16, 2005
Posts: 8932
Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1

PostPosted: Sat Aug 12, 2006 10:35 am    Post subject: Reply with quote  Mark this post and the followings unread

majutsu wrote:

this thread would not be for you or others using mac.


Brian,

yes I understand what you are doing- but you missed my point. You obviously know what you are doing. I don't and by watching you translate the classes from Mac to PC is very interesting for me- and I suspect others who will want to also know.

I take my hat off to you that you are going to such trouble, but please will you come down from the clouds a bit and explain where the changes are in the code?

Perhaps copy the code from the Cottle tutorials and do an a/b comparison thingie?

It's a knowledge thing- and what was that great quote? "Knowledge = Power"? Wink

Cheers Very Happy

_________________
ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
Back to top
View user's profile Send private message Send e-mail
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Sat Aug 12, 2006 11:22 am    Post subject: Reply with quote  Mark this post and the followings unread

ohhhhhhhh

i get you, my brother.

elaborate on how i'm translating. i see. that would help people see how fun swingosc really is. as i start to ease into it, i'm really seeing how genius and logical sciss' little program is as an emulator of cocoa classes. i will give this more thought in the future.

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
royhinckley



Joined: Aug 08, 2006
Posts: 4
Location: Salt Lake City, Utah

PostPosted: Tue Aug 15, 2006 8:16 pm    Post subject: SC3 tutorial with PC examples Reply with quote  Mark this post and the followings unread

Thanks for doing this. I had no idea there would be differences. Maybe once you get them organized I could include them in an appendix?

I have quite a few students who work on PCs, so though I use a Mac and our labs are Mac, I am interested in a workable PC version.
Back to top
View user's profile Send private message
majutsu



Joined: Jun 18, 2006
Posts: 151
Location: New York
Audio files: 1

PostPosted: Thu Aug 17, 2006 6:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

glad it was of help dave
it's really not too bad as most of your great tutorial focuses on sound/synthesis ideas. only the parts with control need to be changed. basically, this is easily done by changing to j classes and adding the line JMouseBase.makeGUI so as to have a control pad.

brian

_________________
All phenomena are atoms in association and dissociation.
Back to top
View user's profile Send private message
djdaphalgan



Joined: Jul 19, 2007
Posts: 20
Location: Belgium

PostPosted: Fri Jan 25, 2008 8:27 am    Post subject: Reply with quote  Mark this post and the followings unread

Where can I download David Cottle's SC tutorial?

(I'm currently playing with Chuck, but Chuck has no GUI elements on Windows. That's why I also want to test Supercollider, but Supercollider seams not so intuitive as Chuck for me)
Back to top
View user's profile Send private message
royhinckley



Joined: Aug 08, 2006
Posts: 4
Location: Salt Lake City, Utah

PostPosted: Fri Jan 25, 2008 9:29 am    Post subject: MIT text Reply with quote  Mark this post and the followings unread

I'm hoping someday to be more cross platform in my tutorial, but right now all my attention is focused on a text to be published next year which will have chapters devoted to other OS's (including Linux). Stay tuned.
Back to top
View user's profile Send private message
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Sun Jan 27, 2008 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

For quite some time SC has had a cross-platform GUI factory class called, well, "GUI" which makes most translations simple.

SCButton(...) --> GUI.button.new(...)
SCStaticText(...) --> GUI.staticText.new(...)
SCPopUpMenu(...) --> GUI.popUpMenu.new(...)

etc.

Executing "GUI.cocoa" means that GUI.button.new will give you a SCButton. If you do "GUI.swing" (assuming you have SwingOSC installed), the same GUI.button.new gives you a JSCButton. Both have matching APIs so SC code that works in cocoa should also work in swing. I have a quite elaborate performance GUI that I cross-test with swing regularly, and it really does work (in Windows too, contrary to the earlier thread - TCP communication is working in the Windows port now).

At this point we should not see direct use of the widget classes, except for legacy code. Of course not everybody has time to update to the new usage right away, so there are still some tutorials floating around (including my own) that haven't been fixed yet.

James

_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic Moderators: v-un-v
Page 1 of 1 [12 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Supercollider
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use