Code Monkey home page Code Monkey logo

music's People

Contributors

mattetti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

youshy

music's Issues

theory/scales might be improved

First of all - amazing idea with go-audio!

I can see a few areas of improvement though.

Scale definition struct needs a bit of rework

// ScaleDefinition defines a scale by giving it a name and the spacing between adjacent notes on the chromatic scale.
type ScaleDefinition struct {
	// Popular indicates that the scale is commonly used
	Popular bool
	// Greek mode scale
	Greek     bool
	Name      ScaleName
	HalfSteps []int
	// InScale indicate what notes are in and which aren't
	InScale     [12]bool
	_scaleNotes []int // cache
}

I kinda disagree with popular boolean as music is not very 0/1. Popularity derivates from the genre itself - best example would be jazz which uses extended modes or modes derivated from other scales other than ionian. Better implementation might be:

type ScaleDefinition struct {
  // as most of the scales have their parent mode
  // it would be useful to note the parent, not if greek or not
  isChild         bool
  ParentScale     *Scale // or any other pointer to the parent. If not child - leave empty?
  Name            ScaleName
  HalfSteps       []int // half steps are useful only if we're talking about western music theory

This struct is way lighter and also indicates the connections between all the modes (based on modal theory for natural, harmonic and melodic minors).

Also, that might change the way we handle the rest of the definitions. If you need any help with implementing the theory bit in Go - let me know - I'm more than happy to help!

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.