[squeak-dev] The Trunk: Sound-dtl.87.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Feb 6 19:09:59 UTC 2022


David T. Lewis uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-dtl.87.mcz

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

Name: Sound-dtl.87
Author: dtl
Time: 6 February 2022, 2:09:58.736336 pm
UUID: 7c8f04f0-6576-400f-a897-8db974da026b
Ancestors: Sound-dtl.86

Restore a method that was improperly removed in my last commit.

=============== Diff against Sound-dtl.86 ===============

Item was changed:
  ----- Method: SampledInstrument class>>readSimpleInstrument:fromDirectory: (in category 'instance creation') -----
  readSimpleInstrument: instName fromDirectory: orchestraDir
  	"SampledInstrument
  		readSimpleInstrument: 'oboe'
  		fromDirectory: 'Tosh:Sample Library:Orchestra'"
  
  	| sampleSetDir memBefore memAfter sampleSet snd |
+ 	sampleSetDir := orchestraDir, FileDirectory slash, instName, ' f'.
- 	sampleSetDir := orchestraDir, ':', instName, ' f'.
  	memBefore := Smalltalk garbageCollect.
  	sampleSet := SampledInstrument new readSampleSetFrom: sampleSetDir.
  	memAfter := Smalltalk garbageCollect.
  	Transcript show:
  		instName, ': ', (memBefore - memAfter) printString,
  		' bytes; ', memAfter printString, ' bytes left'; cr.
  	AbstractSound soundNamed: instName, '-f' put:
  		(snd := SampledInstrument new allSampleSets: sampleSet).
  
  	"fix slow attacks"
  	snd allNotes do: [:n |
  		n firstSample: (n findStartPointForThreshold: 1000)].
  
  	^ snd
  !



More information about the Squeak-dev mailing list