Skip to content

Commit

Permalink
several fixes and cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
genisplaja committed Dec 7, 2024
1 parent 9a80180 commit 5f189b5
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 35 deletions.
29 changes: 25 additions & 4 deletions webbook/introduction/compiam.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,38 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The ``compiam.load_dataset()`` wrapper allows the user to initialize the dataloader for any dataset included in the list displayed above. Let's take a look at an example."
"The ``compiam.load_dataset()`` wrapper allows the user to initialize the dataloader for any dataset included in the list displayed above. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"## Initializing dataloader for an example dataset\n",
"saraga_carnatic = load_dataset(\"saraga_carnatic\")\n",
"saraga_carnatic = load_dataset(\"saraga_carnatic\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The ``load_dataset()`` wrapper automatically downloads the dataset \"index\", which is used to build the dataloader, locate the dataset files, and identify each entity in the dataset. For more information on the mechanics of the dataset loading, see the [mirdata documentation](https://mirdata.readthedocs.io/en/stable/) and the [dataset walkthrough](datasets) of this tutorial.\n",
"\n",
"Let's now see how the dataset class looks like inside:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"saraga_carnatic"
]
},
Expand Down Expand Up @@ -441,7 +462,7 @@
"metadata": {},
"source": [
"## The extent of `compiam`\n",
"In the current latest version of `compiam` (v0.3.0), the package includes access to 10 datasets, access to the Carnatic and the Hindustani corpora in Dunya, and a bit more that 10 tools and models to use, covering 9 different tasks. We are aware, *and we are very interested in bringing that into the open*, that the topic of the computational analysis of Indian Art Music, especially on the tools and models side, **is way broader**. The literature includes a vast amount of very interesting and relevant works that, mainly because of the time constraint, are not included in the first release of `compiam`.\n",
"In the current latest version of `compiam` (v0.4.1), the package includes access to 10 datasets, access to the Carnatic and the Hindustani corpora in Dunya, and more that 12 tools and models to use, covering 9 different tasks. We are aware, *and we are very interested in bringing that into the open*, that the topic of the computational analysis of Indian Art Music, especially on the tools and models side, **is way broader**. The literature includes a vast amount of very interesting and relevant works that, mainly because of the time constraint, are not included in the first release of `compiam`.\n",
"\n",
"However, we have been designing `compiam` so that it evolves as a community-driven initiative, in which anyone can integrate datasts, tools, and models for the computational analysis of Indian Art Music. \n",
"\n",
Expand Down
5 changes: 0 additions & 5 deletions webbook/introduction/python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@
"print(str(datetime.timedelta(seconds=duration)).split(\".\")[0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
35 changes: 23 additions & 12 deletions webbook/resources/exploring-performance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,24 @@
"metadata": {},
"source": [
"## Contents\n",
"1. Import Dependencies and Data\n",
"2. Loading and Visualising Data\n",
" - Multitrack Player\n",
" - Video and Gesture Tracks\n",
"3. Feature Extraction\n",
" - Tonic Identificaton\n",
" - Raga Recognition\n",
" - Source Separation\n",
" - Pitch Extraction\n",
" - Percussion Onset Detection\n",
" - Melodic Pattern Detection "
"1. [Import Dependencies and Data](exploring_import_deps)\n",
"2. [Loading and Visualising Data](exploring_visualising)\n",
" - [Multitrack Player](exploring_player)\n",
" - [Video and Gesture Tracks](exploring_video)\n",
"3. [Feature Extraction](exploring_feature)\n",
" - [Tonic Identificaton](exploring_tonic)\n",
" - [Raga Recognition](exploring_raga)\n",
" - [Music Source Separation](exploring_separation)\n",
" - [Pitch Extraction](exploring_pitch)\n",
" - [Percussion Onset Detection](exploring_onset)\n",
" - [Melodic Pattern Detection](exploring_pattern)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_import_deps)\n",
"## 1. Import Dependencies and Data"
]
},
Expand Down Expand Up @@ -415,6 +416,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_visualising)\n",
"## 2. Loading and visualising the data"
]
},
Expand Down Expand Up @@ -462,6 +464,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_player)\n",
"### 1.1 Multitrack player"
]
},
Expand Down Expand Up @@ -535,6 +538,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_player)\n",
"### 1.2 Video and Gesture Tracks"
]
},
Expand Down Expand Up @@ -755,7 +759,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Feature Extraction"
"=(exploring_feature)\n",
"## 3. Feature Extraction"
]
},
{
Expand All @@ -781,6 +786,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_tonic)\n",
"### 2.1 Tonic Identification"
]
},
Expand Down Expand Up @@ -911,6 +917,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_raga)\n",
"### 2.2 Raga Recognition"
]
},
Expand Down Expand Up @@ -993,6 +1000,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_separation)\n",
"### 2.3 Music Source Separation"
]
},
Expand Down Expand Up @@ -1227,6 +1235,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_pitch)\n",
"### 2.4 Pitch Extraction"
]
},
Expand Down Expand Up @@ -1763,6 +1772,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_onset)\n",
"### 2.5 Percussion onset detection"
]
},
Expand Down Expand Up @@ -1887,6 +1897,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"=(exploring_pattern)\n",
"### 2.6 Melodic pattern discovery"
]
},
Expand Down
28 changes: 14 additions & 14 deletions webbook/structure_analysis/music-segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"dbs = compiam.load_model(\"structure:dhrupad-bandish-segmentation\")"
Expand Down Expand Up @@ -141,15 +145,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"remove-output"
]
},
"metadata": {},
"outputs": [],
"source": [
"%pip install spleeter\n",
"%pip install numba --upgrade"
"%pip install numba --upgrade\n",
"%pip install \"keras<3\"\n",
"%pip install \"tensorflow==2.9.0\"\n",
"%pip install \"numpy<2.0.0\""
]
},
{
Expand All @@ -162,11 +165,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"remove-output"
]
},
"metadata": {},
"outputs": [],
"source": [
"!wget https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz"
Expand Down Expand Up @@ -243,6 +242,7 @@
},
"outputs": [],
"source": [
"import spleeter\n",
"from spleeter.separator import Separator\n",
"\n",
"# Load default 2-stem spleeter separation\n",
Expand Down Expand Up @@ -353,7 +353,7 @@
"source": [
"dbs.predict_stm(\n",
" input_data=os.path.join(\n",
" \"..\", \"audio\", \"59c88c32-0bde-433b-b194-0f65281e5714\", \"vocals.wav\"\n",
" \"..\", \"audio\", \"59c88c32-0bde-433b-b194-0f65281e5714.mp3\"\n",
" )\n",
")"
]
Expand All @@ -378,7 +378,7 @@
"\n",
"vocals, sr = librosa.load(\n",
" os.path.join(\n",
" \"..\", \"audio\", \"59c88c32-0bde-433b-b194-0f65281e5714\", \"vocals.wav\"\n",
" \"..\", \"audio\", \"59c88c32-0bde-433b-b194-0f65281e5714.mp3\"\n",
" ),\n",
")"
]
Expand Down

0 comments on commit 5f189b5

Please sign in to comment.