GithubHelp home page GithubHelp logo

itsflores / musika Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bull313/musika

0.0 0.0 0.0 143 KB

The Music Programming Language - compose in a text editor and compile it into real music

C# 92.24% HTML 4.81% JavaScript 2.49% CSS 0.46%

musika's Introduction

Musika - The Music Programming Language

Musika Features

  • Import 0 or more Musika files to utilize their patterns/music in a file
  • Add the following metadata to a song:
    • song title
    • song author(s)
    • key signature
    • time signature
    • base tempo
    • base octave
  • Define patterns/riffs that can be used in songs (like functions in a program)
  • Define chords that can modularize complex macro-notes (chords)
  • Take a segment of music and have it repeat a number of times
  • Layer music segments on top of each other
  • Change the metadata for a song in the middle of it to change aspects such as key, time, tempo, and octave
  • Write notes in the specified key, give them a length, and keep the octave at the base or shift it one higher or lower
  • Write comments in the code to make developer/composer notes

How to program in Musika

Basic Musika Anatomy

Every Musika file is divided into 4 sections:

  • Accompaniment Section
  • Info Section
  • Pattern Section
  • Music Section

Each of these sections are separated by three dashes (---) on a new line. The accompaniment section is optional, but the other three are required.

The Accompaniment Section

The following is an example of an accompaniment (another Musika file):

	accompany [musika_file] name new_accompaniment

You specify a Musika file within your directory (or as a part of the Musika library) solely by the name (NO FILE EXTENSION)

This statement will import the specified Musika file and it can be referenced later in the file using the name specified after the name keyword.

Each accompaniment specification must be specified on its own line. After that, place three dashes (---) at the bottom line to enter the info section:

	accompany [file1] name one
	accompany [file2] name two
	---
	title: "Song Title"
	author: "Song Author"
	coauthors: "Song coauthors"
	key: Cmaj
	time: 4 / 4
	tempo: 4 = 60
	octave: 4
	---

Note the bottom three dashes used to enter the patterns section afterwards

Sample Programs

  • example1.ka

    			accompany [example2] name rhythm
    			accompany [example3] name pattern_lib
    			---
    			title: "High Noon Chorus Lead"
    			author: pattern_lib
    			coauthors: pattern_lib
    			key: pattern_lib
    			time: pattern_lib
    			tempo: pattern_lib
    			octave: 5
    			=>
    			Any notes on the piece can be written here in a multi-line comment
    			<=
    			---
    			& this is a single-line comment
    			pattern [chorus1]:
    			E....A..G..F.G.D,..A..G.F. & this is the lead pattern for high noon
    			& this is another comment
    			---
    			layer(rhythm)
    			repeat(2) {
    				chorus1
    				pattern_lib>chorus2
    				pattern_lib>chorus_end
    			}
    			---
    		
  • example2.ka

    			accompany [example3] name lib
    			accompany [chords] name c
    			---
    			title: "High Noon Chorus Rhythm"
    			author: lib
    			coauthors: lib
    			key: lib
    			time: lib
    			tempo: lib
    			octave: 2
    			=>
    				This is the rhythm part of High Noon
    			<=
    			---
    			pattern [chorus]:
    			c>E5...c>B5..c>B5.c>B5.c>B5.
    			---
    			chorus*2*3
    			c>E8.*4 c>B8.*4 c>C8.*4 c>D8.*4
    			---
    		
  • exapmle3.ka

    			title: "High Noon Chorus Patterns"
    			author: "Benjamin Ladick"
    			coauthors: "Masking The Fallen"
    			key: Em
    			time: common
    			tempo: 4 = 144
    			octave: 4
    			---
    			pattern [chorus2]:
    			E.B,.D,.E.A..G..F.G.D..B.A.G.F.
    			pattern [chorus_end]:
    			G..F..F.G.D,.F.E.
    			! octave: -1 !
    			B.D.B.D.B.D.E'.
    			---
    			---
    		

musika's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.