Skip to content

Commit

Permalink
deploy: c6694fa
Browse files Browse the repository at this point in the history
  • Loading branch information
genisplaja committed Dec 1, 2024
1 parent 1f970d4 commit 227d774
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 741 deletions.
110 changes: 72 additions & 38 deletions _sources/resources/exploring-performance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"url = \"https://drive.google.com/uc?id=1iR0bfxDLQbH8fEeHU_GFsg2kh7brZ0HZ&export=download\"\n",
"output = os.path.join(AUDIO_PATH, \"dr-brindha-manickavasakan.zip\")\n",
"gdown.download(url, output, quiet=False) "
"gdown.download(url, output, quiet=False)"
]
},
{
Expand Down Expand Up @@ -130,7 +134,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For 100s of performances in the Saraga dataset, the audio stems corresponding to each instrument/perfromer are available. In this performance, this constitutes the lead vocal, the mridangam (left and right microphone), the violin, and the tanpura. The full mix of all instruments is also available."
"For 100s of performances in the Saraga dataset, the audio stems corresponding to each instrument/perfromer are available. In this performance, this constitutes the lead vocal, the mridangam (left and right microphone), the violin, and the tanpura. The full mix of all instruments is also available.\n",
"\n",
"Let us select the preview versions of the multitrack audio, which are shortened and compressed versions of the rendition for easier handling of the previsualisation."
]
},
{
Expand All @@ -139,12 +145,12 @@
"metadata": {},
"outputs": [],
"source": [
"audio_path = os.path.join(folder_path, f\"{rendition}.wav\")\n",
"mrid_left_path = os.path.join(folder_path, f\"{rendition}.mridangam-left.wav\")\n",
"mrid_right_path = os.path.join(folder_path, f\"{rendition}.mridangam-right.wav\")\n",
"violin_path = os.path.join(folder_path, f\"{rendition}.multitrack-violin.wav\")\n",
"vocal_path = os.path.join(folder_path, f\"{rendition}.multitrack-vocal.wav\")\n",
"tanpura_path = os.path.join(folder_path, f\"{rendition}.tanpura.wav\")"
"audio_path_pre = os.path.join(folder_path, \"preview\", f\"{rendition}.mp3\")\n",
"mrid_left_path_pre = os.path.join(folder_path, \"preview\", f\"{rendition}.mridangam-left.mp3\")\n",
"mrid_right_path_pre = os.path.join(folder_path, \"preview\", f\"{rendition}.mridangam-right.mp3\")\n",
"violin_path_pre = os.path.join(folder_path, \"preview\", f\"{rendition}.multitrack-violin.mp3\")\n",
"vocal_path_pre = os.path.join(folder_path, \"preview\", f\"{rendition}.multitrack-vocal.mp3\")\n",
"tanpura_path_pre = os.path.join(folder_path, \"preview\", f\"{rendition}.tanpura.mp3\")"
]
},
{
Expand Down Expand Up @@ -177,7 +183,13 @@
"outputs": [],
"source": [
"# list of paths to load and listen\n",
"all_audio_paths = [vocal_path, violin_path, mrid_left_path, mrid_right_path, tanpura_path]\n",
"all_audio_paths = [\n",
" vocal_path_pre,\n",
" violin_path_pre,\n",
" mrid_left_path_pre,\n",
" mrid_right_path_pre,\n",
" tanpura_path_pre\n",
"]\n",
"# List of labels for each path\n",
"all_names = [\"Vocal\", \"Violin\", \"Mridangam left\", \"Mridangam right\", \"Tanpura\"]"
]
Expand All @@ -188,7 +200,7 @@
"metadata": {},
"outputs": [],
"source": [
"#Player(all_names, all_audio_paths)"
"Player(all_names, all_audio_paths)"
]
},
{
Expand Down Expand Up @@ -351,7 +363,19 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this section we extract various audio and musical features from the raw performance audio; the singer tonic, raga, predominant pitch track of the lead vocal melody, source separated vocal audio, downbeat, and repeated melodic patterns."
"In this section we extract various audio and musical features from the raw performance audio; the singer tonic, raga, predominant pitch track of the lead vocal melody, source separated vocal audio, downbeat, and repeated melodic patterns.\n",
"\n",
"Let's first get the path of the full and uncompressed mixture and vocal tracks."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"audio_path = os.path.join(folder_path, f\"{rendition}.wav\")\n",
"vocal_path = os.path.join(folder_path, f\"{rendition}.multitrack-vocal.wav\")"
]
},
{
Expand Down Expand Up @@ -470,17 +494,25 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"# Computing features\n",
"feat = deepsrgm.get_features(audio_path)"
"feat = deepsrgm.get_features(vocal_path)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"# Predict raga using subset of features corresponding to beginning of audio for faster prediction\n",
Expand All @@ -496,15 +528,6 @@
"print(f'Raga: {predicted_raga}')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"shutil.rmtree(deepsrgm.model_path)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -590,15 +613,6 @@
"ipd.Audio(separated_vocals, rate=SEPARATION_SR)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"shutil.rmtree(separation_model.model_path)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -864,7 +878,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"predicted_aksharas = apt.extract(audio_path)"
Expand Down Expand Up @@ -916,7 +934,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"# Pattern Extraction for a Given Audio\n",
Expand All @@ -929,7 +951,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"# returns magnitude and phase\n",
Expand Down Expand Up @@ -1140,7 +1166,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"all_segments = se.extract_segments(\n",
Expand Down Expand Up @@ -1182,7 +1212,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"remove-output"
]
},
"outputs": [],
"source": [
"# Returns patterns in units of pitch sequence elements\n",
Expand Down
13 changes: 5 additions & 8 deletions introduction/compiam.html
Original file line number Diff line number Diff line change
Expand Up @@ -732,22 +732,19 @@ <h5>The <code class="docutils literal notranslate"><span class="pre">.load_datas
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.00B [00:00, ?B/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 1%|▏ | 8.00k/543k [00:00&lt;00:54, 9.97kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 1%|▏ | 8.00k/543k [00:00&lt;00:35, 15.4kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 3%|▎ | 16.0k/543k [00:00&lt;00:28, 18.9kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 9%|▉ | 48.0k/543k [00:00&lt;00:05, 91.3kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 10%|█ | 56.0k/543k [00:01&lt;00:06, 74.5kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 24%|██▎ | 128k/543k [00:00&lt;00:01, 223kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 24%|██▎ | 128k/543k [00:01&lt;00:02, 170kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 94%|█████████▍| 512k/543k [00:00&lt;00:00, 949kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 53%|█████▎ | 288k/543k [00:01&lt;00:00, 392kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>544kB [00:01, 368kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>544kB [00:00, 576kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>
Expand Down
44 changes: 22 additions & 22 deletions melodic_analysis/melodic-pattern-discovery.html
Original file line number Diff line number Diff line change
Expand Up @@ -775,31 +775,26 @@ <h3>2.2 Visualising predominant pitch<a class="headerlink" href="#visualising-pr
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{58.268175617345825: &#39;G2&#39;,
116.53635123469165: &#39;G2&#39;,
233.0727024693833: &#39;G2&#39;,
466.1454049387666: &#39;G2&#39;,
932.2908098775332: &#39;G2&#39;,
48.9975: &#39;S&#39;,
97.995: &#39;S&#39;,
195.99: &#39;S&#39;,
391.98: &#39;S&#39;,
783.96: &#39;S&#39;,
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>{54.997834212038505: &#39;R2&#39;,
109.99566842407701: &#39;R2&#39;,
219.99133684815402: &#39;R2&#39;,
439.98267369630804: &#39;R2&#39;,
879.965347392616: &#39;R2&#39;,
65.40381575469627: &#39;M1&#39;,
130.80763150939254: &#39;M1&#39;,
261.6152630187851: &#39;M1&#39;,
523.2305260375701: &#39;M1&#39;,
1046.46105207514: &#39;M1&#39;,
87.30361988416256: &#39;N2&#39;,
174.60723976832512: &#39;N2&#39;,
349.21447953665023: &#39;N2&#39;,
698.4289590733005: &#39;N2&#39;,
1396.857918146601: &#39;N2&#39;,
54.997834212038505: &#39;R2&#39;,
109.99566842407701: &#39;R2&#39;,
219.99133684815402: &#39;R2&#39;,
439.98267369630804: &#39;R2&#39;,
879.965347392616: &#39;R2&#39;,
48.9975: &#39;S&#39;,
97.995: &#39;S&#39;,
195.99: &#39;S&#39;,
391.98: &#39;S&#39;,
783.96: &#39;S&#39;,
58.268175617345825: &#39;G2&#39;,
116.53635123469165: &#39;G2&#39;,
233.0727024693833: &#39;G2&#39;,
466.1454049387666: &#39;G2&#39;,
932.2908098775332: &#39;G2&#39;,
82.40364421278775: &#39;D2&#39;,
164.8072884255755: &#39;D2&#39;,
329.614576851151: &#39;D2&#39;,
Expand All @@ -809,7 +804,12 @@ <h3>2.2 Visualising predominant pitch<a class="headerlink" href="#visualising-pr
146.8266019985304: &#39;P&#39;,
293.6532039970608: &#39;P&#39;,
587.3064079941216: &#39;P&#39;,
1174.6128159882435: &#39;P&#39;}
1174.6128159882435: &#39;P&#39;,
87.30361988416256: &#39;N2&#39;,
174.60723976832512: &#39;N2&#39;,
349.21447953665023: &#39;N2&#39;,
698.4289590733005: &#39;N2&#39;,
1396.857918146601: &#39;N2&#39;}
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -884,7 +884,7 @@ <h3>3.1 Melodic feature extraction<a class="headerlink" href="#melodic-feature-e
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[2024-11-30 22:28:55,111] INFO [compiam.melody.pattern.sancara_search.complex_auto.cqt.load_audio:44] loading file ../audio/pattern_finding/Koti Janmani.multitrack-vocal.mp3
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[2024-12-01 11:22:44,034] INFO [compiam.melody.pattern.sancara_search.complex_auto.cqt.load_audio:44] loading file ../audio/pattern_finding/Koti Janmani.multitrack-vocal.mp3
</pre></div>
</div>
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>tensor([[0.6483, 1.1698, 0.7740, ..., 0.2975, 0.2547, 0.9335],
Expand Down
14 changes: 4 additions & 10 deletions melodic_analysis/tonic-identification.html
Original file line number Diff line number Diff line change
Expand Up @@ -635,22 +635,16 @@ <h2> Contents </h2>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.00B [00:00, ?B/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 2%|▏ | 8.00k/473k [00:00&lt;00:33, 14.3kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 2%|▏ | 8.00k/473k [00:00&lt;00:22, 21.5kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 3%|▎ | 16.0k/473k [00:00&lt;00:19, 24.6kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 10%|█ | 48.0k/473k [00:00&lt;00:03, 121kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 12%|█ | 56.0k/473k [00:00&lt;00:04, 90.7kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 29%|██▊ | 136k/473k [00:00&lt;00:01, 276kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 29%|██▊ | 136k/473k [00:01&lt;00:01, 212kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span> 63%|██████▎ | 296k/473k [00:01&lt;00:00, 445kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>480kB [00:01, 399kB/s]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>480kB [00:00, 635kB/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>
Expand Down
694 changes: 44 additions & 650 deletions resources/exploring-performance.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion rhythmic_analysis/meter_analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ <h2> Contents </h2>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.00B [00:00, ?B/s]
</pre></div>
</div>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[2024-11-30 22:56:40,786] ERROR [root.download_from_remote:258]
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[2024-12-01 11:49:39,704] ERROR [root.download_from_remote:258]
mirdata failed to download the dataset from hhttps://zenodo.org/records/14007971/files/compmusic_carnatic_rhythm_full_index_1.0.json?download=1!
Please try again in a few minutes.
If this error persists, please raise an issue at
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 227d774

Please sign in to comment.