2

Disclaimer: I'm a programmer and I know nothing about music.

I connected a small electronic component to my computer, and I'm able to control it using a software I developed.

This electronic component is able to produce a brief sound, if I send it the proper command. It can do this hundreds of time per second. However, there is no variations possible, there is just a small Bip and that's all.

I was thinking that for fun, I could schedule the commands adequately so it produces some kind of rhythmic music. Like when you tap your fingers on the table.

Unfortunately, I could not find any reference to this kind of music compositions. I expected to find some examples of nice "songs" I could implement in my software, but it seems I don't know what to search for.

I imagined this could look like binary data:

000100010001000100100100101010100100101001010

One 0 would mean "do nothing" and one 1 would mean "play the sound". Then I could execute the music with a given tempo, for example "wait 50 ms between each bit".

Is there a name for what I'm looking for, so I can expands my research please?

  • Generally, "rhythm-based" might work... Rare to find styles of music for which there is only rhythmic variation. – user45266 Feb 11 at 18:19
  • 1
    You are possibly making something new. The "sound" as you put it has a pitch or other vibrational quality then that would not be binary but part of a continuum. If you don't care what pitch is being played then just turn your device on and off as you state and that is nothing but rhythm. – ggcg Feb 11 at 18:22
  • It's very common in music to have a part that simply needs to be triggered at a particular time, but I'm confused what this question has to do with notation? You could look up "How to notate rhythm on a single-line staff", or "single-line percussion notation", but I'm not sure why you need any notation to make what you describe happen... – topo morto Feb 11 at 18:32
  • 1
    I recommend you look into a standard format like MIDI files, which store musical events (pitch, loudness, and duration), each tagged with a timing offset. For a non-pitched instrument you'd just ignore the pitch value and treat all pitches the same. This is how commercial sequencers do it. If you use the standard format you'll be able to import all kinds of songs. – John Wu Feb 13 at 1:57
6

In music we generally don't think in terms of absolute duration, but more about relative durations. I've made a small notation example to illustrate (no pitch, only rhythm):

enter image description here

We generally divide music into measures (also known as bars) which divide the music into segments of equal duration. This example contains 5 such measures, divided by vertical lines, which I've numbered.

At the very beginning of the music you will see the time signature (the two fours stacked on top of each other). This tells us that each measure of this piece of music will be equal to four so-called quarter notes (this is the most common time signature, you've probably heard someone count to four along with a piece of music).

In the first measure this is exactly what you see: four quarter notes. Every measure needs to equal this duration, but music would be very boring if every note was the same length. In the second measure we instead have two half notes - since one half is equal to two quarters, two half notes are the same as four quarter notes, and this measure satisfies the 4/4 time signature. The same principle applies to measure three, which contains a single whole note, which alone accounts for a full measure.

To perform these three measures you would repeatedly count to four (maintaining an even rhythm) and for the first measure you would clap/sing on every beat: 1 2 3 4. For measure two, count to four again, but since the half notes take up two quarter notes each, you would only clap on beats 1 and 3: 1 2 3 4 (if you're were playing/singing a note, you would let it ring out for the full two beats). And for measure three you would again count to four, but since the whole note takes up the full measure, you only clap on beat one: 1 2 3 4 (again, a sung note would ring for the full four beats, but that doesn't work if we're only clapping).

Apart from merely doubling the quarter note we can go the other way and divide it. In measure four you see four eight notes and eight sixteenth notes, which all add up to our signature of 4/4 (you can divide even further if you wish). If you wanted to perform this you would have to count to four, clap twice for the first two beats, and four times each for the last two; making sure that the two eight notes and four sixteenth notes are of equal duration to one quarter note each.

As you mention in your post, we also need some kind of "do nothing", which in notation we call a "rest". Measure five contains, in order, a half rest, quarter rest, eighth rest and two sixteenth rests. They each correspond to the duration of the notes we've already mentioned but tell the performer to not do anything for the affected beats. You will also notice that the rests in measure five also add up to four quarter notes.

Using these notes and rests you could thus notate a rhythmic sequence of the kind you describe in your question. You'll notice however that nowhere does it specify how long one quarter note is in terms of seconds (or milliseconds or whatever). In actual notation this is usually written somewhere in the form of "Quarter note = 100 BPM"; where BPM stands for Beats Per Minute, but if there's no such indication you can just decide for yourself how long a quarter note is (which in turn determines how fast the music will be).

In terms of programming this, I suppose you would need to determine the duration of your "base" quarter note/rest, multiply/divide that duration by factors of two to obtain your other notes and rests, and then group them together so they add up to measures of equal length (starting with 4/4 would be a good idea, but you can choose any number of notes per measure if you want). The only problem remaining is which rhythms to actually make it play, but that's up to your personal taste I suppose.

3

There is absolutely rhythm notation. In its simplest form it is just one horizontal line with vertical bar lines and notes written on the horizontal line to indicate the rhythm.

Example:

Example of single line percussion notation

Image source

  • One important thing to note is that with the OP's setup, there is a "lowest common denominator" of time, and each unit of that time must be expressly written as a note or rest. The tambourine part above would work, since every note or rest is a quarter of a measure, but the guiro part wouldn't, since the half notes/rests would have to be expressed as two quarter note/rests. Any note/rest with a duration longer than the denominator would have to be written differently for the computer. – Nuclear Wang Feb 11 at 18:56
0

The closest thing I can think of would be drum tabs, which are often written like this:

C |----|x---------------|----------------|----------------|x---------------|
H |----|--x-x-x-x-x-x-x-|x-x-x-x-x-x-x-x-|x-x-x-x-x-x-x-x-|--x-x-x-x-x-x-x-|
S |o---|----o-------o---|----o-------o---|----o-------o---|----o-------o---|
B |----|o-----o-o-----o-|o-----o-o-----o-|o-----o-o-----o-|o-----o-o-----o-|

(This is the beginning of "Light My Fire" by The Doors, taken from here).

Each line corresponds to one drum instrument (here, Crash cymbal, Hihat, Snare, Bass drum), each bar has sixteen symbols, with either a dash (nothing), or an x or an o (hit the instrument). The | indicate the beginning of the bar. (Some tabs are written in eights instead of sixteenths, but the idea is the same).

This should be possible to convert to instructions for your "instrument". Connect multiple of these instruments, with different pitches and other variations of the beep, and voila, you've got a self-rolled drum computer.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.