Board logo

標題: Freelance Linux programmer [打印本頁]

作者: ackcheng    時間: 2008-11-12 11:42     標題: Freelance Linux programmer

Anyone know where I can find freelance Linux programmer?
作者: cuph    時間: 2008-11-12 13:44

請問想要寫咩language呢 ?
Linux programmer 都可以有好多野, shell, perl, php, C ?
作者: foobar    時間: 2008-11-12 15:46

其實我想八o下樓主係想搵人改 Linux Kernel 定有件 Hardware 想寫 Linux Driver? 不過我冇門路介紹

如果唔係要搞到咁專的話,其實 Open Source Software 入面好可能已經有類似你想要o既o野,橫掂你搵 Freelance 都諗住要洗錢,不如睇o下有冇現成類似 Project,Send 個 Email 問o下個作者幫你做個改動收幾錢仲好
作者: ackcheng    時間: 2008-11-12 18:47

Thanks. Actually I am using BruteFir as a player/convolver/digital crossover for music playback

http://www.ludd.luth.se/~torger/brutefir.html

However, each time I play a wav file, I have to type the file name as part of the shell script. I would like someone to help me to write a GUI so that it can load the whole CD into ram disk, and allow play back function like fast forward etc. Essentially, it is a GUI for running a shell script.

Should I look for someone who can write C++? Should not be too complicated.
作者: toylet    時間: 2008-11-12 20:27

提示: 作者被禁止或刪除 內容自動屏蔽
作者: ackcheng    時間: 2008-11-12 21:21

different quality ma!
作者: hdvd-rom    時間: 2008-11-13 22:24

can you give some tutorials, howto or documentation about this piece of software?
Since this software have not been updated for a long time. There are only few documents talking about the configuration and usage. An additional question is which desktop environment are you using?
作者: ackcheng    時間: 2008-11-13 22:34

This software allows digital signal processing which is what I required. The trick is to control the configuration file. with the shell script. In  my origial script, I divided it into t1 t2 and t3. T1 and t3 are always the same, t2 is like this

device: "file" { path: "/music_ram/15_ArneDomnerus_AntiphoneBlues.wav"; skip: 44; };

This is the command needed to control the play back. When I play the music, I have another script which which combine t1, t2 and t3 into a single configuration file.

The problem I have now is that I have to type the file name every time and i would like it to be controlled by a good GUI.
作者: ackcheng    時間: 2008-11-13 22:35

At the moment, I am using it in SPBlinux but I plan to use it in Ubuntu studio
作者: hdvd-rom    時間: 2008-11-16 23:07

can you provide a set of usable configuration files, filters and sound files for testing purpose?
作者: hdvd-rom    時間: 2008-11-17 16:45

i have created a prototype using python + gtk+ which only include the most basic features.
it should be runnable on most gnome-based linux distributions.
will you give it a try?

features in this moment:
1.select multi-files for playing.
2.play & stop
3.previous, next button
4.repeat mode
5.WAV playback

other features can be add as demand
e.g.(playlist, configuration editor, other music format, shuffle mode....etc)

in order to use this prototype, you should set the input to stdin.

you can save it using text editor and give execute right to it, then you can use it as a normal binary program.

[ 本帖最後由 hdvd-rom 於 2008-11-17 16:54 編輯 ]
作者: ackcheng    時間: 2008-11-18 01:02

Wow, you are so quick, I was working on the config file.

How can I email you?
作者: ntony    時間: 2008-11-18 19:57

I'm interesting in helping. I will send you my email via PM.
作者: hdvd-rom    時間: 2008-11-19 11:07

just a prototype and i don't have time to do a complete version.
it is nice to have someone interested in linux programming, you will share the source code for study purpose?

here is my prototype.
comment is welcome, since i still very new to programming.
save the first code block as "player.py" and the second code block as "player.glade"
  1. #!/usr/bin/env python
  2. import sys

  3. #include gtk::python binding
  4. try:
  5.     import pygtk
  6.     #confirm the gtk version is 2.0 or above
  7.     pygtk.require('2.0')
  8. except:
  9.     pass

  10. try:
  11.     #include gtk and glade library
  12.     import gtk
  13.     import gtk.glade
  14. except:
  15.     sys.exit(1)

  16. import subprocess
  17. import os

  18. import threading

  19. status = "stop"
  20. class ProcessHolder(threading.Thread):
  21.     def __init__(self,process):
  22.         self.process = process
  23.         threading.Thread.__init__(self)

  24.     def run(self):
  25.         print "process start"
  26.         while self.process.returncode == None:
  27.             continue      
  28.         print "before hell"

  29.         print "status: " + status
  30.         if status == "playing":
  31.            self.player.playNext()
  32.    
  33. class BrutefirPlayer:
  34.     """The window object for tutorial"""

  35.     def __init__(self):
  36.         self.gladefile = "player.glade"
  37.         self.currentFile = 0
  38.         self.files = []

  39.         #self.process = ""
  40.         status = "stop"
  41.         self.pholder = threading.Thread()
  42.         self.lock = threading.RLock()

  43.         #Load the glade file and contruct the whole GUI as glade described
  44.         self.xml = gtk.glade.XML(self.gladefile)
  45.         #self.xml = gtk.glade.xml_new_from_buffer(self.gladefile,len(self.gladefile))
  46.         self.filechooser = self.xml.get_widget("filechooser")
  47.         self.play_song = self.xml.get_widget("play")
  48.         #match the handler function name and the event handler name
  49.         # format = "the event name" : the handler function
  50.         # e.g. 'on_' + button1(widget name) + '_' clicked(event)
  51.         dic = { "on_play_clicked" : self.on_play_clicked,
  52.                 "on_prev_song_clicked" : self.on_prev_song_clicked,
  53.                 "on_next_song_clicked" : self.on_next_song_clicked,
  54.                 "on_openfile_clicked" : self.on_openfile_clicked,
  55.                 "on_file_ok_clicked" : self.on_file_ok_clicked,
  56.                 "on_file_cancel_clicked" : self.on_file_cancel_clicked,
  57.                 "gtk_main_quit" : gtk.main_quit }

  58.         #connect all the handler and signal
  59.         self.xml.signal_autoconnect(dic)

  60.     def on_play_clicked(self, Widget):
  61.         #example handler for button1 clicked event
  62.         #the Widget is a user data being passed with the signal
  63.         #it can be any widget in the structure
  64.         if Widget.get_label() == gtk.STOCK_MEDIA_PLAY:
  65.             self.playCurrentFile()
  66.             Widget.set_label(gtk.STOCK_MEDIA_STOP)
  67.         else:
  68.             Widget.set_label(gtk.STOCK_MEDIA_PLAY)
  69.             self.stopPlaying()

  70.     def on_prev_song_clicked(self, Widget):
  71.         if self.currentFile <= 0:
  72.             self.currentFile = len(self.files)-1
  73.         else:
  74.             self.currentFile = self.currentFile - 1

  75.         if self.play_song.get_label() == gtk.STOCK_MEDIA_STOP:
  76.             self.playCurrentFile()


  77.     def on_next_song_clicked(self, Widget):
  78.         if self.currentFile >= len(self.files) - 1:
  79.             self.currentFile = 0
  80.         else:
  81.             self.currentFile = self.currentFile + 1

  82.         if self.play_song.get_label() == gtk.STOCK_MEDIA_STOP:
  83.             self.playCurrentFile()

  84.     def on_openfile_clicked(self, Widget):
  85.         self.filechooser.show()

  86.     def on_file_ok_clicked(self, Widget):
  87.         self.setFile()
  88.         self.filechooser.hide()

  89.     def on_file_cancel_clicked(self,Widget):
  90.         self.filechooser.hide()

  91.     def setFile(self):
  92.         self.files = self.filechooser.get_uris()
  93.         print self.files
  94.         self.currentFile = 0
  95.         
  96.     def playCurrentFile(self):
  97.         self.stopPlaying()
  98.         status = "playing"
  99.         wav = open(self.files[self.currentFile][6:])
  100.         self.process = subprocess.Popen("brutefir",stdin=wav)
  101.         self.pholder = ProcessHolder(self.process)
  102.         self.pholder.start()

  103.     def playFile(self,id=0):
  104.         self.currentFile=id%(len(self.files)-1)
  105.         self.playCurrentFile()

  106.     def stopPlaying(self):
  107.         self.lock.acquire()
  108.         status = "stop"
  109.         subprocess.call(["killall","brutefir"])
  110.         subprocess.call(["killall","brutefir.orig"])
  111.         self.lock.release()
  112.         while self.pholder.isAlive():
  113.             print "alive"
  114.             continue

  115.     def askForNext(self):
  116.         return (self.currentFile +1) % (len(self.files))

  117.     def playNext(self):
  118.        if status == "playing":
  119.            print "play next song"
  120.            id = self.askForNext()
  121.            self.playFile(id)

  122.     def gtk_main_quit( self ):
  123.         #simple function connection
  124.         gtk.main_quit()

  125. if __name__ == "__main__":
  126.     #create a button window object
  127.     g = BrutefirPlayer()
  128.     #start the gtk mainloop
  129.     gtk.main()
複製代碼
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
  3. <!--Generated with glade3 3.4.5 on Mon Nov 17 06:25:09 2008 -->
  4. <glade-interface>
  5.   <widget class="GtkWindow" id="window1">
  6.     <property name="visible">True</property>
  7.     <property name="title" translatable="yes">BrutefirPlayer</property>
  8.     <signal name="delete_event" handler="gtk_main_quit"/>
  9.     <signal name="destroy_event" handler="gtk_main_quit"/>
  10.     <child>
  11.       <widget class="GtkHButtonBox" id="hbuttonbox1">
  12.         <property name="visible">True</property>
  13.         <child>
  14.           <widget class="GtkButton" id="openfile">
  15.             <property name="visible">True</property>
  16.             <property name="can_focus">True</property>
  17.             <property name="receives_default">True</property>
  18.             <property name="label" translatable="yes">gtk-open</property>
  19.             <property name="use_stock">True</property>
  20.             <property name="response_id">0</property>
  21.             <signal name="clicked" handler="on_openfile_clicked"/>
  22.           </widget>
  23.         </child>
  24.         <child>
  25.           <widget class="GtkButton" id="prev_song">
  26.             <property name="visible">True</property>
  27.             <property name="can_focus">True</property>
  28.             <property name="receives_default">True</property>
  29.             <property name="label" translatable="yes">gtk-media-previous</property>
  30.             <property name="use_stock">True</property>
  31.             <property name="response_id">0</property>
  32.             <signal name="clicked" handler="on_prev_song_clicked"/>
  33.           </widget>
  34.           <packing>
  35.             <property name="position">1</property>
  36.           </packing>
  37.         </child>
  38.         <child>
  39.           <widget class="GtkButton" id="play">
  40.             <property name="visible">True</property>
  41.             <property name="can_focus">True</property>
  42.             <property name="receives_default">True</property>
  43.             <property name="label" translatable="yes">gtk-media-play</property>
  44.             <property name="use_stock">True</property>
  45.             <property name="response_id">0</property>
  46.             <signal name="clicked" handler="on_play_clicked"/>
  47.           </widget>
  48.           <packing>
  49.             <property name="position">2</property>
  50.           </packing>
  51.         </child>
  52.         <child>
  53.           <widget class="GtkButton" id="next_song">
  54.             <property name="visible">True</property>
  55.             <property name="can_focus">True</property>
  56.             <property name="receives_default">True</property>
  57.             <property name="label" translatable="yes">gtk-media-next</property>
  58.             <property name="use_stock">True</property>
  59.             <property name="response_id">0</property>
  60.             <signal name="clicked" handler="on_next_song_clicked"/>
  61.           </widget>
  62.           <packing>
  63.             <property name="position">3</property>
  64.           </packing>
  65.         </child>
  66.       </widget>
  67.     </child>
  68.   </widget>
  69.   <widget class="GtkFileChooserDialog" id="filechooser">
  70.     <property name="border_width">5</property>
  71.     <property name="title" translatable="yes">FileChooser</property>
  72.     <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>

  73.     <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
  74.     <property name="has_separator">False</property>
  75.     <property name="select_multiple">True</property>
  76.     <signal name="file_activated" handler="on_file_ok_clicked"/>
  77.     <child internal-child="vbox">
  78.       <widget class="GtkVBox" id="dialog-vbox1">
  79.         <property name="visible">True</property>
  80.         <property name="spacing">2</property>
  81.         <child>
  82.           <placeholder/>
  83.         </child>
  84.         <child internal-child="action_area">
  85.           <widget class="GtkHButtonBox" id="dialog-action_area1">
  86.             <property name="visible">True</property>
  87.             <property name="layout_style">GTK_BUTTONBOX_END</property>
  88.             <child>
  89.               <widget class="GtkButton" id="file_ok">
  90.                 <property name="visible">True</property>
  91.                 <property name="can_focus">True</property>
  92.                 <property name="receives_default">True</property>
  93.                 <property name="label" translatable="yes">gtk-ok</property>
  94.                 <property name="use_stock">True</property>
  95.                 <property name="response_id">0</property>
  96.                 <signal name="clicked" handler="on_file_ok_clicked"/>
  97.               </widget>
  98.             </child>
  99.             <child>
  100.               <widget class="GtkButton" id="file_cancel">
  101.                 <property name="visible">True</property>
  102.                 <property name="can_focus">True</property>
  103.                 <property name="receives_default">True</property>
  104.                 <property name="label" translatable="yes">gtk-cancel</property>
  105.                 <property name="use_stock">True</property>
  106.                 <property name="response_id">0</property>
  107.                 <signal name="clicked" handler="on_file_cancel_clicked"/>
  108.               </widget>
  109.               <packing>
  110.                 <property name="position">1</property>
  111.               </packing>
  112.             </child>
  113.           </widget>
  114.           <packing>
  115.             <property name="expand">False</property>
  116.             <property name="pack_type">GTK_PACK_END</property>
  117.           </packing>
  118.         </child>
  119.       </widget>
  120.     </child>
  121.   </widget>
  122.   <widget class="GtkWindow" id="playlist">
  123.     <property name="title" translatable="yes">Play List</property>
  124.     <child>
  125.       <widget class="GtkTreeView" id="songtree">
  126.         <property name="visible">True</property>
  127.         <property name="can_focus">True</property>
  128.         <signal name="row_activated" handler="on_songtree_row_activated"/>
  129.       </widget>
  130.     </child>
  131.   </widget>
  132. </glade-interface>
複製代碼

[ 本帖最後由 hdvd-rom 於 2008-11-20 15:57 編輯 ]
作者: ackcheng    時間: 2008-11-19 23:10

Dear HDVD-Rom,

Thanks for kicking off the program. Let me work through it and I will certainly post it up here.

Yours

ackcheng
作者: hdvd-rom    時間: 2008-11-20 15:55

pygtk main site have all you wanted, include reference, tutorials, download.
python have many free book available, like dive into python, how to think like a computer scientist....

python official site(reference, tutorials, download, books, howto, useful links)
http://www.python.org/
pygtk official site(reference, tutorials, download)
www.pygtk.org
dive into python(book,useful links)
http://diveintopython.org/
python cook recipes(cookbook)
http://code.activestate.com/recipes/langs/python/
learning python (tutorials)
www.learningpython.com
dicussion group(Q&A)
http://groups.google.com/group/comp.lang.python/topics

my program is only a rapid demo for showing the possibility and the included technologies.
Therefore, it has not much value for studying. it just like a combination of samples.

p.s. save the first code block as "player.py" and the second code block as "player.glade"

[ 本帖最後由 hdvd-rom 於 2008-11-20 15:58 編輯 ]





歡迎光臨 電腦領域 HKEPC Hardware (https://h2.hkepc.com/forum/) Powered by Discuz! 7.2