Music library for use with streams

I would like to write programs that play music (audio or midi or even clear tones will be fine)

But I would like to use it with streams, a stream reproduces sound, and another stream reproduces another sound.

  • Themes 1 * Can reproduce pure tones with different intensities and frequencies (to form a more complex shell, creating a “timbre” of sound).
  • Themes 2 * Stream group 1 can play different notes in a given timbre (to form chords from an instrumental sound)
  • Themes 3 * Stream Group 2 can play chords in different notes (to represent the musician)
  • Themes 4 * Thread Group 3 Can Become an Orchestra! =)

The tough part here, I think, is that I want to output different sounds at the same time, preprocessing, which will be a typical way, but if the combination of sound can be done live, it will become really more interesting.

Any ideas, experiences, libraries or information will help, thanks in advance!

+3
source share
6 answers

, . . , , , ( , ), ( - ), , , ( 16- , -32767 +32768). .

- :

#ts = A clock, in eg, seconds, passed in to your calls for generation purposes.
sample = sum([notefunc(ts) for notefunc in notes])
#Now convert the sample to whatever format needed for your media lib
#Update notes array

... 44100 /. , - . . , (~ 2000 233 G3 Powerbook), , .

+5

, GStreamer. "", . . , "".

manual. 10 . ( .)

, , midi.

+2

jMusic, , . links . [ ; .]

hth, R

+1

, . , . - , .

+1

JFugue. .

As an experiment, I adapted the existing Piano module , which also uses JFugue.

+1
source

Source: https://habr.com/ru/post/1795772/


All Articles