The Trunk: Sound-nice.21.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-nice.21.mcz

commits-2
Nicolas Cellier uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-nice.21.mcz

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

Name: Sound-nice.21
Author: nice
Time: 22 August 2010, 8:42:07.138 pm
UUID: b0096a76-1f5a-4ef8-970e-18e46f169ff2
Ancestors: Sound-ul.20

minor change: avoid creating a SortedCollection when not necessary...
asSortedCollection asArray -> asArray sort

=============== Diff against Sound-ul.20 ===============

Item was changed:
  ----- Method: SampledInstrument>>allNotes (in category 'other') -----
  allNotes
  "Answer a collection containing of all the unique sampled sounds used by this instrument."
 
  | r |
  r := IdentitySet new.
  r addAll: sustainedLoud.
  sustainedSoft ~~ sustainedLoud ifTrue: [r addAll: sustainedSoft].
  staccatoLoud ~~ sustainedLoud ifTrue: [r addAll: staccatoLoud].
  staccatoSoft ~~ staccatoLoud ifTrue: [r addAll: staccatoSoft].
+ ^ r asArray sort: [:n1 :n2 | n1 pitch < n2 pitch]
- ^ (r asSortedCollection: [:n1 :n2 | n1 pitch < n2 pitch]) asArray
  !