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

commits at source.squeak.org commits at source.squeak.org
Sat Feb 5 20:49:56 UTC 2022


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

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

Name: Sound-dtl.86
Author: dtl
Time: 5 February 2022, 3:47:29.747123 pm
UUID: 340d381a-fa79-4de2-aba6-42171c9f2a50
Ancestors: Sound-dto.85

Remove accidental whitespace-only changes from previous commit

=============== Diff against Sound-dto.85 ===============

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'"
+ 
- 	readLoudAndStaccatoInstrument: 'oboe'
- 	fromDirectory: 'Tosh:Sample Library:Orchestra'"
  	| sampleSetDir memBefore memAfter loud short snd |
+ 	sampleSetDir := orchestraDir, ':', instName.
- 	sampleSetDir := orchestraDir , FileDirectory slash , instName.
  	memBefore := Smalltalk garbageCollect.
+ 	loud := SampledInstrument new readSampleSetFrom: sampleSetDir, ' f'.
+ 	short := SampledInstrument new readSampleSetFrom: sampleSetDir, ' stacc'.
- 	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).
- 	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).
- 	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'"
+ 
- 	readPizzInstrument: 'violin'
- 	fromDirectory: 'Tosh:Sample Library:Orchestra'"
  	| sampleSetDir memBefore memAfter sampleSet snd |
+ 	sampleSetDir := orchestraDir, ':', instName, ' pizz'.
- 	sampleSetDir := orchestraDir , FileDirectory slash , 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).
+ 
- 	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 allNotes
- 		do: [:n | n
- 				firstSample: (n findStartPointForThreshold: 1000)].
- 	^ snd!

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, ':', instName, ' f'.
- 	sampleSetDir := orchestraDir, FileDirectory slash, 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