Example: /MacCF/MIDI/Midiplayback

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCF/MIDI/Midiplayback


Required plugins for this example: MBS MacOSX Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCF/MIDI/Midiplayback

This example is the version from Sun, 17th Mar 2012.

Project "Midiplayback.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control playBut Inherits PushButton
ControlInstance playBut Inherits PushButton
EventHandler Sub Action() theSynth.Start scaleTimer.mode = 1 End EventHandler
End Control
Control scaleTimer Inherits Timer
ControlInstance scaleTimer Inherits Timer
EventHandler Sub Action() //PLAY A CHROMATIC SCALE 'turn off previous note theSynth.SendMidiEvent(144, scaleTone+60, 0, 0) 'move to next note scaleTone = scaleTone + 1 if scaleTone < 14 then 'turn on this note theSynth.SendMidiEvent(144, scaleTone+60, 100, 0) me.mode = 1 else 'reset scale scaleTone = 0 me.mode = 0 end if End EventHandler
End Control
EventHandler Sub Open() theSynth = new MidiPlaybackMBS(true) if theSynth.Inited=false then msgbox "Synth failed to initialize." quit Return end if End EventHandler
Property scaleTone As Integer
Property theSynth As MidiPlaybackMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

The items on this page are in the following plugins: MBS MacCF Plugin.


💬 Ask a question or report a problem