Repository navigation
Expand file tree
/
Copy pathVERSIONS
More file actions
5166 lines (4864 loc) · 229 KB
/
Copy pathVERSIONS
File metadata and controls
5166 lines (4864 loc) · 229 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
------------------
ChucK VERSIONS log
------------------
1.5.5.9
=======
- (fixed) ChAI MLP activation and backprop handling
- (fixed) segfault on exit, due to lack of thread join for
OTF server thread before freeing its socket (thanks @barak)
1.5.5.8 (April 2026)
=======
=> This release contains major update to ChuGL as well as a number
of minor language enhancements. There is one potentially "breaking"
change: `!` is no longer overloadable; to "make up" for this, `~` is
now overloadable as a unary prefix operator (see below); also
Nick and Ge unearthed and fixed a boolean logic issue (!!!) with
the logical AND and OR operators
=============
ChuGL v.0.3.0
=============
- (added) `TextureLoadDesc.srgb` for loading image data into srgb textures
- (added) YCrCb video decoding mode to `Video`
- (updated) cmake to build on linux. (thanks Lejun)
- (added) new operator overloads `GGen[] --> GGen` and `GGen[] --< GGen`
for grucking / ungrucking arrays of GGens all at once (thanks Brendan)
- (added) `Color.srgb(vec3)` and `Color.linear(vec3)` for converting
between linear and srgb color spaces
- (added) `PhongMaterial.uvOffset()` and `PhongMaterial.uvScale()` for
repeating/scrolling textures
- (added) `Webcam` now has linux support!
- (added) `int GWindow.minimized()` to detect if the window is currently
minimized (thanks to Nick for the misunderstanding)
- (added) examples
- `deep/video-ycrcb.ck`: demonstrating the YCrCb decoding mode on
`Video` UGen
- `deep/skybox-shader.ck`: procedural sky rendering via custom skybox
shader
(bug fixes)
- (fixed) bug of FlatMaterial.emissive not being properly set
- (fixed) crash caused by using a Material with no Shader
- (fixed) bug where main camera (`GG.camera()`) was being incorrectly
replaced upon instantiating a new `GScene`
- (fixed) segfault caused by setting a null texture to
`Material.texture(int, Texture)`
- (fixed) `GGen.detach()` and `GGen.detachChildren()` now correctly set the
`.parent()` pointers of all detached children to null
- (fixed) `GVideo.rate()` now properly returns a float
- (fixed) segfault caused by GText on Linux
- (fixed) rare race condition on startup caused by the graphics thread
broadcasting WindowResizeEvent
- (fixed) segfault caused by walking scenegraph and calling
`update(float dt)` during GG.autoUpdate()
(general improvements)
- (added) warning when setting RenderPass.clear(false) on a GScene that has
a skybox
- (updated) setting `FlatMaterial.color()` and `PhongMaterial.color()` no
longer override the alpha value to be 1
- (updated) improved performance of default skybox material shader
- (updated) Material uniform updates are now batch-written to the GPU,
improving renderer performance
=============
ChucK 1.5.5.8
=============
(modified) the `!` unary prefix operator is no longer overloadable by the
programmer; the reason is to support the ability to quickly test for null
references in if/while/until/for and other logic conditionals:
----
e.g., `if( obj != null )` can now also be written as `if(obj)`
and `if( obj == null ) can now also be written as `if(!obj)`
----
(added) abiility to overload `~` as a unary operator:
----
// define unary operator overload for '~'
fun int @operator ~( Foo foo ) { return !foo.num; }
----
NOTE: it is recommended that if you are overloading `!` in your code,
please consider using `~` instead.
(note) the examples in examples/oper pertaining to operator overloading
have been updated to use `~` instead of `!`
(updated) can now directly test for null for Object references in
if/while/for/until
----
Foo foo;
if( foo ) { ... }
// same effect as
if( foo != null ) { ... }
---
if( !foo ) { ... }
// same effect as
if( foo == null ) { ... }
(fixed) logical AND and OR now always evaluates to 0 or 1 (previously,
astonishingly, depending on the lhs and rhs, it could evaluate to
the actual value of rhs (which in practice is "correct", but also
potentially violates the very definition of logical AND and OR in
ChucK...) (nick,ge)
(added) @example statement for associating one or more example ChucK files
with class definitions; this will enable CKDoc to generate documention
with links to examples (e.g., https://chuck.stanford.edu/smuck/api/)
(added) spherical harmonic calculator designed for ChucK's math library
(@everettcarpenter)
`Math.sh( int order, float azimuth, float zenith )`
Returns an array of size (N+1)^2, containing ACN ordered spherical
harmonics.
(updated) duplicate-name chugins (regardless of path) are no longer
loaded; (previously such chugins are loaded and duplicate API queries
are ignored). This fixes potential issues if the duplicate chugin
persist state (e.g., registering shred watchers from ChuGL.chug)
(added) examples/basic/noise-machine.ck (a toddler noise machine)
1.5.5.7 (January 2026)
=======
=> This release contains minor but important updates to arrays,
vec2/3/4, ChuGL, and options for replacing chugin/@import path
(in prepration for the soon-to-come ability to create standalone
executable application containers for chuck programs for
software distribution)
============
ChuGL v0.2.9
============
(fixed) transparency depth sorting when using an orthographic camera;
the original math was so scuffed (thanks Ben)
(fixed) crash caused by changing material of GGee primitives, see
https://github.com/ccrma/chugl/issues/8 (thanks Nathan)
(fixed) calling Material.storageBuffer(...) with an empty chuck array no
longer crashes
(fixed) GWindow.sizeLimits(...) to allow non-integer aspect ratios
e.g. 1.6:1
(added) example:
deep/meshlines.ck: 3D line rendering that supports per-vertex line
width, dashed lines, and more
=============
ChucK 1.5.5.7
=============
(updated) semantics and behavior for all array types: typical usage should
proceed always with regard to the *size* of the array; regions outside of
current size are consider out of bound, even if within array capacity
- .capacity() will no longer modify either the size or the within-size
contents of the array, but rather serve to *reserve* a mininum number
of elements
- indexing an array beyond size (even if within capacity) will now result
in an ArrayOutOfBounds exception
(added) negation unary operator for vec2/3/4 type (literals and variables)
(thanks AndrewAday)
(added) command-line options for specifying chugin search paths; these will
REPLACE the respective search paths; can specific empty <PATH> or multiple
paths using delimiters (':' on macOS and Linux and ';' on Windows):
--chugin-path-system:<PATH>
(chugins in system path are auto-loaded when chuck starts; native chuck
libraries are not auto-loaded, but will be in the @import search path)
--chugin-path-packages:<PATH>
(chugins and native chuck libraries in packages path are not auto-loaded,
but will be in the @import search path, and have a special directory
search semantics)
--chugin-path-user:<PATH>
(chugins and native chuck libraries in users path are not auto-loaded,
but will be in the @import search path)
(added) command-line option to add to the default system search path;
--chugin-path-auto-load:<PATH>
this can used to specify additional locations containing chugins to be
auto-loaded; NOTE unlike the above options, this will NOT replace the
default system path; (use with care)
1.5.5.6 (November 2025)
=======
=> This release offers new features in ChucK and ChuGL along with many
quality-of-life improvements; Happy ChucKing!
============
ChuGL v0.2.8
============
(added) game-dev friendly gamepad support!
- (see https://chuck.stanford.edu/chugl/examples/basic/gamepad.ck)
(added) Material blend modes! Additive, multiplicative, subtractive, custom, etc.
- (see https://chuck.stanford.edu/chugl/examples/basic/blend.ck)
(added) GCamera `.aspect()` and `.autoUpdateAspect()`
(added) `TextureLoadDesc.read` to read the texture data into a chuck array on load
(added) `UI_DrawList` methods that ended in `...Ex` were renamed to take advantage
of method overloading, e.g. `.addLineEx(...)` renamed to `.addLine()`
(added) general improvements to `UI_DrawList` and `UI_DrawFlags` docs
(added) `GWindow.snooze()` which puts the graphics window in a low-power mode that
only refreshes upon receiving user input. Useful for editing tools / static apps /
art installations
(added) new Examples
- basic/gamepad.ck
https://chuck.stanford.edu/chugl/examples/basic/gamepad.ck
- basic/blend.ck
https://chuck.stanford.edu/chugl/examples/basic/blend.ck
- deep/lines3d.ck
https://chuck.stanford.edu/chugl/examples/deep/links3d.ck
- deep/custom-material.ck
https://chuck.stanford.edu/chugl/examples/deep/custom-material.ck
- rendergraph/shadertoy.ck
https://chuck.stanford.edu/chugl/examples/rendergraph/shadertoy.ck
bug fixes
(fixed) camera raycast methods (e.g. `NDCToWorldPos`) fixed when using a
render-target that is *not* the same resolution as the GWindow
(basically we assumed camera aspect was always same as GWindow
aspect when in reality it is determined by color target its rendering too)
(fixed) Texture.load() bug where some textures were incorrectly loaded with negative dimensions.
(fixed) `GWindow.sizeLimits()` not correctly updating window size (thanks Ben)
=============
ChucK 1.5.5.6
=============
(added) LiSa now has a .read( string filename ) function as well as an overloaded constructor
that can directly read into an audio file into LiSa (without needing a separate SndBuf);
this now only shortens the code, but offers 100X performance increase during file loading
LiSa( string path )
construct a LiSa with the 'path' to a sound file to read.
string .read( string path )
read audio file at 'path' into LiSa
(added) similar overloaded contructors for multichannel LiSa
LiSa2( string path )
LiSa4( string path )
LiSa6( string path )
LiSa8( string path )
LiSa10( string path )
LiSa16( string path )
(updated) examples using the new LiSa file loading
examples/special/LiSa-load.ck
examples/special/LiSa-track4.ck
examples/special/LiSa-track5.ck
(added) examples/special/LiSa-load-classic.ck (to commemorate the old ways that we have all
been using since 2007)
(added) `super` keyword for calling superclass functions (that have potentially been overridden)
thanks to @NiccoloAbate for the implmentation; additional code by @nshaheed and @gewang
e.g., super.foo();
(added) `super` keyword usage examples
examples/class/super-1-simple.ck
examples/class/super-2-skiplevel.ck
examples/class/super-3-single.ck
examples/class/super-4-multi.ck
(added) new Paulstretch extreme time-stretching
see example/analysis/paulstretch.ck
(added) `GainDB` unit generator (nshaheed)
the same as the Gain UGen, but the constructor sets the gain in deciBels rather
than linear scaling.
GainDB( float dbVal )
the constructor
float .db( float val )
set gain (in dB)
float .db()
get gain (in dB)
(added) `Gain` has gained the above .db methods as well
(added) examples/basic/gain.ck
(added) SndBuf2( string path ) overloaded constructor
(added) StringTokenizer custom delimiters
StringTokenizer( string line )
construct a StringTokenizer with a string to tokenize;
this will use the default whitespace delimiters.
StringTokenizer( string line, string delimiters )
construct a StringTokenizer with a string to tokenize, as well as custom delimiters; if the latter is empty string, default
whitespace characters will be used.
string delims( string delimiters )
sets the delimination characters as a string. If the argument
is an empty string, default whitespace characters " \f\n\r\t\v"
will be used. Also, calling this method resets the state for
the token retrieval loop (e.g., .more() and .next())"
string delims()
returns the string delimination characters as a string.
(updated) examples/string/token.ck
shows additional string tokenizer functionality
(added) string methods to replace a character using a string; previously
characters can only be replaced using an integer with the corresponding
ASCII code.
string charAt2( int index, string theCar )
set the character (as a string) at the specified index;
if `theChar` is an empty string, the character in question is
erased from the string; if `theChar` is longer than 1 character,
only its first character will be used.
string charAt2()
get the character at the specified index, and return it as a string.
(updated) examples/string/strops2.ck
shows the charAt2() and charAt2( int, string ) methods in action
(added) Math.equals( float lhs, float rhs, float epsilon)
an overloaded version of Math.equals( float, float) with custom epsilon
(added) overloaded consstructors ctor(freq) and ctor(freq, Q) for following filters:
LPF, HPF, BPF, BRF, RLPF, RHPF, ResonZ, in the form of
CTOR( float freq ) CTOR( float freq, float Q )
(added) overloaded constructors for the following STK effects:
JCRev ( float mix )
NRev ( float mix )
PRCRev ( float mix )
Chorus ( float modFreq )
Chorus ( float modFreq, float modDepth)
Chorus ( float modFreq, float modDepth, float mix )
Modulate ( float vibratoRate )
Modulate ( float vibratoRate, float vibratoGain)
Modulate ( float vibratoRate, float vibratoGain, float randomGain )
PitShift ( float shift )
PitShift ( float shift, float mix )
(added) examples/deep/cage.ck
two implementation of 4'33", accompanied by philosophical pondering...
(added) examples/deep/room.ck
a ChucK implementation of Alvin Lucier's "I am sitting in a room"
(added) examples/deep/young.ck
an interactive implementation of La Monte Young's Composition 1960 #7
(fixed) overloaded contructors memory leaks for Delay, DelayA, DelayL,
Echo, ADSR
(fixed) inaccuracies in setting delay values in certain Delay-based
contructors
1.5.5.5 (September 2025)
=======
--> "ChucK to School 2025" ChuGL v0.2.7 release!
============
ChuGL v0.2.7
============
(added) `GModel` for loading 3D asset models (currently supports OBJ)
(added) `GPolyhedron` and `PolyhedronGeometry` for builtin platonic solids
(added) `GG.bloom()` and `GG.bloomPass()` to streamline adding bloom to the default scene
(added) `GWindow.files()` to detect draggin+dropping files onto the screen (see basic/gwindow.ck example!)
(added) `Material.wireframe(int)` to easily toggle whether a mesh is rendered as a wireframe
(added) `Texture.save(string)` to save a GPU texture to a .png
(added) `Geometry.indexCount()` to control the number of indices drawn in an indexed draw
(added) `GWindow.droppedFiles()` to handle drag+dropping files onto the window
(added) new `GText` features
- `GText.characters(int)` to control the number of characters rendered on a GText
- `GText.width(int)` to set text wrap width
- `GText.align(int)` to set left/center/right alignment
- `GText.size(int)` to scale text size while respecting wrap and alignment
(added) `Material.wireframe(int)` to render meshes as wireframes
(added) "the Kunwoo Kim Collection" -- NEW interactive visualizers for teaching
- education/additive-synthesis.ck
- education/basic-filters.ck
- education/granular-synthesis.ck
- education/karplus-strong.ck
- education/panning.ck
- education/spectrum-interp.ck
- education/thx-visual.ck
- education/vocoder.ck
- education/fm-synthesis.ck
(updated) examples:
- basic/gmodel.ck (introducing GModel, an asset loading GGen)
- basic/gtext.ck (added new GText features)
- basic/gwindow.ck (added new GWindow features)
- basic/ggen-primitives.ck (see new GPolyhedron)
- basic/geo-and-mat.ck (see new PolyhedronGeometry)
(updated) all ChuGL examples have been updated, streamlined, and commented
- https://chuck.stanford.edu/chugl/examples/
(added) external data files for specific examples:
- https://chuck.stanford.edu/chugl/examples/data/
(fixed) major bugs addressed:
- incorrect transparency sorting on scenes with a large number of materials
- scene background color not affecting clearcolor, causing semi-transparent objects (e.g. GText) to render incorrectly
1.5.5.2 (July 2025)
=======
--> new ChuGL v0.2.6 (see ChuGL release notes below)
~~~~~
ChucK 1.5.5.2
=============
(fixed) windows MIDI support (which was previously broken in 1.5.5.1)
(fixed) examples/analysis/xsynth.ck (thanks Celeste Betancur & Andrew Zhu Aday)
* now performs a proper multi-band cross-synthesis using the magnitude
in each band of signl X to modulate the corresponding frequency bin
in signal Y to produce output Z
(added) examples/analysis/xsynth.ck-stereo.ck same as above + stereo delay
(added) examples/machine/platform.ck -- get underlying OS name + system time
(added) Machine methods
string Machine.os()
get the underlying operating system name; possible values include
"mac", "linux", "windows", "web", "ios", "android", "unknown"
float Machine.timeOfDay()
returns the time in seconds since Epoch 1970-01-01 00:00:00 +0000 (UTC).
The returned time has microsecond resolution
vec2 Machine.timeOfDay2()
identical to Machine.timeOfDay(), only the return value is a vec2
where x is time in seconds, and y is fractional time in microseconds.
y is guaranteed to be between 0 and 1,000,000. x + y yields the total
time. Useful for situations needing less than 64-bit precision e.g.,
floats in OSC are 32-bit and one must send the x and y values
separately -- otherwise a significant amount of timing resolution
would be lost
============
ChuGL v0.2.6
============
(added) Transparency!! (alpha-blended and sorted back to front)
- See examples/basic/transparency.ck
(added) Shadow Mapping (a basic first version)
- Implemented shadow mapping for GDirLight and GSpotLight
(GPointLight currently not supported)
- See examples/deep/shadows.ck
(reworked) Render graph API
- `RenderPass` is now the base class of `ScenePass` (which renderas a GScene
to a target texture, formerly this was called `RenderPass`) and
`ScreenPass` (which renders a full-screen quad, useful for post processing
effects)
- Added new `RenderPass` methods `.clear()`, `.scissor()`,
`.scissorNormalized()`, `.viewport()` and `.viewportNormalized()`
- Added `ScenePass.msaa(int)` which can be used to toggle MSAA antialiasing
- Add resolution, time, delta_time, frame_count, mouse state, and chuck VM
sample rate info to shader #FRAME_UNIFORMS. Simplifies writing generative
shaders in shadertoy-style.
(added) UI improvements:
- Add `UI.knob(...)` widgets
- Add `UI.image(...)` and `UI.imageButton(...)` methods, which allow adding
ChuGL Textures to UI.
(update) Textures
- Changed `TextureDesc.mips()` semantics. Set to `true` to generate a full
mip chain, set to `false` to not create any mips beyond level 0.
- Add `TextureDesc.resizable`, `TextureDesc.widthRatio` and
`TextureDesc.heightRatio` to create resizable textures, i.e. textures that
change in dimensions relative to window resolution. (helpful to make your
app robust against changing screen sizes)
- Add `Texture.write(int ptr)` which copies data from a pointer from a
separate ChuGin. Use with caution!
- change default surface texture to be non-srgb, add `OutputPass.gamma()` to
control whether or not to apply gamma correction. (this simplifies getting
accurate colors in basic 2D scenes without complex lighting.
(updated) various bug fixes
- fix `GGen.lookAt(vec3 pos)` bug when up vector and forward vectors were
collinear.
- added `GGen.lookAt(vec3 pos, vec3 up)` which takes a custom up vector.
- fix `GText.defaultFont()` not setting custom font path correctly
- fix segfault caused by sending large amount of data to `UI.plotLines()`
- setting `TextureLoadDesc.gen_mips` to false no longer erroneously
generates a mip chain
- fix `UI.beginChild(...)` not properly returning a value
- Add normal matrix to #DRAW_UNIFORMS shader include to enable correct
calculations of normal vectors for Meshes with non-uniform scale
(added) GText: Add antialias method `GText.antialias()`
(added) New Examples
- basic/transparency.ck
how to use transparent materials
- rendergraph/slime.ck
slime mold simulation using compute passes!
- deep/pokemon_cries.ck
Gameboy APU emulator that synthesis all Gen I pokemon cries!
- deep/shadows.ck
shadowmapping for directional and spot lights!
(updated) Under the Hood
- Large architecture refactor to use a rendergraph + gpu resource cache
+ sorted drawcall structs to organize and dispatch GPU commands.
- Caching GPU resources (namely BindGroups and TextureViews) significantly
improves performance and increases the maximum number of draw calls that
can be issued each frame
1.5.5.1 (May 2025)
=======
(updated) the underlying MIDI implementation been updated
(updated RtMidi from 1.0.4 to 6.0.0 | thanks to @cviejo)
this updates MIDI support, including:
* (macOS) MIDI timecode is now sent when using MidiOut
* (inux) JACK MIDI support
(fixed) chump (package manager, Windows)
* now correctly unzips packages for package installation
* (updated chump from 0.0.1 to 0.0.2)
(fixed) array.zero() now works properly with multi-dimensional arrays; previously
it would zero out the top-level array elements (which are actually the next
level of inner arrays, since multi-dimensional array in chuck are arrays of
arrays of arrays...)
(fixed) -=> for vec2 -=> v (where v is a vec2) was incorrect and would lead to
a crash
(fixed) LiSa.playPos reporting; addressed off-by-one error and made consistent
reporting semantics for loop/no-loop/bi-dir
(updated) examples/array/array_zero.ck now includes example of using .zero() with
multi-dimensional arrays (thanks to @terryzfeng for reporting this issue)
(developer) added c++ host example #5 to demonstrate adding language APIs
to ChucK from a c++ host:
src/host-examples/example-5-custom-api.cpp
1.5.5.0 (March 2025)
=======
(added) ChuMP: ChucK Manager of Packages! v0.0.1 (alpha)
INTRODUCING ChuMP, the official ChucK package manager! ChuMP currently exists
as a command-line interface tool (`chump`), which can be used to install,
update, and manage ChucK components ranging from chugins to ChucK libraries
to datesets. ChuMP also includes tools (e.g., Chumpinate) for creating new
packages, which the ChucK community is heartily invited to do
|
Selected available packages at time of release
------------------------------------------
run `chump list` to see a list of pacakges
------------------------------------------
* smuck: a framework for symbolic music notation and playback in ChucK
(see below)
* FluidSynth: a UGen for loading and rendering FluidSynth soundfonts
* Rave: a UGen to load and run RAVE (Realtime Audio Variational autoEncoder)
* WarpBuf: a UGen for real-time and high-quality independent time-stretching
and pitch shifting of audio files; also supports Ableton .asd files
* Hydra: a wrapper around the python configuration framework Hydra
* Line: a UGen envelope of arbitrary ramps (ala Max/PD's line~ object)
* Patch: a tool for update control values from UGens
* PlinkyRev: a stereo reverb UGen; port of the Plinky synth's reverb
* Rec: helper functions for recording to audio files. Supports recording
from dac, ugens, and arrays of ugens
* (many more packages are on the way!)
-------------------------------------------
* Chumpinate: two classes (Package & PackageVersion) to help create
new packages for distribution using ChuMP
-------------------------------------------
|
For more information, please visit:
---------------------------------
https://chuck.stanford.edu/chump/
---------------------------------
(added) SMucK: Symoblic Music in ChucK! v0.1.0 (alpha)
|
INTRODUCING SMucK, a framework for writing, processing, and playback of symbolic
music in ChucK.
|
to install (using ChuMP):
-----------------------
> `chump install smuck`
-----------------------
|
to start using from ChucK code:
---------------
@import "smuck"
---------------
|
for tutorials, examples, and documentation:
---------------------------------
https://chuck.stanford.edu/smuck/
---------------------------------
(reworked) basic @doc functionality for language-defined classes to add
inline CKDoc documentation for class definitions and function defintions.
(reworked; now different from 1.5.4.4) @doc now appears *before* the entity
to be documented; now @doc can be also used with class variables
----------------------------------------
// add inline documenation (processed at compile-time)
@doc "this is a description for the class Foo"
class Foo
{
// add inline documenation (processed at compile-time)
@doc "a function in Foo, bar() likes calling his friends"
fun void bar()
{ }
// add inline documentation for a class variable
@doc "this here is a variable called varFoo"
5 => int varFoo;
}
// these @doc information will appear wherever CKDoc is generated
// or displayed, for example:
Foo.help();
----------------------------------------
(added) the ability to hide variables and functions in ckdoc by adding
"(hidden)" in the @doc string, for example:
----------------------------------------
@doc "putting (hidden) anywhere in the doc string hides the next thing"
15 => int varBarHidden;
----------------------------------------
(added) examples/basic/blit4.ck
(added) ChAI: PCA reduce function call input dimension check
(added) ChAI: SVM predict function call input dimension check
(added) KNN nearest neighbor function call input value check
(fixed) @import issue that can result in certain entries in import path
to be skipped over.
(fixed) @import issue resulting from inconsistent casing in filepaths
(fixed) an issue with the record-to-WAV-file examples:
`rec-auto.ck` and `rec-auto-stereo.ck` where they would output an
empty WAV file when trying to record (FYI this was caused by a
combination of changes to UGen garbage collection since 1.5.4.2
and neglecting to remove the temporary workaround in these example files)
(developer) chugins API now supports querying for the local install path
of a chugin, using: QUERY->getinfo(QUERY, CHUGIN_INFO_INSTALL_DIR);
NOTE: this requires updated chugin.h header (1.5.4.5 or higher) and
the latest chuck host (1.5.4.5 or higher)
1.5.4.5 (March 2025)
=======
NOTE: 1.5.4.5 is identical to 1.5.5.0 but without ChuMP
1.5.4.4 (January 2025)
=======
(added) basic @doc functionality for language-defined classes to add inline
CKDoc documentation for class definitions and function defintions.
(added, experimental -- NOTE: the semantics of this was rewored in 1.5.4.5)
function to retrive CKDoc descriptions for classes and functions:
string CKDoc.describe( Object target );
----------------------------------------
class Foo
{
// add inline documenation (processed at compile-time)
@doc "this is a description for the class Foo"
fun void bar()
{
// add inline documenation (processed at compile-time)
@doc "a function in Foo, bar() likes calling his friends"
}
}
// print class description
CKDoc.describe( Foo );
// with an instance, can also get info about instanced functions
Foo f;
<<< CKDoc.describe( f ) >>>;
<<< CKDoc.describe( f.bar ) >>>;
----------------------------------------
(fixed) proper emission of classes by name, e.g., `<<< SinOsc >>>;`
(fixed) attempts to assign to a constant right-hand-side variable
e.g., `null @=> SinOsc;` now results in a compiler error
NOTE: in the above example, SinOsc is a variable of type 'Type'
and is created alongside the SinOsc class/type; such Type variables
associated with class definitions are automatically marked as constant
(fixed) crash due to functions / classes references a local variable defined
at file-scope; code emission is now internally re-ordered to compile
file-scope code segments -> function definitions -> class definitions
(fixed) foreach `auto` variable typing for multi-dimenion array, e.g.,
--------
// two dim array
for( auto x : [[1,2],[3,4]] ) {
for( auto y : x ) {
// print
<<< y >>>;
}
}
--------
=======
(fixed) miniAudicle export and record functionalities; these resulted in
empty WAV file (in 1.5.4.2 and 1.5.4.3), due to updates to garbage collection
policy for UGens. exporting and recording should now work, once again
1.5.4.3 (December 2024)
=======
new ChuGL v0.2.5 (see ChuGL release notes below)
~~~
ChucK 1.5.4.3
=======
(added, at last) class STATIC variable initialization for primitive
and Objects types. (Previously, static variables needed to be
instantiated and initialized separately.) Now variables of any
type can be declared as static variable and they will be automatically
initialized on a per-class basis. Example:
----------------------------------------
class Foo
{
// declare a static int in class Foo
5 => static int THE_NUM;
// declare a static SinOsc in class Foo
static SinOsc THE_UGEN(440);
}
// can be accessed as before
<<< Foo.THE_NUM, Foo.THE_UGEN.freq() >>>;
----------------------------------------
SEMANTICS for static variables
----------------------------------------
as before, static variable can only be DECLARED:
a) within a class definition
b) outside of any class function defintion
c) at the outer-most class scope (cannot be in nested { })
-----------------------------------------
COMPILE-TIME checks:
1) a statement containing a static variable declaration
CANNOT access member data/functions
2) otherwise, a statement can access both static and member data.
3) a statement containing a static variable declaration
CANNOT access local (i.e., outside of class def) vars or funcs
even in non-public classes
-----------------------------------------
RUNTIME checks:
4) static initialization statements are run in immediate mode
meaning no time advances; this is enforced at runtime; any
time advances, including waiting on events, will result in
a runtime exception
-----------------------------------------
(added) examples/class/static-init.ck
examples/import/import-test-3.ck
(added) '/usr/lib/chuck' to @import system search paths on Linux and MacOS.
.chug files in system paths will auto-load on start up (.ck files will
not auto-load and needs to be @imported in order to be used); also
@import will now include this directory when resolving fileanems.
(added) "ChucK => Music Programming Language" title to --about
(fixed) object instantiation refcount integrity; now correctly accounts
for the situation where the object reference count is 0 during
constructors (before assignment to a variable) and the constructor
performs operations that previously could cause itself to be garbage
collected
(fixed) now properly emits function calls vs. function values
(fixed) class definitions that encounter compiler errors (or are
in files that have compiler errors) are now correctly rolled back
in the type system; previously it was possible to instantiate
partial class definition defined in previously compiled code/file,
with undefined outcome
=======
ChuGL v0.2.5 Release Notes
=======
(added) input functions to get *all* keys held/pressed/released this frame
GWindow.keys()
GWindow.keysDown()
GWindow.keysUp()
(added) new RenderPass methods to set the output resolution, msaa sample
count,target scene and target camera for rendering garbage collection
mechanism for all UGens(added) HUD pass to ChuGL's default rendergraph.
Can now easily add 2d HUD overlay to 3D scenes by grucking ggens to
GG.hud()
(added) examples/basic/hud.ck
(fixed) crash caused by ShaderDesc and other internal reference counting
logic
=======
1.5.4.2 (November 2024)
=======
new ChuGL v0.2.4 (see ChuGL release notes below)
=======
(updated) --chugin-path:<path> no longer auto-loads chugins found in the
specified paths; instead the specified paths are added to the import
system user paths, and the .chug and .ck files within the specified
paths can be @imported.
(updated) improved internal garbage collection mechanism for all UGens;
now UGens are garbage collected and disconnected from all its UGen
connections, as soon as it is now longer referenced from code (previously,
this was deferred until the end of origin shred the UGen was created on,
which poses potentially significant memory build-up if a shred repeatedly
instantiated/connected UGens without exiting). Overall, this internal
update should result in improved CPU performance and memory behavior in
various scenarios.
(fixed) long-standing SndBuf issue, especially prevalent on macOS:
"System error : Too many open files." this was due a combination of
(fixed) memory leak involving string operations (e.g., string + string);
internally, string operations now are appropriately handled by the
operator overloading mechanism
(fixed) < <= > >= operators for strings
(fixed) an issue chugin system auto-load and --chugin-probe was skipping
over the first element when scanning directories
(fixed) vec2/vec3/vec4 implicit cast logic for +=> and -=> operations
(previously, this would cause a crash in some cases)
(fixed) vec2/vec3/vec4 function call from literal (non-variable) value
(e.g., @(1,0).magnitude(); previously this yielded a compiler error)
(added) examples/stk/tubebell-algo5.ck
(added) vector dot product methods for vec2, vec3, and vec4
float vec2.dot( vec2 rhs )
float vec3.dot( vec3 rhs )
float vec4.dot( vec4 rhs )
(added) vector cross product method for vec3 and vec4 (as 3D shorthand)
NOTE: this is the same as vec3*vec3 or vec4*vec4
NOTE: 4D cross product is mathematically undefined; vec4 cross product
ignores the `w` components and computes a 3D cross product;
`w` is also set to zero in the resulting vec4
vec3 vec3.cross( vec3 rhs )
vec4 vec4.cross( vec4 rhs )
(added) Type.of( vec2 ) function to get the associate Type
(added) --auto-load-chugin-path:<path> flag -- this behaves as
--chugin-path previously did: chugins in the specified path(s) are
auto-loaded; .ck files can be @imported
(fixed) --chugin:<name> and --chugin-path:<path> now correctly auto-expand
paths
(updated) Shred(.parent(), .ancester(), .childMemSize(), .childRegSize())
now will operate with respect to the shred reference rather than always
w.r.t. the calling shred (e.g., shred that is running when these functions
are called)
(added) Shred.pc(), .regSP(), .memSP() -- for debugging, info, amusement
=======
ChuGL v0.2.4 Release Notes
=======
New Features:
- Should now support both X11 and Wayland on Linux
- PolygonGeometry: provides (decently) robust/performant triangulation, useful for animating or
drawing deformable 2d shapes
- WireframeMaterial: renders a mesh as a wireframe
- Texture.copy(...): can now copy data between textures
- Texture.read(...): read back texture data from GPU --> CPU
~~~
Improvements:
- Significantly reduced startup time from loading large OBJ models or building geometry with
many vertices (tangent frame calculation has been moved from the CPU --> GPU)
- Optimized webcam implementation (now consumes less memory and requires fewer memory transfers)
~~~
New examples
- deep/ray_triangle_intersection.ck: 3d ray-triangle intersection testing. Thanks Shenran!!
- deep/fish.ck: procedurally animating a fish, showcases PolygonGeometry
- deep/webcam_echo.ck: webcam delay effect via texture copying
- basic/triangulate.ck: polygon triangulation with PolygonGeometry
- basic/texture_read.ck: showcases reading texture data from GPU into chuck
~~~
Bug Fixes:
- Crash when using Video textures
- Fix race condition in Webcam destructor
- GText now supports empty strings, and can properly disconnect from the scenegraph
- AssLoader will take model ambient color (Ka) into account
=======
1.5.4.1 (November 2024)
=======
(patch release)
- (fixed, linux) a crash when the OTF handles an OTF command (add or replace)
- (added) support for crawling subdirectories for importing for packages
to be managed by the upcoming ChuMP (ChucK Manager of Packages)
- (updated) --chugin-probe now prints .ck files in the import search paths
NOTE: as of 1.5.4.1 chuck auto-loads ONLY chugins in the system search
paths; all other chugins and all chuck files in the import search paths
must be @imported in order to be used.
1.5.4.0 (November 2024)
=======
\/\/\/\/\/
LICENSE UPDATE: ChucK source code is dual-licensed under the MIT License
and the GNU General Public License 2.0 (or any later version). You can
choose either license in order to use the source code. Previoiusly, ChucK
was GPL-only. Please the LICENSE.MIT and LICENSE.GPL in the source
distribution for details.
----
NOTE: as before, miniAudicle source code remains GPL for now; chugins
each have their own license(s). WebChucK, ChuGL, Chunity, Chunreal
respectively have MIT licenses
/\/\/\/\/\
********** new language feature ************
@import system for .ck and .chug files
********************************************
- for language specification and examples regarding @import:
***************************************************
https://chuck.stanford.edu/doc/language/import.html
***************************************************
- the @import system imports classes and operator overloads from another
.ck file, or from a chugin; it is designed to faciliate creating,
using, and distributing multi-file programs and libraries
- @import SYNTAX:
@import "Foo.ck" // import Foo.ck
@import "Bar.chug" // import Bar.chug chugin
@import { "AAA.ck", "BBB.chug", "CCC" } // multiple imports on one line
@import "/Users/ge/chuck/examples/import/foo-user.ck" // absolute path
@import "../dir/Blarg.ck" // relative path
@import "Foo" // can use implicit filename; @import will search and
match for .ck, .chug, and .chug.wasm, in each directory in the
chugin/import search paths
- @import picks up all (and only) *public* definitions (classes and
operator overloads);
-- this implies that @import will only add new definitions to the type
system, but will NEVER automatically run any code; client code must
first instantiate class or use an operator to execute the contents
of imported files
-- this makes it possible to write unit-test code for public classes
in the same file in which it is defined; any code outside of public
class/operator definition will NOT be type-checked or run (this
code will only scanned for syntax)
- @imports are resolved at compile-time, before the rest of the host file
is evaluated; this makes it possible for a a host .ck file to @import
one or more files and make use of their contents immediately (when it
comes to dependency management, this compile-time import mechanism is
more powerful than the run-time Machine.add()).
- @import can work recursively; can @import files that @import other
files
- @import has built-in cycle-detection; if an @import cycle is detected,
a compiler error will be issued and that compilation will be failed
*******************
ChuGL 0.2.3 Release
*******************
- Video textures!
- Currently supporting MPEG1 Video decoding and playback
- Webcam/video camera integration
- ChuGL can now run at a fixed framerate across all machines/monitors
- `GG.fps(int fps)` to set the target framerate (lower values improve
chuck's audio performance)
- defaults to 60fps
- Added skybox support to GScene and environment lighting to PhongMaterial
- New Examples
- basic/skybox.ck
- basic/webcam.ck
- basic/video.ck
- Fix memory leak on creating new Shaders
- (updated behavior) the one-public-class-per-file restriction has been
lifted; i.e., it is now possible to define more than one public class
in a single .ck file; this update is intended to give programmers and
library creators more flexibility in organizing their public class
definiition
- (updated behavior) .ck files found in chugin/import search paths (e.g.,
~/.chuck/lib) NO LONGER automatically loads; instead these now must
be explicitly @imported to be used (FYI just the file name will
suffice, assuming there are no filename conflicts elsewhere in the
import paths)
*******************
- (added) member function in Object to get the instantiated type of an
object, regardless of the apparent type
Type Object.typeOfInstance()
Get the instanced type of this object.
- (fixed) specific internal UGen connection error now handled without
exiting
- (fixed, windows) single letter filenames without extensions (e.g., "A")
now are distinguished from windows drive letters (e.g., "A:\")
- (fixed) Type.of() now reports more specific array type (e.g.,
`string[]`) instead ofgeneric `@array`
- (fixed) type system [user] namespace now instantiated correctly at
initialization; previously [global] was used until a clearVM was
performed -- this caused incorrect behavior with certain functionality,
including a crash in Type.children(); relatedly a long-standing
bug was fixed in the type system scope::lookup mechanism that added
NULL entries during lookup
- (fixed) modulo `%` by zero (int or float) now throws an exception;
previously this would either produce an incorrect result or cause a
crash
- (updated) .sort() a string array will now sort alphabetically (instead
of by Object refs)
- (updated, internal) dynamic array types are now cached and reused,
preventing potential memory build-up across compilations
- (updated) chugin probe no longer recursively crawl directories
- (updated) variable dependency check now treats sporked functions same
as function calls; unfulfilled dependencies will result in a compiler
error; previously, correctness in this regard was left to the
programmer but could cause a crash. this update is more stringent than
is always necessary (due to spork being parallel and the timing
behavior, the dependency sometimes are resolved in actuality.
however, ChucK team deems potentially over-aggressive dependency
checking for sporked functions is preferrable to unexpected and
hard-to-debug crashes.
============
For example:
============
```
// spork a function (that depends on foo)
spork ~ printArray();
// initialize foo
5 => int foo;
// function that needs foo
fun void printArray()
{
// need 'foo' initialized here
if( foo == 5 ) <<< "success" >>>;
}
// give the sporked shred a chance to run
me.yield();
```
===============
compiler error:
===============
error: sporking 'printArray()' at this point potentially skips
initialization of a needed variable:
[9] spork ~ printArray();
^
error: ...(note: this skipped variable initialization is needed by 'fun
void printArray()')
[12] 5 => int foo;
^
error: ...(note: this is where the variable is used within 'fun void
printArray()' or its subsidiaries)
[18] if( foo == 5 ) <<< "success" >>>;
^
...(hint: try calling 'printArray()' after the variable initialization)
==============
1.5.3.2 (October 2024)
=======
*** ChuGL maintanance patch ***
- (updated) backend WebGPU version to wgpu-22.1.0.5
- (added) OpenGL fallback on machines where modern graphics APIs (vulkan, metal, direct3d)
are not supported
- (fixed) shreds can now exit a GG.nextFrame() loop without hanging the window
- (added) GG.unregisterShred() to manually unregister a graphics shred
- (added) new examples
- deep/particles.ck : musical partical system
- deep/sprite_animation.ck : sprite animation via sprite sheets
- (fixed) race condition on window resize
*******************************
- (added) MidiFileIn.bpm()
"Same as beatsPerMinute()."
- (added) MidiFileIn.ticksPerQuarter();
"Get the ticks per quarter (TPQ) value from the MIDI file header."
- (added) MidiFileIn.tpq();
"Same as ticksPerQuarter()."
- (fixed) documentation for MidiMsg.when:
"Duration since the last MidiMsg (only valid for MidiFileIn)."
- (fixed, windows) SndBuf issue when compiled with UNICODE (FYI SndBuf is still ANSI,
but this averts an error due to char width mismatch)
- (changed, developer) chuck global manager getGlobalUGenSamples() now handles multi-channel
implications for Chunity support for stereo
- (added) new examples (FM Synthesis)
examples/stk/jacobass-algo1.ck
(such groove, much Algorithm 1)
examples/stk/nylon-guitar-algo1.ck
(updated/renamed from honkeytonk-algo3.ck)
1.5.3.1 (October 2024)
=======
*** ChuGL maintanance patch ***
- (fixed) crash caused by calling UI functions before calling GG.nextFrame();
now prints a warning with a hint to call GG.nextFrame()
- (fixed) CPU and memory spikes when minimizing a ChuGL window
- (fixed) crash caused by immediately disconnecting GGen after -->
*******************************
- (fixed) ADSR constructors now work correctly
- (fixed) compiler now reports line numbers and caret position correctly after
a multi-line string literal
1.5.3.0 (September 2024)
=======
- (major update) ****** ChuGL.chug v0.2.0 (alpha) ******
* complete under-the-hood engine rewrite