Hey hey,
I want to record MIDI into a sequencer application, using RtMidi. My
understanding is:
inside that application's tracks events are directly stamped with delta
times, measured in ticks, since the last event in that track. Internally
the sequencer runs a clock at a high rate (480PPQ or higher).
It's probably best to "quantise" events to that internal clock while
they are recorded. So the track object, with its connected MIDI input
device, must be linked to the clock, which will wake up, whenever it is
time for a tick. Linked meaning there must be some way to exchange relevant
info (one of them owning a reference, callback, shared data, ...)
If that basic, and simplified, principle is sound. Which solutions have
been proven feasible to achieve that? For example: make every active
track a thread and have a global mutex? Each track registers a callback
function with the clock to store events. ...?
RtMidi's input object (RtMidiIn) offers to register a callback function,
that will be called with a received MIDI message, when input is
available. Such messages could be stored in a container and be delivered
when it's tick time. -- So again, a track might own a reference to the
Clock thread object and query the current tick count since the last
record start command and use that information to calculate the correct
delta. Not sure though, whether that might raise issues with execution
times. Using an atomic variable as a tick counter will avoid having to
use mutex locks, at least.
Is there any practical advice? Something based on experience? A good
read?
Best wishes and thanks,
Jeanette
--
* Website: http://juliencoder.de - for summer is a state of sound
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
* Audiobombs: https://www.audiobombs.com/users/jeanette_c
* GitHub: https://github.com/jeanette-c
But now I'm stronger than yesterday <3
(Britney Spears)
Hey hey,
how is a logarithmic curve usually programmed in a DAW or sequencer? Do you
scale the values of (log1) to log(2) to the desired range and stretch it over
time? Do you ajudst steepness by either using more less of the log function or
changing both values like log(20) to log(21)?
I'm sure there are many ways to do it, but I'd assume that there are a few
"classic" ways to approach this with anything from controller "automation" to
envelope curve settings to ...
I'd appreciate any hints or simple examples from software practise.
Best wishes and thanks,
Jeanette
--
* Website: http://juliencoder.de - for summer is a state of sound
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
* Audiobombs: https://www.audiobombs.com/users/jeanette_c
* GitHub: https://github.com/jeanette-c
Baby, take the time to realize
I'm not the kind to sacrifice <3
(Britney Spears)
Hello all,
What exactly is meant by a linear or exponential tempo change ?
Is the tempo a lin/exp function of time, or of score position ?
A bit of algebra leads to this:
Let
t = time (seconds)
p = score position (beats)
v = tempo (beats / second) [1]
We have
v = dp / dt # by definition
If v is a linear function of t, then
v (p) = square root of a linear fuction of p
If v is a exponential function of t, then
v (p) = a linear function of p
if v is a linear function of p then
v (t) = an exponential function of t
If v is an exponential function of p, then
v (t) = inverse of a linear function of t
So there is plenty of room for confusion...
[1] Using SI units :-)
Ciao,
--
FA
Hey hey,
I'm experimenting with c++ trying to program something nice for MIDI. I'm now
experimenting with clocks, using both the standard c++ chrono library and the
boost chrono library. My example program sets a desired delta between ticks of
250ms. I see that there is a difference, since Boost chrono can also use
pthread thread parameters foor realtime scheduling and priorities.
With the standard chrono and thread library my ticks are usually out by
anything between 150.000 to 290.000 nanoseconds. Using boost a tick is out
anything between 110.000 to 124.000 nanoseconds. Yes, much better. But,
assuming that I correct the drift, does it make a difference for MIDI
instruments?
I know one of my MIDI instruments with a clock sync'able delay can be rather
touchy with MIDI clocks, but are there good estimated guidelines experience
values how precise ticks should be?
Best wishes and thanks for any help,
Jeanette
--
* Website: http://juliencoder.de - for summer is a state of sound
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
* Audiobombs: https://www.audiobombs.com/users/jeanette_c
* GitHub: https://github.com/jeanette-c
Top down, on the strip
Lookin' in the mirror
I'm checkin' out my lipstick <3
(Britney Spears)
Hello all,
Just hours after the release of zita-resampler-1.10.0 yesterday,
a new bug was reported, not in the library but in the zresample
application.
This is now fixed in 1.10.1
Ciao,
--
FA
Up till now I used Kwrite, but in recent versions this now only supports split
views and tabs, and no longer new views in a new window.
Separate windows in my preferred style, and I find I can work much faster and
more accurately that way.
Does anyone know of a text editor that still does this?
I've not been able to identify anything on the usual search engines, nor with
Wikipedia :(
--
Will J Godfrey {apparently now an 'elderly'}
https://willgodfrey.bandcamp.com/http://yoshimi.github.io
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.