go-audio / music Goto Github PK
View Code? Open in Web Editor NEWMusic and music theory related Go packages
License: Apache License 2.0
Music and music theory related Go packages
License: Apache License 2.0
First of all - amazing idea with go-audio
!
I can see a few areas of improvement though.
// 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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.