[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] mapping, interpolation
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-users] mapping, interpolation
- From: Luke Selden <lselden@xxxxxxxxx>
- Date: Mon, 9 Mar 2009 14:22:23 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=DD0lZllWqSzqKgPVF58pIKZSp19ZQ9OXu1jsEzw400o=; b=MIXA01oPEgIVOjAY4hh+Etn8STpKWlWM4RO9C1iwjz4/VPJr5TXlUnYCd036x0mmwY AQ1KJs9F6a53+auqv5FJpi6x9QOEusazTqxyv+XAiJrnSYkfua/ADJaE3VLqv8mJeFWK 2rPMkgaahTDdjTC8WGpCuvy1k9ukphQ09zMHw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=L8WvvEf7xYxO6rryfREP0WauPKVJUX3HU1Xsuw8Zt+B6/qJT3Mx0M0X60zfSufodCV W91IYgQhIKhld75ZQZhHCEWunFnvs8uwzgMg6Z9zXB8d8T5HwLJN/YT1du+bn5L7NCcy KXdEcSdIViEU2PVSo/X6aVb3bYEdaGVm3IEN8=
- In-reply-to: <4F04F266C26C5A4BB66BE0229682373877BD3A150A@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <4F04F266C26C5A4BB66BE0229682373877BD3A150A@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
first questions -- look into ControlSpec.
z1 = ControlSpec(a2, z2, \lin, 0).map(x);
second question -- You can use .blend to morph arrays:
[1,2.33,4.01,7].blend([15,96.8,301,987.44], x);
hope that helps-
~luke
On Mon, Mar 9, 2009 at 1:55 PM, Justin Yang <jyang03@xxxxxxxxx> wrote:
> Hi,
> A basics question here. Is there a simple way to do mapping/normalizing - as x goes from 0-1 map a1 to z1 into a2 to z2? And is there a way to interpolate between arrays - as x goes from 0-1 [1, 2.33, 4.01, 7] goes to [15, 96.8, 301, 987.44]?
> Thanks,
> Justin
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/