1
- # react-native-osc
1
+ # react-native-osc 0.0.3
2
2
3
- Native Open Sound Control support for React Native (iOS & Android).
3
+ Open Sound Control support for sending and receiving OSC messages in React Native (iOS & Android).
4
4
5
+ On the native side:
5
6
[ JavaOSC] ( https://github.com/hoijui/JavaOSC/ ) for Android &
6
7
[ SwiftOSC] ( https://github.com/ExistentialAudio/SwiftOSC ) for iOS.
7
8
8
-
9
9
## Getting started:
10
10
11
11
` $ npm install react-native-osc --save `
@@ -14,32 +14,25 @@ In ios/Podfile add: `use_frameworks!`
14
14
15
15
` $ cd ios && pod install `
16
16
17
- ## Features:
18
-
19
- Send OSC messages in iOS.
20
-
21
- ~~ Receive OSC messages in IOS.~~
22
-
23
- Send OSC messages in Android.
24
-
25
- Receive OSC messages in Android.
26
-
27
-
28
17
## Usage:
29
18
``` javascript
30
19
import osc from ' react-native-osc' ;
31
20
32
- // To send messages:
33
- osc .createClient (" localhost" , 9090 );
21
+ var portIn = 9999
22
+ var portOut = 9090
23
+
24
+ // create a client and send a message
25
+ osc .createClient (" localhost" , portOut);
34
26
osc .sendMessage (" /address/" , [1.0 , 0.0 ]);
35
27
36
28
37
- // To receive messages (Android only):
29
+ // suscribe to GotMessage event to receive OSC messages
38
30
const eventEmitter = new NativeEventEmitter (osc);
39
- eventEmitter .addListener (' GotMessage' , (newMessage ) => {
40
- console .log (" New OSC message: " , newMessage );
31
+ eventEmitter .addListener (' GotMessage' , (oscMessage ) => {
32
+ console .log (" message: " , oscMessage );
41
33
});
42
- osc .createServer (9999 );
34
+
35
+ osc .createServer (portIn);
43
36
```
44
37
45
38
## Supported types:
@@ -66,7 +59,28 @@ Xcode:11.3.1 - iOS_SDK: 13 - RN: 0.61.5
66
59
67
60
## License
68
61
69
- MIT
62
+ The MIT License (MIT)
63
+
64
+ Copyright (C) 2020 Luis Fernando Garcia Perez
65
+
66
+
67
+ Permission is hereby granted, free of charge, to any person obtaining a copy
68
+ of this software and associated documentation files (the "Software"), to deal
69
+ in the Software without restriction, including without limitation the rights
70
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
71
+ copies of the Software, and to permit persons to whom the Software is
72
+ furnished to do so, subject to the following conditions:
73
+
74
+ The above copyright notice and this permission notice shall be included in all
75
+ copies or substantial portions of the Software.
76
+
77
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
78
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
79
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
80
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
81
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
82
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
83
+ SOFTWARE.
70
84
71
85
## JavaOSC
72
86
0 commit comments