aboutsummaryrefslogtreecommitdiffhomepage
path: root/midi.lua
AgeCommit message (Collapse)AuthorFilesLines
2023-09-29added Stream:CCrel() for interpreting relative CC controllers (for instance ↵Robin Haberkorn1-4/+51
encoders) * currently, this does only support two's complement encoding of signed 7-bit integers
2023-09-26Stream:CC14() added, Stream:CC() outputs normalized values, got rid of ↵Robin Haberkorn1-39/+63
Stream:ccscale() * Stream:CC14() allows reading 14-bit CCs (split over two 7-bit MIDI messages). It's actually capable to handle regular 7-bit controllers just fine. The question is whether we still need a distinction between Stream:CC() and Stream:CC14(). Stream:CC14() has a slight overhead, but only when actually receiving MIDI messages. * Stream:CC14() and Stream:CC() output values normalized to [-1,+1] now. We actually never made use of raw CC values and the scaling can be done only once whenever a matching MIDI message is received, so the runtime overhead is irrelevant. * This means we could also get rid of Stream:ccscale() now. Just use Stream:scale() from nowon. * Use Stream:scan() now whenever relying on previous values. That way, you can often avoid having to keep an accumulator variable in the closure.
2023-09-13added LDoc documentationRobin Haberkorn1-23/+145
* gives a useful overview of everything supported right now * especially the type documentation is useful, as these things are not self-evident in Lua (because of dynamic typing). * The LDoc page can later be published as the Github pages of the project. This can even be done automatically by a Github action. However, we should first make sure that it's okay to publish the project before defending the thesis since Github pages will always be public even for private repositories. * Documentation of command-line parameters is lacking (TODO). * It may be possible to use types like "Stream(number)" to describe streams of numbers. The LDoc documentation mentions boxed types. Perhaps there can even be Streamable(number)? * We are also lacking good example programs and/or introductory material.
2023-09-05replaced math.pow(x, y) with x^yRobin Haberkorn1-1/+1
2023-09-05MIDI stuff has been moved into midi.luaRobin Haberkorn1-0/+239
* common definitions are now in midi.h