How to play a set of frequencies (Chords) at the same time with javax.sound.sampled package

前端 未结 3 527
深忆病人
深忆病人 2021-02-11 08:50

I am trying to implement a system where I give a set of frequencies to be played at once, currently can play each frequency individually. Below I have a code, that plays the giv

3条回答
  •  我在风中等你
    2021-02-11 08:53

    In this example, Tone opens a single SourceDataLine for each Note, but you can open as many lines as there are notes in your chord. Then simply write() each Note of the chord to a separate line. You can create an arpeggio effect by using Note.REST.

提交回复
热议问题