aboutsummaryrefslogtreecommitdiffhomepage
path: root/applause.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-03preliminary (broken) client forking supportRobin Haberkorn1-8/+89
2015-12-31support only LuaJIT and use some additional (insignificant) optimizationsRobin Haberkorn1-0/+8
2015-12-31fixed potential segfaults in MIDI processing & 1-based channelsRobin Haberkorn1-11/+18
* there are at most 128 different MIDI notes; mtof() will now also work for all of them * channels have origin 1 now in the public APIs. This is what most applications seem to use, so in order to avoid confusion it's probably a good idea to use it as well.
2015-12-31implemented basic support for MIDI NOTE ON/OFF eventsRobin Haberkorn1-28/+126
* MIDIVelocityStream will report the velocities on a particular note. This can be used to build polyphonic instruments. * MIDINoteStream will report all possible notes on a particular channel. The velocity of the note last triggered is also encoded into the stream values. This can be used to build simple monophonic instruments. * Map bit methods to stream methods, e.g. Stream:band() Is especially useful for streams that encode multiple values into single integers for performance reasons. * mtof() and ftom() methods for converting from and to MIDI note numbers. mtof() is very efficient since its values are all precalculated in a lookup table. * fixed tostring() method for streams smaller than 1024 samples
2015-11-04added simple support for MIDI CC commandsRobin Haberkorn1-2/+121
* MIDICCStream provides a stream of CC values as if polled from the controller (this is emulated in applause.c)
2015-11-03enforce minimum buffer size for lua<->realtime communication based on ↵Robin Haberkorn1-2/+17
jack_get_buffer_size()
2015-11-03fixed semaphore for realtime<->lua thread synchronizationRobin Haberkorn1-8/+16
2015-11-03allow Stream:play() to be interrupted by CTRL+CRobin Haberkorn1-1/+35
* more precisely, Stream:play() will now throw an error whenever the process receices SIGINT. * this allows us to interrupt long playbacks
2015-11-03ring buffer size is configurable now via ./applause command-line parameter ↵Robin Haberkorn1-9/+32
in milliseconds * default buffer size: 100ms
2015-11-03synchronize buffer access via System V semaphoreRobin Haberkorn1-10/+74
* allows the Lua thread to block when the ringbuffer is full while keeping the realtime thread (jack_process()) realtime-safe. Hopefully :-) * since audio generation is usually faster than consumption (if you don't want to have buffer underruns), this fixes audio generation longer than BUFFER_SIZE (currently 1s)
2015-11-03report buffer underrunsRobin Haberkorn1-6/+23
2015-04-11stop garbage collector temporarily during play()Robin Haberkorn1-1/+16
This improves the real-time properties of sample generation since it avoids CPU spkikes. On the other hand, this may not be ideal as playing a long streams could have non-constant space requirements now. A proper solution would probably involve calling the garbage collector incrementally during the play() loop.
2015-04-11added custom interactive Lua interpreter for evaluating applause expressionsRobin Haberkorn1-0/+274
* implements Stream:play() using Jack as the audio backend