xPC Target Speaker

 

The xPC Target Speaker block plays supplied frequencies over the PC’s internal speaker.

 

Block Input Data Type:          double

                                                            < 0: Play a new frequency

                                                            = 0: Turn speaker off

                                                            > 0: Continue a previously played frequency

 

If the same frequency is repeated, no new values are sent to the speaker, allowing the same tone to be played continuously. If a different frequency is supplied (or the frequency is negative), then the value (or absolute value) will be sent to the speaker. Repeating a frequency on the speaker creates an audible click; this can be controlled using the sign of the frequency.

 

Resolution – Threshold to determine if two consecutive frequencies should be treated as the same. For example, with a resolution of 0.1 the two frequencies 440.0 and 440.05 would be treated as the same. With a resolution of 0.01, the frequencies would be treated as different.