[jokosher-devel] Weekly Report No 1

2010-05-28 Thread David Williams
Hey everyone,

I've posted a new blog about what I've been up to in the first official week of 
coding.

I've pasted it below for ease of reading but you can find it in it's html glory 
at : http://redache.wordpress.com/

So the Summer of Code has officially begun and I’ve been doing a few things 
this week (as well as finishing my final exam(yay!)).

I’ve been working on writing a GStreamer source element for the MusicXML 
generator that will allow me to send the generated MusicXML to a GStreamer 
Pipeline. FIlesrc isn’t suitable as I don’t want to load the file every time I 
want the MusicXML to play. I’ve been having a little difficulty getting the 
Source Element to work as there isn’t much information on how the Python 
GStreamer bindings are used in the context of creating elements. I found a post 
on the Pitivi wiki that explains some of the basics but isn’t solely based on 
Source Elements. I’ve been reading the C tutorials for GStreamer as well to try 
and learn as much as I can about GStreamer and how it interacts with the 
plugins, which should help me understand how to get things working better.

So most of this week has been spent reading Tutorials and Source Code for other 
GStreamer Source Elements (like audiotestsrc) and trying to transfer those 
concepts over to Python. I’m nearly finished with the Source Element I just 
need to figure out how I can pass the data buffer back out into the pipeline, 
which is the only part I’ve really had issue with. Hopefully I’ll get that done 
as soon as possible and I can start working on integrating what I have so far 
into the Jokosher code base and at some point soon starting on a basic UI.

Thanks for reading,
David Williams
Project: Extending Jokosher to include a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Friday 4th June 2010 Weekly Report 2

2010-06-04 Thread David Williams
Hi everyone,

I've posted my second weekly report and added branch to Launchpad with
the current code that I have.

The text of the report is below and you can find the blog post itself at
[1]

This week I've been trying to get a Test GUI working with the Source
Element and XML generator, just so I can work on enhancing the model and
making sure things work as expected. I've managed to get the source
element working after spending what seemed like hours tracing a buffer
error. I'm not quite sure why the error occurred but after modifying a
few things it seems to work ok now.

I'm still having issues with the XML not having an end of stream which
means it constantly gets passed to the buffer over and over again,
making the pipeline fail after a single play. I'm not quite sure how
I'll get it to work but I'll spend the rest of the week working on it
and trying to fix it. Once I perfect that I can move on to working on
enhancements to the model, like Search and Replace and seeking. I have
an idea of how to do search and replace but not so much on seeking, I
guess I'll have to use a lot of trial and error to get it working.

I'm happy with the progress I've made so far and what may have seemed
like a mountain of work is certainly a lot less daunting now. 

I've also made a simple test gui for it, I'll post screenshots once I
have the buffer working. I'll also give instructions on how to run it
once I've fixed the End of Stream errors.

[1] -
http://redache.wordpress.com/2010/06/04/weekly-report-02-buffering-love/

Thanks for reading,

David Williams
Extending Jokosher with a Musical Notation Editor.

___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Thursday 10th June 2010 - Weekly Report 03

2010-06-10 Thread David Williams
Hi Everyone,

Here's my third weekly report which you can find at [0] as well as below.

This week I’ve been toying with the Source Element and have managed to
get it working correctly (finally!) and I’ve also started working on
search and replace on the model and tidying things up. I haven’t done
as much as I’d like this week but it took a while to realise how
simple the solution to the Source Element issue was (a len() fixed
it). Sometimes it’s hard to see the simplest things. I’m also getting
a strange bug with the Bus messages that causes the pipeline to crash
if I have it listen for error messages, I haven’t debugged the
GStreamer pipeline yet, but I bet that there is something throwing an
error that isn’t fatal or noticeable. I want to get the Source Element
perfect because it’ll be relied on to work every time someone clicks
play in the Score Editor.

The Test GUI works quite well, although changing the key/time sig
doesn’t work after the initial selection, which is what I’ll be doing
to test my search and replace and why I’ve started working on it. I’ve
been pushing every so often to my Jokosher branch on Launchpad. Once I
have search and replace working correctly I’ll begin work on modifying
Jokoshers current GUI with a GTK Notebook, which will be the
foundation of the Score Viewer.

If you want to run the code in the branch you need to do the following:

- Grab the MusicXML2Midi plugin from Elleo’s blog.
- Branch the source from Launchpad
- Navigate to the Score Editor folder (which if you branched in your
home directory would be
~/MusicXMLEditor/jokosher/Jokosher/ScoreEditor)
- Run PlayMusicXML.py. This is the GUI that connects everything
together (Excuse the poorly commented code for that file).

You should see the following:

http://redache.files.wordpress.com/2010/06/xmledit.png

It’s not the prettiest thing in the world but it does its job as well
as you'd hope.

A couple of caveats:

1. Pressing play without saving something first will lead to Gstreamer
dying and the program will have to be restarted if you want sound.
2. Changing the Key/Time Signature won't work after the first time as
there's no functionality to do that yet.

I'll also update the live.gnome.org wiki with the build instructions.

[0] - 
http://redache.wordpress.com/2010/06/10/weekly-report-no-3-feel-the-source/

Thanks for reading,

David Williams,
Extending Jokosher with a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Saturday 14th June - Weekly Report No 4

2010-06-18 Thread David Williams
Hi everyone,

Below is my report for this week and a link[1] to my blog post. I
haven't done as much as I'd like this week, but onwards and upwards I
guess. I've also updated my live.gnome.org project page[2] with build
instructions for the current branch.

---Report
This week I haven't done as much as I'd hoped but I have started work on
modifying the Jokosher GUI to accommodate the Score Editor. This will be
achieved by having a GTK Notebook that will have tabs for the Audio
Editor and Score Editor (and can be extended to include any other GUI
additions). I've decided to move on to the GUI early as I think that I
won't get a good idea of what the Model needs to do further than the
stuff it already does without having a GUI in place. This will then show
me the deficiencies in the model and I can add more and more
functionality as I go along.

I've already added a Notebook to the code that should work when I've
finished subclassing the Event Viewer for the Score Editor. My aim is to
do it in shorter steps than I've done before as it can be pretty easy to
get swallowed up in GUI errors. I think my progress will be slower from
now on, but I'm glad that I can move on to something different that has
the potential to teach me a lot of new things.

I've also been reading about GTK things and trying to get to grips with
the GUI code for Jokosher now that I understand Python and GTK a lot
better. Hopefully next weeks report will include a lot more actual
things being done!.

I'm disappointed that I haven't got much to offer this week but I guess
that's how things roll sometimes.
-
Links: 
[1] - http://wp.me/pjdJf-2d
[2] - http://live.gnome.org/SummerOfCode2010/DavidWilliams_Jokosher

Thanks for Reading,
David Williams
Extending Jokosher to Include a Musical Notation Editor.

___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Saturday 26th June 2010 Weekly Report 5

2010-06-25 Thread David Williams
Hi Everyone,

Below is my fifth weekly report and a link to the blog post[1]. 

I'm really disappointed this week as I haven't achieved much at all as
I've spent a lot of the week trying to figure out how things need to
connect together (and I'm still working on figuring it out). Hopefully
I'll have more to show next week.

Report: 

What I've achieved this week:

This week I've been working on learning Cairo and trying to add the new
instrument type needed for Scores to Jokosher. This is harder than I
first thought it would be and my progress has slowed to a crawl as I
slowly try and figure out how everything connects together. I'm
disappointed that I don't have at least a stave working with a new Score
instrument but I always knew that this part would be difficult as a lot
of the work is modifying existing code to work with a new ScoreViewer
class which will handle all the UI stuff for the Scores. I'm slightly
ahead of the schedule that I included with my GSoC application, but I'm
still frustrated with the lack of progress that I've been having the
last 2 weeks.

What I plan to do next week:

I plan to try and have Score tracks working correctly in the context of
the EventLaneViewer, with hopefully some work starting on adding user
editable elements to the Cairo code.

What I've learned this week:

How Cairo works (mostly) and that GUI code can be really frustrating if
you spend hours trying to get something to work and it still doesn't.
Patience is obviously an important thing for coding and I need to have
more of it. I also need to plan more so I don't end up getting lost in
code and have no idea what's going on!.

I hope that I have something concrete to show for my work by the end of
next week.

[1] - http://wp.me/pjdJf-2h

Thanks for reading,

David Williams,
Extending Jokosher to include a score editor.


___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Sunday 4th July - Weekly Report 06

2010-07-04 Thread David Williams
Hi Everyone,

This week has been slightly better than previous weeks as I've managed
to make some progress with my project.

Below is the weekly report which you can find at [0].

-
What I've done this week:

This week I've been busy trying to get my score instrument working
within Jokosher and after a lot of help from Elleo (my mentor) I now
have a score instrument that emits correctly when it's added to the
Jokosher InstrumentViewer. My lack of experience contributed to me
getting confused about the scope of the emit as I had first tried to
emit from the constructor (which obviously doesn't work!) and then
having moved it to its own function, I attempted to emit it before the
InstrumentViewer had been created. Elleo offered guidance with it and
helped me get it working. There's a screenshot of it at [1].

I've also finished the MusicXML source element after some more help from
Elleo as I couldn't figure out why the Bus was failing when the score
was created. It turns out I'd misunderstood what size meant in the
context of do_create in Gstreamer source elements. So after he explained
what was wrong I managed to implement changes that lead to a source
element that works correctly (fingers crossed). 

During the week I've been playing with Pango and Cairo to get a
Stave/Notes rendered. I'm not sure if Pango is the way I will go in the
end but it's good to at least test it and see if it works. 

Plans for next week:

Next week I'll hopefully have a stave rendering correctly inside the
instrument and some rudimentary ability to add notes.

What I've learned:

Another set of eyes can be invaluable especially if you spend a few
hours on something getting more and more frustrated when it doesn't
work. A second set of eyes can spot the mistakes that you might not see
for a long time. I've also discovered I'm not always wrong when it comes
to what I try and do to fix things but I need to take a step back and
consider things more before pushing ahead. 

[0] - http://wp.me/pjdJf-2k
[1] - http://redache.files.wordpress.com/2010/07/score-instrument.png

Thanks for reading,

David Williams
Extending Jokosher to include a Musical Notation Editor


___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Weekly Report 07 - 12/07/2010

2010-07-12 Thread David Williams
Hi everyone,

Here's my report for this week, I haven't done as much as I'd like but
I hope that next week I'll get more done. I've been struggling a bit
with modifying the existing code as I'm not used to it. You can find
the blog post at [0] as well as a mid term summary at [1]. You can
also find the Bzr branch of the current code at [2].

Weekly Report text-
What I've done this week:

This week I've been working on getting a stave/staff to draw correctly
in the score track. After some discussion with my Mentor we've decided
that the best way to represent the scores is to have a midi track
option for every track that currently exists and have the instrument
change to whatever has been selected ( so an electric guitar for
electric guitar scores etc.). I've been struggling with trying to get
the cache overridden so that I can base it on beats/measures and I'd
hoped that I'd have that work finished by the end of the week but I've
had some family issues to deal with which has meant I haven't had the
time to do it towards the end of the week. That's all sorted so I plan
on doing as much work as possible this week to get the cache
overridden and the notes adding ability nearly completed.

You can find the screenshot at [3].

Hopefully I'll have more to report on by the end of next week and
maybe something that actually has some use!.

What I plan to do next week:

Actually finish a lot of the drawing elements for the Score tracks and
have the rudimentary ability to add notes.

What I've learned:

That modifying existing code can be more difficult than I thought.
There are a lot of things to consider and I think my lack of
experience/skill has really hampered my efforts in the last few weeks.
Hopefully I'll be able to overcome these issues and have the work
finished by the end of the Summer Of Code as I'm worried that I might
not reach the end with a finished product at this point.

[0] - http://wp.me/pjdJf-2q
[1] - http://wp.me/pjdJf-2o
[2] - https://code.launchpad.net/~redache/jokosher/MusicXMLEditor
[3] - http://redache.files.wordpress.com/2010/07/score.png

Thanks for reading,
David Williams
Extending Jokosher with a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Weekly Report 09 - 27/07/2010

2010-07-27 Thread David Williams
Hi Everyone,

Below is my report as always which you can find at [0] and you can get
my code at [1]. This week has been difficult and very little reward
for my efforts but having note drawing that works is nearly in my
grasp!.

--Weekly Report---

What I’ve done this week:

This week I’ve been working on getting a Mouse Listener set up so the
user can add notes to the stave. It doesn’t work and I’m not really
sure why, I’m fairly certain I’ve got the context set right but
further experimentation is needed and it may be worth asking for help
from my mentor. If I can get it to update the cairo context with the
pango note then it will work on a basic level. I’ve also got a clear
idea of how I’m going to get the note based on position, which will be
based on the x/y values of the mouse click. So if the click is within
say 10-20 pixels then that note will be an A or whatever the correct
note for that value will be. It’s frustrating that it doesn’t work as
I’m so close to having something I can be proud of and actually have a
note editor that’s working. I’ve also modified the Add Instrument
dialog to include a seperate Notebook tab of Midi instruments and
added midi Instrument copies of the current instruments (apart from a
few that I’ve taken out that weren’t suitable for midi instruments,
like Effect/Audio File). You can find the screenshots on my blog at
[0].

What I plan to do next week:

Getting the note drawing to work and different cleffs based on the
currently selected Instrument (like a Piano will have both the treble
and bass cleff).I’ll also start connecting the model and source
element to the rest of Jokosher. With this done I will then start
cleaning up any of the elements that are left over from subclassing
the Event Viewer and making sure that no weird behavior is experienced
when using the note editor. For example I know that shift + left click
will try and split the event even though there’s no wave form to
split. I think a lot of that work is just disabling a lot of it and
modifying the existing elements so they work with the Score events.
Only when all of this is done will I start working on the in depth
Score Editor, as this is secondary to actually having Score Events
that work!.

What I’ve learned this week:

That Pango is a fairly simple library to use it can just get really
confusing to figure out what’s going on at times. I’ve also found that
using Glade can be awkward if you aren’t skilled at using GTK, with a
lot of the shortcuts being confusing to someone who isn’t used to it.
I think I have really started getting used to GTK and all I can do now
is learn more and more about it and how to use it effectively.

As it’s nearing the end of GSoC I have been thinking about the goals I
set out to achieve and the work I’ve put in and I think I’ve learned a
massive amount in the last 2 months. I think I’ve learned more in
those 2 months than I did in the 9 months I spent at University
learning Java, which was my first language. I may have over reached
slightly with my project but I think I can come as close as possible
to finishing before the Pencils down date. I just need to push forward
and get the things that need to be done completed. It may not be 100%
complete but it’s going to be as close as I can possibly get it in the
time left!.

[0] - http://wp.me/pjdJf-2A
[1] - https://code.launchpad.net/~redache/jokosher/MusicXMLEditor

Thanks for reading,
David Williams,
Extending Jokosher with a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Extending Jokosher with a Musical Notation Editor - Weekly Report 10 03/08/2010

2010-08-02 Thread David Williams
Hi Everyone,

This week has again been fairly eventful and I'm much happier with the
progress I've been making. As always you can find the blog post at [0]
and the launchpad branch at [1].

--Weekly Report Text--

What I’ve done this week:
This week I finally managed to get note drawing to work. There’s still
some issues with getting the fonts perfectly inline with the stave
lines, but I just need to tweak it a bit to get it just right. I’ve
also started plugging the model in and I have it generating valid
MusicXML on the first addition of notes, I still need to add edit
functionality so notes can be moved/deleted. The note drawing now
correctly normalizes the Y position so that I can actually get the
note from the Y position, I still need to add X normalization so I can
make sure the notes look tidy on the stave (and to also make sure I
can add new measures easily).

You can find a screenshot at [2].

You can also listen to a quick sound sample that I created by taking
the Notes from the score and generating the MusicXML at [3]. This is
just a very simple example but it does show progress!.

What I plan to do next week:
I will finish the model so that I can edit the notes and then
regenerate the MusicXML based on these edits. I also need to fix the
font alignment so that it looks neater. Once I’ve done this I’ll move
on to finally connecting the Source Element and Playback bins I need
for Score Elements to produce sound. Then it’s on to finishing the UI
changes needed to finish the basic score editor. I’ll then move on to
the Score Event Viewer and hopefully finish it before the end of
coding.

What I’ve learned this week:
Sometimes the answer to a problem can be much simpler than I presume
it to be and it just takes a bit of time away from trying to do it for
things to come naturally.

[0] - http://wp.me/pjdJf-2K
[1] - https://code.launchpad.net/~redache/jokosher/MusicXMLEditor
[2] - http://redache.files.wordpress.com/2010/08/note.png
[3] - http://omploader.org/vNTRrYg/song.ogg

Thanks for reading,
David Williams
Extending Jokosher with a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Extending Jokosher with a Musical Notation Editor - Weekly Report 11: 10/08/2010

2010-08-10 Thread David Williams
Hi everyone,

Sorry for the lateness of the report but I'd forgotten all about
submitting it this week as I've been busy trying to get things
working!. You can find the full blog post at [0] and the code is at
[1].

---Weekly Report Text--

What I’ve done this week:

This week I’ve been working on getting drag and drop to function, it’s
mostly working I just need to rejig a few things and clean it up. I’ve
also added cut/copy/paste but I haven’t connected it to the context
menu yet, but that shouldn’t be too difficult. I’ve also managed to
figure out a way to count how many notes are in a measure, so I can
work on getting more measures generated when one is filled. There
aren’t any screenshots this week but that’s because most of what I’ve
been doing is related to the backend for the Score Events.

What I plan to do next week:

For the final week of GSoC I am going to have a big push to finish all
the little UI elements I have left and to get Audio working with the
tracks. I also need to work on save/load which shouldn’t be *too*
difficult but it might take me a while. The only thing I will miss
from my original project specification is the in depth score editor,
which is really disappointing. It would have been nice to have gotten
that finished in time but I will continue working on the score editor
after the deadline to make it stable enough for release.

What I’ve learned this week:

That I should be very careful when I name variables as I had an
incident where I had used the same variable name twice in a Function
and I kept  getting weird results from it. It took me an hour to
realise what I’d done wrong, which is very annoying!.

I’m reasonably happy what I’ve achieved so far with my project and
whilst I have had a lot of issues I think I’ve learned so much from
doing it and there’s a lot left for me to learn. But I’m happy to have
been given the opportunity to do this and work on something that I
have an interest in.

[0] - http://redache.wordpress.com/2010/08/10/weekly-report-11-drag-and-drop/
[1] - https://code.launchpad.net/~redache/jokosher/MusicXMLEditor

Thanks for reading,
David Williams
Extending Jokosher with a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list


[jokosher-devel] Weekly Report 12 - Extending Jokosher with a Musical Notation Editor - 16/08/2010

2010-08-16 Thread David Williams
Hi everyone,

You'll find my blog post at [0] and my code at [1], It's finally the
end of GSoC and we can all celebrate :). You can find my weekly report
below. I've also updated by live.gnome.org wiki page [2] with
screenshots of the project as it stands.

-Weekly Report text-
So this is the last weekly report of the Summer of Code. It’s been a
long journey to get to the end and a lot of hard work.

What I’ve done this week:

I reworked the drag and drop to try and make it less glitchy and it
still isn’t perfect. From looking at a lot of other score editors I
think I missed a trick on having measures that were automatically
filled with rests and then just subtracting the note that gets added
from that rest and reworking the rests to fill the rest of the
measure. Hindsight can be an annoying thing sometimes.

I’ve also managed to make the MusicXML generate correctly, regardless
of measure number. I’ve tested it quite a bit and it  does seem to
work as expected every time. So one of the few bits that doesn’t have
strange bugs.
I’ve also tried adding audio the the Instruments but I’ve run into
problems with my Source Element and I’ve just run out of time to fix
it. I would have loved to have had audio working but it just wasn’t
possible.

I’ve also tried to add scaling changes to the notes, this is far from
perfect but it’s a start. I’ve done my best to try and at least
implement most of the features I wanted and this as led to some things
being a little glitchy but I can accept that as version 0.001 of the
Score Editor. This was a pretty big project, much bigger than I
anticipated and it’s been a long hard road to get to where I am now.
I’m happy to have reached the end and look back on everything that
I’ve learned in the last 12 weeks. It has been an amazing experience
to be able to focus on code without having to worry about things.

What I’ve learned throughout GSoC:

That as much as I learn I will always need to learn more. I’ve spent
long enough with roughly documented toolkits to know that to master
these things is pretty difficult and nearly impossible unless you
devote a lot of time to them. I’ve come away wanting to expand and
improve on my project and work towards creating something that is
really cool to me personally. Yes I didn’t finish my original design,
but that wasn’t through lack of trying, I’d just overreached in what I
thought I could do. I’ll continue contributing to Jokosher and to any
Open Source projects that appeal to me, this whole experience has
changed my perspective  a great deal and I want to contribute and give
back more to the FOSS community.

So here’s to the end of my Summer of Code.

[0] - http://wp.me/pjdJf-2Q
[1] - https://code.launchpad.net/~redache/jokosher/MusicXMLEditor
[2] - http://live.gnome.org/SummerOfCode2010/DavidWilliams_Jokosher#preview

Thanks for reading!
and congratulations to everyone else that finished their summer of code.
David Williams,
Extending Jokosher with a Musical Notation Editor.
___
jokosher-devel-list mailing list
jokosher-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/jokosher-devel-list