2020-11-25 19:57:44 +00:00
|
|
|
# Picadae Calibration Programs
|
2020-10-26 18:24:52 +00:00
|
|
|
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:57:44 +00:00
|
|
|
## Install
|
|
|
|
sudo dnf install python3-devel jack-audio-connection-kit-devel
|
2020-11-24 18:27:05 +00:00
|
|
|
|
|
|
|
prerequisites:
|
|
|
|
pyyaml
|
|
|
|
sounddevice
|
|
|
|
soundfile
|
|
|
|
pthon-rtmidi
|
|
|
|
|
|
|
|
export PYTHONPATH=${HOME}/src/picadae/control/app
|
|
|
|
python p_ac.py -c p_ac.yml
|
|
|
|
|
2020-11-25 19:57:44 +00:00
|
|
|
## Data collection
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:57:44 +00:00
|
|
|
Record a sequence of notes of decreasing dynamic level
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:57:44 +00:00
|
|
|
python p_ac.py # start the interactive data collection program
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:57:44 +00:00
|
|
|
Capture note 60 and 61 using the full_pulseL[] and holdDutyPctD{} from the p_ac.yml
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:57:44 +00:00
|
|
|
`c 60 61`
|
2020-11-24 18:27:05 +00:00
|
|
|
|
|
|
|
|
2020-11-25 20:05:57 +00:00
|
|
|
## Plot Cheat Sheet
|
2020-11-24 18:27:05 +00:00
|
|
|
|
|
|
|
|
2020-11-25 19:44:19 +00:00
|
|
|
![Plot Seq 1](doc/do_td_plot.png)
|
2020-11-25 20:05:57 +00:00
|
|
|
|
|
|
|
````
|
|
|
|
python plot_seq.py ~/temp/p_ac_3_od p_ac.yml 60 10
|
|
|
|
|
|
|
|
do_td_plot(inDir,cfg.analysisArgs, pitch, take_id )
|
|
|
|
````
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
![Multi Usec dB](doc/us_db.png)
|
|
|
|
|
|
|
|
````
|
|
|
|
python plot_seq_1.py p_ac.yml ~/temp/p_ac_3_od us_db 84
|
|
|
|
````
|
|
|
|
|
|
|
|
|
|
|
|
---
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:44:19 +00:00
|
|
|
![Multi Plot 1](doc/multi_plot.png)
|
2020-11-25 20:05:57 +00:00
|
|
|
|
|
|
|
````
|
|
|
|
python plot_seq.py p_ac.yml ~/temp/p_ac_3_od td_multi_plot 60 3 60 4 60 5
|
|
|
|
|
|
|
|
plot_seq.py `do_td_multi_plot(inDir,cfg.analysisArgs,[(36,4), (48,2)] )
|
|
|
|
````
|
|
|
|
---
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:44:19 +00:00
|
|
|
![Spectral Ranges](doc/plot_spectral_ranges.png)
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 20:05:57 +00:00
|
|
|
````
|
|
|
|
# pitch0 takeId0 pitch1 takeId1
|
|
|
|
python plot_seq.py p_ac.yml ~/temp/p_ac_3_od plot_spectral_ranges 60 3 60 4
|
|
|
|
|
|
|
|
````
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 20:05:57 +00:00
|
|
|
---
|
2020-11-25 19:44:19 +00:00
|
|
|
|
|
|
|
![Usec dB Spread](doc/us_db_map.png)
|
2020-11-25 20:05:57 +00:00
|
|
|
|
|
|
|
````
|
|
|
|
python plot_seq_1.py p_ac.yml ~/temp/p_ac_3_od us_db_map 84 72
|
|
|
|
````
|
|
|
|
|
|
|
|
---
|
2020-11-25 19:44:19 +00:00
|
|
|
|
|
|
|
![Min Max](doc/min_max_db.png)
|
|
|
|
|
2020-11-25 20:05:57 +00:00
|
|
|
````
|
|
|
|
python plot_seq_1.py p_ac.yml ~/temp/p_ac_3_od min_max 36 48 60 72 84
|
|
|
|
````
|
|
|
|
|
|
|
|
---
|
2020-11-25 19:44:19 +00:00
|
|
|
|
|
|
|
![Min Max 2](doc/min_max_db_2.png)
|
2020-11-25 20:05:57 +00:00
|
|
|
|
2020-11-25 19:44:19 +00:00
|
|
|
The last number in the list is the 'takeId'
|
|
|
|
|
2020-11-25 20:05:57 +00:00
|
|
|
````
|
|
|
|
# pitch0 pitch1 pitch2 pitch3 pitch4 takeId
|
|
|
|
python plot_seq_1.py p_ac.yml ~/temp/p_ac_3_od min_max_2 36 48 60 72 84 2
|
|
|
|
````
|
|
|
|
|
|
|
|
---
|
|
|
|
![Manual dB](doc/manua_db.png)
|
|
|
|
|
|
|
|
````
|
|
|
|
python plot_seq_1.py p_ac.yml ~/temp/p_ac_3_od manual_db
|
|
|
|
````
|
2020-11-25 19:44:19 +00:00
|
|
|
|
|
|
|
Interpolate across the min and max db values to form the min/max curves for the complete
|
|
|
|
set of keys. The anchor points for the curves are taken from cfg record
|
|
|
|
manuMinD,manualAnchorPitchMinDbL, and manualMaxDbL.
|
|
|
|
|
|
|
|
````
|
|
|
|
# select the event (takeId, eventIdx) to use to represent the min value for each pitch
|
|
|
|
manualMinD: {
|
|
|
|
36: [2, 10],
|
|
|
|
48: [2, 10],
|
|
|
|
60: [2, 10],
|
|
|
|
72: [2, 10],
|
|
|
|
84: [2, 10]
|
|
|
|
},
|
|
|
|
|
|
|
|
# leave 60 out of the min anchor point list
|
|
|
|
manualAnchorPitchMinDbL: [ 36,48,72,84 ],
|
|
|
|
|
|
|
|
manualAnchorPitchMaxDbL: [ 36,48,60,72,84 ],
|
2020-11-24 18:27:05 +00:00
|
|
|
|
2020-11-25 19:44:19 +00:00
|
|
|
````
|