ahlstromcj / sequencer64

A major reboot of Seq24. Current release 0.97.0 (2021-05-13), native JACK MIDI, Song recording, playlists, and a Windows/Qt version. For fresher code, see the Seq66 project. Note that trigger and mute-group-in-MIDI-file formats have evolved! Back up your work!
GNU Affero General Public License v3.0
236 stars 28 forks source link

midi control out #58

Open georgkrause opened 7 years ago

georgkrause commented 7 years ago

Is there any possibility to have midi outputs for the controls? i want to "print" the state of the patterns to my apc mini.

georgkrause commented 7 years ago

@ahlstromcj you saw this?

ahlstromcj commented 7 years ago

Yes, still tied up, merged Jack support to master but going to soccer game now. So much to think about!

On Feb 22, 2017 5:12 PM, "Georg Krause" notifications@github.com wrote:

@ahlstromcj https://github.com/ahlstromcj you saw this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahlstromcj/sequencer64/issues/58#issuecomment-281821622, or mute the thread https://github.com/notifications/unsubscribe-auth/AHnVqKXlKUi0ukmrJZTzW-1RANhg24Prks5rfLLqgaJpZM4L71sy .

georgkrause commented 7 years ago

so i assume it isnt possible right now? just wanted to ask if i oversee something ;)

georgkrause commented 7 years ago

btw: buildung the new master right now to test the midi stuff, bug reports are on the way. have fun at your game @ahlstromcj

ahlstromcj commented 7 years ago

If you can, try to track down a "programming", "midi", or reference manual for that device. Apparently AKAI does publish a MIDI sheet for it, that I can tell. Thanks!

georgkrause commented 7 years ago

i can send it later. but wouldnt it be better to built something which works for more controllers?

ahlstromcj commented 7 years ago

I hope they all have the same mappings (like General MIDI), otherwise it could become a bit involved.

muranyia commented 7 years ago

I think mappings differ from device to device. They'll have be set up in the usr file.

georgkrause commented 7 years ago

i see it like @muranyia, all those controllers have specific mappings. my apc mini sends note on/off instead of control changes, so we need a system like the midi mapping for incoming midi ;)

arnaud-jacquemin commented 7 years ago

That feature would be awesome for controllers like the APC mini or Novation's Launchpad.

@ahlstromcj I don't think there is a standard. Here is the spec for the Launchpad : https://d19ulaff0trnck.cloudfront.net/sites/default/files/novation/downloads/10529/launchpad-mk2-programmers-reference-guide-v1-02.pdf

ahlstromcj commented 7 years ago

So much to think about for this little project :-) Work life very hectic.

Starting to work on updating sequencer64-doc for the new JACK support.

igorangst commented 6 years ago

Any news on this feature? I was going to request the same functionality, since I am planning to build my own midi controller matrix using an Arduino platform. I am ready to contribute to the implementation if I manage to understand the code base, and if someone can point me to the right place to put this feature.

georgkrause commented 6 years ago

Would be interested too. Maybe just add another "table" in the rc file like for the inputs to define what is going to be send on a specific event?

muranyia commented 6 years ago

Guys, in the meantime, you can use mididings to build a script that feeds back to your controller.

igorangst commented 6 years ago

@muranyia I have used mididings to do similar stuff in the past. However, for a decent interaction with a controller such as lighting up the buttons corresponding to the active tracks, this script would have to be aware of the mute groups. For one-shot, I don't see any possibility without integration directly inside sequencer64.

@georgkrause Yes, this would be the right place to describe the midi event configuration. But I am rather wondering where in the source code to put this feature. Reading (and understanding) other people's code is not so easy...

mxmilkiib commented 6 years ago

Potentially integration via the openAV-Ctlra library might be worth considering?

@ahlstromcj - good luck with your exam on Friday! do ignore us for the now ;)

georgkrause commented 6 years ago

@muranyia this would only work if only one controller is setting the clip state, but would be possible (+ the mentioned mute groups)

@igorangst i think if you ask @ahlstromcj he would be happy to answer this question ;) it might be an good idea to create a new class since the output of midi control data is not implemented at all at the moment. but i never looked at the code of sequencer64

igorangst commented 6 years ago

OK, I took some time to have a more serious look into the source code. I think I can come up with a first implementation to spit out MIDI events that notify a controller of some interesting things happening. At this time, I could only test this with a small Akai MPD pad, which takes NOTE ON/OFF events to light up the pads. Also, I would like to know, which kind of events should be notified. So, please give me some feedback on these two points:

1) What kind of MIDI events are needed?

2) What should be notified?

Thanks for your feedback!

georgkrause commented 6 years ago

@igorangst great! Maybe i van jump in and help out a little.

  1. How about copying the midi in method of seq64? There you can set the midi status byte and the two data bytes and using this you could display nearly every possible midi message.

  2. The aim should be to let the controller display states and notify it when a state is changed. So i would list some stuff I need display:

    • patterns state (on apc mini maybe blinking of queued, but later...)
    • Queue mode state
    • Replace mode state
    • Is something stored in snapshot 1/2
ahlstromcj commented 6 years ago

Glad to hear someone is interested in doing this! I'm still wrapped up trying to get the Qt build in decent shape.

One thing to make sure is to let the perform object do the work. I've been trying to migrate as much functionality as possible out of the user interface.

If you feel up to it, stick all the functionality into a class the perform can use, and perhaps leverage the sequence class. Just tossing out ideas.

Anyway, keep us posted. Nice to get some additional help! I don't have any MIDI pad to test on :-(

-------- Georg Krause 16:59 Tue 27 Mar --------

[1]@igorangst great! Maybe i van jump in and help out a little.

 1. How about copying the midi in method of seq64? There you can set the midi status byte and the two data bytes and using this you could display nearly every possible midi message.

 2. The aim should be to let the controller display states and notify it when a state is changed. So i would list some stuff I need display:

* patterns state (on apc mini maybe blinking of queued, but later...)
* Queue mode state
* Replace mode state
* Is something stored in snapshot 1/2

— You are receiving this because you were mentioned. Reply to this email directly, [2]view it on GitHub, or [3]mute the thread.

Reverse link: [4]unknown

References

Visible links

  1. https://github.com/igorangst
  2. https://github.com/ahlstromcj/sequencer64/issues/58#issuecomment-376599111
  3. https://github.com/notifications/unsubscribe-auth/AHnVqK_cD6hRLLtxcdSBP_GVYqo12twiks5tinAEgaJpZM4L71sy
  4. https://github.com/ahlstromcj/sequencer64/issues/58#issuecomment-376599111

-- Your talents will be recognized and suitably rewarded.

igorangst commented 6 years ago

Hi, I started working on this feature. You can check out the branch midictrlout in my fork.

To enable the feature, run ./configure --enable-midictrlout

For the moment, the midi control output is hard wired to output port 15 (this will be moved to the configuration). In the sequencer64.rc file, there is a new section [midi-control-out]. For now, there is only feedback on sequence state. For each sequence, you can set up four events with the typical syntax (e.g. [1 0 144 36 127] for enabled: note on event with pitch 'C' and 127 velocity). The four events are sent on arm, mute, queue, and delete, respectively. For now, there is 32 rows (hardwired, will be made variable). Also, all events are wrt the absolute sequence number, so no support for swapping the screen set. Anyway, this is just the start, and it works fine for me :-)

Please give me your feedback. Any bugs?

What should be the behavior for swapping screen sets? 1) None, use absolute sequence numbers 2) Reflect visible screen set (display in sync with the seq64 window) 3) Refresh only on setting the playing screen set

There are more events coming:

ahlstromcj commented 6 years ago

Great news! I will check it out ASAP and give you some feedback. If you can, provide a poop-sheet that describes what-to-do and what you'd see. I don't yet have a MIDI pad, so I can't really try it out. If you're familiar with Doxygen, you can make a *.dox file in doc/dox and add it to the INPUT value in doxy-notes.cfg. Your call.

I am going to be checking a new configure.ac into the qt5_reconcile branch; it was adding gtkmm as a dependency of the non-GUI libraries.

Anyway, I gotta cool off from my bike ride, get some food. :-)

-------- Igor Angst 20:30 Tue 03 Apr --------

Hi, I started working on this feature. You can check out the branch midictrlout in my fork.

To enable the feature, run ./configure --enable-midictrlout

For the moment, the midi control output is hard wired to output port 15 (this will be moved to the configuration). In the sequencer64.rc file, there is a new section [midi-control-out]. For now, there is only feedback on sequence state. For each sequence, you can set up four events with the typical syntax (e.g. [1 0 144 36 127] for enabled: note on event with pitch 'C' and 127 velocity). The four events are sent on arm, mute, queue, and delete, respectively. For now, there is 32 rows (hardwired, will be made variable). Also, all events are wrt the absolute sequence number, so no support for swapping the screen set. Anyway, this is just the start, and it works fine for me :-)

Please give me your feedback. Any bugs?

What should be the behavior for swapping screen sets? 1) None, use absolute sequence numbers 2) Reflect visible screen set (display in sync with the seq64 window) 3) Refresh only on setting the playing screen set

There are more events coming:

  • Queue modifier
  • One shot modifier
  • Replace modifier
  • Play, Stop, Pause
  • Snapshot 1/2 active
  • What else?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/sequencer64/issues/58#issuecomment-378387662

-- Good night to spend with family, but avoid arguments with your mate's new lover.

ahlstromcj commented 6 years ago

Haven't had time to look at much, just a couple quick comments before I head to work. First, it would make your new files easier to read if you piped them through "expand --tabs=8" to get rid of the tabs.

Second, you could make an overload to midi_control_out::set_seq_event() to accept the int array directly so that

event ae, be, ce, de;
if (a[0])
{
    ae.set_channel(a[1]);
    ae.set_status(a[2]);
    ae.set_data(a[3], a[4]);
    mctrl->set_seq_event(i, midi_control_out::seq_action_arm, ae);
}

becomes simply

 mctrl->set_seq_event(i, midi_control_out::seq_action_arm, a);

I.e. let that function deal with the details.

Anyway, if I get too overbearing let me know. I will try a build tonight, or at worst, this weekend. Thanks!

-------- Igor Angst 20:30 Tue 03 Apr --------

Hi, I started working on this feature. You can check out the branch [1]midictrlout in my fork.

To enable the feature, run ./configure --enable-midictrlout

For the moment, the midi control output is hard wired to output port 15 (this will be moved to the configuration). In the sequencer64.rc file, there is a new section [midi-control-out]. For now, there is only feedback on sequence state. For each sequence, you can set up four events with the typical syntax (e.g. [1 0 144 36 127] for enabled: note on event with pitch 'C' and 127 velocity). The four events are sent on arm, mute, queue, and delete, respectively. For now, there is 32 rows (hardwired, will be made variable). Also, all events are wrt the absolute sequence number, so no support for swapping the screen set. Anyway, this is just the start, and it works fine for me :-)

Please give me your feedback. Any bugs?

What should be the behavior for swapping screen sets?

 1. None, use absolute sequence numbers  2. Reflect visible screen set (display in sync with the seq64 window)  3. Refresh only on setting the playing screen set

There are more events coming:

* Queue modifier
* One shot modifier
* Replace modifier
* Play, Stop, Pause
* Snapshot 1/2 active
* What else?

— You are receiving this because you were mentioned. Reply to this email directly, [2]view it on GitHub, or [3]mute the thread.

Reverse link: [4]unknown

References

Visible links

  1. https://github.com/igorangst/sequencer64/tree/midictrlout
  2. https://github.com/ahlstromcj/sequencer64/issues/58#issuecomment-378387662
  3. https://github.com/notifications/unsubscribe-auth/AHnVqDIjThoCscXuTec054KkkbPldJWwks5tk9vegaJpZM4L71sy
  4. https://github.com/ahlstromcj/sequencer64/issues/58#issuecomment-378387662

-- Debian Hint #27: Regularly verify your backups. You are keeping backups, right? Right? If not, start with tar(1) or dump(1).

muranyia commented 6 years ago

@igorangst Thank you for picking this up. I'd prefer messages tied to the current screen set, and refresh when changed. Using a 8x8 AKAI APC MINI, willing to test!

ahlstromcj commented 6 years ago

+ignoangst: Igor, I will be looking into merging your code soon. Finishing up loading Cakewalk WRK files first, in the qt_reconcile branch. Also see jfrey-xx's note above

igorangst commented 6 years ago

Hi, I didn't have time recently to get on with the midi output code, since I was working on my personal seq64 fancy RGB illuminated arcade button controller board :-)

img_20180626_223743

There are still some bits and bytes missing, and I had some very bad crashes while testing, which I did not chase down. I hope to get on with debugging in two weeks or so.

mxmilkiib commented 6 years ago

I've just realised having MIDI out of pattern status comes very close to solving something I've been mulling for a while now; how could one use sequencer64 patterns to control MIDI/audio routing in conjunction with Carla, its internal plugins, and the few do-one-thing MIDI filter collections like midifilter.lv2 & Piz MIDI.

What I would like to do is have a "Drum parts" set with single-instrument-of-percussion drum patterns that combine well when they are all turned on. *

Then a "Drum instruments" set with patterns that, when turned on, would "send" the drum MIDI to one instrument plugin, so there could be an "alvdrums black" pattern, an "alvdrums red" pattern, maybe some for some for drum soundfonts, so I can easily switch or layer up the sound. *

The "control" patterns could be blank, but turning them on and off, with the new MIDI control out feature, would send a MIDI event that could be utilised to automate the MIDI routing plugins in Carla.

* This example is a simple picture; I would actually send parts out on different MIDI channels so MIDI effects can be applied separately to each, and this would be controlled similarly with a "Drum MIDI FX" set (with like "MIDI delay", "Probabilistic drop", etc. patterns.) that would appear after the parts set and before the instruments set. I'd then also have a "Drum Audio FX" set, and then repeat with sets for non drum parts.

I say very close because it would require the output of set change details out so as to automate the automation of the automation, or something like that :)

(Previously I had tried patterns full of CCs which made things slow and plugins unstable, and notes-the-length-of-a-pattern don't just come on if the pattern is activated half-way through)

mathiasfriman commented 5 years ago

First, kudos for a great software, it has almost everything I need! :)

I've tried @igorangst fork just now, configured it with

./configure --enable-midictrlout

I'm aiming at triggering some patterns/sequences with my novation Launchpad Pro. I have been able to use the [midi-control] for a 8x4-grid and an 8x8 grid using mididings, but the [midi-control-out] resets itself to all zeroes [0 0 0 0 0 0] on all 0-31 fields when i quit seq64 if my data looks like this:

0 [0 0 0 0 0] [0 0 0 0 0] [0 2 144 81 16] [0 0 0 0 0] [..] 31 [0 0 0 0 0] [0 0 0 0 0] [0 2 144 58 16] [0 0 0 0 0]

It had to do with me not enabling (on/off-ing) the entries. When I put a 1 to enable the entries, they do not reset.

To send flashing green when queued I should use a row like

0 [0 0 0 0 0] [0 0 0 0 0] [1 2 144 81 16] [0 0 0 0 0]

where 2 is the MIDI-channel that is mandatory for getting the button to blink. However, when I quit seq64 the 2 is gone. I see that the control out is hardwired to MIDI-channel 15, where can I change this in the code?

This is really the only thing left - in an otherwise great (!!) piece of software - that stops me from using it in a live setting. I'm happy to test, however I'm not a C-developer..

igorangst commented 5 years ago

Hi, I confirm that there is a problem with inactive entries not being saved and thus being reset to 0. It has been some time that I worked on this, and I'm really happy that there is somebody out there ready to give it a try with a real piece of hardware. I will try and fix this as soon as I can spare some time. It is quite possible that I didn't implement the channel, since I only use channel 1 in my hardware. As far as I remember, 15 is the number of the (ALSA/Jack) output and does not refer to the MIDI channel.

mathiasfriman commented 5 years ago

Awesome! I'll change the m_buss(2) parameter in libseq64/src/midi_control_out.cpp back to m_buss(15) then. Wingin' it a bit... :)

If I may make a wish list it would be to have the grid on the Launchpad Pro reflect the grid in Sequencer64, maybe with some sort of translation table between the default colors in Seq64:

That would (in my mind at least) allow for e.g. setting a 3-color scheme for the controllers that does not have full RGB-color LEDs, just by adjusting the color codes. Also, I would not use the Red and Green colors (why, I hope will be apparent below), and may want to translate them into some other colors instead.

I would also like Sequencer64 to mimick the behaviour of the Launchpad when used with Ableton Live (which I have never done, just seen videos). That means that

Stopping these requires a send of a (MIDI-Ch 1, NoteOn, Pad XX, Color) to the Launchpad Pro.

It is also possible to light several LEDs with a single SysEx-message on the Launchpad Pro, further detailed in the programmers reference but that might not be a way forward for other controllers, so maybe it's best to stick with MIDI messages.

Also, the pad note numbers seems to vary wildly even within the Launchpad family of controllers...

mathiasfriman commented 5 years ago

I'm starting seq64 with the -j option to connect it to JACK transport and use JACK midi, not ALSA.

If in Sequencer64 I open a sequence and select MIDI Output Bus "[0] 0:0 seq64:system midi_playback_1" and MIDI channel 1, 2 or 3 and connect that bus/port in Qjackctl to the writable/input port "system: midi_playback_2" I can light up the LaunchPad Pro buttons by playing/sending MIDI notes to it.

However, I can't get anything to light up using the Launchpad Pro triggering patterns. They queue up and start playing, but not a single indication on the LPPro.

Do I have to connect some ports in JACK to get it to work, or how do I go about it?

ahlstromcj commented 5 years ago

I'm not sure. Unfortunately I don't have a Launch Pad. But I will investigate further when I get home from work today.

On Thu, Jun 6, 2019, 11:32 mathiasfriman notifications@github.com wrote:

I'm starting seq64 with the -j option to connect it to JACK transport and use JACK midi, not ALSA.

If in Sequencer64 I open a sequence and select MIDI Output Bus "[0] 0:0 seq64:system midi_playback_1" and MIDI channel 1, 2 or 3 and connect that bus/port in Qjackctl to the writable/input port "system: midi_playback_2" I can light up the LaunchPad Pro buttons by playing/sending MIDI notes to it.

However, I can't get anything to light up using the Launchpad Pro triggering patterns. They queue up and start playing, but not a single indication on the LPPro.

Do I have to connect some ports in JACK to get it to work, or how do I go about it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahlstromcj/sequencer64/issues/58?email_source=notifications&email_token=AB45LKE5AFGVYVVJI2PLLODPZEUXJA5CNFSM4C7PLMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXDHP3A#issuecomment-499546092, or mute the thread https://github.com/notifications/unsubscribe-auth/AB45LKES4N6VP5YFVFUXOD3PZEUXJANCNFSM4C7PLMZA .

mathiasfriman commented 5 years ago

These lines in libseq64/src/perform.cpp:

#ifdef SEQ64_MIDI_CTRL_OUT
    if (status | c_status_queue)
        m_midi_ctrl_out->send_event(midi_control_out::action_queue_on);

and these lines of code in libseq64/src/sequence.cpp:

#ifdef SEQ64_MIDI_CTRL_OUT
    if (m_queued)
    {
        m_parent->get_midi_control_out()->send_seq_event(number(), midi_control_out::seq_action_queue);

only get executed when I quit seq64, not when queueing the various sequences during play.

Maybe I'm not doing something right? As I said previously, I'm just guessing here to try to find something that seems to have a bearing on what I'm trying to accomplish..

igorangst commented 5 years ago

Thanks for the feedback. By "get executed" I suppose you mean that the messages only make it out to the Launch Pad when you quit seq64. I guess this is related to the fact that the MIDI output bus needs a flush. I could not figure out why this is the case, it seems to depend on the underlying MIDI implementation. Maybe @ahlstromcj knows more about this. Can you try the following:

The functions send_(seq)_event have an optional boolean argument, telling it to flush the bus after sending. So change the code snippets to if (status | c_status_queue) m_midi_ctrl_out->send_event(midi_control_out::action_queue_on, true); and m_parent->get_midi_control_out()->send_seq_event(number(), midi_control_out::seq_action_queue, true);

mathiasfriman commented 5 years ago

Tried this, and that doesn't do the trick. :(

I've set a number of printf statements in the various files just after the #ifdef SEQ64_MIDI_CTRL_OUT lines. It doesn't print regularly. It's like it doesn't even enter the #ifdef SEQ64_MIDI_CTRL_OUT conditionals until it bursts a number of the printf-statements in a random fashion without any discernable pattern.

This is probably not the best way to do this, but I'm not much of a programmer.. :/ So this is what got printed after starting seq64:

[..]
Input ports (9):
  [0] 0:0 system:midi_playback_1
  [1] 0:1 system:midi_playback_2
  [2] 0:2 system:midi_playback_3
  [3] 0:3 system:midi_playback_4
  [4] 0:4 system:midi_playback_5
  [5] 0:5 system:midi_playback_6
  [6] 0:6 system:midi_playback_7
  [7] 0:7 system:midi_playback_8
  [8] 0:8 system:midi_playback_9
Output ports (5):
  [0] 0:0 system:midi_capture_1 
  [1] 0:1 system:midi_capture_2 
  [2] 0:2 system:midi_capture_3 
  [3] 0:3 system:midi_capture_4 
  [4] 0:4 system:midi_capture_5 

[JACK sync enabled]
[JACK sync still enabled]
[JACK sync still enabled]

After a while, all these printf statements come in one single burst, triggered by what? I don't know. I've tried to show where I've put the print statements with the syntax - path/to/file: row

Sending play midi control - libseq64/src/sequence.cpp: 4802
Sending midi control event action queue on - libseq64/src/perform.cpp: 5517
MIDI CTRL OUT defined - libseq64/src/sequence.cpp: 1032
queued out - libseq64/src/sequence.cpp: 1035
Sending play midi control - libseq64/src/sequence.cpp: 4802
MIDI CTRL OUT defined
queued out
Sending play midi control
MIDI CTRL OUT defined
queued out
Sending play midi control
MIDI CTRL OUT defined
queued out
Sending play midi control
MIDI CTRL OUT defined
queued out
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
MIDI CTRL OUT defined
queued out
Sending play midi control
MIDI CTRL OUT defined
queued out
Sending play midi control
Sending midi-control-event queue off - libseq64/src/perform.cpp: 5553
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play midi control
Sending play m

And there it stops for quite some time..

As an example, in the file libseq64/src/perform.cpp on row 5553 it looks like this:

#ifdef SEQ64_MIDI_CTRL_OUT
    if (status | c_status_queue)
        printf("Sending midi-control-event queue off");
        m_midi_ctrl_out->send_event(midi_control_out::action_queue_off);

In libseq64/src/sequence.cpp in sequence::toggle_queued ():

#ifdef SEQ64_MIDI_CTRL_OUT
    printf("MIDI CTRL OUT defined");
    if (m_queued)
    {
        printf("queued out");
        m_parent->get_midi_control_out()->send_seq_event(number(), midi_control_out::seq_action_queue, 1);

Nothing is lit on the launchpad when the burst comes.

EDIT: To be clear, I get no feedback whatsoever from the midi-control-out to the Launchpad Pro from Sequencer64, from when I start the software to the time i quit/exit.

ahlstromcj commented 5 years ago

Mathias, can you send me or post your [midi-control-out] configuration section? I am "merging" igorangst's midi-control-out code into Sequencer64 on a branch called "midi_control", and want to be sure I understand the setup as completely as possible.

Thanks!

Chris

-------- mathiasfriman 12:27 Tue 04 Jun --------

First, kudos for a great software, it has almost everything I need! :)

I've tried [1]@igorangst fork just now, configured it with

./configure --enable-midictrlout

I'm aiming at triggering some patterns/sequences with my novation Launchpad Pro. I have been able to use the [midi-control] for a 8x4-grid and an 8x8 grid using mididings, but the [midi-control-out] resets itself to all zeroes [0 0 0 0 0 0] on all 0-31 fields when i quit seq64 if my data looks like this:

0 [0 0 0 0 0] [0 0 0 0 0] [0 2 144 81 16] [0 0 0 0 0] [..] 31 [0 0 0 0 0] [0 0 0 0 0] [0 2 144 58 16] [0 0 0 0 0]

It had to do with me not enabling (on/off-ing) the entries. When I put a 1 to enable the entries, they do not reset.

To send flashing green when queued I should use a row like

0 [0 0 0 0 0] [0 0 0 0 0] [1 2 144 81 16] [0 0 0 0 0]

where 2 is the MIDI-channel that is mandatory for getting the button to blink. However, when I quit seq64 the 2 is gone. I see that the control out is hardwired to MIDI-channel 15, where can I change this in the code?

This is really the only thing left - in an otherwise great (!!) piece of software - that stops me from using it in a live setting. I'm happy to test, however I'm not a C-developer..

— You are receiving this because you were mentioned. Reply to this email directly, [2]view it on GitHub, or [3]mute the thread.

References

Visible links

  1. https://github.com/igorangst
  2. https://github.com/ahlstromcj/sequencer64/issues/58?email_source=notifications&email_token=AB45LKBUVN7BAKJBLAJ37RTPY263LA5CNFSM4C7PLMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW5TULQ#issuecomment-498809390
  3. https://github.com/notifications/unsubscribe-auth/AB45LKDKQRD7QBBMCYAA6PDPY263LANCNFSM4C7PLMZA

-- It is a wise father that knows his own child. -- William Shakespeare, "The Merchant of Venice"

mathiasfriman commented 5 years ago

Great news Chris! Sorry for the late reply, but I'm in Sweden, GMT+2 so I have saturday morning now...

Igors fork is a couple of changes behind master so that's a bit of a nuisance when switching between them, since the rc-files are not 100% backwards compatible and tend to overwrite each other.. :)

I've attached my rc below. Here's what happens when I start seq64 with it (using ALSA midi this time to see if it made a difference. It didn't.):

Reading rc configuration /home/mathias/.config/sequencer64/sequencer64.rc]
[set_seq_event] 0 0
[set_seq_event] 0 1
[set_seq_event] 0 2
[set_seq_event] 1 2
[set_seq_event] 2 2
[set_seq_event] 3 2
[set_seq_event] 4 2
[set_seq_event] 5 2
[set_seq_event] 6 2
[set_seq_event] 7 2
[set_seq_event] 8 2
[set_seq_event] 9 2
[set_seq_event] 10 2
[set_seq_event] 11 2
[set_seq_event] 12 2
[set_seq_event] 13 2
[set_seq_event] 14 2
[set_seq_event] 15 2
[set_seq_event] 16 2
[set_seq_event] 17 2
[set_seq_event] 18 2
[set_seq_event] 19 2
[set_seq_event] 20 2
[set_seq_event] 21 2
[set_seq_event] 22 2
[set_seq_event] 23 2
[set_seq_event] 24 2
[set_seq_event] 25 2
[set_seq_event] 26 2
[set_seq_event] 27 2
[set_seq_event] 28 2
[set_seq_event] 29 2
[set_seq_event] 30 2
[set_seq_event] 31 2
filter-by-channel off
[Reading user configuration /home/mathias/.config/sequencer64/sequencer64.usr]
[JACK server already started]
[JACK client:uuid is seq64_transport:24]
[JACK sync slave]
15 rtmidi ports created:
Input ports (6):
  [0] 0:1 system:announce (system)
  [1] 14:0 Midi Through:Midi Through Port-0
  [2] 20:0 Launchpad Pro:Launchpad Pro MIDI 1
  [3] 20:1 Launchpad Pro:Launchpad Pro MIDI 2
  [4] 20:2 Launchpad Pro:Launchpad Pro MIDI 3
  [5] 133:0 KMidimon:KMidimon
Output ports (9):
  [0] 14:0 Midi Through:Midi Through Port-0 
  [1] 20:0 Launchpad Pro:Launchpad Pro MIDI 1 
  [2] 20:1 Launchpad Pro:Launchpad Pro MIDI 2 
  [3] 20:2 Launchpad Pro:Launchpad Pro MIDI 3 
  [4] 128:0 TiMidity:TiMidity port 0 
  [5] 128:1 TiMidity:TiMidity port 1 
  [6] 128:2 TiMidity:TiMidity port 2 
  [7] 128:3 TiMidity:TiMidity port 3 
  [8] 133:0 KMidimon:KMidimon 

[JACK sync enabled]
[JACK sync still enabled]
[JACK sync still enabled]

Maybe that's indended, but I can't see an output midi control out port that I can connect the LaunchPad Pro to. Is seq64 suppose to handle this internally?

sequencer64.rc.txt

ahlstromcj commented 5 years ago

Thanks for the rc file. The -c or --config option (see the man page) can change the name of the rc/usr files. Also see --rc and --usr options. Just make a short cut for each version of the app.

Now back to work for me ! :-D

-------- mathiasfriman 01:44 Sat 08 Jun --------

Great news Chris! Sorry for the late reply, but I'm in Sweden, GMT+2 so I have saturday morning now...

Igors fork is a couple of changes behind master so that's a bit of a nuisance when switching between them, since the rc-files are not 100% backwards compatible and tend to overwrite each other.. :)

I've attached my rc below. Here's what happens when I start seq64 with it (using ALSA midi this time to see if it made a difference. It didn't.):

Reading rc configuration /home/mathias/.config/sequencer64/sequencer64.rc] [set_seq_event] 0 0 [set_seq_event] 0 1 [set_seq_event] 0 2 [set_seq_event] 1 2 [set_seq_event] 2 2 [set_seq_event] 3 2 [set_seq_event] 4 2 [set_seq_event] 5 2 [set_seq_event] 6 2 [set_seq_event] 7 2 [set_seq_event] 8 2 [set_seq_event] 9 2 [set_seq_event] 10 2 [set_seq_event] 11 2 [set_seq_event] 12 2 [set_seq_event] 13 2 [set_seq_event] 14 2 [set_seq_event] 15 2 [set_seq_event] 16 2 [set_seq_event] 17 2 [set_seq_event] 18 2 [set_seq_event] 19 2 [set_seq_event] 20 2 [set_seq_event] 21 2 [set_seq_event] 22 2 [set_seq_event] 23 2 [set_seq_event] 24 2 [set_seq_event] 25 2 [set_seq_event] 26 2 [set_seq_event] 27 2 [set_seq_event] 28 2 [set_seq_event] 29 2 [set_seq_event] 30 2 [set_seq_event] 31 2 filter-by-channel off [Reading user configuration /home/mathias/.config/sequencer64/sequencer64.usr] [JACK server already started] [JACK client:uuid is seq64_transport:24] [JACK sync slave] 15 rtmidi ports created: Input ports (6): [0] 0:1 system:announce (system) [1] 14:0 Midi Through:Midi Through Port-0 [2] 20:0 Launchpad Pro:Launchpad Pro MIDI 1 [3] 20:1 Launchpad Pro:Launchpad Pro MIDI 2 [4] 20:2 Launchpad Pro:Launchpad Pro MIDI 3 [5] 133:0 KMidimon:KMidimon Output ports (9): [0] 14:0 Midi Through:Midi Through Port-0 [1] 20:0 Launchpad Pro:Launchpad Pro MIDI 1 [2] 20:1 Launchpad Pro:Launchpad Pro MIDI 2 [3] 20:2 Launchpad Pro:Launchpad Pro MIDI 3 [4] 128:0 TiMidity:TiMidity port 0 [5] 128:1 TiMidity:TiMidity port 1 [6] 128:2 TiMidity:TiMidity port 2 [7] 128:3 TiMidity:TiMidity port 3 [8] 133:0 KMidimon:KMidimon

[JACK sync enabled] [JACK sync still enabled] [JACK sync still enabled]

Maybe that's indended, but I can't see an output midi control out port that I can connect the LaunchPad Pro to. Is seq64 suppose to handle this internally?

[1]sequencer64.rc.txt

— You are receiving this because you were mentioned. Reply to this email directly, [2]view it on GitHub, or [3]mute the thread.

References

Visible links

  1. https://github.com/ahlstromcj/sequencer64/files/3268340/sequencer64.rc.txt
  2. https://github.com/ahlstromcj/sequencer64/issues/58?email_source=notifications&email_token=AB45LKCBCJRNM3A3NOQIJ53PZNWQFA5CNFSM4C7PLMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXHQT2Q#issuecomment-500107754
  3. https://github.com/notifications/unsubscribe-auth/AB45LKBFN4ELLPP7VQLLXJDPZNWQFANCNFSM4C7PLMZA

-- Think twice before speaking, but don't say "think think click click".

igorangst commented 5 years ago

@ahlstromcj I have some uncommitted work in progress on my fork. If you give me a day, I will try and get it up to date with the upstream repo...

ahlstromcj commented 5 years ago

@igorangst I did find a couple of bugs, I think, in the midi_control_out.cpp file:

  1. In midi_control_out::get_event_str(), the function should not return ("[0 0 0 0]") if the action is disabled. I would do that only if the "what" parameter is bad. If the action is disabled, we still need to preserve the event's values.

  2. Similary, in midi_control_out::set_event(), even if the event action is disabled, the event parameter's should still be written (including the "false" action status).

I would guess you've already found and fixed these potential issues. But, if you believe they are not issues, let us know.

I've been adding your code, slightly refactored (only slightly because you've done a good job of encapsulation), to the "midi_control" branch of Sequencer64. I hope you don't mind. I will further refactor it (just like I refactored the rest of the app) in an upcoming Sequencer66 upgrade (not yet published to GitHub).

Anyway, thanks for basically writing this requested feature for Sequencer64.

Chris

igorangst commented 5 years ago

OK, good to hear you made a branch in your repo. If you are interested, the fixes for the bugs you mentioned (plus variable number of sequences for midi output) are included in the latest commit on my fork: https://github.com/igorangst/sequencer64/commit/97e67722b925dba76854b51168d81f04b0432f16

mathiasfriman commented 5 years ago

Hi again!

Forgive a n00b, but I've tried Chris' branch and compiled with --enable-midictrlout. I can still play/queue clips from the Launchpad using the [midi-control] section. My [midi-control-out] section on the other hand, looks a bit strange, and the pads continue to be unlit. It also contains only four numbers per bracket. When i quit seq64, some code seem to autogenerate the settings of [midi-control-out] into different numbers every time.

Second run:

0 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1]
1 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1]
2 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1]
3 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1]
4 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1]

Third run:

0 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1]
1 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1]
2 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1]
3 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1]
4 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1]

Fourth run:

0 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1]
1 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1]
2 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1]
3 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1]
4 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1]

All 32 rows look the same after each run.

On another note, shouldn't there be something like the MIDI Input dialog also for MIDI Control Out? Would definitely help me, atleast. :)

seq64-midi-input

I may be really daft, but is there some way to monitor that the midi-control-out-messages are sent from Seq64? I've connected all ports (ALSA as well as JACK) to Kmidimon or Gmidimonitor, but I can't see anything on those ports. Is it supposed to be handled internally in some way?

ahlstromcj commented 5 years ago

To tell you the truth, I am still working this feature. I haven't seen the issue above, once I fixed a couple of bugs. But again, I'm still working on it. I don't have a launch pad, but I can send the control output to a software synth. Not sure if I will get to it tonight. Tired :-)

On Sun, Jun 9, 2019, 17:25 mathiasfriman notifications@github.com wrote:

Hi again!

Forgive a n00b, but I've tried Chris' branch and compiled with --enable-midictrlout. I can still play/queue clips from the Launchpad using the [midi-control] section. My [midi-control-out] section on the other hand, looks a bit strange, and the pads continue to be unlit. It also contains only four numbers per bracket. When i quit seq64, some code seem to autogenerate the settings of [midi-control-out] into different numbers every time.

Second run:

0 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1] 1 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1] 2 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1] 3 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1] 4 [0 0 0 112] [2 16 0 18] [15 16 123 2] [0 0 0 1]

Third run:

0 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1] 1 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1] 2 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1] 3 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1] 4 [0 0 112 32] [2 16 0 18] [15 16 112 2] [0 0 0 1]

Fourth run:

0 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1] 1 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1] 2 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1] 3 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1] 4 [0 112 32 16] [2 16 0 18] [15 16 7 2] [0 0 0 1]

All 32 rows look the same after each run.

On another note, shouldn't there be something like the MIDI Input dialog also for MIDI Control Out? Would definitely help me, atleast. :)

[image: seq64-midi-input] https://user-images.githubusercontent.com/3397596/59164413-bab80000-8b0c-11e9-8729-c041818cfe93.png

I may be really daft, but is there some way to monitor that the midi-control-out-messages are sent from Seq64? I've connected all ports (ALSA as well as JACK) to Kmidimon or Gmidimonitor, but I can't see anything on those ports. Is it supposed to be handled internally in some way?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahlstromcj/sequencer64/issues/58?email_source=notifications&email_token=AB45LKBXAPDIY6GNKSEQCYDPZVYN7A5CNFSM4C7PLMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXISSPA#issuecomment-500246844, or mute the thread https://github.com/notifications/unsubscribe-auth/AB45LKELZENFXUCN2M6LTELPZVYN7ANCNFSM4C7PLMZA .

ahlstromcj commented 5 years ago

Actually, I did get up the energy to fix a few more MIDI control out issues in the midi_control branch. I have not yet investigated the queue issue.

Muting and arming seq 0 with a setup to emit two different notes (pitches) doesn't quite work the way I expected, but at least it does something and the *.rc file is read and saved properly.

I also added a buss value to the [midi-control-out] section. If you run it then exit, you will see the setsize and buss number:

"32 15"

I change the 15 to 1 for testing, trying to drive Yoshimi via control-out events.

ahlstromcj commented 5 years ago

Found the learn/queue bug, the "flush" parameter in send_seq_event() was defaulting to false. Cannot test right now.

mathiasfriman commented 5 years ago

Yay, progress!

So, a short story long. I've checked out the latest revision of the midi_control branch and bootstrapped:

$ git clone -b midi_control https://github.com/ahlstromcj/sequencer64.git
$ ./configure --enable-midictrlout
configure: error: cannot run /bin/bash aux-files/config.sub

$ ./bootstrap

EXTRAFLAGS = --enable-rtmidi
The Sequencer64 configure script already exists. Replacing it.
* Running project build command aclocal -I m4 --install
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
* Running project build command autoconf
* Running project build command autoheader
* Running project build command libtoolize --automake --force --copy
* Running project build command automake --foreign --add-missing --copy
configure.ac:72: installing 'aux-files/compile'
configure.ac:49: installing 'aux-files/config.guess'
configure.ac:49: installing 'aux-files/config.sub'
configure.ac:56: installing 'aux-files/missing'
Midiclocker64/Makefile.am: installing 'aux-files/depcomp'
parallel-tests: installing 'aux-files/test-driver'
! To build the documentation, you need to install graphviz.
! To build the documentation, you need to install doxygen.
Bootstrapping enabled....

Now run './configure' to configure Sequencer64 for compilation, or './configure
--help' for configuration options.  Useful options:

      --enable-debug=gdb  --disable-shared   --enable-silent-rules
      --disable-seq32jack --enable-alsamidi  --enable-rtmidi (default)
      --enable-cli (no GUI) --enable-portmidi --enable-qtmidi

$ ./configure --enable-midictrlout
[..]
some message about no such option --enable-midictrlout

So I check out another branch in a separate directory, copy that configure file to the bootstrapped directory and then run

./configure --enable-midictrlout
make

Works like a charm. :) Somebody should probably take a look at the bootstrapping procedure since it overwrites the configure file with the --enable-midictrlout option in it and replaces it with one that has none.

Next step is to try out some different options in sequencer64.rc

[midi-control-out]

#    ------------------- on/off (indicate is the section is enabled)
#    | ----------------- MIDI channel (0-15)
#    | | --------------- MIDI status (event) byte (e.g. note on)
#    | | | ------------- data 1 (e.g. note number)
#    | | | | ----------- data 2 (e.g. velocity)
#    | | | | |
#    v v v v v
#   [0 0 0 0 0] [0 0 0 0 0] [0 0 0 0 0] [0 0 0 0 0]
#       Arm         Mute       Queue      Delete

32 1 1     # screenset size, output buss, enabled (1) /disabled (0)

0 [1 1 144 81 16] [1 1 144 81 0] [1 1 144 81 12] [0 0 0 0 0]
1 [1 1 144 71 16] [1 1 144 71 0] [1 1 144 71 12] [0 0 0 0 0]

The above settings lights the pads in a green color when arming (playing) them. Setting another MIDI channel to produce blinking lights (channel 2) or pulsing lights (channel 3) does not work. Muting, turns the pads off.

If queuing is enabled, the pads light up yellow before starting (arming) or stopping (muting).

What midi output buss is, I have no idea, but it works!

So

However, when the .rc file is written after exit, the midi channel is set to 0 automatically.

0 [1 0 144 81 16] [1 0 144 81 0] [1 0 144 81 12] [0 0 0 0 0]
1 [1 0 144 71 16] [1 0 144 71 0] [1 0 144 71 12] [0 0 0 0 0]

This has the effect that the next time I start Sequencer64, it does not work.

But all in all, a big win! :) Good work, guys!

(and sorry for my incoherent rambling..)

ahlstromcj commented 5 years ago

Thanks for the report. Sound like a few nits are still running around, hope to fix by tomorrow evening EST.

On Tue, Jun 11, 2019, 16:52 mathiasfriman notifications@github.com wrote:

Yay, progress!

So, a short story long. I've checked out the latest revision of the midi_control branch and bootstrapped:

$ git clone -b midi_control https://github.com/ahlstromcj/sequencer64.git $ ./configure --enable-midictrlout configure: error: cannot run /bin/bash aux-files/config.sub

$ ./bootstrap

EXTRAFLAGS = --enable-rtmidi The Sequencer64 configure script already exists. Replacing it.

  • Running project build command aclocal -I m4 --install aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4' aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4' aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4' aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4' aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
  • Running project build command autoconf
  • Running project build command autoheader
  • Running project build command libtoolize --automake --force --copy
  • Running project build command automake --foreign --add-missing --copyconfigure.ac:72: installing 'aux-files/compile'configure.ac:49: installing 'aux-files/config.guess'configure.ac:49: installing 'aux-files/config.sub'configure.ac:56: installing 'aux-files/missing' Midiclocker64/Makefile.am: installing 'aux-files/depcomp' parallel-tests: installing 'aux-files/test-driver' ! To build the documentation, you need to install graphviz. ! To build the documentation, you need to install doxygen. Bootstrapping enabled....

Now run './configure' to configure Sequencer64 for compilation, or './configure --help' for configuration options. Useful options:

  --enable-debug=gdb  --disable-shared   --enable-silent-rules
  --disable-seq32jack --enable-alsamidi  --enable-rtmidi (default)
  --enable-cli (no GUI) --enable-portmidi --enable-qtmidi

$ ./configure --enable-midictrlout [..] some message about no such option --enable-midictrlout

So I check out another branch in a separate directory, copy that configure file to the bootstrapped directory and then run

./configure --enable-midictrlout make

Works like a charm. :) Somebody should probably take a look at the bootstrapping procedure since it overwrites the configure file with the --enable-midictrlout option in it and replaces it with one that has none.

Next step is to try out some different options in sequencer64.rc

[midi-control-out]

------------------- on/off (indicate is the section is enabled)

| ----------------- MIDI channel (0-15)

| | --------------- MIDI status (event) byte (e.g. note on)

| | | ------------- data 1 (e.g. note number)

| | | | ----------- data 2 (e.g. velocity)

| | | | |

v v v v v

[0 0 0 0 0] [0 0 0 0 0] [0 0 0 0 0] [0 0 0 0 0]

Arm Mute Queue Delete

32 1 1 # screenset size, output buss, enabled (1) /disabled (0)

0 [1 1 144 81 16] [1 1 144 81 0] [1 1 144 81 12] [0 0 0 0 0] 1 [1 1 144 71 16] [1 1 144 71 0] [1 1 144 71 12] [0 0 0 0 0]

The above settings lights the pads in a green color when arming (playing) them. Setting another MIDI channel to produce blinking lights (channel 2) or pulsing lights (channel 3) does not work. Muting, turns the pads off.

If queuing is enabled, the pads light up yellow before starting (arming) or stopping (muting).

What midi output buss is, I have no idea, but it works!

So

  • Output buss 1 works
  • Midi channel 1 on the pads work
  • Queuing, playing and stopping individual pads work.

However, when the .rc file is written after exit, the midi channel is set to 0 automatically.

0 [1 0 144 81 16] [1 0 144 81 0] [1 0 144 81 12] [0 0 0 0 0] 1 [1 0 144 71 16] [1 0 144 71 0] [1 0 144 71 12] [0 0 0 0 0]

This has the effect that the next time I start Sequencer64, it does not work.

But all in all, a big win! :) Good work, guys!

(and sorry for my incoherent rambling..)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ahlstromcj/sequencer64/issues/58?email_source=notifications&email_token=AB45LKHFAKT27YMKP5ACO4DP2AF7FA5CNFSM4C7PLMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOO5AI#issuecomment-501018241, or mute the thread https://github.com/notifications/unsubscribe-auth/AB45LKBNO6YWJ5JIYCGRTJ3P2AF7FANCNFSM4C7PLMZA .

mathiasfriman commented 5 years ago

Good to hear. Looks really promising, this feature. What a great job you're doing! :)

One thing that is still lacking, is the neat feature that reflects the "grid" of Sequencer64 on the midi controller (e.g. Launchpad). As the issue author @georgkrause put it in his initial comment ( https://github.com/ahlstromcj/sequencer64/issues/58#issue-206436475 ):

"Is there any possibility to have midi outputs for the controls? i want to "print" the state of the patterns to my apc mini."

mathiasfriman commented 5 years ago

I've used the last commit de91c4e and the midi channel output works! I can now arm, mute and queue sequences like a boss. When I queue a non playing track, the pad flashes yellow, and then turns pulsating green when playing. If I mute a playing sequence with queueing enabled, the pad pulse green and occasionally flashes yellow, until it is muted. Instant feedback.

That is so awesomely cool I can hardly keep myself from jumping up and down :)

My midi-control-out section looks a lot like this. 16 is Green, 0 is Off, 12 is yellow.

arm, mute, queue

0 [1 2 144 81 16] [1 0 144 81 0] [1 1 144 81 12] [0 0 0 0 0]
1 [1 2 144 71 16] [1 0 144 71 0] [1 1 144 71 12] [0 0 0 0 0]

Started with

./seq64 -j -t --option sets=8x8

and tested the whole 64 grid. I have some weirdness with the mute groups, but the controls work flawlessly. Good work @ahlstromcj and @igorangst :)

I find that on a grid of 8x8, one needs to check the computer screen for which pads to press since they are all unlit when not being played, regardless if they contain a sequence or not.

For displaying sequences with some MIDI data in them to work on the Launchpad Pro, sequencer64 needs to send a NoteOn (144) to MIDI channel 1 for the corresponding pad with a color value != 0

Color Midi-command
Red [1 0 144 XX 72]
Green [1 0 144 XX 76]
Yellow [1 0 144 XX 113]
Blue [1 0 144 XX 79]
Magenta [1 0 144 XX 53]
White [1 0 144 XX 3]
Dark red [1 0 144 XX 120]
Dark Green [1 0 144 XX 18]
Dark Yellow [1 0 144 XX 124]
Dark Blue [1 0 144 XX 46]
Dark Magenta [1 0 144 XX 54]
Dark Cyan [1 0 144 XX 77]
Orange [1 0 144 XX 96]
Dark Orange [1 0 144 XX 9]
OFF [1 0 144 XX 0]

If one would do this for each sequence when a new midi file is loaded or a sequence is created in the GUI, it would definitely be enough for my purposes at least. I would be more than happy with a monochrome visualization too :)

The "mute" command in [midi-control-out] in the .rc file would also need to be replaced with the above command, since it can only send one color value (= velocity). Instead of just sending [1 0 144 XX 0] for each pad, it would have to take the color value of the sequence i Sequencer64 into account when sending the mute.

But that's for another day. For now, I just want to say how grateful I am that you guys put so much effort into this wonderful piece of software! :)

ahlstromcj commented 5 years ago

Thanks! Igorangst deserves the credit for jump-starting this feature!

I'll look at the other ideas below and see what I can do. Currently, dealing with pixmaps in the seq66 project is kicking my ass.

-------- mathiasfriman 04:21 Sat 15 Jun --------

I've used the last commit [1]de91c4e and the midi channel output works! I can now arm, mute and queue sequences like a boss. When I queue a non playing track, the pad flashes yellow, and then turns pulsating green when playing. If I mute a playing sequence with queueing enabled, the pad pulse green and occasionally flashes yellow, until it is muted. Instant feedback.

That is so awesomely cool I can hardly keep myself from jumping up and down :)

My midi-control-out section looks a lot like this. 16 is Green, 0 is Off, 12 is yellow.

arm, mute, queue

0 [1 2 144 81 16] [1 0 144 81 0] [1 1 144 81 12] [0 0 0 0 0] 1 [1 2 144 71 16] [1 0 144 71 0] [1 1 144 71 12] [0 0 0 0 0]

Started with

./seq64 -j -t --option sets=8x8

and tested the whole 64 grid. I have some weirdness with the mute groups, but the controls work flawlessly. Good work [2]@ahlstromcj and [3]@igorangst :)

I find that on a grid of 8x8, one needs to check the computer screen for which pads to press since they are all unlit when not being played, regardless if they contain a sequence or not.

For displaying sequences with some MIDI data in them to work on the Launchpad Pro, sequencer64 needs to send a NoteOn (144) to MIDI channel 1 for the corresponding pad with a color value != 0

 Color       Midi-command

Red [1 0 144 XX 72] Green [1 0 144 XX 76] Yellow [1 0 144 XX 113] Blue [1 0 144 XX 79] Magenta [1 0 144 XX 53] White [1 0 144 XX 3] Dark red [1 0 144 XX 120] Dark Green [1 0 144 XX 18] Dark Yellow [1 0 144 XX 124] Dark Blue [1 0 144 XX 46] Dark Magenta [1 0 144 XX 54] Dark Cyan [1 0 144 XX 77] Orange [1 0 144 XX 96] Dark Orange [1 0 144 XX 9] OFF [1 0 144 XX 0]

If one would to this for each sequence when a new midi file is loaded or a sequence is created in the GUI, it would definitely be enough for my purposes at least. I would be more than happy with a monochrome visualization too :)

The "mute" command in [midi-control-out] in the .rc file would also need to be replaced with the above command, since it can only send one color value (= velocity). Instead of just sending [1 0 144 XX 0] for each pad, it would have to take the color value of the sequence i Sequencer64 into account when sending the mute.

But that's for another day. For now, I just want to say how grateful I am that you guys put so much effort into this wonderful piece of software! :)

— You are receiving this because you were mentioned. Reply to this email directly, [4]view it on GitHub, or [5]mute the thread.

References

Visible links

  1. https://github.com/ahlstromcj/sequencer64/tree/midi_control
  2. https://github.com/ahlstromcj
  3. https://github.com/igorangst
  4. https://github.com/ahlstromcj/sequencer64/issues/58?email_source=notifications&email_token=AB45LKC4TMSQ2XVKGFJOMADP2TGDBA5CNFSM4C7PLMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYWBCA#issuecomment-502358152
  5. https://github.com/notifications/unsubscribe-auth/AB45LKD6MFWTTSFS5CHKWPTP2TGDBANCNFSM4C7PLMZA

-- Q: What do you call a WASP who doesn't work for his father, isn't a lawyer, and believes in social causes? A: A failure.