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.


The biggest plugin in space...