music-notation

Sheet music library

[亡魂溺海] 提交于 2019-12-31 08:59:27
问题 I'm a python hacker looking to build a sheet music app. I'm comfortable with reading/understanding sheet music (played piano for many years). Here are my complete newbie questions.. Is there a standard for representing notes digitally? I don't want to reinvent any wheels. Given a sequence of notes and durations, is there a library for displaying these in a sheet music format? Basically I'm looking for a place to get started. I'm not heavily into graphics, so a existing open-source library

Function with input prints out nothing

别说谁变了你拦得住时间么 提交于 2019-12-24 12:17:57
问题 Ok so I'm trying to get z.ExNote() to print out an image (of an 8th note) onto a page of sheet music for an app I'm building. Basically every variable just has to do with the (x,y) coordinates of where the note is to be placed. .ExNote() is a function inside a class Note which translates 5 variables of the Note object (Num, staff, measure, note, notetype) into an x,y coordinate for the image to be placed on. This whole mess takes care of 4 variables for you so you can theoretically input the

Music Chord part splitting Regex

老子叫甜甜 提交于 2019-12-22 08:46:50
问题 This is a follow-up question to this one: Regex for matching a music Chord, asked by me. Now that I have a regex to know whether a String representation of a chord is valid or not (previous question), how can I effectively get the three different parts of the chord (the root note , accidentals and chord type ) into seperate variables? I could do simple string manipulation, but I guess that it would be easier to build on the previous code and use regex for that, or am I am wrong? Here is the

Regex for matching a music Chord

自闭症网瘾萝莉.ら 提交于 2019-12-18 04:46:25
问题 I am trying to write a function to parse the string representation of a musical chord. Example: C major chord -> Cmaj (this is what I want to parse) Just to make it clear, a chord is made of three different parts: the note (C, D, E, F, G, A) the accidentals for that note (#, ##, b, bb) the chord name For those, music savvy, I am not considering slash chords (on purpose). The below function is almost working. However it still doesn't work for the following case: "C#maj" # matches and should "C

How to abbreviate 'note with the same note an octave higher, parenthesized' in Lilypond?

谁说我不能喝 提交于 2019-12-07 03:56:21
问题 Currently I write lilypond code that looks like this: \version "2.14.2" P = #parenthesize \relative c, { \clef bass <c \P c'> <e \P e'> <g \P g'>2 <c, \P c'>4 <d \P d'> <e \P e'>2 } where I repeatedly mean ' this note, together with the same note one octave higher, parenthesized'. I'd like a way to abbreviate this, so that I can write something like this: \version "2.14.2" poct = ... \relative c, { \clef bass \poct c \poct e \poct g2 \poct c,4 \poct d \poct e2 } As suggested in a helpful

Coloring notes in Lilypond by pitch

自古美人都是妖i 提交于 2019-12-07 03:16:36
问题 lilypond can color notes in a arbitrary way using \override NoteHead #'color = #red c with the default color is black. But I like to color all notes by pitch, so that my kids can more easily learn to recognize the notes as the c, d, e, f, ... are associated with its own color. The above allows me to do this, but is rather verbose. Is there a shortcut, macros of some sort, that allow me to do something along the lines of: redc greend bluee or even overwriting the default colors for each note

An algorithm to create a simple chord progression

ぐ巨炮叔叔 提交于 2019-12-06 22:43:19
问题 I'm making a program that generates random simple melodies, based an a randomized basic chord progression from the C Major scale. What would be a good way to generate a chord progression of 4 triads from this scale? Generating 4 completely random triads (from the 7 existing ones) from the scale usually doesn't sound very good. I need an approach to generate a chord progression that will sound good or okay, but I don't want to simply choose a progression randomly from an existing pool of

How to abbreviate 'note with the same note an octave higher, parenthesized' in Lilypond?

非 Y 不嫁゛ 提交于 2019-12-05 08:17:15
Currently I write lilypond code that looks like this: \version "2.14.2" P = #parenthesize \relative c, { \clef bass <c \P c'> <e \P e'> <g \P g'>2 <c, \P c'>4 <d \P d'> <e \P e'>2 } where I repeatedly mean ' this note, together with the same note one octave higher, parenthesized'. I'd like a way to abbreviate this, so that I can write something like this: \version "2.14.2" poct = ... \relative c, { \clef bass \poct c \poct e \poct g2 \poct c,4 \poct d \poct e2 } As suggested in a helpful answer to an earlier question of mine , I have tried to use a music function , but there is no way I can

An algorithm to create a simple chord progression

蹲街弑〆低调 提交于 2019-12-05 04:06:12
I'm making a program that generates random simple melodies, based an a randomized basic chord progression from the C Major scale. What would be a good way to generate a chord progression of 4 triads from this scale? Generating 4 completely random triads (from the 7 existing ones) from the scale usually doesn't sound very good. I need an approach to generate a chord progression that will sound good or okay, but I don't want to simply choose a progression randomly from an existing pool of progressions. I still want the program to generate these 4 triads by itself, using some simple algorithm to

How do I transpose music chords using JavaScript?

為{幸葍}努か 提交于 2019-12-04 17:57:53
问题 I was wondering how would one create a javascript function for transposing music chords. Since I don't expect everyone to be a musician here, I'll try to explain how it works in music theory. I hope I don't forget something. If yes, musicians, please, correct me. 1) The simple chords The simple chords are almost as simple as an alphabet and it goes like this: C, C#, D, D#, E, F, F#, G, G#, A, A# B From B it loops all over again to C. Therefore, If the original chord is E and we want to