musipedia.org// ?
Deutsch  English  Français  中文 
 

Logging in is required for posting.

Special forum features: inserting music notation, posting audio recordings.

All Categories > Musipedia > Musipedia Features > Standalone app or source code
Total Posts: 11 - Pages (2): [1] 2
Author: Adam Kluzniak
Posted: Jun 18 2005 - 04:53 PM
Subject: re: Standalone app or source code
I think that is all that is needed:)Other things, like GUI, are obvious. But about that cosi table again: It is used in the code like this:
buf2[2*j] = buffer[j] * cosi[j]; // real
I think that it (cosi[j]) is not supposed to be zero.
Unfortunatelly I'll check it as complete app a lot later, because of other elements of my project and a short break:).
Thanks and bye.
Author: Rainer
Posted: Jun 17 2005 - 09:40 PM
Subject: re: Standalone app or source code
Sorry for omitting some important details. Here are the missing classes: http://www.musipedia.org/toenecl.java http://www.musipedia.org/vpclass.java http://musipedia.org/texts.java

I use WINDOWSIZE=1024.

CapturePlayback.java:
int WINDOWSIZE=1024;
cosi = new float[WINDOWSIZE];
CapturePlayback.java: Vector volpitch;
CapturePlayback.java: volpitch = new Vector(1000,50);
CapturePlayback.java: volpitch.addElement(new vpclass(samples_read, nmax, max));

toene is initialized in the published source code:
toene = new Vector(20,1);

Hope this helps. Let me know if more stuff is missing.

Author: Adam Kluzniak
Posted: Jun 16 2005 - 06:03 PM
Subject: re: Standalone app or source code
Thanks again. And I've got some questions about the code. What are vpclass and toenecl classes?
Could you publish the strings class also?
How should WINDOWSIZE, volpitch, cosi and toene variables be initialized (and where)?
Author: Rainer
Posted: Jun 15 2005 - 10:58 PM
Subject: re: Standalone app or source code
Okay, here's the fragment that takes sound, fft-s it, and extracts notes:

http://www.musipedia.org/GPL-ed_source.java

I am publishing this fragment under the GPL in the hope that someone (maybe Adam?) will improve it and make the improved version available to me so I can put a better applet onto Musipedia.

I am sorry about the extreme messiness of this code - hope it's useful anyways.

Rainer
Author: Adam Kluzniak
Posted: Jun 15 2005 - 01:51 PM
Subject: re: Standalone app or source code
Hi!
You are right. I checked license for Sun demo code and it says that "Modified source code cannot be distributed without the express written permission of Sun".
So if you could share your code with the Sun's cut out I would definitely appriciate it.
Author: Rainer
Posted: Jun 15 2005 - 11:48 AM
Subject: re: Standalone app or source code
Hi Adam,

I don't so much have a problem with sharing the work I put into the applet (after all, this would be the only way of getting someone else to improve the melody recognition aspect of the applet). My main concern here is that I haven't really read Sun's conditions carefully, and I don't want to make the whole source code publicly available before I am sure I am not making myself vulnerable to an attack by Sun, who might claim that my applet is a bit too inspired by their software.

I could, of course, cut out the part that definitely has nothing to do with Sun and share that. Would you be interested in that? That would be an FFT routine for the purpose of pitch recognition and some messy, quick-and-dirty code for note separation (yet another area that could use some improvement).
Author: Adam Kluzniak
Posted: Jun 15 2005 - 11:41 AM
Subject: re: Standalone app or source code
Thanks again. This praat program is really a cool one:) Though it is also (I mean pitch contour determination) too sophisticated. You see, the goal of my work is to make an automatic retrieval of main themes from midi music files. Of course it is not easy but I have some ideas and even if they don't succeed I can compare different kinds of music on how they convert. I don't want to make a MIR system, because there are some already. I need one just to test my results and show them to some people in my university. Writing database is in my time capabilities but writing a whistle recognition is not. I found one standalone MIR app (Choir Fish - I even added it to your mirsystems page) but it is hardly acceptable. Your applet for pitch determination looks very nice and would be very useful for me. I'll understand if you don't want to share and if you don't please write it explicitly. But nevertheless you helped me already. Thanks.
Author: Rainer
Posted: Jun 14 2005 - 11:55 PM
Subject: re: Standalone app or source code
In the 2004 paper, you can read the details about the vantage point method for indexing. This works for any distance measure that obeys the triangle inequality, including editing distances (if you treat them properly, especially solve the problem of differing string lengths). I am using a database here because that saves me part of the implementation work. Distances to vantage objects are stored in a database table, and I use the standard B-tree index of the database for indexing that table, so this is an index of an index, so to speak.

Here's source code for the editing distance:
http://www.musipedia.org/distance

The whistling applet actually does not work all that well because it uses some very simplistic methods for determining pitch. Better techniques are probably available in Praat (open source, see praat.org - it's meant mainly for speech, but they do provide some code for pitch determination) or possibly elsewhere. A lot of inspiration for my whistling applet came from the Sun Java Sound demo, whose source is available on the Sun website.

Rainer
Author: Adam Kluzniak
Posted: Jun 14 2005 - 07:08 PM
Subject: re: Standalone app or source code
Thanks. I checked this first paper (the one from 2001 - I found it on my harddrive :) I must have downloaded it some time ago). The other seems to be about polyphonic music and I only need mono stuff.
So editing distance may be appriopriatly easy (although I would be grateful for your code) but I think you have some kind of indexing technique in your database implementation - any tips where to find info about that? And the most difficult thing for me is whistle recognition. Maybe you could give me something to incorporate in my prog - eg. a java class (of course the best thing for me is source code:) that does that. Thanks for your help!
Author: Rainer
Posted: Jun 14 2005 - 03:57 PM
Subject: re: Standalone app or source code
This is not so easy since it relies on MySQL, which is not very handy to distribute. Getting it to run on another server requires a considerable amount of fiddling and configuring.

Would you be happy enough with a private online Musipedia-like database where you can store and search your own collection, password-protected, so that you control who has access? If there is enough demand for that, I might make it available on a subscription basis (it would require some additional server capacity, of course).

Otherwise, if you prefer implementing it yourself, without a MySQL database or in some other way, you can find a description of the algorithms I use in my papers:
http://rainer.typke.org/publications.0.html
(look at the 2001 ACM TOCHI paper and the 2004 ACM MM paper; most of it has to be re-implemented if you work without a relational database; I can give you source code for the editing distance between two text strings, but if you look at the literature, you can also easily write that yourself)
Total Posts: 11 - Pages (2): [1] 2
You must login to post a message to this conference.

How to insert music:

Add a bit of sheet music, along with a MIDI file, simply by entering note names in Lilypond syntax between the [L] and [/L] tags.
For example, you can try what happens if you enter: [l]g'4 g'4 d''4 d''4 e''4 e''4 d''2[/l] (use the Preview function if you don't actually want to post this).
You can create these lists of note names by clicking on piano keys here.

How to post an audio recording:

If you just want to sing, whistle, or play a melody so that other forum visitors can hear it, follow these steps:

  1. Record your audio here.
  2. You should notice a 32-character hash code, something like: 2a40281c5001c5a7d8c9f57fcdeccfaf
  3. copy this hash code and paste it into a forum post, enclosed in the audio tags, for example: [audio]2a40281c5001c5a7d8c9f57fcdeccfaf[/audio]

How to mark a thread as solved:

If the original question in a thread is solved, please mark it as solved using the "solved" icon (or by just typing [solved] into your post). This makes life easier for people who are willing to identify melodies, since unsolved problems are easier to spot that way. If a problem turns out to not be solved after all, just write [/solved] in a new post, and the thread will be labeled accordingly.

z-library z library books project Immediate Prospect