Questions tagged [music]

This tag indicates that the challenge involves music, e.g. taking music as input, producing music as output or handling musical notes.

Filter by
Sorted by
Tagged with
27
votes
15answers
11k views

Twinkle Twinkle Little Star

Write a program to play the popular English nursery rhyme. (This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Attribution: Helix84 at the English language ...
38
votes
11answers
2k views

Music: what's in this chord?

Input The symbol of any triadic chord (see http://en.wikipedia.org/wiki/Chord_(music)#Triads). Output The notes constituting the given chord. Examples Input: AM...
47
votes
15answers
7k views

Attack, Decay, Sustain, Release

Sound synthesizers use envelope generators to control how certain parameters of the sound (such as overall loudness) change with time. In many synthesizers an envelope is defined by four parameters, ...
15
votes
2answers
513 views

The Major-Minor Dichotomy

Given a list of chords label them as either 'Major' or ' Minor'. Input Input will be a list of chords, one per line, made up of 3 notes separated by a space. Each note will consist of the note name ...
11
votes
7answers
490 views

Music Interval Solver

In music theory, an interval is the difference between two pitches. Each pitch is defined by the number of half-steps (The difference between C and C#) or whole steps (The difference between C and D). ...
11
votes
4answers
467 views

The Sound of Words

People have written many things allowing one thing to be visualized as another. Now I propose being able to translate letters to music! Its your job to write a program that takes a text file and ...
42
votes
11answers
4k views

Let us play the ocarina

As we all know, the Zelda series are one of the best game series ever made. In honor of that, let us play some songs on the ocarina. Challenge: Write a program which, given a song, outputs the score ...
27
votes
1answer
1k views

ASCII Scores ­­­­­

Digging around in the depths of your temp folder, you find some compositions for the piano. Unfortunately, these compositions were written with note names and durations only, and you only have access ...
16
votes
4answers
2k views

Markov Chain Beatbox Generator

Just an idea I had the other day: Making beats following a Markov Chain of predefined sounds. I remember someone did a beatbox with Google Translate and the German language (follow the link and press ...
31
votes
10answers
2k views

Play “Taps”​​​​

Today, November 11, 2015, is Veterans Day in the United States. "Taps" is the bugle call played at U.S. military funerals: ("Taps" on SoundCloud from vtmiller) It is a ...
24
votes
8answers
3k views

Generating guitar tabs?

Write the shortest program that generates guitar tabs for the chords given as input. So that the guitarists among you don't have an advantage, and to make it deterministic (and probably easier to ...
36
votes
27answers
4k views

Building a Metronome

Introduction Some days ago I needed a metronome for something. I had none available so I downloaded an app from the App Store. The app had a size of 71 MB!!! 71 MB for making tic-toc...?! So code-...
13
votes
4answers
1k views

Mozart golf - mini “Rondo”

Output "Mozart - Alla Turca" to stdout (see the sample for "reference implementation") Try to find how to pack both synthesizer and the music into minimal size. Requirements: Format suitable for ...
36
votes
18answers
2k views

Consonance or dissonance?

Given two note names, you are to write a program that determines if the interval formed by these two notes is consonant or dissonant. Introduction In Western music, there are only 12 "different" ...
24
votes
1answer
2k views

Print the lyrics to “Twinkle Twinkle Little Star”

Your goal is to print the lyrics to the song "Twinkle Twinkle Little Star" as each note is played. The computer's microphone will hear notes. If the pitch (but not necessarily the length) of the note ...
21
votes
11answers
3k views

What is the frequency of this note?

Quick musical refresher: The piano keyboard consists of 88 notes. On each octave, there are 12 notes, C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭ and ...
10
votes
1answer
328 views

Scale from key and mode

Most of you probably know the C major scale: C D E F G A B C The major scale is characterised by the intervals between adjacent notes, which measured in ...
21
votes
11answers
2k views

How many semitones

Guidelines Task Given two notes, inputted as strings or lists/arrays, calculate how many semitones apart they are (inclusive of the notes themselves), outputting as a number. Explanation of a ...
19
votes
7answers
892 views

Organise the Gregorian Church's Music

The year is 930, and the Gregorian Church is having a problem. They have thousands of pages of chant music, but the problem is that all the sheet music was simply thrown onto a pile instead of having ...
18
votes
14answers
1k views

Translate number pairs to guitar notes

A guitar fretboard diagram looks like this: ...
15
votes
5answers
1k views

RTTTL Obfuscation

RTTTL, or Ring Tone Text Transfer Language is a music format that was invented by Nokia in the dawn of time when dinosaurs roamed the land. It allows for fairly crude pieces of music (no chords or ...
15
votes
4answers
2k views

Create a GUI Piano [closed]

Challenge Create a GUI Keyboard with as few characters as possible. Example Because this was an assignment in one of my courses, I can't show the source code. However, here is a screen shot of my ...
10
votes
6answers
438 views

Print the sizes of intervals inside of a piece of music

Background In Western music, every single music note has an assigned name. Within each octave, there are twelve unique notes in the following order: "C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B C", ...
15
votes
4answers
1k views

It's fun to stay at the Y.M.C.A

"Y.M.C.A." is a popular disco song by the Village People that has a well-known dance. Write the shortest program to output the capital letters "Y", "M", "C", and "A" synchronized to the song's chorus. ...
9
votes
1answer
446 views

Notes to Tablature

Challenge Given a list a notes, you must return the corresponding tablature. Notes The notes must be in the range of A to G inclusive and the octave range being 2 to 6 inclusive. The format is note-...