Deutsch  English  Français  中文 

Logging in is required for posting.

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

Total Posts: 2 - Pages (1): [1]
user picture Author: rt
Posted: Jan 13 2009 - 04:32 PM
Subject: re: soap client
Hi Gary,

here's an extremely simple client. It requires PHP5 and can be run from the command line. (Not sure what it would look like with NuSOAP instead of just what's built into PHP 5 - but it should not be too different).

Let's assume your Musipedia user ID is "gary" and your password is "gpasswd".

$client = new SoapClient('');

$q1_coll = "Musipedia";
$q2_melody = "0,72,0.75;0.75,75,0.25;1,63,0.75;1.75,69,0.25;2,71,0.25;2.25,72,0.25;2.5,71,0.25;2.75,69,0.25";
// some possible alternatives:
//$q2 = "0.642,1.143,1.305,1.599,1.862,2.121,2.414,3.017,3.316";
//$q2 = "0.698,87,0.291;1.31,86,0.302;2,82,0.267;2.66,84,0.407;3.36,82,0.384";
//$q2 = "* dudududuuuududu ";
$q3 = "";
$pitch = 0.6;
$rhythm = 0.4;
$maxres = 5;

$result = $client->search("gary", md5("gpasswd$q1_coll$q2_melody$q3"), $q1_coll, $q2_melody, $q3, $pitch, $rhythm, $maxres, 0);

Hope this helps.
- Rainer
Author: gary.kavanagh
Posted: Jan 13 2009 - 01:11 AM
Subject: soap client
hi guys - I'm trying to write a soap client for musipedia to query the database using NuSOAP and PHP, but I'm a total newbie at this. Has anyone else written one, or could give me any pointers please?

Thanks in advance.
Total Posts: 2 - Pages (1): [1]
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.