MBS FileMaker Plugin Example Databases

Midi Receive

All examples are included with download of MBS FileMaker Plugin.

Midi Receive.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Midi Receive
8 fields defined, 0 record
Midi Receive

Fields

Table Name: Midi Receive - 8 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
HostTimeStampNormal, TimestampAuto-Enter:
  • Context table: Midi Receive
    Calculation: Get ( CurrentHostTimestamp )
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        StatusNormal, NumberAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
            StatusTextNormal, TextAuto-Enter: Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
            • Indexing: None
            • Automatically create indexes as needed
            • Index Language: German
                  Data1Normal, NumberAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      Data2Normal, NumberAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          TimeStampNormal, NumberAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              DeviceNameNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Global
                              • Repetitions: 1
                              • Index Language: German
                                  MessageRawNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German

                                      Layout Objects: Midi Receive

                                      Regular Fields

                                      Field Name: Midi Receive::HostTimeStamp
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 6 pt
                                      • Bottom: 74 pt
                                      • Right: 145 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Midi Receive::Status
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 150 pt
                                      • Bottom: 74 pt
                                      • Right: 229 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Midi Receive::StatusText
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 234 pt
                                      • Bottom: 74 pt
                                      • Right: 487 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Midi Receive::Data1
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 492 pt
                                      • Bottom: 74 pt
                                      • Right: 571 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Midi Receive::Data2
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 576 pt
                                      • Bottom: 74 pt
                                      • Right: 655 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Midi Receive::TimeStamp
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 660 pt
                                      • Bottom: 74 pt
                                      • Right: 739 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: Midi Receive::DeviceName
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 12 pt
                                      • Left: 138 pt
                                      • Bottom: 26 pt
                                      • Right: 391 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: Midi Receive::MessageRaw
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 60 pt
                                      • Left: 744 pt
                                      • Bottom: 74 pt
                                      • Right: 997 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Group Buttons

                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Start
                                        Additional Properties:
                                      • Change to hand cursor over button
                                      • Rectangular
                                      • Top: 6 pt
                                      • Left: 414 pt
                                      • Bottom: 31 pt
                                      • Right: 511 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “InitMidi” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Stop
                                        Additional Properties:
                                      • Change to hand cursor over button
                                      • Rectangular
                                      • Top: 6 pt
                                      • Left: 522 pt
                                      • Bottom: 31 pt
                                      • Right: 619 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “CloseMidi” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Rescan
                                        Additional Properties:
                                      • Change to hand cursor over button
                                      • Rectangular
                                      • Top: 6 pt
                                      • Left: 630 pt
                                      • Bottom: 31 pt
                                      • Right: 727 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Rescan” ]

                                      Scripts:


                                      Script Hierarchy

                                      InitMidi
                                      TimerAction
                                      CloseMidi
                                      Rescan

                                      Next Script: [TimerAction]
                                      Script NameInitMidi
                                      Run script with full access privilegesOff
                                      Include In MenuYes
                                      Layouts that use this script
                                      Scripts that use this script
                                        Script Definition
                                        Script Steps
                                        • Delete All Records [ No dialog ]
                                        • Set Variable [ $r; Value:MBS("Trace") ]
                                        • Set Variable [ $DeviceID; Value:MBS("PortMidi.GetDefaultInputDeviceID") ]
                                        • If [ GetAsNumber($DeviceID) >= 0 ]
                                        • Set Field [ Midi Receive::DeviceName; MBS("PortMidi.GetDeviceInfo"; $DeviceID; "Name") ]
                                        • Set Variable [ $$stream; Value:MBS("PortMidi.OpenInput"; $deviceID) ]
                                        • If [ MBS("ISError") ]
                                        • Show Custom Dialog [ Title: "Failed to open Device"; Message: $$stream; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                        • Else
                                        • Install OnTimer Script [ “TimerAction”; Interval: ,1 ]
                                        • End If
                                        • Else
                                        • Set Field [ Midi Receive::DeviceName; "" ]
                                        • Show Custom Dialog [ Message: "No MIDI input device found attached?"; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                        • End If
                                        Fields used in this script
                                        Scripts used in this script
                                        Layouts used in this script
                                          Tables used in this script
                                          Table occurrences used by this script
                                          Custom Functions used by this script
                                            Custom menu set used by this script

                                              Previous Script: [InitMidi]Next Script: [CloseMidi]
                                              Script NameTimerAction
                                              Run script with full access privilegesOff
                                              Include In MenuYes
                                              Layouts that use this script
                                                Scripts that use this script
                                                Script Definition
                                                Script Steps
                                                • Loop
                                                • Set Variable [ $r; Value:MBS("PortMidi.Poll"; $$stream) ]
                                                • Exit Loop If [ MBS("IsError") ]
                                                • Exit Loop If [ $r < 1 ]
                                                • Set Variable [ $m; Value:MBS("PortMidi.ReadMessage"; $$stream) ]
                                                • If [ ValueCount ( $m ) > 1 ]
                                                • New Record/Request
                                                • Set Variable [ $status; Value:GetValue ( $m ; 1 ) ]
                                                • Set Variable [ $data1; Value:GetValue ( $m ; 2 ) ]
                                                • Set Variable [ $data2; Value:GetValue ( $m ;3 ) ]
                                                • Set Variable [ $timestamp; Value:GetValue ( $m ; 4 ) ]
                                                • Set Variable [ $message; Value:GetValue ( $m ; 6 ) ]
                                                • Set Field [ Midi Receive::Status; $status ]
                                                • Set Field [ Midi Receive::Data1; $data1 ]
                                                • Set Field [ Midi Receive::Data2; $data2 ]
                                                • Set Field [ Midi Receive::TimeStamp; $timestamp ]
                                                • Set Field [ Midi Receive::MessageRaw; $message ]
                                                • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                • End If
                                                • End Loop
                                                Fields used in this script
                                                Scripts used in this script
                                                  Layouts used in this script
                                                    Tables used in this script
                                                    Table occurrences used by this script
                                                    Custom Functions used by this script
                                                      Custom menu set used by this script

                                                        Previous Script: [TimerAction]Next Script: [Rescan]
                                                        Script NameCloseMidi
                                                        Run script with full access privilegesOff
                                                        Include In MenuYes
                                                        Layouts that use this script
                                                        Scripts that use this script
                                                        Script Definition
                                                        Script Steps
                                                        • #Close stream if still open
                                                        • Install OnTimer Script [ ]
                                                        • If [ GetAsNumber($$stream) > 0 ]
                                                        • Set Variable [ $r; Value:MBS("PortMidi.Close"; $$stream) ]
                                                        • Set Variable [ $$stream; Value:0 ]
                                                        • End If
                                                        Fields used in this script
                                                          Scripts used in this script
                                                            Layouts used in this script
                                                              Tables used in this script
                                                                Table occurrences used by this script
                                                                  Custom Functions used by this script
                                                                    Custom menu set used by this script

                                                                      Previous Script: [CloseMidi]
                                                                      Script NameRescan
                                                                      Run script with full access privilegesOff
                                                                      Include In MenuYes
                                                                      Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • Perform Script [ “CloseMidi” ]
                                                                        • Set Variable [ $r; Value:MBS("PortMidi.Rescan") ]
                                                                        Fields used in this script
                                                                          Scripts used in this script
                                                                          Layouts used in this script
                                                                            Tables used in this script
                                                                              Table occurrences used by this script
                                                                                Custom Functions used by this script
                                                                                  Custom menu set used by this script

                                                                                    Download example: Midi Receive

                                                                                    Used functions:




                                                                                    Links
                                                                                    MBS FileMaker Plugins