supergilbert / midilooper

midilooper
GNU General Public License v3.0
5 stars 0 forks source link

Midi CC / note Binding the record button #2

Closed CarloCattano closed 3 years ago

CarloCattano commented 3 years ago

Hi there . Thanks a lot for this looper ! Its exactly what I was looking for after compiling every solution I could find around . The functionality for a live setup its almost there , I'm able to bind my controller . Unfortunately , I cant seem to find a way to bind the record button instead of the play button .

Would be great if you can point me out where in the code this could be addressed . I'm not talented at all in C , but as a musician and hobbyist dev I will try to be helpful.

Looking forwards for the clock sync too , as its quite important . Must say that the performance in your looper is superior to anything elase Ive tried to date running on a raspberry pi with Patchbox OS . There aren't many current solutions to live midi loop and depend less on the screen for it. So again thanks a lot for maintaining this !

CarloCattano commented 3 years ago

I see how is the mute button binded here . No implementation on record but I would assume a similar approach ? Also found the funcitions but have no clue on how to start . If could be easy to have a CC enum type implemented. Talking without a deep look

  if (wait_binding_type == MSQ_WAIT_MIDI_PROGRAM ||
      wait_binding_type == MSQ_WAIT_MIDI_NOTE || wait_binding_type == MSQ_WAIT_MIDI_CC) // ?
    return;

https://github.com/supergilbert/midilooper/blob/b5e0e4b3134cf15fe9a35a22eaa23551b644afb0/src/midiseq/loop_engine/engine_binding.c#L113-L134

CarloCattano commented 3 years ago

== MSQ_WAIT_MIDI_CC) // ?

Found the type definition . So it could be

if (wait_binding_type == MSQ_WAIT_MIDI_PROGRAM ||
      wait_binding_type == MSQ_WAIT_MIDI_NOTE || wait_binding_type == MSQ_MIDI_CONTROLCHANGE) // ?
    return;

https://github.com/supergilbert/midilooper/blob/4168bd320ff9e1da63e0e748a4be4b4a70fa4dd0/src/midiseq/midi/midi_channel_ev.c#L56

supergilbert commented 3 years ago

Hi! Thanks for trying my soft. (I will check the CC remote control functionality but I think it will be as an option. My controllers are noisy so I never think of implementing CC remote behaviour but I will add it in my Roadmap) Unfortunately I have not a lot of time to work on it, :-( and there is still some bad bug on this looper. When this bugs are corrected, I will work on your CC functionality.

CarloCattano commented 3 years ago

Hey , Thanks for getting back . I understand the CC decision , I had noisy controllers too that would be complicated to map . Thats not that essetial for me as the ability to bind the record button, would be super cool to have it map , and run it even without gui with each slot set for a live performance

supergilbert commented 3 years ago

I have made some corrections there where several bugs and it may stay some do not hesitate to report them. Rec button via MMC is corrected. Hmm, binding the record button (why not I will check) (... for cc it will coming)

supergilbert commented 3 years ago

A new branch "remote_handling_upgrade" has been created with your ideas. (rec binding is done on it, cc remote coming soon)

CarloCattano commented 3 years ago

Amazing , Im going to test it ASAP . Thanks for the effort , Wish I knew more C to give a hand

supergilbert commented 3 years ago

Cool, do not hesitate to reports bugs. I am not really trying it on raspberry. I have an RPI3b+ and a RPI4 so I will check soon. On what kind of RPI do you use it ? How do you compile it in Release or in Debug mode ?

I have made some changes. Now double click on a rec binding will launch an undo on the track.

CarloCattano commented 3 years ago

Ace ! I have a RPI3b+ running patchboxOS If I recall correctly , I didnt add anything extra to the commands described on readme to compile

supergilbert commented 3 years ago

Yes. I don't know if you have performance issue but : cmake -DCMAKE_BUILD_TYPE=Release .. instead of cmake .. may increase performance a little (with the -O3).

CarloCattano commented 3 years ago

Thanks ! definately good to try stuff in Release rather than debug mode ;-) didnt even had a deep look at it , it was smooth and convincing even in debug mode !

supergilbert commented 3 years ago

Cool to know. Thanks for the remote rec it was a really good idea and easy to add for me. (Other ideas like that are welcome) (I am adding missing channel events, making some tests. I think I will merge this branch soon and close the issue.)

CarloCattano commented 3 years ago

The Release build from the branch works like a charm on the pi ! I just briefly tested that everything worked correctly and the key mappings, saving and loading the project and all works :-) Thanks .

I will test it soon with the target setup and with the CC mappings and let you know , Want to get my head around using it in jack mode and send my controllers to Remote and Record inputs while having Jack Transport drive it with some sort of usb-midi clock in to jack wich I imagine it exists . It runs very well on the pi 3 btw .

supergilbert commented 3 years ago

Ok cool. I have merge the branch in master.

supergilbert commented 3 years ago

For jack transport BPM is not handled and wont change automatically for the moment only start stop will work.