Go to advanced search

by jwkennedy651
Wed Jul 29, 2015 7:05 pm
Forum: Python
Topic: Command line output to string
Replies: 7
Views: 1069

Re: Command line output to string

davef21370 wrote:Very likely using subprocess but I'm not the man to ask about that.

Dave.
Alright, thanks anyway!
Joe
by jwkennedy651
Wed Jul 29, 2015 7:00 pm
Forum: Python
Topic: Command line output to string
Replies: 7
Views: 1069

Re: Command line output to string

How about the PyGame midi module http://www.pygame.org/docs/ref/midi.html . Dave. I'll look into the pygame module too, I've heard of it before. I will probably use pygame instead of what I have now, but just out of curiosity, is there a way to do what I described in the original question? Thanks f...
by jwkennedy651
Wed Jul 29, 2015 6:42 pm
Forum: Python
Topic: Command line output to string
Replies: 7
Views: 1069

Command line output to string

I'm working on a project that involves a midi keyboard. I use the following code to get midi output data from the keyboard dumped onto the command line: amidi -d I need my python program to run this code and turn the output into a variable I can use later. The python script also needs to be able to ...
by jwkennedy651
Thu Jul 16, 2015 5:40 pm
Forum: Python
Topic: If no input for 3 seconds
Replies: 3
Views: 502

Re: If no input for 3 seconds

joan wrote:

Code: Select all

start_time is now

while not button pressed and (now - start_time) < 3:
   sleep for a short time

if button pressed:
   # do button pressed code
else:
   # do timeout code
I'll try this out and get back to you if I have any problems. Thank you!
by jwkennedy651
Thu Jul 16, 2015 5:17 pm
Forum: Python
Topic: If no input for 3 seconds
Replies: 3
Views: 502

If no input for 3 seconds

Hellos, I want to implement a feature in my script: if a button is not pressed for 3 seconds or more, perform an action. It would be something like this: (nextpreset is what I named my button in the code. The button sends False if it is being pressed, which is a little counterintuitive.) if nextpres...
by jwkennedy651
Tue Jul 14, 2015 4:44 am
Forum: Graphics, sound and multimedia
Topic: Making a MIDI piano playing device!
Replies: 3
Views: 8090

Re: Making a MIDI piano playing device!

fruitoftheloom wrote:This is a similar project which may give some pointers:

viewtopic.php?f=38&t=107622
Found some good info on your forum link on how to get midi data to display. Thanks, this may help me at some point in the project!
by jwkennedy651
Mon Jul 13, 2015 4:29 pm
Forum: Graphics, sound and multimedia
Topic: Making a MIDI piano playing device!
Replies: 3
Views: 8090

Making a MIDI piano playing device!

Hello, I'm looking to create a device with the pi where I can plug in my midi keyboard controller (mine plugs in via a USB cable, not the standard midi plug), attach a set of speakers to the pi, and instantly have a way to play live piano without the need for a bulky computer and a DAW. I found a pr...
by jwkennedy651
Thu Feb 26, 2015 12:09 am
Forum: Beginners
Topic: Deleting 'pi' user
Replies: 8
Views: 3876

Re: Deleting 'pi' user

In the first place, I really just wanted to rename the 'pi' user. So, this is my new plan: Instead of deleting pi, I think I will remove the joe account I already made, delete its home directory, and then use: sudo usermod -l joe pi to change my pi username to joe. I can then manually change the nam...
by jwkennedy651
Wed Feb 25, 2015 2:33 pm
Forum: Beginners
Topic: Deleting 'pi' user
Replies: 8
Views: 3876

Re: Deleting 'pi' user

I boot to the command line, so it should be fine.

Thank you for your help!
by jwkennedy651
Wed Feb 25, 2015 4:36 am
Forum: Beginners
Topic: Deleting 'pi' user
Replies: 8
Views: 3876

Deleting 'pi' user

Hello,

I have a Pi 2 model B running Raspbian. I recently created a new user ('joe') and granted this user sudo rights. Is it now safe for me to delete the default user pi? I do not have any important files stored in the old 'pi' home folder.

Thank you!

Go to advanced search