Skip to content

1.0.2829

Latest
Compare
Choose a tag to compare
@cesaref cesaref released this 22 Apr 09:25
· 32 commits to main since this release

This release includes various bug fixes, and some incremental changes to the language, and resolves various problems around vector support.

Mutable slices and slice constness

We have implemented mutable slices, that is, the ability to modify the underlying array via a slice. The existing slice syntax is now implicitly mutable, so it is a requirement that if a slice of a constant array is created, it must now be marked as const:

int getElement (int[] a, int i)
{
    return a[i];
}

bool test()
{
    let a = int[3](1, 2, 3);
    return getElement (a, 1) == 2;      // error: Cannot pass a const value as a mutable slice
}

The getElement function would need to be updated to:

int getElement (const int[] a, int i)
{
    return a[i];
}

This is an early release of this feature, so we'd be interested in any feedback, especially odd error reporting and bug reports related to this feature.

Improved compilation optimisation

There have been various improvements to the JIT compiler, which lead to more automatic vectorisation, and automatic loop unrolling. These updates may increase compile time, but will increase the runtime performance of the generated code.

Slices of slices

It is now possible to take a slice of a slice - previously we were not able to pass a slice to a function, and return part of this slice. Slice indexes must still be static, and are currently readonly. Further work will be made to relax these constraints further.

std::convolution

We now have convolution support in the std library. These include time domain and frequency domain implementations, including a zero latency convolution algorithm. The library supports multi-channel impulses.

New examples

There is a demo of convolution using a reverb, and a new synth (TX81Z).

Bug fixes

Resolved an issue related to vector<1> in the C++ code generator.
Resolved an issue where a wrap loop counter could be updated and lead to invalid loop repetitions
Fixed some intrinsic functions which previously accepted invalid data types leading to confusing error messages
Resolved an issue which could lead to hoisted endpoints having an invalid endpoint type, leading to invalid compile errors
Stopped the compiler incorrectly recompiling the patch when only UI components have been updated
Fixed C++ code generation related to some vector operations (|, &, >>, <<, >>>>>)
Resolved a problem with endpoint annotations merging incorrectly
Fixed a bug in the NoteToMidi helper
Fixed a bug in inplace operators which could lead to incorrect index operations
Fixed an issue which could cause out of range indexes for wrap types for powers of 2