Marcel Taeumel uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-mt.55.mcz==================== Summary ====================
Name: Sound-mt.55
Author: mt
Time: 6 April 2016, 7:16:16.273155 pm
UUID: c5be3a4c-30f2-dd48-8f1e-087d240d455a
Ancestors: Sound-mt.54
Adds support for dropping a MIDI file into the image and play it directly. (Instead of only offering to open a ScorePlayerMorph for that.)
=============== Diff against Sound-mt.54 ===============
Item was added:
+ ----- Method: ScorePlayer class>>fileReaderServicesForFile:suffix: (in category 'file reader services') -----
+ fileReaderServicesForFile: fullName suffix: suffix
+
+ ^ (suffix = 'mid') | (suffix = '*')
+ ifTrue: [self services]
+ ifFalse: [#()]
+ !
Item was changed:
+ ----- Method: ScorePlayer class>>initialize (in category 'class initialization') -----
- ----- Method: ScorePlayer class>>initialize (in category 'as yet unclassified') -----
initialize
+ Smalltalk addToShutDownList: self.
+ FileServices registerFileReader: self.!
- Smalltalk addToShutDownList: self.!
Item was added:
+ ----- Method: ScorePlayer class>>playFileNamed: (in category 'instance creation') -----
+ playFileNamed: fileName
+
+ ^ (MIDISound fromFileNamed: fileName)
+ play; yourself!
Item was added:
+ ----- Method: ScorePlayer class>>servicePlayMidiFile (in category 'file reader services') -----
+ servicePlayMidiFile
+ "Answer a service for opening player on a midi file"
+
+ ^ SimpleServiceEntry
+ provider: self
+ label: 'play MIDI file'
+ selector: #playFileNamed:
+ description: 'play the MIDI file directly'
+ buttonLabel: 'play'!
Item was added:
+ ----- Method: ScorePlayer class>>services (in category 'file reader services') -----
+ services
+
+ ^ Array with: self servicePlayMidiFile!
Item was added:
+ ----- Method: ScorePlayer class>>unload (in category 'initialize-release') -----
+ unload
+
+ FileServices unregisterFileReader: self !