Before posting, please read: When to use this forum, when to submit a help ticket

Midi commands to LoopyHD

Started by wrpooley, February 05, 2015, 05:01:51 PM

Previous topic - Next topic

wrpooley

Not sure if this question is better posted on the loopy forum but figured I'd start here.

Goal is to have SLM send a series of midi presets to LoopyHD upon selecting song in show mode.  Loopy is following MIDI beat clock from SLM. The actions are as follows and I will create the midi bindings in LoopyHD:

1.  Note On/Off - mutes all tracks in Loopy. This way when I start the tempo either by hand or by Song Action, Loopy doesn't begin playing a loop which may be at a wildly different tempo.  Currently the tempo

2.  Note On/Off (after some delay (1 or 2 sec) - Stop/Start Loopy session playback and resets to beat 1.  This is necessary as Loopy needs to play a bar or two at the new tempo it received from SLM in order to reliable play ANY tempo matched loops well.

***Every song would have this 'header' if you will in order to put LoopyHD in a state where I can fly a loop in at the song's tempo. 

3. Each song would then have another midi preset that would choose a specific track in LoopyHD that would play as soon as it receives a play command.  Also, being able to tweek the tempo in LoopyHD at this point is also nice.

The problem I'm having is that the only way to get the MIDI bindings I mention above with LoopyHD is basically a MIDI learn process.  If I set LoopyHD to look at a Network session I can in fact create the bindings and it all works.  I'd don't want to use a network connection however and wish to send the commands to Loopy directly.  Unfortunately, when I put LoopyHD in 'waiting for binding' mode' and switch back to SLM to send the command, LoopyHD never gets the message.

Again, I can certainly see that this could be a question better answered by the Loopy folks but I'm wondering if anyone else has run into this MIDI Learn issue between Apps running on an iOS device.  I've also heard Midibridge may solve this issue as well but have not tried it.  Thanks.

arlo

"The only way to get the MIDI bindings I mention above with LoopyHD is basically a MIDI learn process." Do you mean that you can only configure Loopy by sending MIDI into it, and not by directly entering the MIDI messages you want?

"If I set LoopyHD to look at a Network session I can in fact create the bindings and it all works.  I'd don't want to use a network connection however and wish to send the commands to Loopy directly." Can you configure Loopy using a network session and then switch to a direct connection when it's all configured?

"When I put LoopyHD in 'waiting for binding' mode' and switch back to SLM to send the command, LoopyHD never gets the message." Do you mean that when you send MIDI directly to Loopy's virtual port, it doesn't receive the message?

wrpooley

I see no way to enter the MIDI bindings in Loopy except by actually receiving the event from the outside.  I can configure Loopy via a network connection but that requires me to create a network session on my MacbookPro.  Strangely, when I enable Loopy's network option it creates a Network Session 1 that shows up in SLM as a destination.  However that pathway doesn't actually work until I start a network session on my laptop.  It's as if it has to pass through the laptop in order to get back to Loopy.  I can confirm that it works this way as I'd expect but I assume there is more latency and of course don't want to require the presence of a laptop.

arlo

In Set List Maker, are you leaving the Port settings in your MIDI Presets set to All?

To be clear, are you having a problem sending MIDI to Loopy to configure it with its MIDI Learn function, or sending MIDI to Loopy to control it after it's configured, or both?

wrpooley

Yes I have tried All as well.  And yes I'm having trouble sending MIDI to Loopy to make the binding.  I assume since Loopy is receiving clock via the virtual port that the port/pathway is working.

I've done some more research and it looks like some clever folks are working to edit the plist file which addresses Loopy's MIDI bindings.  It looks pretty straightforward but every time I make the change and send it back to the Loopy App (with iFunBox) the changes don't seem to stick.  Below is an example of that plist file.  In the MIDI binding you'll see 3 events (C0, C#0,D0) linked to 'Toggle Mute' for tracks 1,2, &3 in Loopy.  The areas in Red are where I try to change to "Set List Maker"

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>BITCrashManagerStatus</key>
   <integer>1</integer>
   <key>BITUpdateDateOfLastCheck</key>
   <date>0000-12-30T00:00:00Z</date>
   <key>BITUpdateDateOfVersionInstallation</key>
   <real>444667443.02020299</real>
   <key>BITUpdateUsageTimeForVersionString</key>
   <string>1.4.10</string>
   <key>BITUpdateUsageTimeOfCurrentVersion</key>
   <real>55771.182731151581</real>
   <key>Count-In</key>
   <true/>
   <key>Count-In Length</key>
   <real>1</real>
   <key>Count-In Mute/Unmute</key>
   <true/>
   <key>DBLocalEndpoint ID</key>
   <string>CA85588F-2746-47C3-A6C7-E6009FC5025F</string>
   <key>Default BPM</key>
   <real>104</real>
   <key>Fade</key>
   <false/>
   <key>Fade In Duration</key>
   <real>0.10000000149011612</real>
   <key>Fade Out Duration</key>
   <real>1.4832448959350586</real>
   <key>Fit Imported Loops</key>
   <true/>
   <key>Last Announcement Check</key>
   <integer>444926606</integer>
   <key>Last Announcement ID</key>
   <string>20140927</string>
   <key>Last Announcement Timestamp</key>
   <string>Fri, 06 Feb 2015 06:09:50 GMT</string>
   <key>Last Session</key>
   <string>4 Feb, 21:12</string>
   <key>MIDI Bindings</key>
   <dict>
      <key>Network Session 1</key>
      <dict>
         <key>90007f</key>
         <dict>
            <key>action</key>
            <string>toggle mute</string>
            <key>track</key>
            <integer>0</integer>
         </dict>
         <key>90017f</key>
         <dict>
            <key>action</key>
            <string>toggle mute</string>
            <key>track</key>
            <integer>1</integer>
         </dict>
         <key>90027f</key>
         <dict>
            <key>action</key>
            <string>toggle mute</string>
            <key>track</key>
            <integer>2</integer>
         </dict>
      </dict>
   </dict>
   <key>MIDI Bindings Order</key>
   <dict>
      <key>Network Session 1</key>
      <array>
         <string>90007f</string>
         <string>90017f</string>
         <string>90027f</string>
      </array>
   </dict>
   <key>MIDI Clock Destinations</key>
   <array>
      <string>Set List Maker</string>
      <string>Network Session 1</string>
   </array>
   <key>MIDI Clock Sources</key>
   <array/>
   <key>MIDI Control Sources</key>
   <array>
      <string>Set List Maker</string>
   </array>
   <key>MIDI Over Network</key>
   <true/>
   <key>PGMIDI Saved Virtual Destination ID</key>
   <integer>-812361745</integer>
   <key>Play Imported Loops Immediately</key>
   <true/>
   <key>Play in Background</key>
   <true/>
   <key>Playthrough</key>
   <false/>
   <key>Showed 1.4 Welcome</key>
   <true/>
   <key>Showed Tutorial</key>
   <true/>
   <key>Synchronise Tracks</key>
   <false/>
   <key>TPAnnouncementController: First Launch Complete</key>
   <true/>
   <key>Track Count</key>
   <integer>12</integer>
   <key>WebDatabaseDirectory</key>
   <string>/var/mobile/Containers/Data/Application/AB1E2E47-20B6-42AD-A65B-A64629A0D708/Library/Caches</string>
   <key>WebKitDiskImageCacheSavedCacheDirectory</key>
   <string></string>
   <key>WebKitLocalStorageDatabasePathPreferenceKey</key>
   <string>/var/mobile/Containers/Data/Application/AB1E2E47-20B6-42AD-A65B-A64629A0D708/Library/Caches</string>
   <key>WebKitOfflineWebApplicationCacheEnabled</key>
   <true/>
   <key>WebKitShrinksStandaloneImagesToFit</key>
   <true/>
</dict>
</plist>




<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>BITCrashManagerStatus</key>
   <integer>1</integer>
   <key>BITUpdateDateOfLastCheck</key>
   <date>0000-12-30T00:00:00Z</date>
   <key>BITUpdateDateOfVersionInstallation</key>
   <real>444667443.02020299</real>
   <key>BITUpdateUsageTimeForVersionString</key>
   <string>1.4.10</string>
   <key>BITUpdateUsageTimeOfCurrentVersion</key>
   <real>55771.182731151581</real>
   <key>Count-In</key>
   <true/>
   <key>Count-In Length</key>
   <real>1</real>
   <key>Count-In Mute/Unmute</key>
   <true/>
   <key>DBLocalEndpoint ID</key>
   <string>CA85588F-2746-47C3-A6C7-E6009FC5025F</string>
   <key>Default BPM</key>
   <real>104</real>
   <key>Fade</key>
   <false/>
   <key>Fade In Duration</key>
   <real>0.10000000149011612</real>
   <key>Fade Out Duration</key>
   <real>1.4832448959350586</real>
   <key>Fit Imported Loops</key>
   <true/>
   <key>Last Announcement Check</key>
   <integer>444926606</integer>
   <key>Last Announcement ID</key>
   <string>20140927</string>
   <key>Last Announcement Timestamp</key>
   <string>Fri, 06 Feb 2015 06:09:50 GMT</string>
   <key>Last Session</key>
   <string>4 Feb, 21:12</string>
   <key>MIDI Bindings</key>
   <dict>
      <key>Network Session 1</key>
      <dict>
         <key>90007f</key>
         <dict>
            <key>action</key>
            <string>toggle mute</string>
            <key>track</key>
            <integer>0</integer>
         </dict>
         <key>90017f</key>
         <dict>
            <key>action</key>
            <string>toggle mute</string>
            <key>track</key>
            <integer>1</integer>
         </dict>
         <key>90027f</key>
         <dict>
            <key>action</key>
            <string>toggle mute</string>
            <key>track</key>
            <integer>2</integer>
         </dict>
      </dict>
   </dict>
   <key>MIDI Bindings Order</key>
   <dict>
      <key>Network Session 1</key>
      <array>
         <string>90007f</string>
         <string>90017f</string>
         <string>90027f</string>
      </array>
   </dict>
   <key>MIDI Clock Destinations</key>
   <array>
      <string>Set List Maker</string>
      <string>Network Session 1</string>
   </array>
   <key>MIDI Clock Sources</key>
   <array/>
   <key>MIDI Control Sources</key>
   <array>
      <string>Set List Maker</string>
   </array>
   <key>MIDI Over Network</key>
   <true/>
   <key>PGMIDI Saved Virtual Destination ID</key>
   <integer>-812361745</integer>
   <key>Play Imported Loops Immediately</key>
   <true/>
   <key>Play in Background</key>
   <true/>
   <key>Playthrough</key>
   <false/>
   <key>Showed 1.4 Welcome</key>
   <true/>
   <key>Showed Tutorial</key>
   <true/>
   <key>Synchronise Tracks</key>
   <false/>
   <key>TPAnnouncementController: First Launch Complete</key>
   <true/>
   <key>Track Count</key>
   <integer>12</integer>
   <key>WebDatabaseDirectory</key>
   <string>/var/mobile/Containers/Data/Application/AB1E2E47-20B6-42AD-A65B-A64629A0D708/Library/Caches</string>
   <key>WebKitDiskImageCacheSavedCacheDirectory</key>
   <string></string>
   <key>WebKitLocalStorageDatabasePathPreferenceKey</key>
   <string>/var/mobile/Containers/Data/Application/AB1E2E47-20B6-42AD-A65B-A64629A0D708/Library/Caches</string>
   <key>WebKitOfflineWebApplicationCacheEnabled</key>
   <true/>
   <key>WebKitShrinksStandaloneImagesToFit</key>
   <true/>
</dict>
</plist>


arlo

I'm not going to get into understanding Loopy's config file, but if the problem is only configuring it and you don't have a problem running it after it's configured, can't you use the non-ideal network setup during configuration and then revert to a more ideal configuration when performing?

wrpooley

Understand about not getting Loopy's config file.  Unfortunately if I config the bindings with a Network Session there doesn't seem to be a way to move those bindings over to the virtual port.  They just stay with the Network Session.   And simply sending commands to All ports doesn't work either.  Thanks for your input.

arlo

I'll double check and make sure MIDI messages targeted to other apps' virtual ports are working correctly. But if you are sending to all ports, they should be received by all apps, whether they are listening on a virtual port or the shared Network Session.

wrpooley

I just tried sending messages to other Apps via their virtual port and while it did work it was somewhat fishy.  I couldn't properly send a note off and the note that was 2 octaves below.  Could be a pilot error but I couldn't seem to figure out what was going on. 


arlo

I downloaded Loopy to try this, but it didn't recognize any incoming MIDI from other apps on the same device no matter what combination of port input and output settings I used. I connected to a network session on my laptop and that didn't make any difference (and I don't think it should). I also tried sending MIDI messages from the MIDI Wrench app, but Loopy didn't see those, either. The only time Loopy recognized an incoming MIDI message in its "learn" function was when I sent them from my laptop.

Can you specify the steps you took to send MIDI to Loopy from another app on the same device?

arlo

Never mind my previous question, I've figured that part out, but I'm still working on why Loopy doesn't receive the MIDI messages without the Mac as an intermediary.

arlo

Okay, I found a problem with my app in sending MIDI to other apps on the same device. I just submitted version 4.1.4, which should fix it. With this fix, I was able to send messages to Loopy's "learn" mode, as long as Loopy's option to run in the background was enabled.

http://www.arlomedia.com/apps/setlistmaker/support/release_notes.html

wrpooley

THat's great Arlo!   I'm sorry I missed your efforts on this.  Can't wait to check it out. 

Is there a chance that something changed in the way sync is transmitted to other apps?  I've found that LoopyHD no longer syncs reliably to SLM since either its update or SLM.  Oddly enough, SLM now shows it's receiving clock from Loopy whenever Loopy's transport is playing even though I've not chosen to do that and am specifically trying to block that from happening with MidiBridge (3rd party).  Loopy's quantization engine pretty much falls apart after I start tempo in SLM.  I've brought it up on their forum as well...

arlo

When I was testing, I noticed that Loopy kept sending MIDI beat clock messages. I assume there's a way to turn that off, but I didn't investigate how to do it.

I don't know what you mean by "pretty much falls apart."

wrpooley

It looks like you have to explicitly tell Loopy to send clock to other apps although but as you've observed it seems to do it anyway even though I've not told it to do so. 

By 'fall apart' I mean if there is any audio attempting to play in Loopy it's pretty mangled and varies in tempo wildly if it plays at all.  It definitely feels like a sort of feedback loop of clock. 

Can I assume that the way in which SLM sends clock messages has not changed in the last 2 months?