Re: [PD] libpd for Unity still alive?

2016-10-24 Thread Ali Momeni
Hello all,

My answers in line below:

On Mon, Oct 24, 2016 at 6:56 PM, Scott R. Looney 
wrote:

>
> Android latency is often a fact of life, even by that much. one question
> is whether you're getting that latency playing it in the Editor. if not,
> that may be a libpd question that would need answering. you might also
> reach out to Sebastian(hagish) to ask him, though he might be no longer
> working with libpd since Kalmiba wasn't updated in a while. he did in fact
> say that Android latency was an issue in the Read Me. however you might
> have more luck with this fork which has a latency fix in Android. not sure
> how good it is, but it's been updated about a year ago:
>
> https://github.com/marcinkaszynski/kalimba
>

This is great to know; i will try that.
To answer your question, I do not have this latency issue in the editor.
Even more importantly, I don't have this issue when i build the same Pd
patch for android, using the libpd4unity approach, as i've done here:
https://github.com/cmuartfab/libpd4unity-starter


>
>
> @ali - as i understand it, creating instances of PD/libpd has been
> discussed for a while as a positive step. i haven't had a need for it yet
> but others on this list have discussed benefits, mostly in terms of both
> power and resource management. there are drawbacks as well, but
> unfortunately i don't know the particulars. one instance is enough for me
> for the moment though. but i think the strength is dynamically spawning and
> killing resources as needed.
>

Good to know; thanks scott.

ali

>
> best,
> scott
>
>>
>>
>>> ___
>>> Pd-list@lists.iem.at mailing list
>>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/li
>>> stinfo/pd-list
>>>
>>>
>>
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] libpd for Unity still alive?

2016-10-24 Thread Scott R. Looney
hi Ali - answers inline, for my part,

On Mon, Oct 24, 2016 at 3:30 PM, Ali Momeni  wrote:

> Hello all,
> This is wonderful, thank you for contributing to this thread. Glad to see
> that Unity + PureData is active:
>
> @wing: I also put together a unity+pd integration example; it has a
> bouncing ball withs sonification done in Pd; works on Android!
> https://github.com/cmuartfab/libpd4unity-starter  I will take a look at
> your work also, thank you for sharing that.
>
> @scott: I also tried Kalimba, but i have massive latency on Android, on
> the order of 300-500ms.  Did you have this experience?
>

Android latency is often a fact of life, even by that much. one question is
whether you're getting that latency playing it in the Editor. if not, that
may be a libpd question that would need answering. you might also reach out
to Sebastian(hagish) to ask him, though he might be no longer working with
libpd since Kalmiba wasn't updated in a while. he did in fact say that
Android latency was an issue in the Read Me. however you might have more
luck with this fork which has a latency fix in Android. not sure how good
it is, but it's been updated about a year ago:

https://github.com/marcinkaszynski/kalimba

if you are getting latency in the Editor, i'm not sure what to say. i
haven't tested latency yet (midterm grading wiped my weekend out).

>
> @scott+@wing: can you give me an example or two of when you may need
> multiple instances of LibPd in one's unity project? Couldnt you just make a
> more complex Pd patch that has all the things you want happening in it?
>

@ali - as i understand it, creating instances of PD/libpd has been
discussed for a while as a positive step. i haven't had a need for it yet
but others on this list have discussed benefits, mostly in terms of both
power and resource management. there are drawbacks as well, but
unfortunately i don't know the particulars. one instance is enough for me
for the moment though. but i think the strength is dynamically spawning and
killing resources as needed.

best,
scott

>
>
>> ___
>> Pd-list@lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/li
>> stinfo/pd-list
>>
>>
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] libpd for Unity still alive?

2016-10-24 Thread Ali Momeni
Hello all,
This is wonderful, thank you for contributing to this thread. Glad to see
that Unity + PureData is active:

@wing: I also put together a unity+pd integration example; it has a
bouncing ball withs sonification done in Pd; works on Android!
https://github.com/cmuartfab/libpd4unity-starter  I will take a look at
your work also, thank you for sharing that.

@scott: I also tried Kalimba, but i have massive latency on Android, on the
order of 300-500ms.  Did you have this experience?

@scott+@wing: can you give me an example or two of when you may need
multiple instances of LibPd in one's unity project? Couldnt you just make a
more complex Pd patch that has all the things you want happening in it?

On Mon, Oct 24, 2016 at 5:51 PM, Wing Sang Wong 
wrote:

> Hi Scott,
>
> The way I handle multiple instances is to open new patches via C# and
> store the dollar zero variable in a game object.
>
> The PdAudioSource component can be attached to a prefab and you can
> instantiated the prefab via C#. PdAudioSource also stores the dollar zero
> variable of the associated patch, so you can directly send messages to a
> particular instance by calling methods in PdAudioSource. However, all send
> and receive objects in your patches need to start with a dollar zero (e.g.
> [send $0-Frequency], [receive $0-isPlaying]).
>
> For audio signals, all patches need to have appropriate [throw~ ] objects
> (e.g. [throw~ out5] [throw~ out6]) in order to be heard. Audio signals from
> all instances will go through the [catch~ ] object in pdManager.pd, which
> is mapped to the Unity audio mixer. Getting audio input from Unity to libpd
> is a little bit tricky in this case. If someone need audio input from
> Unity, one might modify the OnAudioFilterRead method in PdStereo.cs.
>
> My project isn't complete and I always welcome for suggestions or comments.
>
> Best,
> Wing
>
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/
> listinfo/pd-list
>
>
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] libpd for Unity still alive?

2016-10-24 Thread Wing Sang Wong
Hi Scott,

The way I handle multiple instances is to open new patches via C# and store
the dollar zero variable in a game object.

The PdAudioSource component can be attached to a prefab and you can
instantiated the prefab via C#. PdAudioSource also stores the dollar zero
variable of the associated patch, so you can directly send messages to a
particular instance by calling methods in PdAudioSource. However, all send
and receive objects in your patches need to start with a dollar zero (e.g.
[send $0-Frequency], [receive $0-isPlaying]).

For audio signals, all patches need to have appropriate [throw~ ] objects
(e.g. [throw~ out5] [throw~ out6]) in order to be heard. Audio signals from
all instances will go through the [catch~ ] object in pdManager.pd, which
is mapped to the Unity audio mixer. Getting audio input from Unity to libpd
is a little bit tricky in this case. If someone need audio input from
Unity, one might modify the OnAudioFilterRead method in PdStereo.cs.

My project isn't complete and I always welcome for suggestions or comments.

Best,
Wing
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list