Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions 2024R2_Test/Sound/ASDforEV/Appendices/SEV_API_OSC_protocol.md

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions 2024R2_Test/Sound/ASDforEV/Appendices/SEV_API_overview.md

This file was deleted.

15 changes: 0 additions & 15 deletions 2024R2_Test/Sound/ASDforEV/Appendices/SEV_UG_API_doc_header.md

This file was deleted.

7 changes: 0 additions & 7 deletions 2024R2_Test/Sound/ASDforEV/Appendices/appendix.md

This file was deleted.

73 changes: 73 additions & 0 deletions 2024R2_Test/Sound/ASDforEV/SEV_API_OSC_protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# OSC Protocol

## OSC Standard

Open Sound Control \(OSC - [opensoundcontrol.org](http://opensoundcontrol.org)\) is a protocol for communication among computers, sound synthesizers, and other multimedia devices that is optimized for modern networking technology and has been used in many application areas. OSC was defined and is supported by CNMAT of Berkeley University \([cnmat.berkeley.edu/](http://cnmat.berkeley.edu/)\)

The unit of transmission of OSC is an OSC Packet. Any application that sends OSC Packets is an OSC Client. Any application that receives OSC Packets is an OSC Server.

## OSC for Ansys Sound: ASDforEV

Ansys Sound: ASDforEV communication uses **OSC Messages** only. Refer to [open source control documentation](http://opensoundcontrol.org) for more details.

**Ansys Sound: ASDforEV** is the OSC server.

The API describes the UDP messages to use for building an OSC client. This client will send messages to **Ansys Sound: ASDforEV** \(the server\).

OSC packets are sent from one application to the other using UDP protocol. An OSC packet consists of its content \(a contiguous block of binary data\), and its size \(the number of bytes \(8-bit\) that comprise the content\).

**Important:** The size of an OSC packet is always a multiple of 4.

Under Windows operating system, OSC data endianness must be in BIG ENDIAN.

*OSC STRING is a sequence of non-null ASCII characters followed by a null, followed by 0-3 additional null characters to make the total number of bits a multiple of 32.*

Example 1: the string 'OSC' is coded as follows:

```
[O]+[S]+[C]+[\0]
```

Example 2: the string 'DATA' is coded as follows:

```
[D]+[A]+[T]+[A]+[\0]+[\0]+[\0]+[\0]
```

Example 3: the string 'SPEED' is coded as follows:

```
[S]+[P]+[E]+[E]+[D]+[\0]+[\0]+[\0]
```

An "OSC MESSAGE" contains:

\{ADDRESS\_PATTERN\}\{TYPE\_TAG\_STRING\}\{OSC arguments\}

**\{ADDRESS\_PATTERN\}** is an OSC STRING that starts with the character slash "/". Following the slash character, you use a KEYWORD explaining the type of audio processing applied on the data passed in argument.

Example: \{\[‘/’\]KEYWORD\}

**Important:** For Ansys Sound: ASDforEV , the slash \("/"\) character must **NOT** appear.

**\{TYPE\_TAG\_STRING\}** is an OSC STRING beginning with a comma "," and followed by as many "type tags" as the following data count.

A TYPE TAG is a set of letters coding the binary data type following.

These types used by Car Sound Simulator are \{'i','f','s'\} as follows:

- **i** : integer 32 bits
- **f** : for single precision floating point values \(32 bits\)
- **s** : OSC String

Example: \{","\[TYPE\_TAG\]\}

**\{OSC arguments\}** is a sequence of OSC Arguments is represented by a contiguous sequence of the binary representations of each argument.

![OSC Messaging Format](images/i_SEV_CAN_API_OSC_messaging_format.png "OSC Messaging Format")

## References

Original OSC documentation: [opensoundcontrol.org](http://opensoundcontrol.org)

OSCpack is a suitable library for C++ implementation of OSC messages: [www.rossbencina.com/code/oscpack](http://www.rossbencina.com/code/oscpack)
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
# Ansys Sound: ASDforEV API Messages {#SEV_API_SEV_Driving .concept}
# Ansys Sound: ASDforEV API Messages

**Ansys Sound: ASDforEV** communicates using OSC MESSAGES sent over UDP: there is one action at a time associated to one message. Each message is composed of a KEYWORD, followed by a single DATA item \(float or string\); the only exception is the message "ACTIVE", for which only the KEYWORD is sent \(no data, cf. below\).



When using Ansys Sound: ASDforEV alongside an application for reading CAN data, most UDP communication is done from application reading or generating the vehicle data \(for example CAN data reading application\) towards ASDforEV, to command the parameters of the sounds produced \(see section **Sending messages to ASDforEV**\). However, ASDforEV also sends data via UDP to the application sending vehicle data \(see section**Receiving messages from ASDforEV**\).



The tables in the following sections specify the KEYWORDS and expected DATA that Ansys Sound: ASDforEV uses to communicate via UDP. In these tables \(except for Vehicle messages\), the ranges for the DATA values are not specified, as raw values can be transformed through a dedicated graphical interface in Ansys Sound: ASDforEV.

- Note that **messages are case-sensitive**, both for KEYWORDS and string DATA.


Note that **messages are case-sensitive**, both for KEYWORDS and string DATA.

A Max/MSP code example, to send data to ASDforEV, is given in the figure below.

![](images/i_SEV_CAN_API_data_via_UDP.png "Max/MSP code example to send data to ASDforEV via UDP")

- **[UDP Connection](../../../Sound/UG_ASDforEV/Appendices/SEV_API_UDP_connection.md)**
- **[UDP Connection](SEV_API_UDP_connection.md)**

- **[Sending Messages to ASDforEV](../../../Sound/UG_ASDforEV/Appendices/SEV_API_sending.md)**
- **[Sending Messages to ASDforEV](SEV_API_sending.md)**
Here is the list of messages that can be sent to Ansys Sound: ASDforEV using this API.
- **[Receiving Messages from ASDforEV](../../../Sound/UG_ASDforEV/Appendices/SEV_API_receiving.md)**
- **[Receiving Messages from ASDforEV](SEV_API_receiving.md)**
Here is the list of messages that can be received from ASDforEV using this API.

**Parent topic:**[Ansys Sound: ASDforEV API Documentation](../../../Sound/UG_ASDforEV/Appendices/SEV_UG_API_doc_header.md)

6 changes: 6 additions & 0 deletions 2024R2_Test/Sound/ASDforEV/SEV_API_UDP_connection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# UDP Connection

Both communication modes are carried out on distinct UDP ports:

- Messages **sent** to ASDforEV: Port **7450**
- Messages **received** from ASDforEV: Port **7460**
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
# Receiving Messages from ASDforEV {#SEV_API_receiving .reference}
# Receiving Messages from ASDforEV

Here is the list of messages that can be received from ASDforEV using this API.

## Ambiance Messages { .section}
## Ambiance Messages

|Keyword|Data|Comments|
|-------|----|--------|
|**Ambiance1**|Sound function name \(string\)|**Ambiance1 <name\>**, where **<name\>** is the sound function name specified in ASDforEV, is sent, so that this name can be displayed in the application reading CAN data.|

Similar messages are used for sound functions **Ambiance2** and **Ambiance3**.

## ADAS Messages { .section}
## ADAS Messages

|Keyword|Data|Comments|
|-------|----|--------|
|**ADAS1**|Sound function name \(string\)|**ADAS1 <name\>**, where **<name\>** is the sound function name specified in ASDforEV, is sent, so that this name can be displayed in the application reading CAN data.|

Similar messages are used for sound functions **ADAS2** to **ADAS5**.

## HMI Messages { .section}
## HMI Messages

|Keyword|Data|Comments|
|-------|----|--------|
|**HMI1**|Sound function name \(string\)|**HMI1 <name\>**, where **<name\>** is the sound function name specified in ASDforEV, is sent, so that this name can be displayed in the application reading CAN data.|

Similar messages are used for sound functions **HMI2** to **HMI15**.

**Parent topic:**[Ansys Sound: ASDforEV API Messages](../../../Sound/UG_ASDforEV/Appendices/SEV_API_SEV_Driving.md)

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Sending Messages to ASDforEV {#SEV_API_sending .reference}
# Sending Messages to ASDforEV

Here is the list of messages that can be sent to Ansys Sound: ASDforEV using this API.

## General Message { .section}
## General Message

|Keyword|Data|Comments|
|-------|----|--------|
|**ALIVE**|empty|**ALIVE** \(with no DATA\) should be sent every 5 seconds so that ASDforEV can indicate that the CAN bus is still being read by the dedicated application|

## Vehicle Messages { .section}
## Vehicle Messages

|Keyword|Data|Comments|
|-------|----|--------|
Expand All @@ -19,7 +19,7 @@ Here is the list of messages that can be sent to Ansys Sound: ASDforEV using thi
|**Torque**|Value \(float\)|Engine torque in N.m|
|**Brake**|Value \(float\)|Brake pedal position in %|

## Ambiance Messages { .section}
## Ambiance Messages

|Keyword|Data|Comments|
|-------|----|--------|
Expand All @@ -28,15 +28,15 @@ Here is the list of messages that can be sent to Ansys Sound: ASDforEV using thi

Similar messages are used for sound functions **Ambiance2** and **Ambiance 3**.

## SAF Messages { .section}
## SAF Messages

|Keyword|Data|Comments|
|-------|----|--------|
|**SAF\_Activate**|Value\(float\)|This message sends the values that will control the activation of the SAF sound function|
|**SAF\_Angle**|Value\(float\)|This message sends the values that will control the azimuth angle of the SAF sound function|
|**SAF\_Diffuseness**|Value\(float\)|This message sends the values that will control the spatialization diffuseness of the SAF sound function|

## ICE-ASD Messages { .section}
## ICE-ASD Messages

|Keyword|Data|Comments|
|-------|----|--------|
Expand All @@ -46,7 +46,7 @@ Similar messages are used for sound functions **Ambiance2** and **Ambiance 3**.
|**ICEASD\_Load**|Value\(float\)|This message sends the values that will control the load used to pilot ICE-ASD gain|
|**ICEASD\_Acceleration**|Value\(float\)|This message sends the values that will control the acceleration used to switch between 2 ICE-ASD datasets, respectively dedicated to acceleration and deceleration phases|

## ADAS Messages { .section}
## ADAS Messages

|Keyword|Data|Comments|
|-------|----|--------|
Expand All @@ -56,7 +56,7 @@ Similar messages are used for sound functions **Ambiance2** and **Ambiance 3**.

Similar messages are used for sound function **ADAS2** to sound function **ADAS5**.

## HMI Messages { .section}
## HMI Messages

|Keyword|Data|Comments|
|-------|----|--------|
Expand All @@ -66,7 +66,7 @@ Similar messages are used for sound function **ADAS2** to sound function **ADAS5

Similar messages are used for sound function **HMI2** to sound function **HMI15**.

## Other Messages { .section}
## Other Messages

|Keyword|Data|Comments|
|-------|----|--------|
Expand All @@ -80,13 +80,10 @@ Similar messages are used for sound function **HMI2** to sound function **HMI15*
|**Wind**|Value \(float\)|This message sends wind speed values to be used in ASDforEV’s Vehicle data preprocessing|
|**Time**|Value \(float\)|This message sends time of day values to be used in ASDforEV’s Vehicle data preprocessing|

## Custom Messages {#section_z4y_bys_nrb .section}
## Custom Messages

|Keyword|Data|Comments|
|-------|----|--------|
|**Custom1**|Value \(float\)|This message sends an additional custom parameter's values to be used in ASDforEV’s External data preprocessing|

Similar messages are used for 9 other custom signals, from **Custom2** to **Custom10**.

**Parent topic:**[Ansys Sound: ASDforEV API Messages](../../../Sound/UG_ASDforEV/Appendices/SEV_API_SEV_Driving.md)

13 changes: 13 additions & 0 deletions 2024R2_Test/Sound/ASDforEV/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"build": {
"globalMetadata": {
"title": "ASDforEV API 2024 R1",
"summary": "",
"version": "2024 R1",
"product": "Ansys Sound",
"programming language": "OSC",
"product collection": "Sound",
"physics": "Acoustics"
}
}
}
20 changes: 11 additions & 9 deletions 2024R2_Test/Sound/ASDforEV/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Ansys Sound: ASDforEV User's Guide
# Ansys Sound: ASDforEV API Documentation

- [Appendices](Sound/Appendices/appendix.md)
- [Ansys Sound: ASDforEV API Documentation](Sound/Appendices/SEV_UG_API_doc_header.md)
- [Ansys Sound: ASDforEV API Overview](Sound/Appendices/SEV_API_overview.md)
- [OSC Protocol](Sound/Appendices/SEV_API_OSC_protocol.md)
- [Ansys Sound: ASDforEV API Messages](Sound/Appendices/SEV_API_SEV_Driving.md)
- [UDP Connection](Sound/Appendices/SEV_API_UDP_connection.md)
- [Sending Messages to ASDforEV](Sound/Appendices/SEV_API_sending.md)
- [Receiving Messages from ASDforEV](Sound/Appendices/SEV_API_receiving.md)
Ansys Sound: ASDforEV can be directly driven using the Open Sound Control Protocol \(OSC\) over the UDP network protocol. Using the API described in this document, you can send data \(vehicle messages, ADAS data, etc.\) to Ansys Sound: ASDforEV to command the sounds produced.

This API document describes the driving parameters, also referred to as messages, which can be sent to or received from Ansys Sound: ASDforEV.

The API helps you to configure your external device to read data. If you do not have the resources to configure it, Ansys can provide help.

- [OSC Protocol](SEV_API_OSC_protocol.md)
- [Ansys Sound: ASDforEV API Messages](SEV_API_SEV_Driving.md)
- [UDP Connection](SEV_API_UDP_connection.md)
- [Sending Messages to ASDforEV](SEV_API_sending.md)
- [Receiving Messages from ASDforEV](SEV_API_receiving.md)
Loading