Skip to content

Commit

Permalink
Description
Browse files Browse the repository at this point in the history
  • Loading branch information
olaviinha committed May 7, 2023
1 parent 90c6db3 commit ba1abd4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions SloppyUpsampler.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"#<font face=\"Trebuchet MS\" size=\"6\">Sloppy Upsampler <font color=\"#999\" size=\"4\">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</font><font color=\"#999\" size=\"4\">Audio upsampler</font><font color=\"#999\" size=\"4\">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</font><a href=\"https://github.com/olaviinha/SloppyButchery\" target=\"_blank\"><font color=\"#999\" size=\"4\">Github</font></a>\n",
"\n",
"Poor man's upsampling & highs restoration by traditional methods: \n",
"- convert to 44.1 kHz with interpolation filter ffmpeg -dither_scale 1 -resampler 'swr' -filter_size 32 -phase_shift 10\n",
"- pitch up one octave with librosa resample type soxr_hq\n",
"- highpass above 10k\n",
"- mix on original with low volume (~ 10 %)"
"- convert to 44.1 kHz with a decent interpolation filter (`ffmpeg -dither_scale 1 -resampler 'swr' -filter_size 32 -phase_shift 10`)\n",
"- pitch up one octave with very high quality (`librosa soxr_vhq`)\n",
"- highpass above 10kHz\n",
"- mix on original with low volume (50% vol highpass on 80% total vol)"
]
},
{
Expand Down Expand Up @@ -117,7 +117,7 @@
" sr = fs\n",
" else:\n",
" data, sr = librosa.load(input, sr=None, mono=False)\n",
" octave_up = librosa.effects.pitch_shift(data, sr=sr, n_steps=12) * hipass_vol\n",
" octave_up = librosa.effects.pitch_shift(data, sr=sr, n_steps=12, res_type='soxr_vhq') * hipass_vol\n",
" hipass = highpass_audio(octave_up, cutoff, fx, order)\n",
" return data*mix_vol+hipass\n",
"\n",
Expand All @@ -130,6 +130,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "Znu4P-Gtsdrr"
},
"outputs": [],
Expand Down Expand Up @@ -221,7 +222,7 @@
"colab": {
"provenance": [],
"mount_file_id": "1KsC80bOcnAJ9K5UfpsF_saOywtPg7qT8",
"authorship_tag": "ABX9TyOk8pJ8GXWxxomD83BXRyqp",
"authorship_tag": "ABX9TyOqC6Mfjnh5x68XQLxKITGc",
"include_colab_link": true
},
"kernelspec": {
Expand Down

0 comments on commit ba1abd4

Please sign in to comment.