jeapostrophe / srpnt

srpnt - synthesized, random pulse, noise, and triangle (wip)
Other
6 stars 1 forks source link

Some examples of "manual" compositions? #2

Closed cwebber closed 4 years ago

cwebber commented 4 years ago

I assume it's possible to use this library to enter in manual compositions. More or less, "can this be used kind of like chiptune tracker software, but entering in music through code instead"?

However I'm not really sure how to get started. It would be fun to play with. I don't suppose you would mind showing a small code snippet, even one that just extrapolates an auto-generated tune into something that looks like something that someone might hand-enter as code?

jeapostrophe commented 4 years ago

There's no examples like this or documentation for how to do it. But, I can roughly describe what you'd do...

Call (play-one! (compile-song c n)) like https://github.com/jeapostrophe/srpnt/blob/master/srpnt/dev.rkt#L229-L233

c and n are the composition and the NEStration, their parts are here --- https://github.com/jeapostrophe/srpnt/blob/master/srpnt/band.rkt#L38-L43 --- or you could look at their constructors --- https://github.com/jeapostrophe/srpnt/blob/master/srpnt/bithoven.rkt#L370 and https://github.com/jeapostrophe/srpnt/blob/master/srpnt/nestration.rkt#L77

Roughly a composition is something like "120 bpm; accents on the 2nd beat; ABA; where A is (...measures...) and B is (...measures...)", then a NEStration is the set of instruments and the key. The weirdest thing is probably that the composition measures are in an abstract key that is then transposed by the NEStration. For example, the composition says "Play the 3rd note in the key, 1 octave up from the base" and the NEStration says "The key is C Minor and the base octave is 4."

cwebber commented 4 years ago

Thanks, that's useful! I consider that enough information to get experimenting. Thanks! :)

If I think there's a way I can contribute some "manual examples" I'll reopen this.