Nicolas Cellier uploaded a new version of Balloon to project The Trunk:
http://source.squeak.org/trunk/Balloon-nice.33.mcz
==================== Summary ====================
Name: Balloon-nice.33
Author: nice
Time: 10 May 2020, 9:46:17.536227 pm
UUID: e222eaef-65e7-4c46-99c1-72fc91ddb6f8
Ancestors: Balloon-dtl.32
Move PointArray one level higher.
It is usefull if we want to deprecate IntegerArray...
Also, it shall not reply itself to asIntegerArray.
Provide a correct bytesPerElement taking the two slots occupied by each element into account.
=============== Diff against Balloon-dtl.32 ===============
Item was changed:
+ SignedWordArray variableWordSubclass: #PointArray
- IntegerArray variableWordSubclass: #PointArray
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Balloon-Collections'!
!PointArray commentStamp: '<historical>' prior: 0!
This class stores 32bit Integer points in place. It is used to pass data efficiently to the primitive level during high-bandwidth 2D graphics operations.!
Item was added:
+ ----- Method: PointArray>>bytesPerElement (in category 'accessing') -----
+ bytesPerElement
+ "Each element occupy two slots"
+ ^ 8!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1328.mcz
==================== Summary ====================
Name: Kernel-nice.1328
Author: nice
Time: 10 May 2020, 6:37:59.503017 pm
UUID: 0dc2dc8d-e20b-4b2b-9db6-8c5ceacb165f
Ancestors: Kernel-nice.1327
Return to a safer ClassBuilder.
=============== Diff against Kernel-nice.1327 ===============
Item was changed:
----- Method: ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'class definition') -----
name: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category
"Define a new class in the given environment"
^self
name: className
inEnvironment: env
subclassOf: newSuper
type: type
instanceVariableNames: instVarString
classVariableNames: classVarString
poolDictionaries: poolString
category: category
+ unsafe: false!
- unsafe: true!
Nicolas Cellier uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-nice.69.mcz
==================== Summary ====================
Name: Sound-nice.69
Author: nice
Time: 10 May 2020, 6:23:44.99374 pm
UUID: 9ac78f43-a8a1-40c2-a03c-1015a62cb643
Ancestors: Sound-dtl.68
Use Float32Array explicitely
=============== Diff against Sound-dtl.68 ===============
Item was changed:
----- Method: FFT>>initializeHammingWindow: (in category 'bulk processing') -----
initializeHammingWindow: alpha
"Initialize the windowing function to the generalized Hamming window. See F. Richard Moore, Elements of Computer Music, p. 100. An alpha of 0.54 gives the Hamming window, 0.5 gives the hanning window."
| v midPoint |
+ window := Float32Array new: n.
- window := FloatArray new: n.
midPoint := (n + 1) / 2.0.
1 to: n do: [:i |
v := alpha + ((1.0 - alpha) * (2.0 * Float pi * ((i - midPoint) / n)) cos).
window at: i put: v].
!
Item was changed:
----- Method: FFT>>initializeTriangularWindow (in category 'bulk processing') -----
initializeTriangularWindow
"Initialize the windowing function to the triangular, or Parzen, window. See F. Richard Moore, Elements of Computer Music, p. 100."
| v |
+ window := Float32Array new: n.
- window := FloatArray new: n.
0 to: (n // 2) - 1 do: [:i |
v := i / ((n // 2) - 1).
window at: (i + 1) put: v.
window at: (n - i) put: v].
!
Item was changed:
----- Method: FFT>>pluginPrepareData (in category 'plugin-testing') -----
pluginPrepareData
"The FFT plugin requires data to be represented in WordArrays or FloatArrays"
+ sinTable := sinTable asFloat32Array.
- sinTable := sinTable asFloatArray.
permTable := permTable asWordArray.
+ realData := realData asFloat32Array.
+ imagData := imagData asFloat32Array.!
- realData := realData asFloatArray.
- imagData := imagData asFloatArray.!
Item was changed:
----- Method: FFT>>setSize: (in category 'bulk processing') -----
setSize: anIntegerPowerOfTwo
"Initialize variables and tables for performing an FFT on the given number of samples. The number of samples must be an integral power of two (e.g. 1024). Prepare data for use with the fast primitive."
self nu: (anIntegerPowerOfTwo log: 2) asInteger.
n = anIntegerPowerOfTwo ifFalse: [self error: 'size must be a power of two'].
+ sinTable := sinTable asFloat32Array.
- sinTable := sinTable asFloatArray.
permTable := permTable asWordArray.
+ realData := Float32Array new: n.
+ imagData := Float32Array new: n.
- realData := FloatArray new: n.
- imagData := FloatArray new: n.
self initializeHammingWindow: 0.54. "0.54 for Hamming, 0.5 for hanning"
!
Item was changed:
----- Method: FFT>>transformDataFrom:startingAt: (in category 'bulk processing') -----
transformDataFrom: anIndexableCollection startingAt: index
"Forward transform a block of real data taken from from the given indexable collection starting at the given index. Answer a block of values representing the normalized magnitudes of the frequency components."
| j real imag out |
j := 0.
index to: index + n - 1 do: [:i |
realData at: (j := j + 1) put: (anIndexableCollection at: i)].
realData *= window.
+ imagData := Float32Array new: n.
- imagData := FloatArray new: n.
self transformForward: true.
"compute the magnitudes of the complex results"
"note: the results are in bottom half; the upper half is just its mirror image"
real := realData copyFrom: 1 to: (n / 2).
imag := imagData copyFrom: 1 to: (n / 2).
out := (real * real) + (imag * imag).
1 to: out size do: [:i | out at: i put: (out at: i) sqrt].
^ out
!
Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.967.mcz
==================== Summary ====================
Name: Tools-nice.967
Author: nice
Time: 10 May 2020, 6:22:51.031917 pm
UUID: bd2143a6-8aec-4e9f-a321-38f66b09f498
Ancestors: Tools-jr.966
asFloat3Array and asFloat64Array
=============== Diff against Tools-jr.966 ===============
Item was changed:
----- Method: MethodFinder>>initialize (in category 'initialize') -----
(excessive size, no diff calculated)
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.431.mcz
==================== Summary ====================
Name: Graphics-nice.431
Author: nice
Time: 10 May 2020, 6:20:54.708121 pm
UUID: 97120981-48e8-42ff-823d-6ad4035ddae6
Ancestors: Graphics-mt.430
Use Float32Array explicitely
=============== Diff against Graphics-mt.430 ===============
Item was changed:
----- Method: MatrixTransform2x3>>explorerContents (in category 'explorer') -----
explorerContents
+ ^(Float32Array newFrom: self) explorerContents!
- ^(FloatArray newFrom: self) explorerContents!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1327.mcz
==================== Summary ====================
Name: Kernel-nice.1327
Author: nice
Time: 10 May 2020, 6:14:32.751642 pm
UUID: d1799f0b-e9b3-4aee-b3ca-a87fd702f2c6
Ancestors: Kernel-nice.1326
Be unsafe for enabling migration of ByteArray
=============== Diff against Kernel-nice.1326 ===============
Item was changed:
----- Method: ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'class definition') -----
name: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category
"Define a new class in the given environment"
^self
name: className
inEnvironment: env
subclassOf: newSuper
type: type
instanceVariableNames: instVarString
classVariableNames: classVarString
poolDictionaries: poolString
category: category
+ unsafe: true!
- unsafe: false!