[PD] How to create an array in Ofelia

Esteban Viveros emviveros at gmail.com
Sat Aug 22 18:32:27 CEST 2020


Hello!

If you are in ofelia 3 you can script like you did double clicking in
ofelia object and writing your script.

In ofelia object you can use ofTable() or to interact with pd arrays
ofArray() see patch example.



Em sáb., 22 de ago. de 2020 às 12:48, Alexandros <adrcki at gmail.com>
escreveu:

> I'm trying to write some Lua scripts in [ofelia] and I don't know how to
> create an array, since arrays in Lua are written with curly brackets,
> which are not allowed in Pd.
>
> For example, I'd like to create an array like this:
>
> local tab = {}
>
> and then populate it like this:
>
> for i=1,161
> do
>     tab[i] = ofRandom(0,255)
> end
>
> Any ideas?
>
>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>


-- 

 Esteban Viveros

www.estebanviveros.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200822/17e23e66/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arraysExamples.pd
Type: application/octet-stream
Size: 1747 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200822/17e23e66/attachment.obj>


More information about the Pd-list mailing list