SuperCollider and Lemur

Discuss Lemur and share techniques.
Post Reply
nitefish
Regular
Posts:56
Joined:24 Aug 2012 07:43
SuperCollider and Lemur

Post by nitefish » 24 Sep 2012 15:26

Bonjour,
I'm french,and real newbie with Lemur( and with SuperCollider too...) :(


I am using the lemur class found here:
http://www.jazzmutant.com/workshop_tuto ... ercollider.
I can understand almost every infos in this tutorial and map simple sc synths on basic lemur controllers.
But I really don't know how to "name" a second multiball(ball 1) or the second slider of a multislider in my SuperCollider code.
/MultiBall1/x don't work,/MultiBall/x[1] don't work...
Any help?

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: SuperCollider and Lemur

Post by Macciza » 24 Sep 2012 16:20

Hi
MultiBall.x will give you the whole array of x values . . .

MultiBall.x[1] will give you the 2nd value in that array . . .

Hope that helps
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

nitefish
Regular
Posts:56
Joined:24 Aug 2012 07:43

Re: SuperCollider and Lemur

Post by nitefish » 24 Sep 2012 17:47

thanks for the (fast) reply,Macciza.

I had understood all those things (x[0],x[1],etc...).
My problem is to have access to those specifics variables in SuperCollider.
I can map "x" on an argument with the SC lemur class,but this don't work with x[0].

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: SuperCollider and Lemur

Post by Macciza » 25 Sep 2012 02:46

Hi
Sorry about that I thought you meant the Lemur side . .
Also be aware that SC has changed a bit since those examples where made - OSC is dealt with slightly differently these days I think.

Anyway I see two solutions:

1. Access the values from the MultiBall.x array in SC using 'array.at(n)' as detailed in the MultiSlider example the tutorial.

2. Create Custom OSC addresses for each index in Lemur and capture those singularly in SC

Approach 1 is probably recommended.
Once your Responder has captured the array of MultiBall.x data you can access and use it how you like.

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

nitefish
Regular
Posts:56
Joined:24 Aug 2012 07:43

Re: SuperCollider and Lemur

Post by nitefish » 25 Sep 2012 10:07

thank you,
I will look at this in the evening.
(And,it's true,the info IS in the tutorial,so the real universal tip is just"opening the eyes"...
once again :D )
have a nice day!

nitefish
Regular
Posts:56
Joined:24 Aug 2012 07:43

Re: SuperCollider and Lemur

Post by nitefish » 29 Sep 2012 10:05

Bonjour,
I'm back with this,because I'm not able to find the right syntax to achieve solution one(from the Macciza's post above).
I don't know how to put this array "notion" in this SC message:
~lemur.mapXScaled(~synth, "level", "/MultiBall/x", 0, 0.9);


solution two works fine,but if the first is "probably recommended"...
Any help?

Have a nice day.

Macciza
Regular
Posts:1325
Joined:07 Dec 2011 04:57
Location:Sydney, Australia.

Re: SuperCollider and Lemur

Post by Macciza » 29 Sep 2012 13:33

Hi
It's been a while since I did any SCing so I'm unsure of the SC side . . .
But it comes down to pulling the values out of the array and the ~lemur.map functions being able to deal with that data.
I'm not sure if they would as they probably expect the address reference - you would need to use your own scaling, I think.

But you can always format your stuff on the Lemur side of things. ie Solution 2.
Try this:
Make 2 new variables in the MultiBall - x1 = x[0] & x2 = x[1] these are the first 2 ball values.
Set these to send to your SC OSC Target - x does not send anywhere now.

In SC your example line now uses "/MultiBall/x1" for the first ball "/MultiBall/x2" for the second etc
Make as many additional variables as needed.

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]

nitefish
Regular
Posts:56
Joined:24 Aug 2012 07:43

Re: SuperCollider and Lemur

Post by nitefish » 01 Oct 2012 13:13

Thanks Macciza,
I can do a lot of things with solution 2.

Post Reply