26
Python for manufacturing musical instruments Olivier CAYROL - June 15th, 2016

Pydata Paris Python for manufacturing musical instruments

  • Upload
    logilab

  • View
    146

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Pydata Paris Python for manufacturing musical instruments

 

Python for manufacturingmusical instruments

Olivier CAYROL - June 15th, 2016

Page 2: Pydata Paris Python for manufacturing musical instruments

 

Prolegomena

•  A few words about me:

•  co-founder and deputy CEO of Logilab

•  cuddling computers for 30 years

•  data modelling, software design

•  A few words about my company:

•  created in 2000, 20 engineers today

•  Python since the beginning, agile development

•  active free software supporter

•  development of strategic semantic Web applications:

•  data.bnf.fr (national library), francearchives.fr (national archives)

2

Page 3: Pydata Paris Python for manufacturing musical instruments

 

Context

•  Making and repair of musical instruments:

•  2,400 companies in France, 2/3 with only 1 employee

•  employees: 11,000 people in France

•  turnover: 800 millions Euros / year

•  exported production rate: 80%

•  Assets:

•  traditional craftsmanship

•  world-famous quality

•  Challenge:

•  aggressive competition from foreign countries

3

Page 4: Pydata Paris Python for manufacturing musical instruments

 

Context illustration

Restoration of baritone saxo from 1901, Gaëtan Schneider

4

Page 5: Pydata Paris Python for manufacturing musical instruments

 

ITEMM laboratory

•  European Technological Institute for Musical Professions

•  Based in Le Mans, France

•  Designing digital tools dedicated to the manufacturing of musicalinstruments:

•  characterization of instruments

•  analysis of the sounds the instruments produce

•  development of digital models to predict the sounds of the instruments

•  Driving the digital revolution of the French sector of instrumentscraftsmanship

5

Page 6: Pydata Paris Python for manufacturing musical instruments

 

Needs of the instrument makers

•  When designing an instrument, makers are interested in:

•  tuning

•  timbre

•  ease of playing

•  Traditionally, makers:

•  build multiple prototypes

•  in order to choose the proper instrument dimensions

6

Page 7: Pydata Paris Python for manufacturing musical instruments

 

PAFI platform

•  Web application developped by ITEMM and Logilab

•  source code to be soon published as free software

•  Support for woodwind and brass wind instruments:

•  trumpets, horns, trombones, saxophones, clarinets, oboes, etc.

•  Dedicated digital tools:

•  instrument models, fingering descriptions

•  computation of acoustic input impedance for a given fingering

•  tuning diagram for each fingering

•  capture of acoustic input impedance from a real instrument

•  Ability to share and clone instrument models

7

Page 8: Pydata Paris Python for manufacturing musical instruments

 

PAFI platform overview

8

Page 9: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - introduction

•  Project made by Baptiste Le Guillou

•  student at the ITEMM

•  in the context of his degree in Arts and Crafts (Brevet des Métiers d'Art)

•  project duration: 2 years

•  Turning a valves trumpet into a valves and slide trumpet

•  the added slide must modify the note up to one tone

•  the added slide allows playing quarter tones or glissando effects

9

Page 10: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - work to be done

•  Add tubings in the tuning slide to allow the desired effect

•  Remove a part of the tubing between the bell and the valves

•  in order to have a longer space for the tuning slide

10

Page 11: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - study

•  Questions to be answered:

•  what length of tubing should be added to the tuning slide?

•  what are the effects of the modifications on the instrument?

•  Use of the digital simulation instead of numerous trial / error cycles:

•  cheaper, faster

•  ability to explore more possibilities

11

Page 12: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - geometry

•  Measure of the actual instrument:

•  tubings length and diameter

•  valves position

•  Description of the instrument in the platform:

•  series of tubings, cones, valves, returns, holes, etc.

•  different fingerings:

•  which holes are closed, half-closed, opened

•  which valve pistons are pushed

•  what note is expected

12

Page 13: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - computation

•  Computation of the acoustic impedance:

•  Fourier transform of the pressure divided by the volume flow

•  shows the resonance frequencies of the instrument

•  and thus the notes that can be played

•  Computation of the tuning diagram:

•  difference between the expected note and the actual note (computed above)

•  the musician must adjust his playing to correct the note:

•  small differences mean ease of playing

13

Page 14: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - results

14

Page 15: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - checking

•  Measure of the actual acoustic impedance of the instrument

•  with dedicated sensors (loudspeakers and microphone)

•  connection through the Web browser thanks to the Web audio API

•  Comparison of the two impedance graphs

•  especially the resonance frequencies

15

Page 16: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - measures

16

Page 17: Pydata Paris Python for manufacturing musical instruments

 

Use case 1 - conclusion

•  Different slide lengths have been simulated

•  The best option has been implemented on the instrument

•  The result perfectly meets the initial requirements

17

Page 18: Pydata Paris Python for manufacturing musical instruments

 

Use case 2 - introduction

•  Project made by Gaëtan Schneider

•  student at the ITEMM

•  in the context of his degree in Arts and Crafts (Brevet des Métiers d'Art)

•  project duration: 2 years

•  Restoring a Couesnon baritone saxo from 1901

•  numerous keys are twisted

•  the neck is smashed and splitted

•  it can't be restored

18

Page 19: Pydata Paris Python for manufacturing musical instruments

 

Use case 2 - initial state

19

Page 20: Pydata Paris Python for manufacturing musical instruments

 

Use case 2 - study

•  A new neck must be built

•  Question to be answered:

•  what must be the length and the shape of the neck?

•  Study:

•  geometry description

•  computation of tuning diagram

•  digital try of different necks

20

Page 21: Pydata Paris Python for manufacturing musical instruments

 

Use case 2 - model

21

Page 22: Pydata Paris Python for manufacturing musical instruments

 

Use case 2 - results

22

Page 23: Pydata Paris Python for manufacturing musical instruments

 

Under the hood

•  Web application coded in Python and javascript

•  Computations based on numpy and scipy libraries

•  refactored from Matlab prototypes

•  Simple model and simple computations

•  easy to describe

•  fast to compute

•  sufficient accuracy for the expected physical values

•  the played note corresponds to the first order in physics

23

Page 24: Pydata Paris Python for manufacturing musical instruments

 

Feedbacks

•  Craftsmen:

•  easy test of instrument designs with a digital tool

•  ability to explore and dig in several options

•  no installation (Web application)

•  Researchers:

•  easy-to-understand code

•  Python compactness, high-level operations in its numeric libraries

•  structuring in modules

•  security from the numerous automatic tests

•  ability to enhance the algorithms without regression

24

Page 25: Pydata Paris Python for manufacturing musical instruments

 

We are hiring!

•  Visit http://www.logilab.fr/emplois

•  Web developer (javascript + Python)

•  Developer for data analysis and semantic Web (Python)

•  Thank you for your attention

•  Email: [email protected]

•  Twitter: @OCayrol

25

Page 26: Pydata Paris Python for manufacturing musical instruments