RPI - Add MIDI I/O to Boss GP-10, Simple Raspberry Pi Setup

Started by MusicOverGear, August 09, 2014, 01:03:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mbenigni

QuoteRaspberry Pi DIY Wireless MIDI-OSC Bridge! ( indicates this might also work as a substitute for the Arduino based Jabrudian "Missing Link"   
See attached for PDF version - archived just in case this info disappears in the future.
Wireless OSC on a programmable platform!  This is really exciting stuff!  If the GP-10 makes the grade for me, I can see I'll definitely wind up on the Raspberry Pi kick with the rest of you sooner or later.

whippinpost91850


Ringleader

Alright. Which one of you is gonna be the entrepreneur and start selling these things pre-configured? I want one that allows me to use my homemade midi foot controller (essentially a Korg Nanokontrol) and my Fishman triple Play simultaneously AND wirelessly with my iPad. If you can do it, send me a quote.  :)

loulea

Quote from: Ringleader on August 11, 2014, 05:31:24 PM
Alright. Which one of you is gonna be the entrepreneur and start selling these things pre-configured? I want one that allows me to use my homemade midi foot controller (essentially a Korg Nanokontrol) and my Fishman triple Play simultaneously AND wirelessly with my iPad. If you can do it, send me a quote.  :)

I was thinking of doing it but the IRS would come after me! ;)
Music is in everyone!!

gumtown

Quote from: Ringleader on August 11, 2014, 05:31:24 PM
Alright. Which one of you is gonna be the entrepreneur and start selling these things pre-configured? I want one that allows me to use my homemade midi foot controller (essentially a Korg Nanokontrol) and my Fishman triple Play simultaneously AND wirelessly with my iPad. If you can do it, send me a quote.  :)
It won't be that simple, and could possibly bite the seller on the backside,
as everyone's setup will be different - one size won't fit all.

That's why many are testing configurations on different gear and setup's to document easiest way for a "noob" (not New Out Of Box  :D ) to do this themselves.

I hope to have my Pi soon,
I will bypass the NOOB installer, I read that it slows down the system a bit, and will go direct to the Raspbian install.
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

MusicOverGear

#30
Big ups to loulea for discovering that Raspberry Pi could solve this problem for GP-10 users. He got the ball rolling and distributed a disk image of the first working implementation of this stuff. Everyone should click on his [Applaud] button right now!

I am going to maintain this blog post with any suggested and tested improvements, e.g. if someone can demonstrate that the MIDI interface used in this vid does not work for this purpose, I'll update that.

Beyond updates, this is the best I'm able to offer to people who want to get the Pi working with absolute minimum effort and understanding. The point of this tutorial is to simply add MIDI I/O to the GP-10, extending its functionality using the Pi so that the GP-10 has simple 5-pin MIDI.

I will offer the following advice for people who want to make it through this process and simply get the Pi working:

  • Steel yourself for getting through the process. This may require some resilience if you get hung up on the process
  • If you get stuck, just start Googling relevant words. I figured out a much geekier, more efficient way to do this on my first try using scripts and arcane commands. All I had to help me was the knowledge that the Pi was capable of making the connections using jack, plus Google - that's the critical part. I'm just an ignorant musician; but Google led me to really on-point information. if I can do that, anyone can do this.
  • If you get really stuck - just basic computing stuff, like where's the any key - see if you can find someone nearby who is already proficient with Linux, the Pi specifically, or just computers in general. Check local Maker events, comic book clubs, or the lobby of theaters showing sci-fi movies  :)
  • If you have dreams about doing more with the Pi, great. Dream big! People who accomplish big things focus hard on one small project at a time. Right now this is your project; until you get it working I seriously wouldn't worry about single thing beyond this project.
  • If you live in certain locales, e.g. LA, NY, ATL, Nashville, you can probably just hire someone to do this for you. e.g. give Bob Bradshaw a call and see whether he's game. By this point there is someone who installs Roland stuff - who builds Steve Stevens' rigs?
  • There are tons of books - traditional and internet style on the Pi. I found a raft of free ones available through bit torrent. Amazon has many more. Also the Pi community is huge and very supportive. Theare are many many resources out there.

http://www.mozartsnephew.com/2014/08/boss-gp-10-midi-foot-controller-for.html

And here is a snapshot of the page as it is now:

This is the simplest way I could imagine to get generic MIDI messages in and out of the Boss GP-10 using a Raspberry Pi. The list below contains the links promised in the video.



Stuff to Buy
Boss GP-10 with a GK Pickup
Midi Foot Controller that sends Program Change Messages. This one, the Rolls Midi Buddy, I THINK has the feature of toggling back and forth the the previous patch by tapping the same button. I had one years ago with this feature. When using foot switches only for patch changes, I found that to be a very handy feature. Also this is one of the few controllers available today that seems to be informed by an awareness that a musician might want to install and transport it.
Raspberry Pi B+ 512MB
Inline Midi Interface & Cables (Listed as HDE USB MIDI Cable Converter PC to Music Keyboard)
Pretty Much Any MicroSD Card 4GB or higher. This is the one I used. The higher the class rating, the faster it can read/write, and the faster your Pi will run. If you are just doing MIDI control messages, you don't need much speed IMHO
Pi Power Supply. Adafruit has one, as does every retailer on earth and every thrift store in North America. My recommendation is to use a wall wart that can supply more current that you would ever need, which for the B+ is 600mA. So if you just look at the tiny print that's molded into most  power supplies, you find many that say 1A or 1000mA (same thing).  Use one of those.
[If it is not built into the power supply] Micro USB Cable to connect the power supply to the Pi. This may be the single most common data cable on earth (just a guess), so I'll recommend one that you might miss if you just went looking for one: AdaFruit Flowing Effect MicroUSB Data+Charging Cable. This one shows you visually how much current is flowing through the cable, which can serve as a sort of ghetto status light so you know when the Pi has finished shutting down. Plus if you like blingy pedalboards, this is clearly the way to go.
Power Button (not covered in this video - it is a commercial solution that comes with its own instructions).  It is made for people who don't want to do any coding, so you shouldn't need a walkthrough. Also I don't have one, so I can't show you how to use it. Here is one available across the pond.

Software You Will Download
SD Formatter
NOOBS

General flow of events:
Format card
Download NOOBs
Unzip NOOBs
Copy NOOBs to card
Plug in all devices to the Pi: GP-10 USB, Midi Interface USB, USB Mouse, USB Keyboard, HDMI Video, Ethernet
Put card into Pi
Power up the Pi
Install Raspbian
Use Raspi-Config to make Raspbian boot to LXDE (Desktop Environment)
Open QjackCtl and learn how to make connections
Use Patchbay to make a connection file
Activate patch bay persistence
Open a Terminal and type the following
sudo leafpad
Open the file /etc/xdg/lxsession/LXDE/autostart
add the following line to the autostart file
@qjackctl
reboot using the little power button in the start menu
bask in sense of accomplishment
decide how you want to do a shutdown script and do it
You can just buy a solution like this one, or...
You can follow my instructions below, which picks up from a previous video and requires some very basic computer literacy - not for everyone


Elantric

Thanks for all your effort on creating these clear instructions !

MusicOverGear

No prob. Really hoping this is what people need. This no-midi problem itches like crazy!

loulea

I finally had a chance to look at the videos posted in this forum and just a word of caution. If you have a process running as a PI user and you run another from the LDXI script as "sudo", you will have two process running as two different users. One has administrative privileges (sudo) and has priority and the other only has user privileges. This could be a problem when shutting and rebooting since the sudo may be writing something upon exit and could brick the card.
Music is in everyone!!

Kevin M

You guys have done some excellent work on this project!  Although I don't have a need for this, the geek factor is really compelling!!


Sent from my iPad using Tapatalk

gumtown

#35
Wow !! The Pi arrived today, and this is my first post here from using the Pi itself with NetSurf.
Picture below is the Raspberry Pi GUI in action on a monitor via the HDMI port.


I ended up researching some Micro SD cards and ended up getting the Samsung EVO 16Gb,
as it has the (bang for bucks) fastest 4kb read/write block cycles used by the Pi as general disk access functions.
Some class 10 cards, even though good at initial disk image/file writes, are actually slower than class 4 at generic disk access functions.

So... so-far I downloaded the Raspbian wheezy image (linux debian based), and unzipped it.
Formatted the SD card on my Toshiba Win 7 laptop as follows
Format type = exFAT
Cluster size = 4Kb
I chose the 4Kb cluster size to match the Pi read/write block size.
The Samsung EVO 16GB card had from factory FAT32 free space = 15,711,867,784 bytes
after full re-formatting to exFAT free space = 15,699,279,872 bytes and used space = 48 Kb

Then downloaded and installed/used Win32DiskImager to install the Raspbian image to the SD card.
After the image install, the used space = 9,887,774 bytes and free space = 48,775168 bytes capacity = 56Mbytes

Plugged in HDMI monitor, USB keyboard, USB mouse, RJ45 Network cable to the WideWickedWorld.
Then the Samsung cell phone charger (it is all I have at the time), and
PRESTO!! the Pi fires up.
picture below shows the first boot config menu (should have switched off the camera flash)

After allocating all the SD card disk space to the Pi, I restarted.......

On restart you are prompted for a user name (pi) and password(raspberry)
Type startx to run the graphical interface.

Within this post will be my Blog space to keep you updated on my experiences getting the Raspberry Pi setup.
With a step by step process on how I arrive at setting up a Raspberry Pi (B+ model).
so this post will be updated here from time to time.
You can compare my journey, which I will try to explain in simple terms, with that of others, not saying my way is the right way,
but another way to get results.


Here is the Pi running the left screen with the Pi, mouse and keyboard below.
(BTW: this is at work)


Next I launched the LX Terminal and typed in
sudo apt-get update
to download the latest library of updates (btw: su = super user, the Linux equivalent of administrator access)
then typed
sudo apt-get upgrade
to initiate the system updates.

Now I edited a file to allow auto login:
Open the LX Terminal and type
sudo nano /etc/inittab
this opens the boot script file for editing, before very careful on what you do. pressing F2 will exit the text editor and F3 + Enter will save the file.
find the line with(or similar to)
1:2345:respawn:/sbin/getty 115200 tty1
and place a # in front of that line from the boot loader to ignore it, as below
#1:2345:respawn:/sbin/getty 115200 tty1
and insert another line of text as below
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
Press F3 key to save and Enter to confirm, then press F2 to exit the text editor, and type exit to close the terminal window.
When you re-start the Pi, the login name and password are no longer required.

Now to install FluidSynth, a Soundfont (*.sf2) PCM/sample type software synth..
sudo apt-get install fluidsynth
And try to install QSynth, a graphical interface for FluidSynth.

**UPDATE***
FluidSynth works!! I installed with the above command line instruction, waited for the install (the GM sound set is 120Mb),
and was pleasantly surprised to find QSynth installed too, and is in the Pi "Sound and Video" menu.
I also installed virtual keyboard for some quick midi note generation. sudo apt-get install vkeybd

Then setup QSynth with
  • to add a FluidSynth module and chose the alsa_seq for midi control, alsa audio driver, and the generic installed SoundFont (you can download or edit your own too).
    I then plugged in my GT-100 (as it was nearby).
    The jack audio driver only gave a very stuttered sound, so ALSA is the one to use with the internal soundcard.
    After setting up the JACK Audio control panel as shown with the midi cross-connects,
    and also setup driver=alsa and audio=playback only in the JACK audio connection kit.
    Now I tried the virtual keyboard and the GT-100 controlling patch change and the EXP pedal controlling the synth level. Works well !!
    Now the exciting bit, since the latest GT-100 firmware also includes pitch to midi (monophonic though), I enabled that and played a few notes.. that WORKS TOO.

    The Raspberry Pi, as well as being a Midi Cross connect unit, is also Software Synth sound module.



    I have also read about some settings that can switch the SD card to READ ONLY access, where the swap file is automatically disabled, and uses the ram as a scratch pad to load everything.
    Which means instant power off without corrupting the card, and by enabling the Write Access, the Pi can return to normal for further programming.
    I also recommend using the Win32DiskImager to make backups of your SD Card image as a precaution.

    ***** continued at Reply #8 *****
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

whippinpost91850

Gumtown, Looking forward to following your journey. I like the concise directions you are giving so far. Thanks

Ringleader

It might be time for a separate raspberry pi section of the forum. With all of its flexibility, I can see pi usage expanding well beyond the scope of the GP-10. Would be nice to have a resource for everyone's pi experiences that aren't all jammed into a few threads.

gumtown

#38
From here on my posts on my own setup will use the command line terminal and not the graphical interface
this gives you the option of a different setup (a true Linux programmer uses command line scripts instead of a GUI  ;) )

So if you read my previous post, you will see how to setup FluidSynth,
a SoundFont (*sf2) software midi synth,
allowing the Raspbian-Pi to become a midi sound module too.
Some links to SoundFont resources
http://www.synthfont.com/links_to_soundfonts.html
and the Viena soundfont editor here to make your own PCM/sample/synth sound sets
http://www.synthfont.com/Downloads.html

Next I have found a way to make the Pi disk system READ ONLY, so that sudden power off won't corrupt the SD Card.
First I recommend copying your SD card with the Win32DiskImager program to keep an up to date 'last working copy' of your Pi.
Then startup the Pi to the console command line.
type sudo nano /etc/fstab

and you will see something like
Quote
proc                           /proc           proc        defaults                0       0
/dev/mmcblk0p1        /boot            vfat         defaults                0       2
/dev/mmcblk0p2        /                  ext4        defaults,noatime    0       1
change the 4th parameter to 'ro' as below
Quote
proc                           /proc           proc        defaults                0       0
/dev/mmcblk0p1        /boot            vfat         ro                        0       2
/dev/mmcblk0p2        /                  ext4        ro                         0       1
then press F3 to save and then Y (yes)
then press F2 to exit
now restart, from the command line you can type sudo shutdown -r now (the -r = restart or -h = halt to power off)

The Pi will now restart in Read-Only mode,
Before using the GUI (typing startx) or to have write disk access for changes,
you will need to type sudo mount / -o remount,rw
Do not power off when write access is enabled
a proper shutdown is required in write acces mode,
and any restart will be in Read Only mode. 

** After Note ***
Although the disk is now read only and program/user access restored by the sudo mount / -o remount,rw command,
the firmware/boot area will stay read only and prevent firmware updates installing.
If you decide to make your Pi r/o and wish to install future firmware updates, then do the reverse of the above
with sudo nano /etc/fstab

***** continued at Reply #12 *****
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

MusicOverGear

#39
(Thunderous Applause)

Fantastic. I am going to rip out my shutdown switch the first chance I get. Your solution is much more fitting for a pedalboard.

UPDATE: I did this on my machine (Read-Only) and it works. Card is read-only and nothing else was effected. VERY NICE - THANKS!

That's one less control on my pedalboard.

loulea

I've always said backups are a must in the original thread!

I just added some links to videos on how to remote into your PI from a PC and remote into the PI with the IPAD and the PI wireless.

It is a great idea to have another forum for the PI because I can tell you that I can see you guys having fun with this. I have seen more posts about the PI than the GP-10. I know I have spent more on the PI than the GP-10 myself.

Keep em coming!

Enjoy!
Music is in everyone!!

mbenigni

QuoteSo if you read my previous post, you will see how to setup FluidSynth, a SoundFont (*sf2) software midi synth, allowing the Raspbian-Pi to become a midi sound module too.
QuoteNext I have found a way to make the Pi disk system READ ONLY, so that sudden power off won't corrupt the SD Card.
QuoteI just added some links to videos on how to remote into your PI from a PC and remote into the PI with the IPAD and the PI wireless.

Amazing, amazing, amazing.  You guys are doing some incredible work here!

gumtown

#42
I've finally "cracked it" and will post my results on how latter.
I now have a Midi cross connect device and a Soundfont softsynth which can be powered off without shutdown and not damage the SD card integrity.
It also only uses the command line and bin/bash scripting, no GUI overheads,\

although another script, where you just type 'quit' shuts down the synth and disconnects the midi cross connects and reinstates the write access to the SD card,
so you can resume normal Raspberry Pi business.


**After Note***
The midi device connections can also be multiple connections to the same device,
or you can make a pile of connections to devices not currently present,
so if you want to use the Pi for multiple uses, you can make predefined midi cross connects in the script,
and only the devices present will connect.

***** continued at Reply #13 *****
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

gumtown

#43
OK here's the nuts & bolts on how the scripting works for the midi cross connections and running the Fluidsynth (optional).
If you don't want fluidsynth, just omit the lines associated with it in both scripts.

from the Pi command prompt, type sudo nano /etc/init.d/midi_setup
this will create a new blank file, and type in the following.

Quote
#! /bin/sh
# /etc/init.d/midi_setup

### BEGIN INIT INFO
# Provides: midi_setup
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start Fluidsynth and aconnect
# Description: Simple script to start fluidsynth and aconnect
### END INIT INFO

# make disk read only if previously writable
mount / -o remount,ro
echo
echo "\033[0;32m*-*-*-*-*-*-*-*-* Starting Fluidsynth *-*-*-*-*-*-*-*-*\033[0;37m"
echo
# force the mixer to use the select built in sound card and analog 3.5mm jack port if HDMI is present.
amixer -c ALSA cset numid=3 1
# start fluidsynth with options for alsa midi and sound system, running as a server with no shell interface
fluidsynth -a alsa -m alsa_seq -si /usr/share/sounds/sf2/FluidR3_GM.sf2 &
# wait 15 seconds for the 120Mb GM synth file to load into memory before continuing
sleep 15
echo
echo
echo "\033[0;32m* * * * * * * * * Reading aconnect midi inputs * * * * * * * * *\033[0;37m"
aconnect -i
echo
echo "\033[0;32m* * * * * * * * * Reading aconnect midi outputs * * * * * * * * *\033[0;37m"
aconnect -o
echo
echo "\033[0;32m* * * * * * * * * cross-connect midi ports * * * * * * * * *\033[0;37m"
# do your midi cross connections below, left side is midi source, right side is midi destination
# Fluidsynth will always be 128:0 as the name changes with every reboot
aconnect 'PCR':1 128:0
aconnect 'GT-100':0 'GR-55':0
aconnect 'GP-10:0 128:0
aconnect 'GP-10:0 GT-100:0
aconnect 'GT-100':0 'GP-10':0
echo
echo
echo "\033[0;36m----- Type 'quit' to exit Fluidsynth and restore disk write access, or POWER OFF NOW -----\033[0;37m"
echo
echo
exit 0
now press the F3 key and then Enter to save
then press the F2 key to exit the script editor

now make the script executable by typing sudo chmod 755 /etc/init.d/midi_setup

Next we make the Quit script,
type sudo nano /usr/local/bin/quit
and type in the following


Quote
#! /bin/sh
# /usr/local/bin/quit

### BEGIN INIT INFO
# Provides: quit
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to kill Fluidsynth and aconnect midi connections and restore disk to R/W
# Description: Simple script to kill fluidsynth and aconnect midi connections and restore disk to R/W
### END INIT INFO

echo
# stop the fluidsynth process
sudo killall fluidsynth
# make disk access Writable after quiting fluidsynth
sudo mount / -o remount,rw
# release all midi connections
aconnect -x
echo
echo
echo "Disk sytem is now R/W -  do not power off - USE 'sudo shutdown -h now'"
echo "Type 'startx' to run GUI"
exit 0

now press the F3 key and then Enter to save
then press the F2 key to exit the script editor

now make the script executable by typing sudo chmod 755 /usr/local/bin/quit
and make it usuable without the 'sudo' command, type sudo chmod +x /usr/local/bin/quit

the script can be tested by typing sudo /etc/init.d/midi_setup start
and the process terminated by typing quit
Hint: pressing the up arrow key will display the last used commands so you don't have to type them all the time.
You can edit the script by typing sudo nano /etc/init.d/midi_setup but remember to have the file system R/W by using the quit command.

With various midi devices connected the script screen output will display the device descriptions,
which you can enter in the aconnect midi cross connect.

Once satisfied the scripting works, the script can be added to the start-up process.
now is also a good time for a SD card backup.
type sudo update-rc.d midi_setup defaults
if latter you don't want the script running at startup type sudo update-rc.d -f midi_setup remove

Now all we need is a program for midi event re-mapping.



Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

whippinpost91850

Watching you "Geniuses" figure this "S**t" out is mindblowingly 8)

gumtown

#45
I hope others can try it and share their results/thoughts/experiences.

Put forward some ideas on other uses or functions.

The Raspberry Pi is a complete micro computer the size of a cigarette packet,
with 4 USB ports, audio output, HDMI monitor out, Network enabled,
and a generous amount of digital I/O pins.

So here is a summary of the path I used to get the Raspberry Pi to work as a
General 4 port Midi USB cross connector/Hub and a Soft-synth (which the user can also make their own sound/sample set),
with the ability to be powered off without the requirement to shutdown.

https://www.vguitarforums.com/smf/index.php?topic=12067.msg87939#msg87939

https://www.vguitarforums.com/smf/index.php?topic=12067.msg88038#msg88038

https://www.vguitarforums.com/smf/index.php?topic=12067.msg88185#msg88185

https://www.vguitarforums.com/smf/index.php?topic=12067.msg88249#msg88249

** Note: I recommend now not using the Fluidsynth as it eats too much CPU time for the power the Pi currently has at B+ revision. Just omit the Fluidsynth lines from the scripts
Free "GR-55 FloorBoard" editor software from https://sourceforge.net/projects/grfloorboard/

mbenigni

#46
Another interesting alternative on the way - significantly more expensive, though:  http://techreport.com/news/26982/zotac-pico-pc-runs-windows-slips-into-a-pocket


Kevin M

Quote from: mbenigni on August 28, 2014, 08:21:30 AM
Another interesting alternative on the way - significantly more expensive, though:  http://techreport.com/news/26982/zotac-pico-pc-runs-windows-slips-into-a-pocket

I'd be curious to know if the GP-10 driver works on this box.  Is this the RT version of Win8.1?


Sent from my iPad using Tapatalk

admin

#48
Zotac Pico has a genuine Intel Atom ( not ARM) - so yes Win8 can run - but for $199 the specs look rather dreadful to me. (2GB RAM / 32GB Flash)


Might as well get one of these - and have a multitouch display too.
http://www.ebay.com/itm/Red-Dell-Venue-8-Pro-32GB-Tablet-8-inch-Intel-Atom-Z3740D-1-Yr-Warranty-Win-8-1-/171436335113?pt=US_Tablets&hash=item27ea66e009

Dell Venue 8 Pro 32GB Tablet 8" inch/Intel Atom Z3740D/1 Yr Warranty/Win 8.1  - $149



http://www.dell.com/us/p/dell-venue-8-pro/pd?&ST=dell%20venue%208%20pro&dgc=ST&cid=270552&lid=4960896&acd=123098073120560

and a USB OTG adapter $5 ( to connect to USB HUB)
http://www.ebay.com/itm/like/141372265621?lpid=82


mbenigni

Quote from: admsustainiac on August 28, 2014, 11:43:29 AM
Might as well get one of these - and have a multitouch display too.
http://www.ebay.com/itm/Red-Dell-Venue-8-Pro-32GB-Tablet-8-inch-Intel-Atom-Z3740D-1-Yr-Warranty-Win-8-1-/171436335113?pt=US_Tablets&hash=item27ea66e009

Wow - agreed, that is a much better solution, just by virtue of the touchscreen.  As for the Zotac specs, I'd only consider it as a little utility box anyway, e.g. to boot and run the GP-10 driver.  But no question the Dell is a better value.  I guess what remains to be seen is whether the Zotac's $199 is MSRP or street.  I'm sure that Dell retailed for much more than $149 on release.