add julia draft <3
This commit is contained in:
parent
a7fb725fd3
commit
4fe6d22731
6 changed files with 62397 additions and 0 deletions
4096
duval/Supelec_2012_SIR_Spectral_Analysis_EA_v001.csv
Normal file
4096
duval/Supelec_2012_SIR_Spectral_Analysis_EA_v001.csv
Normal file
File diff suppressed because one or more lines are too long
BIN
duval/Supelec_2012_SIR_Spectral_Analysis_EA_v001.mat
Normal file
BIN
duval/Supelec_2012_SIR_Spectral_Analysis_EA_v001.mat
Normal file
Binary file not shown.
BIN
rossignol/fluteircam.wav
Normal file
BIN
rossignol/fluteircam.wav
Normal file
Binary file not shown.
BIN
rossignol/myson.wav
Normal file
BIN
rossignol/myson.wav
Normal file
Binary file not shown.
|
@ -0,0 +1,182 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Flute\n",
|
||||
"\n",
|
||||
"## Objectif de ce fichier\n",
|
||||
"\n",
|
||||
"pipopipopipo\n",
|
||||
"\n",
|
||||
"## Code\n",
|
||||
"\n",
|
||||
"On importe le son de la flûte.\n",
|
||||
"\n",
|
||||
"On affiche et on joue le son pour s'assurer qu'il est bien **Ne fonctionne pas ?**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"┌ Info: Precompiling ImageView [86fae568-95e7-573e-a6b2-d8a6b900c9ef]\n",
|
||||
"└ @ Base loading.jl:1242\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"using WAV\n",
|
||||
"using Plots\n",
|
||||
"using WORLD\n",
|
||||
"using ImageView"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"y_flute, fs_flute = wavread(\"fluteircam.wav\");\n",
|
||||
"y_flute = vec(y_flute);\n",
|
||||
"fs_flute = floor(Int, fs_flute);\n",
|
||||
"t_flute = (0 : 1 : size(y_flute)[1]-1)/fs_flute;"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 35,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#wavplay(y_flute, fs_flute);\n",
|
||||
"#plot(t_flute, y_flute, title=\"Flute\",label=[\"Signal brut\"])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 36,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"opt = HarvestOption(300.0, 800.0, 0.02)#floor and ceil freq, period\n",
|
||||
"f0, timeaxis = harvest(y_flute, fs_flute, opt);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 37,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#plot(timeaxis, f0)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 38,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"opt = DioOption(f0floor=300.0, f0ceil=800.0, channels_in_octave=2.0,\n",
|
||||
" period=0.2, speed=1)\n",
|
||||
"f0, timeaxis = dio(y_flute, fs_flute, opt);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 39,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#plot(timeaxis, f0)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 40,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"spectrogram = cheaptrick(y_flute, fs_flute, timeaxis, f0);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 41,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"(1025, 68426)\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"println(size(spectrogram/max(spectrogram)))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 42,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Dict{String,Any} with 4 entries:\n",
|
||||
" \"gui\" => Dict{String,Any}(\"window\"=>GtkWindowLeaf(name=\"\", parent, wi…\n",
|
||||
" \"roi\" => Dict{String,Any}(\"redraw\"=>74: \"map(clim-mapped image, input…\n",
|
||||
" \"annotations\" => 40: \"input-14\" = Dict{UInt64,Any}() Dict{UInt64,Any} \n",
|
||||
" \"clim\" => 39: \"CLim\" = CLim{Float64}(5.04797e-17, 1.15948) CLim{Float6…"
|
||||
]
|
||||
},
|
||||
"execution_count": 42,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"imshow(spectrogram)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Julia 1.2.0",
|
||||
"language": "julia",
|
||||
"name": "julia-1.2"
|
||||
},
|
||||
"language_info": {
|
||||
"file_extension": ".jl",
|
||||
"mimetype": "application/julia",
|
||||
"name": "julia",
|
||||
"version": "1.2.0"
|
||||
},
|
||||
"widgets": {
|
||||
"application/vnd.jupyter.widget-state+json": {
|
||||
"state": {},
|
||||
"version_major": 1,
|
||||
"version_minor": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
58119
rossignol/parametrique/note_flute.ipynb
Normal file
58119
rossignol/parametrique/note_flute.ipynb
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue