The Trunk: Sound-ul.60.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Sound-ul.60.mcz

commits-2
Levente Uzonyi uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-ul.60.mcz

==================== Summary ====================

Name: Sound-ul.60
Author: ul
Time: 13 March 2017, 2:58:01.850611 pm
UUID: 3729fde3-4fa7-4961-85f1-06f8d4f21324
Ancestors: Sound-tfel.59

SortedCollection Whack-a-mole

=============== Diff against Sound-tfel.59 ===============

Item was changed:
  ----- Method: SampledInstrument>>readSampleSetFrom: (in category 'other') -----
  readSampleSetFrom: dirName
  "Answer a collection of sounds read from AIFF files in the given directory and sorted in ascending pitch order."
 
  | all dir |
+ all := OrderedCollection new.
- all := SortedCollection sortBlock: [:s1 :s2 | s1 pitch < s2 pitch].
  dir := FileDirectory default on: dirName.
  dir fileNames do: [:n | | fullName snd |
  fullName := dir fullNameFor: n.
  UIManager default
  informUser: 'Reading AIFF file ', n
  during:
  [snd := LoopedSampledSound new
  fromAIFFFileNamed: fullName
  mergeIfStereo: true].
  all add: snd].
+ ^ all asArray sort: [:s1 :s2 | s1 pitch < s2 pitch]
- ^ all asArray
  !