Skip to main content

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.

16 votes
15 answers
2k views

Transpose these notes!

In this challenge, you should take input as a number between 0 and 11 inclusive and a (possibly empty) list of the following strings/notes: ...
3-1-4-One-Five's user avatar
1 vote
7 answers
497 views

Relations between interval and semitones

Output this table: -2* -1* - 0 - 1 2 -1* 0 1 - 2 3 4 1 2 3 - 4 5 6 3 4 - 5 - 6 7 5 6 - 7 - 8 9 6 7 8 - 9 10 11 8 9 10 - 11 12 13 10 11 - 12 - 13 14 You can output one string with two types of ...
l4m2's user avatar
  • 25k
13 votes
2 answers
1k views

Can Bitshift Variations in C Minor be compressed down to less than 185 characters?

Bitshift Variations in C Minor by Robert Miles is a Code Golf music piece written in C (with some additional bash commands). It was originally presented in a 2016 Computerphile video Code Golf & ...
brubsby's user avatar
  • 253
10 votes
4 answers
792 views

Identify 22-TET intervals

Objective Given the distance between two keys in an octave, identify its name. But there's a caveat. In this challenge, there are 22 keys in an octave, not usual 12. Here, a porcupine[7] scale will be ...
Dannyu NDos's user avatar
  • 5,961
8 votes
7 answers
550 views

Print the notes of an increasing octave-repeating scale

Challenge To quote Wikipedia: An octave-repeating scale can be represented as a circular arrangement of pitch classes, ordered by increasing (or decreasing) pitch class. For instance, the increasing ...
badatgolf's user avatar
  • 1,477
10 votes
6 answers
772 views

Counting Rhythms

The Narrative You are a bad musician. You never bothered to learn how to count rhythms. To remedy this shortcoming, you decide to write a program that will tell you how to count in any given time ...
Nilster's user avatar
  • 1,487
10 votes
9 answers
542 views

Sort musical pitches

Given an unordered list of musical pitches, write the shortest program/function (scored in bytes) to sort the list from lowest pitch to highest. Pitches will be given in scientific pitch notation, ...
Dingus's user avatar
  • 11.2k
21 votes
13 answers
2k views

Output the 12 Bar Blues

Note to those without experience in music: Through making an attempt to solve this problem, you may find that music and computer programming are similar in the ways that they implement rules and ...
drmosley's user avatar
  • 757
1 vote
0 answers
121 views

Random musical harmonies [closed]

The challenge. Make a program that produces a random series of 8 notes in the scale of E minor, and then harmonizes them. Details. Notes must be represented in output as a 1-2 char string, which ...
Shiatryx's user avatar
9 votes
8 answers
2k views

Music with pi and e

Because I forgot to celebrate Pi Day (14.3), let's celebrate with \$\pi\$, \$e\$ (Euler's number) and music! Challenge No, we don't have time to eat a pi-pizza, let's make a program. What you need is ...
math scat's user avatar
  • 9,408
7 votes
7 answers
872 views

How predictable is popular music?

The McGill Billboard Project annotates various audio features of songs from a random sample of the Billboard charts. I scraped this data to produce the following file of chord progressions: ...
Dustin G. Mixon's user avatar
19 votes
13 answers
1k views

Are the beams above or below the notes?

In musical notation, groups of notes shorter than one beat are joined together by a line at the bottom called a beam. Here are a few bars of music with the beams highlighted: (Taken from Second Suite ...
Purple P's user avatar
  • 1,667
14 votes
7 answers
600 views

Make a random drum loop

Do randomly generated drum loops sound good? A drum loop is a \$5\times 32\$ matrix \$A\$ of \$1\$s and \$0\$s such that \$A_{1,1}=A_{1,17}=A_{2,9}=A_{2,25}=1\$, for each \$i\$, the \$i\$th row has ...
Dustin G. Mixon's user avatar
11 votes
7 answers
2k views

Approximate the perfect fifth

Starting at 1-TET, give equal temperaments that have better and better approximation of the perfect fifth(just ratio 3/2). (OEIS sequence A060528) The formal description of the sequence, copied from ...
Dannyu NDos's user avatar
  • 5,961
16 votes
9 answers
2k views

Is this a Major Scale (or equivalent)?

Sandbox The major scale (or Ionian scale) is one of the most commonly used musical scales, especially in Western music. It is one of the diatonic scales. Like many musical scales, it is made up of ...
Luis felipe De jesus Munoz's user avatar

15 30 50 per page
1
2 3 4 5