Go to advanced search

by PianoPCJ/A.F
Sun Mar 25, 2018 2:38 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

OMG! it works. Thanks!! now I need how I can run a python-script as solution of the right password.
by PianoPCJ/A.F
Sat Mar 24, 2018 2:28 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

I don't understand how I have to edit my script now.
And what I have to edit that the skript runs a non-python skript and the LED goes on if the password is correct?
and how to change the password?
by PianoPCJ/A.F
Thu Mar 22, 2018 7:44 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

I've had to disconnect keyboard as rooom full of other stuff for the moment but try this and see it if works import sys, pygame, pygame.midi # set up pygame pygame.init() pygame.midi.init() # list all midi devices for x in range( 0, pygame.midi.get_count() ): print pygame.midi.get_device_info(x) # ...
by PianoPCJ/A.F
Tue Mar 20, 2018 1:37 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

Ok, but now I need a possibility to set a melody which works like a passwort.
How can i do this?
by PianoPCJ/A.F
Mon Mar 19, 2018 6:00 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

mattmiller wrote:
Mon Mar 19, 2018 7:47 am
Can you just check what you get if you just play C D E in sequence please (which is what I did)
Of course. My output:

Code: Select all

[144, 60, 77, 0]
[128, 60, 46, 0]
[144, 62, 68, 0]
[128, 62, 47, 0]
[144, 64, 80, 0]
[128, 64, 80, 0]
now i played every tone separate.
by PianoPCJ/A.F
Sun Mar 18, 2018 8:59 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

Then if i start playing Sound of Music Do-Re-Me I get this output ('ALSA', 'Midi Through Port-0', 0, 1, 0) ('ALSA', 'Midi Through Port-0', 1, 0, 0) ('ALSA', 'Digital Keyboard MIDI 1', 0, 1, 0) ('ALSA', 'Digital Keyboard MIDI 1', 1, 0, 0) [144, 60, 31, 0] [144, 60, 0, 0] [144, 62, 42, 0] [144, 62, 0...
by PianoPCJ/A.F
Wed Feb 21, 2018 4:46 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

Wht keyboard do you have - does it have its own usbmidi port or are you using an adaptor device of some sort? I builded a "adapter" by a tutorial to build a Raspisynt http://www.instructables.com/id/PiMiDi-A-Raspberry-Pi-Midi-Box-or-How-I-Learned-to/ but then I noticed that in the tutorial they use...
by PianoPCJ/A.F
Wed Feb 21, 2018 2:05 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

notice i'm runing on Raspian Strech lite aah- that will be the problem with pygame not being installed maybe try sudo apt-get install python-pygame OK nice. that worked. but then when I run the file ther comes this: ('ALSA', 'Midi Through Port-0', 0, 1, 0) ('ALSA', 'Midi Through Port-0', 1, 0, 0) T...
by PianoPCJ/A.F
Tue Feb 20, 2018 3:31 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

:( From all that I've read - pygame is supposed to be installed by default I'm getting a new SD card tomorrow - I'll try setting up from scratch and see what happens on my system Can you remember the steps you did to get mididings to work for you? I only typed in apt-get update and apt-get install ...
by PianoPCJ/A.F
Tue Feb 20, 2018 2:05 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

But there is still the error:"ImportError: No module named pygame".
by PianoPCJ/A.F
Mon Feb 19, 2018 8:49 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

mattmiller wrote:
Mon Feb 19, 2018 4:07 pm
It is a python file. i saved it as ymidi.py

try running it as

Code: Select all

python ymidi.py
Interestingly - I can't get mididings to install - it gives me an error saying no package called jack :)
do I have anything to do before runing this script? Create a file? install a package?
and what is "pygame"?
by PianoPCJ/A.F
Mon Feb 19, 2018 2:10 pm
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Re: Using MIDI-events to run shell comands on a raspi

Just had a quick play - I've got a midi keyboard and plugged it in and found this code to read the midi datastream import sys, pygame, pygame.midi # set up pygame pygame.init() pygame.midi.init() # list all midi devices for x in range( 0, pygame.midi.get_count() ): print pygame.midi.get_device_info...
by PianoPCJ/A.F
Sun Feb 18, 2018 11:11 am
Forum: Graphics, sound and multimedia
Topic: Using MIDI-events to run shell comands on a raspi
Replies: 27
Views: 3538

Using MIDI-events to run shell comands on a raspi

Hello, I want to build a Gaming PC(with Windows on it) witch goes on if I play a melody on a MDI-Piano(like a Password). More accurate: I wan t that if I play that melody the raspy turns same Relay to give power to the PC. The PC strats if he gets power and also the screens. Before I want to save a ...
by PianoPCJ/A.F
Sat Feb 17, 2018 10:04 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 37
Views: 90324

Re: /etc/inittab no longer present in Raspbian Jessie?

Wheezy is two Debian versions before Stretch. (Jessie being the one in the middle we have just moved from). If you come from a Windows background. It's like running Windows 7 instead of windows 10 (with Windows 8 in between). You'll need to work around and figure out the new methods unfortunately, ...
by PianoPCJ/A.F
Sat Feb 17, 2018 7:43 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 37
Views: 90324

Re: /etc/inittab no longer present in Raspbian Jessie?

Ok thanks! But how can I follow no my tutorial? Again: In the tutorial they used a Raspi 2 and I have a Raspi3B The fundamental problem is that they keep changing things, rendering existing tutorials inaccurate. If your tutorials reference a Raspi 1 or 2, then they probably were written with Wheezy...
by PianoPCJ/A.F
Sat Feb 17, 2018 7:31 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 37
Views: 90324

Re: /etc/inittab no longer present in Raspbian Jessie?

Ok thanks! But how can I follow no my tutorial? Again: In the tutorial they used a Raspi 2 and I have a Raspi3B
by PianoPCJ/A.F
Sat Feb 17, 2018 6:42 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 37
Views: 90324

Re: /etc/inittab no longer present in Raspbian Jessie?

ShiftPlusOne wrote:
Fri Feb 16, 2018 5:14 pm
Use raspi-config to disable serial shell instead of the way they say in the tutorial. You want to keep the hardware enabled, but disable the shell (it should ask you two questions).

what do you mean with raspi-config? is this a comand or a file?
by PianoPCJ/A.F
Fri Feb 16, 2018 3:52 pm
Forum: Raspbian
Topic: /etc/inittab no longer present in Raspbian Jessie?
Replies: 37
Views: 90324

Re: /etc/inittab no longer present in Raspbian Jessie?

Hello, I almost have the same problem. I will explain my situation: I have a Raspberry Pi 3 Model B and I want to edit the inittab.txt file but it does not exists :cry:. In a tutorial to build a Midi-synth they used an Raspberry 2 but I thought there are no differences between the Raspi 2 and Raspi ...

Go to advanced search