MCPcopy Index your code
hub / github.com/cmajor-lang/cmajor

github.com/cmajor-lang/cmajor @1.0.3159

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.3159 ↗ · + Follow
9,095 symbols 25,275 edges 486 files 1,366 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

The Cmajor Language

Cmajor is a programming language for writing fast, portable audio software.

You've heard of C, C++, C#, objective-C... well, Cmajor is a C-family language designed specifically for writing DSP signal processing code.

Project goals

We're aiming to improve on the current status-quo for audio development in quite a few ways:

  • To match (and often beat) the performance of traditional C/C++
  • To make the same code portable across diverse processor architectures (CPU, DSP, GPU, TPU etc)
  • To offer enough power and flexibility to satisfy professional audio tech industry users
  • To speed-up commercial product cycles by enabling sound-designers to be more independent from the instrument platforms
  • To attract students and beginners by being vastly easier to learn than C/C++

Our main documentation site is at cmajor.dev.

The Cmajor VScode extension offers a one-click install process to get you up-and-running, or see the Quick Start Guide for other options, like how to use the command-line tools.

If you want to learn about the nitty-gritty of the Cmajor language, the language guide offers a deep dive. To see some examples of the code, try the examples folder.

How to build

To build Cmajor requires a host with suitable compilers, and with support for Cmake. For MacOS, a recent XCode is required, whilst Windows requires VS2019. Linux builds have been successfully built using both clang and gcc v8 and above.

When cloning the Cmajor repository, you need to ensure you have also pulled the submodules, as there are a number for third party libraries and some pre-built LLVM libraries.

Building on MacOS

To build on MacOS, from the top level directory in a shell execute:

> cmake -Bbuild -GXcode .

You can then open the XCode project in the build directory to build the tooling

Building on Windows

On Windows, use cmake to build a suitable project to be opened with visual studio. From the top level directory in a shell execute:

> cmake -Bbuild -G"Visual Studio 16 2019" .

The resulting visual studio project can be opened and the tooling built. On Windows/arm64, building the plugin is not supported for now, and this can be disabled by specifying -DBUILD_PLUGIN=OFF when running cmake

Only Release and RelWithDebugInfo builds of the windows project are currently supported, as the pre-built LLVM libraries use the release runtime. If you find you need a Debug build, the simplest way is to re-build the LLVM library as a debug build. Be warned, this will take some time and the resulting LLVM libraries are rather large. The LLVM build script can be run to achieve this specifying --build-type=Debug

Building on Linux

On linux platforms, simply running cmake with your generator of choice will produce a suitable build. We find ninja works well for this project:

> cmake -Bbuild -GNinja -DBUILD_PLUGIN=OFF -DCMAKE_BUILD_TYPE=Release .
> cd build
> ninja

All content is copyright 2023 Cmajor Software Ltd unless marked otherwise.

Extension points exported contracts — how you extend this code

EndpointAnnotation (Interface)
(no doc)
javascript/cmaj_api/cmaj-types.d.ts
EndpointInfo (Interface)
(no doc)
javascript/cmaj_api/cmaj-types.d.ts
PatchManifest (Interface)
(no doc)
javascript/cmaj_api/cmaj-types.d.ts
StatusMessage (Interface)
(no doc)
javascript/cmaj_api/cmaj-types.d.ts

Core symbols most depended-on inside this repo

get
called by 733
modules/compiler/src/AST/cmaj_AST_StringPool.h
set
called by 630
modules/compiler/src/AST/cmaj_AST_Properties.h
throwError
called by 436
modules/compiler/src/AST/cmaj_AST.h
size
called by 355
modules/compiler/src/AST/cmaj_AST_Utilities.h
agerr
called by 194
3rdParty/graphviz/cgraph/agerror.c
referTo
called by 176
modules/compiler/src/AST/cmaj_AST_Properties.h
empty
called by 144
modules/compiler/src/AST/cmaj_AST_StringPool.h
agnameof
called by 144
3rdParty/graphviz/cgraph/id.c

Shape

Method 4,614
Function 3,521
Class 919
Enum 37
Interface 4

Languages

C++53%
C26%
TypeScript20%
Python1%

Modules by API surface

examples/patches/SubtractOne/gui/stripped-build/static/js/main.62462333.js468 symbols
modules/compiler/src/AST/cmaj_AST_Classes_Types.h246 symbols
include/cmajor/helpers/cmaj_Patch.h223 symbols
modules/compiler/src/AST/cmaj_AST_Classes_Constants.h216 symbols
modules/compiler/src/AST/cmaj_AST_Properties.h195 symbols
modules/compiler/src/AST/cmaj_AST_Classes.h183 symbols
modules/embedded_assets/wam/sdk/index.js165 symbols
modules/compiler/src/AST/cmaj_AST_Classes_Values.h157 symbols
3rdParty/graphviz/expat/xmlparse.c156 symbols
modules/compiler/src/AST/cmaj_AST_Classes_Processors.h133 symbols
modules/compiler/src/backends/LLVM/cmaj_LLVMGenerator.h126 symbols
include/cmajor/helpers/cmaj_JUCEPlugin.h121 symbols

For agents

$ claude mcp add cmajor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page