11

I would like to create a chord using multiple instruments. This started as an attempt to explain music to a friend but my curiosity has taken over. I am familiar with the SoundNote function.

I know that SoundNote can create a chord using the same instrument:

Sound[SoundNote[{"C4", "G3"}, 1, "Harpsichord"]]

And it can create a series of notes with different respective instruments:

Sound[{SoundNote["C", 0.5`, "Oboe"], SoundNote["G", 0.5`, "SynthVoice"], SoundNote["C5", 0.5`, "Organ"]}]

What I'm wondering is if there is a way to play more than one sound with specific notes at the same time.

Andrew Brēza
  • 327
  • 1
  • 6

1 Answers1

12

This example in Documentation exactly answers your question. You just need to specify overlapping time intervals. Lets expand your specific case. Below after every second a new instrument will come in and they will all end at the same time.

Sound[{SoundNote["C", {0, 4}, "Oboe"], 
       SoundNote["G", {1, 4}, "SynthVoice"], 
       SoundNote["C5", {2, 4}, "Organ"], 
       SoundNote["E3", {3, 4}, "VoiceAahs"]}]

enter image description here

Vitaliy Kaurov
  • 73,078
  • 9
  • 204
  • 355