«Using CCResponder Function to Use Midi Controller Slider to Generate and Control the Frequency of a SinOsc Frequency Variable» by n.salerno

on 03 Dec'19 14:30 in

I have only been using SuperCollider for a couple of weeks, and I am finding it rather tough, so please bear with me. I would like to use the argument 'value' (integer) from the function CCResponder to control the frequency of the frequency argument of SinOsc. I know I will need to declare a variable and manipulate the variable to the correct value to be used with freq. I am not sure how to access the 'value' argument of CCResponder and also how to convert it to a useable value to be used with SinOsc's freq. I know this is probably easy to do, but I am banging my head against a brick wall at the moment.

1
2
3
4
5
6
7
8
9
10
11
(

var freq, {
c = CCResponder({ |src,chan,num,value|
        [src,chan,num,value].postln;
		test = (CCResponder[value]);
	
    });
    c.learn; // wait for the first controller
	
	 SinOsc.ar(freq, 0, 0.5) }.play;
raw 223 chars (focus & ctrl+a+c to copy)
reception
comments
Bruno Ruviaro user 14 Dec'19 02:03

Hi there, questions like this should be sent to our sc-users mailing list, or the https://scsynth.org/ forum. This website (sccode.org) is intended more like for sharing working pieces of code that do cool stuff, or even entire pieces :-) Have fun with SuperCollider!