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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » Supercollider
turning up the speed
Post new topic   Reply to topic Moderators: v-un-v
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
googolplex



Joined: Nov 14, 2011
Posts: 1
Location: berlin

PostPosted: Mon Nov 14, 2011 4:44 am    Post subject:  turning up the speed Reply with quote  Mark this post and the followings unread

Hi everyone,

I got my hands on a piece of code creating a nice baseline and what i want to do with it is changing the speed with wich the baseline is played by moving my mouse. therefore I have found these handy mouseX and mousY methods but i dunno where to add them to the code. i tried to multiply mouseX to the \dur: Pseq([...]*mouseX.kr(1,10),... but this doesnt seem to work.
for a better example i ll post a piece of code from the tutorial here on which we can discuss the options:

(
SynthDef(\smooth, { |freq = 440, sustain = 1, amp = 0.5|
var sig;
sig = SinOsc.ar(freq, 0, amp) * EnvGen.kr(Env.linen(0.05, sustain, 0.1), doneAction: 2);
Out.ar(0, sig ! 2)
}).memStore;
)
(
p = Pbind(
// the name of the SynthDef to use for each note
\instrument, \smooth,
// MIDI note numbers -- converted automatically to Hz
\midinote, Pseq([60, 72, 71, 67, 69, 71, 72, 64, 69, 67], 1),
// rhythmic values
\dur, Pseq([2, 2, 1, 0.5, 0.5, 1, 1, 2, 2, 3]*MouseX.kr(1,10), 1)
).play;
)

looking forward to speed things up Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: v-un-v
Page 1 of 1 [1 Post]
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