Skip to content

Add missing equation parser features (e.g. loop, megabuf) #590

@kblaschke

Description

@kblaschke

Latest Milkdrop supports more equation functions and features than projectM. These new functions were introduced in Winamp 5.57 beta, when the devs switched to ns-eel2. Here's a list of currently unsupported functions:

  • loop(var, statements; ...)
  • while(cond)
  • megabuf(n) (can be used as an lvalue!)
  • gmegabuf(n) (can be used as an lvalue!)
  • freembuf(block)
  • memcpy(dst, src, numvals)
  • memset(dst, val, numvals)
  • exec2(stmt1, stmt2) (Returns the result of the second statement)
  • exec3(stmt1, stmt2, smt3) (Returns the result of the third statement)
  • invsqrt(f) (Fast inverse square root)

Some reverse engineering might be required to see how these functions work, as there's no end-user documentation.
Also, the megabufs are always global and do not follow the inheritance pattern of q vars. Some presets take advantage of this and use the megabuf to pass data between different equations. It might be hard to find such presets, but if there are some, it's quite important that projectM's order of rendering/calculating each part of a preset follows the exact same order as in Milkdrop.

Metadata

Metadata

Assignees

Labels

enhancementThe feature is considered an enhancement.importantImportant bugs or features which should be fixed/implemented ASAP.work-in-progress

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions