KenoRosarioPH
Posts: 41
Joined: Wed Nov 18, 2015 1:51 pm

GUI on Raspbian OS

Thu Nov 19, 2015 6:44 pm

I am in my last year project dealing with raspberry pi that has the ability to record voice with my single tap on its touchscreen. I already knew how recording and playback works, what i really want an answer is the part where i could build an GUI for my "START" and "STOP" "PLAYBACK" button that executes the same command when type "arecord" "aplay" on lxt terminal. Thank you

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: GUI on Raspbian OS

Fri Nov 20, 2015 6:40 am

What programming languages do you know ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Aydan
Posts: 729
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: GUI on Raspbian OS

Fri Nov 20, 2015 9:38 am

Since you want to use the touch screen, Kivy should be the best solution.

Regards
Aydan

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: GUI on Raspbian OS

Fri Nov 20, 2015 12:00 pm

Since you're a student, have you thought about asking your professor for help?

This forum isn't here to provide canned answers for you. It's here to provide support, advice and guidance and to point you in the right direction with possibly some small examples of code.

You have to do your own research, because otherwise can I have your BA or BSc assigned to me when I've done your coursework for you.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

gordon77
Posts: 5074
Joined: Sun Aug 05, 2012 3:12 pm

Re: GUI on Raspbian OS

Fri Nov 20, 2015 2:07 pm

You could try python, maybe pygame to draw the GUI.

then use subprocess to call arecord etc

eg

import subprocess
....
rpistr = "arecord ..."
p=subprocess.Popen(rpistr,shell=True, preexec_fn=os.setsid)

replace the ... with the full command you need.

User avatar
PeterO
Posts: 5951
Joined: Sun Jul 22, 2012 4:14 pm

Re: GUI on Raspbian OS

Fri Nov 20, 2015 2:19 pm

Or you could read up on the GTK+ language bindings for your preferred language , and ALSA, and integrate the reading and writing the alsa device into the GTK+ event loop. That way there is no messy forking of subprocess to deal with ;)
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

KenoRosarioPH
Posts: 41
Joined: Wed Nov 18, 2015 1:51 pm

Re: GUI on Raspbian OS

Fri Nov 20, 2015 6:51 pm

DougieLawson wrote:Since you're a student, have you thought about asking your professor for help?

This forum isn't here to provide canned answers for you. It's here to provide support, advice and guidance and to point you in the right direction with possibly some small examples of code.

You have to do your own research, because otherwise can I have your BA or BSc assigned to me when I've done your coursework for you.

Dont have chance to ask for help and I know I've been stretching the limitations of the forum and seem to fish "ready-to-eat" answers. Just want to call reparation for this acts. This forum lessened the time for me to research and go direct on the answers given by you and other experts from this forum and so i tried asking multiple questions on this forum to go easy on this. Thanks sir, You are really a great help. ;)

KenoRosarioPH
Posts: 41
Joined: Wed Nov 18, 2015 1:51 pm

Re: GUI on Raspbian OS

Fri Nov 20, 2015 6:52 pm

ghans wrote:What programming languages do you know ?

ghans
I can do python programming, But less of an expert. Thanks

Aydan
Posts: 729
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: GUI on Raspbian OS

Fri Nov 20, 2015 6:56 pm

KenoRosarioPH wrote:
ghans wrote:What programming languages do you know ?

ghans
I can do python programming, But less of an expert. Thanks
Then have a look at Kivy. It's a python framework for touch interaction and more.

KenoRosarioPH
Posts: 41
Joined: Wed Nov 18, 2015 1:51 pm

Re: GUI on Raspbian OS

Fri Nov 20, 2015 6:59 pm

Aydan wrote:
KenoRosarioPH wrote:
ghans wrote:What programming languages do you know ?

ghans
I can do python programming, But less of an expert. Thanks
Then have a look at Kivy. It's a python framework for touch interaction and more.
Will Sir! Thankyou

Return to “General discussion”