Audiobus: Use your music apps together.

What is Audiobus?Audiobus is an award-winning music app for iPhone and iPad which lets you use your other music apps together. Chain effects on your favourite synth, run the output of apps or Audio Units into an app like GarageBand or Loopy, or select a different audio interface output for each app. Route MIDI between apps — drive a synth from a MIDI sequencer, or add an arpeggiator to your MIDI keyboard — or sync with your external MIDI gear. And control your entire setup from a MIDI controller.

Download on the App Store

Audiobus is the app that makes the rest of your setup better.

Show 'n Tell: Raspberry Pi BLE Midi Bridge Thingy

124678

Comments

  • wimwim
    edited November 2020

    @Alfred said:
    Hi Wim, so I tried building an image. I have some problems though.

    The name of the bluetooth connection did not become what I chose.
    I get some long number instead. I tried again:
    Sudo btmidi-server -v -n "RPi Bluetooth"

    It seems to take some time for the iOS Bluetooth system to update it's names. I found that turning Bluetooth off and back on, sometimes kicked it into gear. Other times I tried shutting off the device, then quickly swiping left to delete the connection entry while it's greyed out and before it disappeared, then turning Bluetooth off and back on.

    In all cases though, the name did eventually come through. You may find that it eventually picks up the name on its own.

    Note: every time you edit the /lib/systemd/system/btmidi.service file, you need to run the commands listed below in the article:

    sudo systemctl daemon-reload
    sudo systemctl enable btmidi.service
    sudo systemctl start btmidi.service
    

    When I connect to it with Aum and send some notes I see messages coming in in the terminal.
    But in reaper the new midi device is named "MIDI function" and it does not send or receive anything.

    Which device are we talking about here? The "MIDI Gadget" version, with the modifications to the cmdline.txt and config.txt? The MIDI Gadget version is the only one that's going to work when plugged into a PC.

    When making the build my only problem was when giving that btmidi-server command.
    I did not see a way to get back to the command prompt, so I ended the ssh session and logged back in to finish the last few steps...

    <ctrl-c> would have killed the running btmidi-server.

    Do you have an idea how to fix this?

    I assume you're talking about the Reaper connection issue? If so, see my question above.

    If you could make some prebuild images for your pi zero midi projects the average user would be greatly helped...

    I plan to once it seems like they're in a final state. It seems like the two versions of the device are close. The only issue is WiFi access. There's no way to build an image with WiFi credentials. And once the Read Only file system is in place, no way to edit wifi credentials in the /boot partition.

    I'll either need to find a way around that, or build it with no wifi credentials. This would require a USB keyboard and HDMI monitor to edit those.

    TLDR; yes I do plan to make images of the two at some point.

  • Yes I was making the gadget version.

    If the make read only can be done from raspi-config that would not be to hard for an average user.

    The gadget version might be best with the wifi in host mode, allthough that autoswitch feature from blokas, sounds mighty cool. For that midi host project it would be nice if we could get rtp midi too.

    Thanks again

  • wimwim
    edited November 2020

    @Alfred said:
    Yes I was making the gadget version.

    OK then, I don't know why it's not working for you in Reaper. It works fine here on my other Windows DAWs (I only own an ancient version of Reaper and it's not installed). Yes, it does show up as "Midi Function". I plan to see if there's a way to change that. Just haven't gotten around to it.

    If the make read only can be done from raspi-config that would not be to hard for an average user.

    Yes, that might be a good option. They could do that either by gaining wifi access, or with a USB keyboard and HDMI (with an adapter).

    The gadget version might be best with the wifi in host mode, allthough that autoswitch feature from blokas, sounds mighty cool. For that midi host project it would be nice if we could get rtp midi too.

    That's a really interesting idea. That could simplify wifi setup a lot.

    As for rtp midi ... it probably wouldn't be hard, but I'm not as interested myself since it's not compatible with the apple "network session" as far as I can tell. Also, wifi based midi just doesn't work well enough in my experience. I've given up every time. Ethernet maybe, but again, my focus is on Apple stuff, I've gone lost interest in Linux and Windows for music stuff.

    Sure ... I hope you can get it working with Reaper. If you aren't able to, then maybe I'll download the demo and give it a try.

    ... oh. Forgot to mention: I connected to a Windows 7 machine, not Windows 10.

  • Ok I found some problem in the autoconnect ruby script. There were some extra empty lines in the copy...
    No more error there, but after a reboot it can not find the raspberrypi.local anymore with ssh.
    Guess I have to start over again :-(

  • But rtp midi is the apple protocol. Thumbjam is good at connecting to network sessions.

    There are also other hardware devices that use rtp midi like the iConnectMidi4+ and the Deepmind.

    A bit more latency but a lot more bandwith.

    Maybe that would be nice for a pi 4 build where you have wired ethernet and a desktop.

    By the way reaper runs very well on the pi 4.

  • wimwim
    edited November 2020

    @Alfred said:
    But rtp midi is the apple protocol. Thumbjam is good at connecting to network sessions.

    I think they are different. I don't think it's possible to connect a linux rtp-midi session to an Apple network session. I did try connecting the Alsa network session to MacBook - couldn't get it working, and read something somewhere that said it can't be done. Unfortunately I didn't document my searches on the subject.

    There are also other hardware devices that use rtp midi like the iConnectMidi4+ and the Deepmind.

    Yeh, I dunno. Like I said, I'm not all that interested. I've tried all sorts of ways to get acceptable midi performance over wifi and it just doesn't happen. Kind of interested in network session over ethernet ... but at that point, might as well go wired.

    A bit more latency but a lot more bandwith.

    In my experience - lots more latency, and most importantly tons of inconsistency. I have officially given up on that angle.

    Maybe that would be nice for a pi 4 build where you have wired ethernet and a desktop.

    Maybe ... but for someone else to pursue, not me. ;)
    If I'm gonna be sticking wires into stuff, IDAM to the MacBook over plain ol' USB-Lightning cable is all I need.

  • wimwim
    edited November 2020

    @Alfred said:
    By the way reaper runs very well on the pi 4.

    OK now, that's something cool. B)
    I'm sticking with these cute little zero's for now though. :D

  • heshes
    edited November 2020

    @wim said:

    @Alfred said:
    But rtp midi is the apple protocol. Thumbjam is good at connecting to network sessions.

    I think they are different. I don't think it's possible to connect a linux rtp-midi session to an Apple network session. I did try connecting the Alsa network session to MacBook - couldn't get it working, and read something somewhere that said it can't be done. Unfortunately I didn't document my searches on the subject.

    I've routed ipad to rpi using "network session" in AUM over an rtp-midi connection. I used this rptmidi server on the pi: https://github.com/davidmoreno/rtpmidid To actually create the rtpmidi connection I used the free "Midi Connection" app on the ipad: https://apps.apple.com/us/app/midi-network/id1102428729

    That rtpmidi server on github worked for me, but a better solution for some people might be the $5 solution from Mclaren Labs, which may be better documented and/or supported: https://mclarenlabs.com/#rtpmidi

  • Thanks @hes, that's good info. Not gonna go there myself, but someone else may.

  • @wim said:
    Thanks @hes, that's good info. Not gonna go there myself, but someone else may.

    Yeah, I'm not sure why someone would prefer rtpmidi to bluetooth. Any advantages?

  • @hes said:

    @wim said:
    Thanks @hes, that's good info. Not gonna go there myself, but someone else may.

    Yeah, I'm not sure why someone would prefer rtpmidi to bluetooth. Any advantages?

    I think where it could really pay off is for live setups. I don't think I'd want to have every cell phone in the room able to hook up to my devices. :D

    If WiFi performed well enough, I could see risking a private Wifi, using something like the small travel routers I have if the performance were OK. But it isn't (in my experience, ymmv), and would still be susceptible to wifi interference.

    So, rtp midi over ethernet might be an attractive option. Maybe. But I'm not much inclined to try it out.

  • I got it working for just USB device to device connection. Recompiling this bluetooth stack is taking forever! My old PC-300 is seen right away, connected a Novation Circuit and the connection is automatic! I feel like recompiling is going to take over an hour though.

    I just used the latest Raspbian and didn’t do the lite version. I did the bloated version and I’m in the GUI for now. I’m not using SSH at the moment, so I have a mess of dongles. If I get it all working and like it, I’ll do the lite version, make it read only, and see if I can just build it into my keyboard.

    Too bad I’m not a good electronics tinkerer. I feel like installing the Pi inside this keyboard and also routing an internal battery pack to power it all wouldn’t be too difficult if you were good with such things.

  • wimwim
    edited November 2020

    I have about 20 minute or less compile times for the Bluetooth stack. There’s probably a lot better performance with the lite version, but I’m guessing MicroSD card performance can be a big issue too.

  • @wim said:
    I have about 20 minute or less compile times for the Bluetooth stack. There’s probably a lot better performance with the lite version, but I’m guessing MicroSD card performance can be a big issue too.

    Well it’s working now!! PC-300 to iPad over bluetooth. Not getting bad latency, but I’m going to get on this sustain pedal and play a bunch of notes and see if it trips up at all.

    It’s just broadcasting as a long hexidecimal name at this point, but I’ll worry about that later.

  • edited November 2020

    Just in case anyone has a use for this:
    I still have my old bored iPhone 5 here so I thought: BLE, iOS9, Lightning, MidiFire... wait a sec!
    What I did:
    CCK3 plugged into the iPhone 5, Lightning charger and a USB hub plugged into the CCK3, four USB MIDI controllers plugged into the USB hub and MidiFire running on the iPhone.
    I have set up MidiFire to "advertise BT MIDI service", routed all controllers to that airy MIDI port and opened the MIDI monitor module to see what all controllers do.
    Ran Drambo on the iPad, connected to my iPhone over BTLE and all controllers (Keystep, Beatstep, Launchpad Mini and Hercules Starlight) worked instantly 😊
    It's great because I can leave all the cable mess at one place and still work on the iPad with only the headphones connected while being free to move.
    Originally I had bought a Yamaha UD-BT01 for the purpose but this setup does more.
    So... again searching for an even better use for the Raspberry 😁

  • wimwim
    edited November 2020

    @rs2000 said:
    Just in case anyone has a use for this:
    I still have my old bored iPhone 5 here so I thought: BLE, iOS9, Lightning, MidiFire... wait a sec!
    What I did:
    CCK3 plugged into the iPhone 5, Lightning charger and a USB hub plugged into the CCK3, four USB MIDI controllers plugged into the USB hub and MidiFire running on the iPhone.
    I have set up MidiFire to "advertise BT MIDI service", routed all controllers to that airy MIDI port and opened the MIDI monitor module to see what all controllers do.
    Ran Drambo on the iPad, connected to my iPhone over BTLE and all controllers (Keystep, Beatstep, Launchpad Mini and Hercules Starlight) worked instantly 😊
    It's great because I can leave all the cable mess at one place and still work on the iPad with only the headphones connected while being free to move.
    Originally I had bought a Yamaha UD-BT01 for the purpose but this setup does more.
    So... again searching for an even better use for the Raspberry 😁

    Good one. I have a 5 around Here somewhere too.

  • @wim When you start yours up do you have to restart the MIDI service each time? Either with your web tool or the LCD?

    I find when I turn it off and on I can still see the incorrect hexadecimal name on my iPad to connect, but it won’t connect. I go ahead and run this command ( sudo btmidi-server -v -n "RPi Bluetooth" ) and then I’m good to go. I’m just wondering if yours starts automatically or if I have a problem somewhere with mine. I’ve never been able to get mine to actually rename, so that might also be part of the problem.

    My goal is to just set this up as a permanent thing for one keyboard only. Either if this is expected behavior or if mine is having an issue I could probably fix it by getting that command to run at boot with some script, but just checking how it works on your end before attempting to proceed.

    Thanks

  • wimwim
    edited November 2020

    @DMan said:
    @wim When you start yours up do you have to restart the MIDI service each time? Either with your web tool or the LCD?

    I find when I turn it off and on I can still see the incorrect hexadecimal name on my iPad to connect, but it won’t connect. I go ahead and run this command ( sudo btmidi-server -v -n "RPi Bluetooth" ) and then I’m good to go. I’m just wondering if yours starts automatically or if I have a problem somewhere with mine. I’ve never been able to get mine to actually rename, so that might also be part of the problem.

    @Dman, no, it works fine here. I never get the numeric name. Try opening the Bluetooth connection dialog in something like AUM, then when you see the entry, turn off the Pi. As soon as the entry goes "dim", swipe left on it and delete it. Then turn Bluetooth off and then back on on your iOS device. Now turn the Pi back on.

    If it comes back up with the numeric ID, then probably there's something wrong with the ExecStart line in your /lib/systemd/system/btmidi.service file. Check that line carefully.

    If you're connecting from a Mac, the Bluetooth cache seems to be a bit more stubborn. But it's always picked up the name eventually, so I have to think there's something not right with the startup file.

    Don't forget, after you change that file, you must reload. It's not enough to just edit the file and reboot. Make sure you execute these commands:

    sudo systemctl daemon-reload
    sudo systemctl enable btmidi.service
    sudo systemctl start btmidi.service
    

    Also, if you've applied the "overlay file system", the Pi will let you edit that file, but a reboot will revert it to the original version. You have to disable the overlay file system using raspy-config to get any changes to stick.

    The device should still work without any issue even if you can't get a friendly name. That would be annoying, but shouldn't cause operational issues.

    My goal is to just set this up as a permanent thing for one keyboard only. Either if this is expected behavior or if mine is having an issue I could probably fix it by getting that command to run at boot with some script, but just checking how it works on your end before attempting to proceed.

    You don't want to run the server from a command line. It should start as a daemon, which is what the /lib/systemd/system/btmidi.service file does.

  • Yeah, I did all of that. I’m just erasing it and setting it up all over again at this point. It was working for a brief moment after fixing the bluetooth name, but quickly reverted back to the same issue as before. Every time it reboots it broadcasts the MIDI bluetooth, starts connecting, and fails. I run that command to start the service and it works. I’ll just start it again from scratch. I’ll do SSH and install the lite version this time.

    I used my Mac to make a disk image of the Pi before erasing it in case I need to get back to what I had, which is very unlikely. Using Disk Utility for disk images should be pretty handy if I take on some more projects after I fix this one. Then you can just archive every project and just clone it back to an SD card if you need it.

  • wimwim
    edited November 2020

    @DMan said:
    Yeah, I did all of that. I’m just erasing it and setting it up all over again at this point. It was working for a brief moment after fixing the bluetooth name, but quickly reverted back to the same issue as before. Every time it reboots it broadcasts the MIDI bluetooth, starts connecting, and fails. I run that command to start the service and it works. I’ll just start it again from scratch. I’ll do SSH and install the lite version this time.

    I used my Mac to make a disk image of the Pi before erasing it in case I need to get back to what I had, which is very unlikely. Using Disk Utility for disk images should be pretty handy if I take on some more projects after I fix this one. Then you can just archive every project and just clone it back to an SD card if you need it.

    Yeh, I dunno. I’ve rebuilt from scratch at least a half dozen times, and it has worked every time. I did install Raspberry Pi OS full on the “MIDI Gadget” version, but disabled the GUI before attempting the Bluetooth part. Maybe I’ll try enabling the GUI and see if it borks the Bluetooth if your new build doesn’t work.

  • I got it all working now. Seems pretty stable and survives a reboot and MIDI still works. I don’t know what was wrong before, but rebuilding it all was the ticket. Thanks for the inspiration. Maybe I’ll get back into some musical pi projects for something to do.

    For now, I’m just using this in my setup to replace the iRig MIDI 2 I needed due to this keyboard having outdated drivers, that fortunately are included in ALSA so works on Linux. That will make it quite apparent how stable it is over time.

    I need to find a smaller battery pack that can power it though. Only my larger battery packs are powering it, though to be fair the only small one I have I bought for $10 in 2013 and probably doesn’t have enough amps. One battery pack will power the Pi Zero and the keyboard quite easily.

  • @DMan said:
    I got it all working now. Seems pretty stable and survives a reboot and MIDI still works. I don’t know what was wrong before, but rebuilding it all was the ticket. Thanks for the inspiration. Maybe I’ll get back into some musical pi projects for something to do.

    For now, I’m just using this in my setup to replace the iRig MIDI 2 I needed due to this keyboard having outdated drivers, that fortunately are included in ALSA so works on Linux. That will make it quite apparent how stable it is over time.

    I need to find a smaller battery pack that can power it though. Only my larger battery packs are powering it, though to be fair the only small one I have I bought for $10 in 2013 and probably doesn’t have enough amps. One battery pack will power the Pi Zero and the keyboard quite easily.

    Cool, I’m glad it’s working. Which version are you using? The original BLE Midi Bridge, or the MIDI Gadget that can plug directly in as a USB device?

  • I’m sort of casually experimenting with building a “Midi Logger” that can run on these and capture any midi sent to them. This would make it possible to jam for as long as you like and, if something good came out that you want to keep, you could download the file for importation/editing in an app of your choice.

  • @wim said:

    @DMan said:
    I got it all working now. Seems pretty stable and survives a reboot and MIDI still works. I don’t know what was wrong before, but rebuilding it all was the ticket. Thanks for the inspiration. Maybe I’ll get back into some musical pi projects for something to do.

    For now, I’m just using this in my setup to replace the iRig MIDI 2 I needed due to this keyboard having outdated drivers, that fortunately are included in ALSA so works on Linux. That will make it quite apparent how stable it is over time.

    I need to find a smaller battery pack that can power it though. Only my larger battery packs are powering it, though to be fair the only small one I have I bought for $10 in 2013 and probably doesn’t have enough amps. One battery pack will power the Pi Zero and the keyboard quite easily.

    Cool, I’m glad it’s working. Which version are you using? The original BLE Midi Bridge, or the MIDI Gadget that can plug directly in as a USB device?

    I’m using the BLE Midi Bridge. I had to go back through the comments to see what you were talking about for MIDI Gadget. I’m not sure I would really have a use for plugging in the Pi as a MIDI source.

    I have 1-2 non wireless Pi Zeros, a Pi 2, and my partner’s unused Pi 4. So, I might as well put some of them to use. I’ll have to check around for some other projects. Most often I’m sure my iPads are much better for music, but I could definitely make some kind of audio source to use alongside my old Volcas.

  • wimwim
    edited November 2020

    @DMan said:
    I’m using the BLE Midi Bridge. I had to go back through the comments to see what you were talking about for MIDI Gadget. I’m not sure I would really have a use for plugging in the Pi as a MIDI source.

    I have 1-2 non wireless Pi Zeros, a Pi 2, and my partner’s unused Pi 4. So, I might as well put some of them to use. I’ll have to check around for some other projects. Most often I’m sure my iPads are much better for music, but I could definitely make some kind of audio source to use alongside my old Volcas.

    Oh yeh, now that I think about it, the MIDI Gadget variant wouldn’t work for your keyboard anyway.

    You could probably have some fun with the Pi 4 using SunVox and/or Sonic Pi. As for the Zero’s, I wouldn’t hope for much. Orca Midi Sequencer works pretty well with it if you’re into that kind of thing. Python with MIDI is interesting.

    But other than this idea of a midi logger and maybe someday a looper for the zero, I can’t think of much else to do with ‘em at this point. Making DIY hardware midi controllers doesn’t seem worth the effort to me.

  • @wim MIDI logger and looper would be fantastic already!
    Imagine a pi MIDI logger that will let you scroll/scrub through its note history (ideally supported by your OLED display with a minimalistic piano roll), set a rough start/end range and upload the generated MIDI file to Nanostudio 2 using WebDAV. Then you can just drag & drop it onto your arrangement.
    I should file a patent for this 😬

  • wimwim
    edited November 2020

    @rs2000 said:
    @wim MIDI logger and looper would be fantastic already!
    Imagine a pi MIDI logger that will let you scroll/scrub through its note history (ideally supported by your OLED display with a minimalistic piano roll), set a rough start/end range and upload the generated MIDI file to Nanostudio 2 using WebDAV. Then you can just drag & drop it onto your arrangement.
    I should file a patent for this 😬

    The scrubbing and editing bit would be a challenge. For the first attempt I’m just going to plan on importing and editing in something that’s already good at that sort of thing.

  • @wim said:

    @rs2000 said:
    @wim MIDI logger and looper would be fantastic already!
    Imagine a pi MIDI logger that will let you scroll/scrub through its note history (ideally supported by your OLED display with a minimalistic piano roll), set a rough start/end range and upload the generated MIDI file to Nanostudio 2 using WebDAV. Then you can just drag & drop it onto your arrangement.
    I should file a patent for this 😬

    The scrubbing and editing bit would be a challenge. For the first attempt I’m just going to plan on importing and editing in something that’s already good at that sort of thing.

    You're right. Viewing and editing MIDI is better done in something like NS2 and transferring a long MIDI file is easy...

  • @wim said:
    But other than this idea of a midi logger and maybe someday a looper for the zero.

    Ok, you're officially my hero! The BT bridge is a lifesaver (already built 2...), but the MIDI logger would be even cooler!!! Currently I'm using PhotonAU, but I've already lost few rehearsals due to crashes (a couple) and user errors (forgot to start it and erroneously flushed the buffer before saving).

    A device that starts recording the flow of MIDI data (including CCs and all 16 CHs) as soon as it is plugged in and saves directly to disk to avoid loss of data in case of unwanted disconnections would be fantastic!

  • @Keyb said:

    @wim said:
    But other than this idea of a midi logger and maybe someday a looper for the zero.

    Ok, you're officially my hero! The BT bridge is a lifesaver (already built 2...), but the MIDI logger would be even cooler!!! Currently I'm using PhotonAU, but I've already lost few rehearsals due to crashes (a couple) and user errors (forgot to start it and erroneously flushed the buffer before saving).

    A device that starts recording the flow of MIDI data (including CCs and all 16 CHs) as soon as it is plugged in and saves directly to disk to avoid loss of data in case of unwanted disconnections would be fantastic!

    Credit for this thing goes to Neuma Studio. I just passed it along. B)

    The caveat with the midi logger is you'd still need to route any iOS midi traffic to it. It could capture attached hardware devices automatically, I suppose, but that wouldn't hold true for iOS data.

    I'm still thinking some of this through. No timetable on this one ...

Sign In or Register to comment.