Fixes and Other Ideas from Stan Preston (stazed)
Chris Ahlstrom
2016-06-06 to 2016-09-18


Date: Sat, 19 Mar 2016 13:55:24 -0500
From: Stan Preston <sspresto10@hotmail.com>
To: ahlstromcj@gmail.com
Subject: sequencer64
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101
        Thunderbird/38.6.0

Hello Chris,

It seems that seq24 has become very popular lately!

FYI, last November I began reviving seq42, the fork of seq24 that began in
2010 by Sam Brauer.

https://github.com/Stazed/seq42

In working with the program I noticed some bugs, some of which were imported
from seq24 and still existed in the current version.  I also got carried away
and started adding some enhancements to seq24 that I found useful. To get to
the point... this happened :)

https://github.com/Stazed/seq24

There are many enhancements, bug fixes, some refactoring etc.  I tried to keep
the original design purpose of simplicity as well as live performance in mind
when making the changes.

Of special interest:

- fixed jack master to work, it now loops and starts on left frame

  CA Note: Is this what we want in all circumstances?  It would be nice
  to continue where the playback stopped, if the Pause button/key is
  pressed.

- from the seq24 TODO, added note listen on paint and move notes in the seqroll
- refactored the menu so it will not conflict with the live keybinding - added
  off button!

There are many other items, see the changelog, commits.

About a week ago I came across your sequencer64 project and was very impressed
and humbled!  I confess that I have already used some of your code...

I wanted to let you know in case any of my stuff could be of help to you since
your project has already been of help to me.

FYI, I have no formal training in programming, just a part time hobby that I
picked up recently from taking some online tutorials. In part, my work on
seq42/seq24 was a learning experience and also served to make the projects
more useful to me.

Thank you again for the work on sequencer64, the documentation is very
helpful.

Emulation is the sincerest form of flattery!

Stan (AKA Stazed)




Date: Mon, 6 Jun 2016 13:50:34 -0500
From: Stan Preston <stazed10@gmail.com>
To: ahlstromcj@gmail.com
Subject: Re: Fwd: Re: sequencer64
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101
        Thunderbird/38.8.0

Hey Chris,

Please note the email address change.

Also, I recently changed the project to a new name to avoid confusion:

https://github.com/Stazed/seq32

Re:

"I'm going to assume that the superlooper fix for JACK that I used is correct,
like yours, unless you tell me otherwise.  If it isn't quite right, I would
love feedback on that."


Check out the recent 6/5/2016 commits in seq32.  I wrote a lengthy explanation
about an obscure bug that occurs when using qjackctl in master mode.  I checked
it out on sequencer64 and it does also occur.  I also removed the new position
change stuff because I do not see any need for it. It seems to me that all the
timebase callback is     doing, is calculating BBT info to send to jack based
on pos.frame. It does not seem to matter if the position changes... and it
seems a lot easier and cleaner. This might not work with the superlooper method
of "Calculations are made by increments and decrement in a while loop."

To create the obscure bug... set sequencer64 to master, then start jack
rolling.  In qjackctl hold down the > > (fast forward) button for a while and
watch the BBT display.  Try the < < button as well.  If you pay close attention
you will see a brief flash of some very large numbers that are obviously wrong
due to the zero (or junk) value of pos.frame_rate sent when new_pos = TRUE;

"what is your setup process for the seq24 build?"

I'm not sure of anything special. Using ubuntu-studio 14.04 and simply pulled
the original seq24 from bzr which I compile using their configure. I'm still a
noob about all that, make, cmake, configure, etc...... Maybe you could tell
me!! :)

"What is the set_chord() feature?  That looks intriguing."

Select a chord type from the drop down, then add a note to the seqroll. It will
auto paint the whole chord. Oops, I noticed that I failed to give LMMS
credit... that's where the idea and some code came from.

"Also, can you explain more about the listen button?"

Did you mean "note listen"?

If so...  Connect to a synth, and paint or move a note on the seqroll. It will
play!!!  This was one of my proudest achievements!!! Or at least the most
fulfilling.  Thanks for asking! :) If not...  ??

Anything you can use you are welcome to...

Stazed

PARTIAL CHANGELOG:

commit 8978a3efc65c97f1f5ab52d10f9050943ce21909
Author: Stazed <Stazed@mapson.com>
Date:   Mon Jun 6 18:32:12 2016 -0500

    Fix obscure freeze on rapid toggle start/stop.

commit cc2cbe69a7b663d72aa84cb7375cff0a18b0fbd9
Author: Stazed <Stazed@mapson.com>
Date:   Sun Jun 5 12:51:02 2016 -0500

    Cleanup jack_timebase_callback() - unnecessary calculations.

commit 9e1b286f033c9aa5887327d503a7bcfdd30d0123
Author: Stazed <Stazed@mapson.com>
Date:   Sun Jun 5 12:41:44 2016 -0500

    Use initial m_jack_frame_rate for all internal calculations to fix jack_timebase_call_back()
    BBT calculations and for consistency.
    Add note of explanation.

commit fad310707c5cdbd9edb4528f64cc30d1332ca509
Author: Stazed <Stazed@mapson.com>
Date:   Wed Jun 1 22:13:43 2016 -0500

    Fix jack beat_type to use user selected bw instead of hard code of 4.
    Set tempo/BBT to always use from internal amounts, not jack.
    Add a note of explanation.

commit 6dabbeaae764066f039a8036f293df0769a5ac8a
Author: Stazed <Stazed@mapson.com>
Date:   Tue May 31 22:45:09 2016 -0500

    Remove redundant position_jack() call in output_func().
    Remove redundant frame position call in jack_sync_callback().

commit 002069a2f4d96d5a0c284acd8bde1b8a6ee996bd
Author: Stazed <Stazed@mapson.com>
Date:   Sun May 29 22:16:28 2016 -0500

    Fix multiple position_jack() calls on master looping.

. . .

commit f94fc237955158af3c05b784477b85d55d0d04e4
Author: Stazed <Stazed@mapson.com>
Date:   Fri Mar 11 19:43:48 2016 -0600

    Set menus non-sensitive when global_is_running.
    Set song button non-sensitive when global_is_running.
    Remove global_is_running checks on key press and jack toggles no longer needed.

commit 360bedcdba308d8b946b96d82171575774eae70b
Author: Stazed <Stazed@mapson.com>
Date:   Fri Mar 11 15:19:06 2016 -0600

    Set Jack buttons to insensitive when global_is_running.
    Re-write menu tooltip.
    Cleanup.

commit dc2681f76071456492010f4687f5c5b4971638a1
Author: Stazed <Stazed@mapson.com>
Date:   Thu Mar 10 23:04:35 2016 -0600

    refactor seqroll auto scroll - sequencer64 method

commit 50ac457724fbb69f1e49d252e2c61cbc197fab1f
Author: Stazed <Stazed@mapson.com>
Date:   Sun Mar 6 20:25:15 2016 -0600

    Don't mix the build system with the target platform
    from seq24 trunk Sebastien Alaiwan, commit #147

. . .

commit b06af04c913240ecd36cfb96848410103453c877
Author: Stazed <Stazed@mapson.com>
Date:   Sun Mar 6 19:46:23 2016 -0600

    Use std::vector to store sysex messages.
    Use 'auto' on comparison.
    from seq24 trunk Sebastien Alaiwan, commits #143, #144

. . .

commit 0b9c5026cef420651c762f68c430eae758322ad8
Author: Stazed <Stazed@mapson.com>
Date:   Mon Jan 25 20:04:59 2016 -0600

    fix "dirty hack" space bar press on focused buttons
    optimize code for !mark_selected() - stop redraw
    cleanup

commit 63b1771c5757eb3063c6e8788b2af874aef4e885
Author: Stazed <Stazed@mapson.com>
Date:   Sat Jan 23 15:16:37 2016 -0600

    fix start from perfedit to always start in song mode
    cleanup - remove start_playing() stop_playing() from perfroll - never called
    rename global_jack_start_mode to global_song_start_mode
    change command line message for renaming

. . .

commit 1d76c3de5cd3187d146f81161e209eda9e78a42a
Author: Stazed <Stazed@mapson.com>
Date:   Fri Jan 15 19:22:38 2016 -0600

    add move notes with cursor keys: left/right move to snap: shift left/right move to tick : ctrl left/right move transport line to grid.
    fix unnecessary pushes to undo when nothing selected in mark_selected().

. . .

commit afc7ecc969173ab6f3079dcf325d7698efa59165
Author: Stazed <Stazed@mapson.com>
Date:   Sun Jan 3 23:11:56 2016 -0600

    remove song mode buttons from options
    add position_jack() to startup to stop flicker

commit 991255ca12b6867dc32e99ddf2bc5e689edf98ab
Author: Stazed <Stazed@mapson.com>
Date:   Sun Jan 3 20:11:30 2016 -0600

    remove position_jack() from start_playing() and clean up code

commit 55988dee62de75bd13071ee7c0b8d09d807018c4
Author: Stazed <Stazed@mapson.com>
Date:   Sun Jan 3 15:08:38 2016 -0600

    fix bbt jack calc

. . .

commit 91e7890f80d59f17e01b8c81193f3d458bc17137
Author: Stazed <Stazed@mapson.com>
Date:   Fri Jan 1 22:52:07 2016 -0600

    fix jack master mode

. . .

commit 1c6a5afc2f64f0f7f938c368e8d5ee387e10a979
Author: Stazed <Stazed@mapson.com>
Date:   Sat Dec 26 13:19:02 2015 -0600

    add listen to notes on draw/move seqroll

commit 0d84b568b6a20c5feebd9e8752e62a5480d0b762
Author: Stazed <Stazed@mapson.com>
Date:   Wed Dec 23 12:55:46 2015 -0600

    add song mode toggle button to main window

commit 17ba6c3a33cb6924ae0a72ed24fe3f0a417ff926
Author: Stazed <Stazed@mapson.com>
Date:   Mon Dec 21 19:22:13 2015 -0600

    add lfo window to seq undo

commit efbb03d06a314fde53c490f0aef21961d8df40bf
Author: Stazed <Stazed@mapson.com>
Date:   Mon Dec 21 15:27:59 2015 -0600

    add lfo-window
    thanks to Mattias Lasersköld - Seq42

. . .

commit 9b8a856e95a5abb3e10f1ef10a55a9593dc1bac8
Author: Stazed <Stazed@mapson.com>
Date:   Tue Nov 10 19:21:45 2015 -0600

    seqedit enhancements

    	From the seq42 fork - now dead??
    	thanks to Sam Brauer

    	new functions to expand or compress patterns (doubling or halving timing of selected pattern)
    	new actions to select notes on even or odd beats (1/4, 1/8 or 1/16)
    	new event value randomize function

    	lower bpm minimum from 20 to 5 (please!)
    	got rid of a few magic numbers for consistency


----------------
 JACK
----------------

Date: Sat, 11 Jun 2016 19:29:46 -0500
From: Stan Preston <stazed10@gmail.com>
To: Chris Ahlstrom <ahlstromcj@gmail.com>
Subject: Re: Fwd: Re: sequencer64
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101
        Thunderbird/38.8.0

jack,jack,jack....

Well, first let me explain how I think it works. From what I can tell, there is
only one difference between jack master and jack slave. The master gets it is
jack_timebase_callback() called and gets to send to jack BBT (and other) info.
Any client, master or slave can send position changes and start/stop messages.
It appears that the BBT is largely ignored by all other time-line based DAWs or
sequencers (that I checked - non-timeline, qtractor).

Seq24, and as imported into sequencer64 are the exceptions... and it does not
work.

From my 6/01 commit:

   If another jack client is supplying tempo/BBT info that is different from
   seq42 (as Master), the perfroll grid will be incorrect. Perfroll uses
   internal temp/BBT and cannot update on the fly. Even if seq42 could support
   tempo/BBT changes, all info would have to be available before the transport
   start, to work. For this reason, the tempo/BBT info will be plugged from the
   seq42 internal settings here... always. This is the method used by probably
   all other jack clients with some sort of time-line. The jack API indicates
   that BBT is optional and AFIK, other sequencers only use frame & frame_rate
   from jack for internal calculations. The tempo and BBT info is always
   internal. Also, if there is no Master set, then we would need to plug it
   here to follow the jack frame anyways.

You can test the last sentence on sequencer64. Start qjackctl and look at the
BBT display before any other client is attached. It will show -.-.--- . No
master is set. Now start sequencer64 and set as slave. The qjackctl display
should still show blanks. Press start in sequencer64 or qjackctl and the
transport will start rolling but sequencer64 will freeze. This is the same
behavior that occurred in the original seq24. It is because seq24 is trying to
use BBT queried from jack in the output_func() that does not exist. This
behavior was imported into sequencer64 and I have seen a number of complaints
over the years in forums about the seq24 inconsistent behavior. This is
probably why.

You can also try this same test with other programs such as non-timeline,
qtractor are the ones I checked. Since these (and probably all) of the other
time-line based programs set themselves as master, you have to replace them
with another master such as sequencer64, last one attached wins. Then
disconnect sequencer64 from jack. Check qjackctl for the blanks to be sure that
you have no master set. Now start the transport. The other programs follow,
obviously using their own internal tempo/BBT using jack frame and frame_rate
only from jack. You can hook up several different programs in this way, remove
the master, and if they all have the same internal tempo/BBT set, they will run
perfectly in sync. You can also change transport positions with these programs
when rolling, as well as from qjackctl and they will still stay in sync.

What this all means to me is that as far as time-line type programs are
concerned, BBT from jack is just pretty, but superficial display in qjackctl.
It is not necessary for them to sync when received from jack. Other type
programs, the only one I can think of is klick, do use BBT.

Try this test with klick. Set sequencer64 up as master, and klick running.
Start the transport rolling then change on the perfroll the beats per bar.
klick wo not adjust. Sequencer64 is not resetting the beats per bar when changed
internally? Is the button callback connected? Try this same test with seq32 and
klick adjusts to the new beats per bar. klick will not work when no master is
set.

For the jack_timebase_callback():

   All I did was strip out the calculations regarding new position changes and
   always use internal tempo/BBT. It seems to me that as far as tempo/BBT is
   concerned, the only thing that matters is jack frame and frame_rate. Just
   use internal tempo/BBT on all calculations. Your calculations in timebase
   callback seem to work (might be overkill), except for using pos->frame_rate.
   If the client sending a position change uses jack_transport_locate(), then
   they are only sending jack frame position and no BBT.

The perhaps overkill...

Your conditional:

        if (new_pos || ! (pos->valid & JackPositionBBT))

and seq24 original version:

          if (state_last == JackTransportStarting && state_current ==
            JackTransportRolling )

Why is this needed? Obviously seq24s callback did not work regardless of the
check, but why bother??  You get a new jack frame or the transport sends one,
and calculate BBT to plug into pos->.  And by the time jack slow sync catches
up and changes to JackTransportRolling you are a number of cycles past new_pos
anyway. I suspect this check may be necessary for something like klick or
perhaps sooperlooper?(I have not used) that are not time-line based? klick
adjusts to changes in beats per measure (probably tempo also). Maybe
sooperlooper as well?  I just took this stuff out and it seems to work with
everthing I tested including klick.

Onward...

   position_jack()
   jack_transport_reposition()
   jack_transport_locate()...

This is were I was concerned about seq32.  See my latest commits from last
night, I mean morning 4:11 am.  Let me expain :)
The changes I made in seq32 are just my personal preferences.

The original seq24 did this in position_jack()

    if ( m_jack_running ){
        jack_transport_locate( m_jack_client, 0 );
    }
    return;

Obviously just started at 0 frame position. It was only called when seq24
started the transport rolling from various different locations that I remember
and was a really ugly complicated mess that took me many hours to decipher. I
finally concluded that everything should be called from a single perform
start_playing(). I think you did something similar. nightmares!

Anyway regarding position_jack(). As you know, there was the code after the
above return that was never used. My guess is that the seq24 team decided to
follow Rob Buses original plan of a minimalist sequencer for LIVE performance
only. Jack repositions hesitate because jack waits for slow sync clients to
catch up, thus making repositions useless in a live setup. They just abandoned
any running position changes and if synced to jack, just start at 0.

It is this issue that I deviated from the original seq24. I used seq24 as a
sort of creative experimental looping tool, for editing. Not for live
purposes... yet?? Because it is more of an editor for me, I wanted seq32 master
to change position, loop in sync with other programs. If you just want
sequencer64 for live purposes, then jack_position() is not needed. But, I
suspect since you added the second performance editor, and the event editor,
that you want better editing capabilities.

So, to explain what I did for seq32 as of last night...

The set_left_frame() stuff worked but really, really, really ugly.

The actual transport reposition calculations/BBT in position_jack() that were
NOT used were actually very close. The problem with them was... I can not think
of the correct programming term... the variable size was too small... the
calculations were truncated?? They also hard coded beats_per_bar and beat_type
to 4.

The below calculation is where the problem was. I replaced this with
set_left_frame() which calculated m_left_frame.

Before:

    pos.frame = (jack_nframes_t) ( (current_tick * rate * 60.0)
            / (pos.ticks_per_beat * pos.beats_per_minute) );

Now:

    uint64_t tick_rate = ((uint64_t)m_jack_frame_rate * current_tick * 60.0);
    long tpb_bpm = ticks_per_beat * beats_per_minute;
    uint64_t jack_frame = tick_rate / tpb_bpm;

The only real difference between the before calculation above and the one that
calculated m_left_frame in set_left_frame() was I separated things and added a
few more casts to uint64_t and stored them in uint64_t to stop the
truncation. It was really ugly looking... but I think it calculated
correctly... well at least I did not find it to be wrong... :) I removed
set_left_frame() and m_left_frame last morning.

I moved the set_left_frame() calc back into position_jack() and commented out
all the BBT stuff, and replaced jack_transport_reposition() with
jack_transport_locate(). The difference is that jack_transport_locate() just
sends the frame position, NOT BBT. And it works...

From my note:

    This jack_frame calculation is all that is needed to change jack position
    The BBT calc below can be sent but will be overridden by the first call to
    jack_timebase_callback() of any master set. If no master is set, then the
    BBT will display the new position but will not change even if the transport
    is rolling. I am going with the KISS (keep it simple stupid) rule here.
    There is no need to send BBT on position change - the fact that the
    function jack_transport_locate() exists and only uses the frame position is
    proof that BBT is not needed!

The reason that I decided to dump BBT on position change altogether is the part
about sending BBT when there is no master set. If you do this with klick
connected and hit the precise position change it will cause the "click" to
play, endlessly loudly... also, the unchanging BBT displayed in qjackctl could
be confusing to users.  You don't want to send BBT position info if there is no
master, and it gets immediately overridden by any master's timebase callback.
Seems useless to me.  I left the BBT code (uncommented) in in case I am wrong.

Previous position_jack() used set_left_frame() which was hard coded to use
m_left_tick. The last commit of last morning I added a new feature that I
previously added in seq42.

FYI almost everything done to seq32 is cut and paste from seq42. I use the two
programs interchangeably and want the features to be the same.

This new feature required the tick be passed into position_jack(). m_left_tick
is the left tick marker in the perfroll as you know. Currently, this is also
how I get jack to loop.. call position_jack() which repositions to the left
tick in output_func when m_looping or when called from start_playing().
Instead of only positioning to m_left_tick, it now accepts a tick variable and
then can adjust to any position. The new feature is one "filched" from
non-timeline which allows the user to adjust the position on the perfedit to
the mouse pointer with key-p. The mouse must be focused on the perfroll.  In
seq42 I also added FF and rewind buttons that use it also.

If you do not want the key-p type position change, then m_left_tick can be hard
code.

To summarize how things work now in seq32:

The "nightmare" that was replaced with perform::start_playing(), and the added
buttons of "song mode" on the mainwnd and jack sync (xpm) in the perfedit were
done for consistency. The original seq24....... could drive a person to...
learn programming!

I was going to try to explain all the variations the program used to start
rolling, based on which place you pressed the space bar or whether you used the
buttons or key-binding, in mainwnd, seqroll, perfedit. And all the rules
changed if connected to jack, depending on the song/live button hidden in the

Instead I will just explain how seq32 works.

The "song mode" button was moved from the jack sync menu and now applies
always, not just for jack.

When starting from the mainwnd, seqroll(keybind), or when connected to jack and
started by the transport, when the song button is pressed it will cause the
perfedit to play. It will start at the left tick marker if in jack master mode,
and also when not connected to jack. When started from the perfedit, the song
button is ignored and ALWAYS plays the song.  When the song button is
unchecked, it will play live if started from the mainwnd and seqroll jack or
not.

The jack sync button does what it did before.. connects and disconnects jack.
I moved it to perfedit for personal preference and to be able to attach
key-binding. I also attached key-binding to the song button. This allows me to
turn both on and off from the seqroll without having to go all the way to the
file/options/jack sync menu or to the perfedit for song play.

The difference between jack master and slave:

   -  Master starts at left tick marker and will loop.
   -  Slave just starts at transport position... like sequencer64 master.
   -  When in live mode, master starts at 0. Slave continues at transport
      position.

The new key-p feature will work all cases, master, slave and when not connected
to jack. I stopped it from working if m_usemidiclock... not sure how that works
yet.

How you want sequencer64 to work with jack as master vs slave or even if you
want to have position changes is matter of preference. This is mine.
Well thats my long winded thoughts on jack. Hope it helps.

Stan

---------------------------------------------------------------

Features from seq32

   x  Chord generator
   -  LFO
   -  JACK fixes
   -  Song Mode button (in pattern editor)
   -  JACK sync toggle button (in song editor)
   -  JACK follow transport button (in song editor)
   -  Menu disable button (in pattern editor)
   -  Run-time sequence transpose (in pattern editor)
   -  Run-time song transpose (in song editor and Edit menu)
   -  F keys for song mode, jack sync toggle, menu mode, and follow transport
   -  MIDI Export song
   -  Mute/Unmute/Toggle All Tracks menu entry
   -  Tools:
      -  Select extra odd and even notes of various durations
      -  Modify time (expand and compress)
      -  Randomize event values

---------------------------------------------------------------

ate: Sun, 31 Jul 2016 12:50:02 -0500
From: Stan Preston <stazed10@gmail.com>
To: Chris Ahlstrom <ahlstromcj@gmail.com>
Subject: Re: Sequencer64 Version 0.9.15.2
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101

Re: Trigger support.

I believe there were only two things I did with triggers. First, you could
split triggers with a middle mouse button click and seq24 would cut the
trigger down the middle. I fixed the code to allow the split on the mouse
pointer location, grid snapped. This was actually a simplification of code
- just removed the calculation of trigger mid point and added the grid
snap calc.

The second issue was ctrl-c copy of selected triggers and ctrl-v paste of
triggers. Original seq24 just pasted after the selected ctrl-c trigger,
and repeated ctrl-v would continue paste after the previous paste. I added
the ability to paste to any location on the sequence track line if open.
This is done with a middle mouse click on the open track (same commit as
above) . (if you middle mouse click on a trigger, you split it :)) The
mouse click sets the location and ctrl-v will paste it via
set_trigger_paste_tick() Then the paste tick is set to -1 (none) and the
original method applies, i.e. subsequent ctrl-v will paste after the
previous paste. Middle click on a new location and it will use the new          > location for the first paste. if you paste very close to, in front of an
existing trigger that overlaps, it will overwrite and crop. Fruity method
uses middle mouse or ctrl-Left mouse click for paste location.

Oops! Just noticed I had an extra unnecessary call to
set_trigger_paste_tick() in: Seq32PerfInput::on_button_press_event() -
fixed now!:-[

Re: undo/redo:

Most of the undo/redo stuff was done to eliminate pushes to undo when
nothing actually changed or to optimize the push - perfedit. I believe the
seqdata never actually pushed to undo when changed.
For seqdata the push is held until on_leave_notify_event() occurs so that
any changes that occur on a single sweep will be all considered part of
one edit item (thus one undo).
The same applies to lfownd - just uses on_focus_out_event() instead.

When I added the sensitive/insensitive stuff it became very obvious that
undo was doing a lot of unnecessary pushes which previously seemed like
undo was broken - from a user point of view. You would often have to hit
the undo button many times before the undo occurred because useless undos
were pushed from simply clicking on an open space in the perfedit, etc.

Hope this helps!

Stan


Date: Wed, 3 Aug 2016 14:55:02 -0500
From: Stan Preston <stazed10@gmail.com>
To: Chris Ahlstrom <ahlstromcj@gmail.com>
Subject: Re: Sequencer64 Version 0.9.15.2
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
        Thunderbird/45.2.0

Re:

> Quick question.  What exactly is the Export function for?
> I thought it was to use any triggers in each sequence to export
> a reassembled standard MIDI file that would then play as if
> it were layed out in the performance editor, but no longer need
> the trigger information.

Well, that was the original intention, to be able to play it in something like
timidity, etc. After I completed things I realized that there could be an
editing benefit as well. I like to record from my midi keyboard, improvised to
a drum beat, on a long sequence (64 measures). Some is junk, but there are
usually parts that I can use. In original seq24, to cut out the good or bad
stuff, you would have to search the sequence by listening, then cut and move
or copy and paste to a new sequence. It could be done but was always tedious.
The paste box for the sequence sometimes made it difficult to find the correct
note location, measure, and beat. Also, on a long sequence, you need to zoom
out to see the copy location as it played, but zoom in for the precise paste
location. In addition if you wanted to change the measure of the notes, it
became a trial and error of copy/paste, listen, move , listen, move... etc.

With the added song editor feature of split trigger to mouse and copy paste
trigger to mouse, you can now do all the editing from the song editor. Listen
to the sequence, cut out the good or bad parts and reassemble. Move or copy
all good trigger parts to the left start and delete all the bad stuff. Now you
can use the song export to create the new sequence. Just mute all other tracks
and export. Re-import and the new cleaned sequence is already done. Also I use
it for importing drum beats from a single '32/'42 file that contains dozens of
different styles with intros and endings. I like to sync two instances of '32
or '42 together with jack, then play/experiment with the different beats. If I
find something I like, create the song trigger for the part I like in the drum
file, export and import.

I actually do not use the song export for anything but editing myself...
Stan


Just a quick add on:

The reason I left the trigger stuff in is for seq42. '42 has no mainwnd so
there is no quick visual display on import. You can see the track being added
and can open the sequence, but I prefer to see the sequence via the trigger
immediately.

Date: Fri, 5 Aug 2016 22:20:09 -0500
From: Stan Preston <stazed10@gmail.com>
To: Chris Ahlstrom <ahlstromcj@gmail.com>
Subject: Re: Sequencer64 Version 0.9.15.2
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
        Thunderbird/45.2.0

The additional snaps were put in to match the beats per measure (bar) on the
perfedit. If you have a time signature of 7/8, there is no snap to get you to
each beat. Add a trigger and move it. Zoom in so you can see where the trigger
lands. I originally added the extras before adding zoom so I didn't think I
needed more. But in looking at it now with zoom, I will add more to get half
beats on the higher beats per bar. I might also take some out - 1/40 - a 1/8
beat of 5 beats per bar or 1/4 beat of 10? - WTF was I thinking :)!

Just a heads up, the original seq24 did not save beats per bar or beat width
from the perfedit, and it seems this is imported into sequencer64.



Date: Sat, 6 Aug 2016 11:57:50 -0500
From: Stan Preston <stazed10@gmail.com>
To: Chris Ahlstrom <ahlstromcj@gmail.com>
Subject: Re: Sequencer64 Version 0.9.15.2
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
        Thunderbird/45.2.0

Actually, the seven in 7/8 is the BEAT in beats per bar. The 8 is the beat
width. So 1/8 should not snap to a beats per bar of 7. I think your zoom and
grid are OK.

Does seq32 save the perfedit beat info?

Argh! Well it did!. I originally used proprietary:

c_bp_measure = 0x24240011;

c_beat_width   = 0x24240012;

On per my ca. 7/20 change I decided to plug it into the SMF track  0, and just
assume the first track as perfedit.

I now see the error in my ways. What if there is no track 0? What if the first
sequence time signature is different from the perfedit? Stupid!

I will be reverting it back to the proprietary method.  It would be nice to
keep the midi files of '32,'42,'64 somewhat consistent since they are all
using the 0x24 ID. Since you used 11, 12, and 13 for other stuff and I changed
'32 transpose to 14 to be consistent with '64, how about beats per bar = 15
and beat width = 16 for perfedit? Unless you know of a better way of doing
it....





Date: Tue, 13 Sep 2016 13:03:15 -0500
From: Stan Preston <stazed10@gmail.com>
To: Chris Ahlstrom <ahlstromcj@gmail.com>
Subject: Re: Seq32 menu disabling
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
        Thunderbird/45.2.0

"why disabling is needed when playing"

The original seq24 had numerous conflicts between the menu key binding and the
default seq24 key binding for the mainwind sequence triggers. For example:
ctrl-q (quits the program without prompt) - If you place a sequence in the
default 'q' slot, you cannot use it with ctrl-l or ctrl-r (default replace or
queue) because the menu grabs the keys. Same goes for the alt-l or alt-r
(default snapshot 1 or 2). Try same as above with alt-f, alt-v, alt-h, ctrl-n,
ctrl-o... etc. So I just shut off all the menus by default when playing
because it seems that they should not be needed then... especially in a live
performance.

"why a button?"

On occasion I wanted to use the mainwnd key binding when stopped to set the
sequences to be ready before starting. It's also a sort of safety feature as
well, just toggle the menus off before going live so that you don't hit
ctrl-q, ctrl-n etc.. forgetting things are not playing....



# vim: sw=4 ts=4 wm=8 et ft=sh
