PortMidi.Rescan
---------------

Terminates all streams and shutdown the midi functions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PortMidi](component_PortMidi.md) | [4.2](newinversion42.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "PortMidi.Rescan" ) ### Parameters

none

### Result

Returns OK or error.

### Description

Terminates all streams and shutdown the midi functions.  
Than on next call midi devices are searched.  
### Examples

Check before and after a scan:

 $CountBefore = MBS ( "[PortMidi.DeviceCount](PortMidiDeviceCount.md)" )  
$r = MBS ("PortMidi.Rescan")  
$CountAfter = MBS ( "[PortMidi.DeviceCount](PortMidiDeviceCount.md)" )  
### See also

- [PortMidi.DeviceCount](PortMidiDeviceCount.md)

### Example Databases

- [Midi/Midi Receive](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Midi/Midi%20Receive.shtml#4ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[PortMidi.ReadMessage](PortMidiReadMessage.md) - [PortMidi.SendMessage](PortMidiSendMessage.md)

[HTML Version](PortMidiRescan.shtml)