Linux midi don't see my sh-01a

#1

Hi,

After 2 day of work I installed successfully version 3.2 on raspian os.
It works fine but it doesn’t see my roland sh-01a connect trough usb.
I tried on a raspberry pi and it works.
My computer see the sh-01a but not sonic-pi. I tried to connect
with visuals (patchage, qjack) with no results.

I think is a sonic-pi bug, any ideas ?

#2

Hi,

Congratulations to have succeed into installing Version 3.2. on rasbian os.
Would you share the way you take to reach this point ? I have tried few months ago and it failed.
Cheers

#3

Totally crazy,
I don’t rember everything but the main bug are that the library path must
be/usr/lib/i386-linux-gnu/ and so on. There is also a lot of simlink to do.
If you run the script and check every line is possible.
You must also to run jack before like this : jackd -d alsa --device hw:1,0 --rate 44100 --period 4096

here’s my build-debian-app, tell me if you are lost


#Application/library versions built by this script.
SUPERCOLLIDER_VERSION=3.9.1
SC_PLUGINS_VERSION=3.9.0 # 3.9.1 is currently in pre-release and I've had issues installing it, but 3.9.0 seems to work fine.#!/bin/bash

#Fail script on first error encountered
set -e
# Verbose
#set -x
AUBIO_VERSION=c6ae035 # v0.4.6
OSMID_VERSION=391f35f789f18126003d2edf32902eb714726802
RUGGED_VERSION=0.26.0

#Internal definitions
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SP_APP_SRC=${SCRIPT_DIR}
SP_ROOT=${SP_APP_SRC}/../../../../
OSMID_DIR=${SP_APP_SRC}/../../server/native/linux/osmid

CYAN='\033[1;36m'
NC='\033[0m' # No Color

echo "This script is modified version of the original build-ubuntu-app script. This has been tested on Debian Stretch (9)."
echo "In some cases users may need to install some of the dependencies by hand from source."
echo "We're working to make a one shot script solution for all Linux platforms."
echo "Original script made by Factoid and possibly other people, modified for Debian Stretch by SunderB."

installMethod=''

while [ "$installMethod" != "1" ] && [ "$installMethod" != "2" ]; do
		echo 'Some packages may be built from source and installed manually.'
		echo 'How do you want to install these packages?'
		echo '1 - install manually via. make install.'
		echo '2 - make .deb packages via. checkinstall and install those via dpkg. (Only works on Debian)'
		echo 'Type quit to exit.'
		read installMethod
		if [ "$installMethod" == "quit" ]; then
				return;
		fi
done

#Install dependencies for building supercollider, as well as qt5 and supporting libraries for gui
echo -e "${CYAN}Installing dependencies for building supercollider, as well as qt5 and supporting libraries for gui...${NC}"
sudo apt-get install -y \
     g++ ruby ruby-dev pkg-config git build-essential libjack-jackd2-dev \
     libsndfile1-dev libasound2-dev libavahi-client-dev libicu-dev \
     libreadline6-dev libfftw3-dev libxt-dev libudev-dev cmake libboost-dev \
     libqwt-qt5-dev libqt5scintilla2-dev libqt5svg5-dev qt5-qmake qt5-default \
     qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
     qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev libffi-dev \
     curl python erlang-base
					
if [ "$installMethod" == "2" ]; then
		echo -e "${CYAN}Installing checkinstall...${NC}"
		sudo apt-get install checkinstall
fi

# Ruby Packages:
# ruby ruby-dev gem
# ------------------
# ruby - Interpreter for the ruby programming language
# ruby-dev - Header files for compiling extension modules for Ruby

# Qt Packages:
# libqwt-qt5-dev libqt5scintilla2-dev libqt5svg5-dev qt5-qmake qt5-default \
#    qttools5-dev qttools5-dev-tools qtdeclarative5-dev libqt5webkit5-dev \
#    qtpositioning5-dev libqt5sensors5-dev qtmultimedia5-dev
					
# Other languages and compilers:
# python erlang-base g++ 

# Other tools:
# git curl
# -----------------
# git - A version/revision control system
# curl - 

### IF YOU HAVE PROBLEMS WITH qwt
cd $SP_APP_SRC/../../../../
wget 'http://downloads.sourceforge.net/project/qwt/qwt/6.1.2/qwt-6.1.2.tar.bz2'
tar -xf qwt-6.1.2.tar.bz2
cd qwt-6.1.2
/usr/lib/i386-linux-gnu/qt5/bin/qmake qwt.pro
make
sudo make install
sudo cp /usr/local/qwt-6.1.2/features/* /usr/lib/i386-linux-gnu/qt5/mkspecs/features/

 #IF YOU HAVE PROBLEMS WITH qscintilla2
cd $SP_APP_SRC/../../../../
wget 'http://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.9.2/QScintilla_gpl-2.9.2.tar.gz'
tar -xf QScintilla_gpl-2.9.2.tar.gz
cd QScintilla_gpl-2.9.2/Qt4Qt5/
/usr/lib/i386-linux-gnu/qt5/bin/qmake qscintilla.pro
make
sudo make install

#Build supercollider from source
echo -e "${CYAN}Building supercollider from source...${NC}"
cd "${SP_ROOT}"
git clone --recursive https://github.com/supercollider/supercollider.git || true
cd supercollider
git checkout Version-${SUPERCOLLIDER_VERSION}
git submodule init && git submodule update
git submodule update --init
mkdir -p build
cd build
cmake -DSC_EL=no ..
make
echo -e "${CYAN}Installing supercollider...${NC}"
if [ "$installMethod" == "2" ]; then
		sudo checkinstall --pkgname=supercollider --pkgversion=1:${SUPERCOLLIDER_VERSION} --pkglicense=GPL-3.0 --pkggroup=sound --nodoc --default --install=no
		sudo dpkg -i supercollider_${SUPERCOLLIDER_VERSION}-1_amd64.deb
else
		sudo make install
fi
#This should install to /usr/local/

#Install sc3 plugins
#Build sc3 plugins and install to /usr/local/ so supercollider can find them
echo -e "${CYAN}Building sc3-plugins from source...${NC}"
cd "${SP_ROOT}"
git clone --recursive https://github.com/supercollider/sc3-plugins.git || true
cd sc3-plugins
git checkout Version-${SC_PLUGINS_VERSION}
git submodule init && git submodule update
git submodule update --init
cp -r external_libraries/nova-simd/* source/VBAPUGens
mkdir -p build
cd build
#cmake -DSC_PATH=../../supercollider -DCMAKE_INSTALL_PREFIX=/usr/local ..
#cmake -DCMAKE_INSTALL_PREFIX=/usr/local --build . --config Release
cmake -DSC_PATH=../../supercollider ..
cmake --build . --config Release
make
echo -e "${CYAN}Installing sc3-plugins...${NC}"
if [ "$installMethod" == "2" ]; then
		sudo checkinstall --pkgname=sc3-plugins --pkgversion=1:${SC_PLUGINS_VERSION} --pkglicense=GPL-2.0 --pkggroup=sound --nodoc --default --install=no
		sudo dpkg -i sc3-plugins_${SC_PLUGINS_VERSION}-1_amd64.deb
else
		sudo make install
fi

#Install libaubio (apt-get version is too old)
echo -e "${CYAN}Building libaubio from source...${NC}"
cd "${SP_ROOT}"
git clone https://git.aubio.org/git/aubio/ || true
cd aubio
git checkout ${AUBIO_VERSION}
make getwaf
./waf configure
./waf build
sudo ./waf install

#Install osmid (for MIDI support)
echo -e "${CYAN}Building osmid from source...${NC}"
cd "${SP_ROOT}"
git clone https://github.com/llloret/osmid.git || true
cd osmid
git checkout ${OSMID_VERSION}
mkdir -p build
cd build
cmake ..
make
echo -e "${CYAN}Installing osmid...${NC}"
mkdir -p "${OSMID_DIR}"
install m2o o2m -t "${OSMID_DIR}"

#Build Erlang files
echo -e "${CYAN}Building Erlang files...${NC}"
cd "${SP_APP_SRC}/../../server/erlang"
#The current implementation of osc.erl uses Erlang features that require
#at least Erlang 19.1 to be installed. 16.04 LTS is currently at 18.3.
#If versions < 19.1 are installed, and we use the current code, the MIDI
#implementation breaks because the Erlang OSC router is failing.
ERLANG_VERSION=$(./print_erlang_version)
if [ -e "osc.erl.orig" ]; then
    # Handle, if the original file in the source tree ever gets updated.
    rm osc.erl.orig
    git checkout osc.erl
fi
if [[ "${ERLANG_VERSION}" < "19.1" ]]; then
    echo "Found Erlang version < 19.1 (${ERLANG_VERSION})! Updating source code."
    sed -i.orig 's|erlang:system_time(nanosecond)|erlang:system_time(nano_seconds)|' osc.erl
fi
erlc osc.erl
erlc pi_server.erl

#Build sonic-pi server extensions, documentation, and binary.
cd "${SP_APP_SRC}"

echo -e "${CYAN}Building sonic-pi server extensions...${NC}"
### If you're having trouble with rugged, this should install rugged and copy it to the Sonic Pi folder.
#sudo gem install rugged
#cp -a "/var/lib/gems/2.3.0/gems/rugged-${RUGGED_VERSION}/." "../../server/ruby/vendor/rugged-${RUGGED_VERSION}/" # You may need to change this path slightly

ruby ../../server/ruby/bin/compile-extensions.rb
echo -e "${CYAN}Building sonic-pi documentation...${NC}"
ruby ../../server/ruby/bin/i18n-tool.rb -t
cp -f ruby_help.tmpl ruby_help.h
ruby ../../server/ruby/bin/qt-doc.rb -o ruby_help.h
echo -e "${CYAN}Building sonic-pi binary...${NC}"
lrelease SonicPi.pro
qmake -qt=qt5 SonicPi.pro
make
echo -e "${CYAN}Done!${NC}"
2 Likes
Raspberry pi and sonic pi 3.2 dev possible on raspbian stretch?
#4

oh thanks a lot. Could you add three backticks to color your code and to make us easy to copy / paste.
I will try as soon as possible and come back !

#5

With pleasure but how must I do ?
Sorry to be stupid forum user.

#6

hi,

well on an azerty keyboard (used in France), we do a backtick with the keys [ALT Gr] + ` (the backtick :slight_smile:) located on the key with 7 è and `

a little search on google : https://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows

so you have to find the backtick symbol on your keyboard then put 3 of them to begin a block code and and 3 of them to end. the tip is to type the backtick and then press on space bar to make it appear.

play :c4

hope it helps.

#7

I did like you said, thanks, I changed the previous post.
For my midi problem, I think it’s maybe sonic-pi who don’t have permissions
to access midi usb. Let’s see

2 Likes
#9

try this :

sudo apt-get update
sudo apt-get install qt5-default 

Or try to find it on your computer maybe the file is elsewhere.

#10

yes i’m looking for the good path, a metaphysic question i think i’m going to create a new post not to spam your initial topic.

#11

Hi @matheynen,

Well done for getting the latest dev version working on Raspbian. Did you also recompile or copy across the MIDI subsystem binaries into your build folder?

If not, try copying o2m and m2o from /opt/sonic-pi/app/server/native/osmid into the matching directory app/server/native/osmid in your new build path and see if that improves things after a restart of Sonic Pi :slight_smile:

2 Likes
#12

Indeed, thank you. Now I’m ready for solar system expedition

3 Likes