Makam API

compmusic.dunya.makam.download_mp3(recordingid, location, slugify=False)[source]

Download the mp3 of a document and save it to the specificed directory.

Parameters:
  • recordingid – The MBID of the recording
  • location – Where to save the mp3 to
  • slugify – Boolean specifying whether to slugify the filepath or not
compmusic.dunya.makam.download_release(releaseid, location, slugify=False)[source]

Download the mp3s of all recordings in a release and save them to the specificed directory.

Parameters:
  • releaseid – The MBID of the release
  • location – Where to save the mp3s to
  • slugify – Boolean specifying whether to slugify the filepath or not
compmusic.dunya.makam.get_artist(ambid)[source]

Get specific information about an artist.

Parameters:ambid – An artist mbid
Returns:mbid, name, releases, instruments.

releases, instruments and recordings include information from recording- and release-level relationships, as well as release artists

compmusic.dunya.makam.get_artists()[source]

Get a list of makam artists in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing artist information:
{"mbid": MusicBrainz artist id, "name": Name of the artist}

For additional information about each artist use get_artist()

compmusic.dunya.makam.get_composer(cmbid)[source]

Get specific information about an composer.

Parameters:cmbid – A composer mbid
Returns:mbid, name, works, lyric_works

works contains a list of works that the composer has written. lyric_works are works where they were lyricist.

compmusic.dunya.makam.get_composers()[source]

Get a list of makam composers in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing composers information:
{"mbid": MusicBrainz artist id, "name": Name of the composer}

For additional information about each composer use get_composer()

compmusic.dunya.makam.get_form(fid)[source]

Get specific information about a form.

Parameters:fid – A form id or uuid
Returns:uuid, name, works.
compmusic.dunya.makam.get_forms()[source]

Get a list of makam forms in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing form information:
{"uuid": form uuid, "name": Name of the form}

For additional information about each form use get_form()

compmusic.dunya.makam.get_instrument(iid)[source]

Get specific information about an instrument.

Parameters:iid – An instrument id
Returns:id, name, artists.

artists includes artists with recording- and release- level performance relationships of this instrument.

compmusic.dunya.makam.get_instruments()[source]

Get a list of makam instruments in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing instrument information:
{"id": instrument id, "name": Name of the instrument}

For additional information about each instrument use get_instrument()

compmusic.dunya.makam.get_makam(mid)[source]

Get specific information about a makam.

Parameters:mid – A makam id or uuid
Returns:uuid, name, works, taksims, gazels.

the taksims and gazels lists are of recordings.

compmusic.dunya.makam.get_makams()[source]

Get a list of makam makams in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing makam information:
{"uuid": makam uuid, "name": Name of the makam}

For additional information about each makam use get_makam()

compmusic.dunya.makam.get_recording(rmbid)[source]

Get specific information about a recording.

Parameters:rmbid – A recording mbid
Returns:mbid, title, releases, performers, work.

artists includes performance relationships attached to the recording, the release, and the release artists.

compmusic.dunya.makam.get_recordings(recording_detail=False)[source]

Get a list of makam recordings in the database. This function will automatically page through API results.

Parameters:recording_detail – if True, return full details for each recording like get_recording()
Returns:A list of dictionaries containing recording information:
{"mbid": MusicBrainz recording id, "title": Title of the recording}

For additional information about each recording use get_recording().

compmusic.dunya.makam.get_release(cmbid)[source]

Get specific information about a release.

Parameters:cmbid – A release mbid
Returns:mbid, title, artists, tracks.

artists includes performance relationships attached to the recordings, the release, and the release artists.

compmusic.dunya.makam.get_releases()[source]

Get a list of makam releases in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing release information:
{"mbid": MusicBrainz release id, "title": title of the release}

For additional information about each release use get_release()

compmusic.dunya.makam.get_symbtr(uuid)[source]

Get a symbtr file info from id This function will automatically page through API results.

Parameters:uuid – A symbtr id

returns: name and id of the symbtr file

compmusic.dunya.makam.get_symbtrs()[source]

Get a list of MusicBrainz id - symbtr mappings in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing symbtr information:
{"uuid": MusicBrainz uuid (work id or recording id), "name": Name of the symbtr track}
compmusic.dunya.makam.get_usul(uid)[source]

Get specific information about a usul.

Parameters:uid – An usul id or uuid
Returns:uuid, name, works, taksims, gazels.

the taksims and gazels lists are of recordings. They are only valid for the usul serbest

compmusic.dunya.makam.get_usuls()[source]

Get a list of makam usuls in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing usul information:
{"uuid": usul uuid, "name": Name of the usul}

For additional information about each usul use get_usul()

compmusic.dunya.makam.get_work(wmbid)[source]

Get specific information about a work.

Parameters:wmbid – A work mbid
Returns:mbid, title, composers, makams, forms, usuls, recordings
compmusic.dunya.makam.get_works()[source]

Get a list of makam works in the database. This function will automatically page through API results.

Returns:A list of dictionaries containing work information:
{"mbid": MusicBrainz work id, "name": work name}

For additional information about each work use get_work().

compmusic.dunya.makam.get_works_by_query(mid='', uid='', fid='', cmbid='', ambid='')[source]

Get the works filtered according to the input makam uuid, usul uuid form uuid, composer mbid and artist mbid

Parameters:
  • mid – A makam id or uuid
  • uid – An usul id or uuid
  • fid – A form id or uuid
  • cmbid – A composer mbid
  • ambid – An artist mbid
Returns:

A list of dictionaries containing work/s

compmusic.dunya.makam.slugify_tr(value)[source]