Re: loop mode in midish ?

From: Alexandre Ratchov <alex_at_caoua.org>
Date: Thu Apr 09 2009 - 15:06:34 CEST
On Thu, Apr 09, 2009 at 10:41:04AM +0200, Thierry Boudet wrote:
>
> hello.
>
> I've started to play with midish, and I'm searching a way to
> work in loopmode (in the style of a tr505), with say 4 measures
> so I can punch successively all the element of my drumkit.
>
> Is there a way to do that, and, if not, what is the place to
> dig in the source code ?
>

Hi, 

there's no loop mode yet.  To implement loops, the useful
code to get familiar with is:

 - state and statelist structures defined in
   state.{c,h} - they are responsible for maintaining
   the list of sounding notes the state of controllers,
   pitch bender and so on

 - seqptr structure defined in frame.{c,h} - is
   responsible for reading and writing events on
   tracks. It's the equivalent of what is the head
   to the magnetic tape.

Currently playback is very rudimentary: each track has a
seqptr structure that is reading events one-by-one from the
track and sending them to the hardware using mux_putev(),
it's implemented in song_ticplay(), which is invoked on
every clock tick.

To implement loops, two seqptr structures per track will be
necessary. While one seqptr structure plays one iteration,
the other one terminates playing the previous iteration.
This is to avoid stale notes and bogus controllers at the
loop boundaries. Basically, this will require reworking the
songtrk structure, and related code.

Last point: the code has changed a lot since the last
release, the relevant bits are on cvs or in the snapshots.

> Thx.
>
> (OpenBSD, kbd Evol mk225c, tx81z & s2000)
   ^^^^^^^
Wow!! OpenBSD MIDI users are so rare!
:) 

-- Alexandre
Received on Thu, 9 Apr 2009 15:06:34 +0200

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:20 CET