defaultxr / cl-patterns

Library for writing patterns to generate or process (a)musical sequences of mathematically (un)related (non-)compound values in Lisp.
https://w.struct.ws/cl-patterns
MIT License
77 stars 10 forks source link

Special Key 'Set' is not implemented yet. Is this still true? #46

Closed cianoc closed 7 months ago

cianoc commented 7 months ago

From the special keys documentation it says:

set - NOTE: Not implemented yet. Only set the parameters of a synth; don’t start or stop any notes.

Is this still true. And if it is, what would it take to address this? This doesn't seem like it would be a particularly difficult problem to solve, and given I need this functionality I was wondering if this would be a simple thing to do?

Or is there some architectural issue here that I'm missing?

defaultxr commented 7 months ago

Specifying :type :set won't do anything, but the same effect can be achieved by specifying the synth whose parameters you want to change as the :instrument. So for example, instead of :instrument :bass_sound, something like:

(defparameter *bass* (synth 'bass))

(pbind :instrument *bass*
       :midinote (pwhite 0 127))

I should probably update that part of the docs to mention that. Thanks for pointing it out, and let me know if that suggestion doesn't achieve what you're going for.

defaultxr commented 7 months ago

It looks like :type :set is implemented for the alsa-midi backend, but all it does there is skip sending the note on/note off messages, while still sending CC messages.

cianoc commented 7 months ago

No that absolutely works and seems better/more flexible, at least for my purposes.

The ALSA midi behavior does make a lot of sense and I can see myself using that.