Skip to content

Commit

Permalink
try with previews
Browse files Browse the repository at this point in the history
  • Loading branch information
genisplaja committed Dec 1, 2024
1 parent fb5438c commit c6694fa
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions webbook/resources/exploring-performance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"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 @@ -134,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 @@ -143,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 @@ -181,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 Down Expand Up @@ -355,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

0 comments on commit c6694fa

Please sign in to comment.