[squeak-dev] The Trunk: Sound-ct.88.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 26 18:58:20 UTC 2022


Christoph Thiede uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-ct.88.mcz

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

Name: Sound-ct.88
Author: ct
Time: 26 March 2022, 7:56:05.035593 pm
UUID: d40ab95a-8643-a649-99ed-598a37950ddb
Ancestors: Sound-dtl.87

Uses FileDirectory slash in SampledInstrument examples. Thanks to David (dto)!

=============== Diff against Sound-dtl.87 ===============

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

Item was changed:
  ----- Method: SampledInstrument class>>readPizzInstrument:fromDirectory: (in category 'instance creation') -----
+ readPizzInstrument: instName fromDirectory: orchestraDir 
- readPizzInstrument: instName fromDirectory: orchestraDir
  	"SampledInstrument
  		readPizzInstrument: 'violin'
+ 		fromDirectory: 'Tosh/Sample Library/Orchestra'"
- 		fromDirectory: 'Tosh:Sample Library:Orchestra'"
- 
  	| sampleSetDir memBefore memAfter sampleSet snd |
+ 	sampleSetDir := orchestraDir , FileDirectory slash , instName , ' pizz'.
- 	sampleSetDir := orchestraDir, ':', instName, ' pizz'.
  	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, '-pizz' put:
  		(snd := SampledInstrument new allSampleSets: sampleSet).
  
  	"fix slow attacks"
  	snd allNotes do: [:n |
  		n firstSample: (n findStartPointForThreshold: 1000)].
  
+ 	^ snd!
- 	^ snd
- !



More information about the Squeak-dev mailing list