Re: [Inscore-devel] Redirect incoming OSC message
An environment for the design of INteractive augmented music Scores
Brought to you by:
dfober
|
From: Trad D. <tr...@gm...> - 2016-10-07 09:56:13
|
Hi Dominque,
Reprograming a short python client where arguments are explicitely specify
gives me the same issue. So there is really something I do not understand:
"""
This program sends 20 values to Inscore
"""
import argparse
import random
import time
from pythonosc import osc_message_builder
from pythonosc import udp_client
print("running")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ip", default="127.0.0.1",
help="The ip of the OSC server")
parser.add_argument("--port", type=int, default=7003,
help="The port the OSC server is listening on")
args = parser.parse_args()
client = udp_client.UDPClient(args.ip, args.port)
for x in range(20):
msg = osc_message_builder.OscMessageBuilder(address =
"/ITL/scene/cursor")
msg.add_arg("date "+ str(x) + " 2")
msg = msg.build()
client.send(msg)
time.sleep(1)
On Fri, Oct 7, 2016 at 10:14 AM, Trad Dog <tr...@gm...> wrote:
> Dominique,
>
> I had missed your email as I had reverted to the Yahoo account. Sorry for
> the delay and really appreciate your help
> as I feel I am close to wrap something up that has been botheriing me for
> months. I settled on Inscore a long time ago
> but was unable to compile it properly on Linux and the tutorial was
> behaving strangely. I tried other libraries but none offers the same level
> of abstraction and flexibility.
> A few days ago, I had to work on Windows and realised Inscore was also
> distributed on Msft Windows. There, to my surprise, it worked
> out of the box.
>
> To come back to your question, the application I use is a prototype Score
> Follower from another company. I am talking
> to the developer there and I could ask them to change their messages if
> needed be.
>
> I must be missing something fundamental though. What message would I send
> from any OSC emitting application to
> say set the cursor to a specific date: 12 2 for sake of clarity ?
> I can see in MP-Interaction sample PD script you are simply sending
> /ITL/scene/cursor date 0 1 for example (I have difficulties to
> have PD to work on my PC probably because of some conflict between Jack
> and standard MSFT audio) ? How would I do that
> with SuperCollider or another application ? I cannot understand how the
> syntax is different.
>
>
> On Wed, Oct 5, 2016 at 8:34 AM, Dominique Fober <fo...@gr...> wrote:
>
>>
>> Le 4 oct. 2016 à 16:37, Trad Dog <tr...@gm...> a écrit :
>>
>> Hi Dominique,
>>
>> I am fully aware I should go through the standard channel to ask these
>> questions but it seems I am really close to do pretty much all I need.
>> The 3rd party application has these settings to send messages where
>> {{replace}} is a variable information. What is the syntax to separate
>> the address part from the paramaters part in the message ?
>>
>>
>> It depends on your application and on the osc implementation. Actually,
>> the address and the parameters are stored differently in the packet sent
>> over the network. (see the OSC spec at http://opensoundcontrol.org/ )
>> Now, you probably don’t want to dive into these low level issues. What is
>> the application you’re using? why don’t you use max/msp or puredata? Are
>> you simply trying to send date messages?
>> —
>> Dom
>>
>>
>>
>> Thanks in advance for your time.
>>
>> Trad
>>
>> On Tue, Oct 4, 2016 at 2:51 PM, Dominique Fober <fo...@gr...> wrote:
>>
>>>
>>> Le 4 oct. 2016 à 13:29, Trad Dog <tr...@gm...> a écrit :
>>>
>>> Hi Dominik,
>>>
>>> Thanks for your quick answers.
>>>
>>> This is indeed my mistake. I effectively copy and paste whatever I
>>> manage to have working in the .inscore.
>>> How am I supposed to pass the parameters when they are from another
>>> application ? I try quoting but
>>> that's not it.
>>>
>>>
>>> if you build your own application to send OSC, I recommend you to use an
>>> existing OSC library. INScore is using OSCPack (included in the lib folder)
>>> and in addition, there is already a simple command line tool to send OSC
>>> messages (included in validation/tools)
>>> —
>>> Dom
>>>
>>> ps: note that you can use inscore as well to send arbitrary osc messages
>>> (using extended OSC address)
>>>
>>>
>>>
>>> Well noted for the email address. I am going to corect this.
>>>
>>> Best
>>>
>>> Trad.
>>>
>>> On Tue, Oct 4, 2016 at 12:23 PM, Dominique Fober <fo...@gr...> wrote:
>>>
>>>>
>>>> Le 4 oct. 2016 à 13:08, Trad Dog <tr...@gm...> a écrit :
>>>>
>>>> It does indeed. Thanks for the tip.
>>>>
>>>> In the meanwhile, I have set up a fake application sending messages to
>>>> port 7000, which are picked up
>>>> but are reported as an error:
>>>> INScore v 1.17 listening OSC on port 7000
>>>> error: incorrect OSC address: /ITL/scene/cursor set ellipse 0.07 0.07
>>>> error: incorrect OSC address: /ITL/scene/cursor date 1 2
>>>> error: incorrect OSC address: /ITL/scene/cursor date 2 2
>>>>
>>>>
>>>> You’re likely putting everything into the osc address field.
>>>> When inscore reports an incorrect OSC address, only the address field
>>>> is printed, in your case, it look like the message parameters are part of
>>>> the OSC address.
>>>> Can you check that?
>>>>
>>>>
>>>> I am puzzled at this as when I try it into a .inscore scrpt, these
>>>> work. I think this is the last hurdle to have something working.
>>>> All the rest did work. By the way, this is a very nice application.
>>>>
>>>> Best
>>>>
>>>> Trad
>>>>
>>>>
>>>>
>>>> I am not sure why I lost my registration for the mailing list, by the
>>>> way.
>>>>
>>>>
>>>> you’re subscribed as <traddog at yahoo.com>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Oct 4, 2016 at 10:44 AM, Dominique Fober <fo...@gr...>
>>>> wrote:
>>>>
>>>>> Hi Trad,
>>>>>
>>>>> You can use the alias mechanism when you have no control over the
>>>>> sender.
>>>>> See ‘aliases’ at http://inscore.sourceforge.net/doc/html/index.html
>>>>> You have also an example in scripts/Standalone/aliases.inscore
>>>>> also available online:
>>>>> https://sourceforge.net/p/inscore/code/ci/dev/tree/scripts/S
>>>>> tandalone/aliases.inscore
>>>>>
>>>>> Does it solves your problem?
>>>>> —
>>>>> Dom
>>>>>
>>>>>
>>>>> Le 4 oct. 2016 à 11:25, Trad Dog <tr...@gm...> a écrit :
>>>>>
>>>>> Hi,
>>>>>
>>>>> An application is sending messages on a fixed URL which I cannot
>>>>> change,
>>>>> say /AppOrg/*timeId*
>>>>> where timeId is the variable part I would like to use in InScore.
>>>>> Reading the doc, I was not sure how I could redirect this kind of
>>>>> message
>>>>> to a proper object in InScore, so something like:
>>>>> /ITL/scene/obj *timeId*
>>>>> Could someone help ?
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Trad
>>>>> ------------------------------------------------------------
>>>>> ------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, SlashDot.org <http://slashdot.org/>!
>>>>> http://sdm.link/slashdot____________________________________
>>>>> ___________
>>>>> Inscore-devel mailing list
>>>>> Ins...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/inscore-devel
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>> <OSCSettings.PNG>
>>
>>
>>
>
|