introlab / odas

ODAS: Open embeddeD Audition System
MIT License
780 stars 248 forks source link

Phoenix Branch Question #97

Closed taospartan closed 6 years ago

taospartan commented 6 years ago

Using the Phoenix branch, is it possible to send your own target sources via a socket to odas in order to control the position of the beam manually? If so could you give me some guidance ?

Many thanks:)

FrancoisGrondin commented 6 years ago

Yes it is :)

You can send a JSON message with this format:

{
    "targets": 
    [
        { "tag": "your_first_target", "x": 1.0, "y": 0.0, "z": 0.0 },
        { "tag": "your_second_target", "x": 0.0, "y": 1.0, "z": 0.0 }
    ]
}

And then you forward it to the port associated to the target (ex: 5002) in the socket configuration file:

{
    "sockets":
    {
        "raw": 5001,
        "targets": 5002,

        "pots": 0,
        "tracks": 6002,
        "seps": 0,
        "pfs": 0,
        "iseps": 0,
        "ipfs": 0       
    }
}

Suppose your JSON message is in "targets.json" then you can for instance do something like this:

cat targets.json | netcat localhost 5002

Of course you can write your own script in any language that generates a JSON string and send it to ODAS asynchronously. You can thus refresh the target source over time.

Does this help?

taospartan commented 6 years ago

Exceptionally clear and concise, exactly what I need

Many thanks:)

Sent from my iPad

On 31 Jul 2018, at 16:21, François Grondin notifications@github.com wrote:

Yes it is :)

You can send a JSON message with this format:

{ "targets": [ { "tag": "your_first_target", "x": 1.0, "y": 0.0, "z": 0.0 }, { "tag": "your_second_target", "x": 0.0, "y": 1.0, "z": 0.0 } ] } And then you forward it to the port associated to the target (ex: 5002) in the socket configuration file:

{ "sockets": { "raw": 5001, "targets": 5002,

    "pots": 0,
    "tracks": 6002,
    "seps": 0,
    "pfs": 0,
    "iseps": 0,
    "ipfs": 0       
}

} Suppose your JSON message is in "targets.json" then you can for instance do something like this:

cat targets.json | netcat localhost 5002

Of course you can write your own script in any language that generates a JSON string and send it to ODAS asynchronously. You can thus refresh the target source over time.

Does this help?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

taospartan commented 6 years ago

Sorry to bother you but what’s the difference between seps and iseps? Can the sep raw settings in the same method as targets? E.g. gain?

FrancoisGrondin commented 6 years ago

iSep is a stream that uses additional channels to carry tracking information. This way you can have all info in sync and send it through pipes to another process ;)

taospartan commented 6 years ago

Is it then possible to adjust the gain via the socket?

Sent from my iPhone

On 2 Aug 2018, at 13:48, François Grondin notifications@github.com wrote:

iSep is a stream that uses additional channels to carry tracking information. This way you can have all info in sync and send it through pipes to another process ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

FrancoisGrondin commented 6 years ago

The gain of the separated signal?

taospartan commented 6 years ago

Yes:)

Sent from my iPad

On 2 Aug 2018, at 17:04, François Grondin notifications@github.com wrote:

The gain of the separated signal?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

FrancoisGrondin commented 6 years ago

You mean having a parameter you can send async that will change the volume?

taospartan commented 6 years ago

Yes that would be awesome !

Sent from my iPad

On 2 Aug 2018, at 21:28, François Grondin notifications@github.com wrote:

You mean having a parameter you can send async that will change the volume?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

FrancoisGrondin commented 6 years ago

I see! For now this is nothing like that, but I'll keep this in mind for future feature ;)