Showing posts with label music. Show all posts
Showing posts with label music. Show all posts

Wednesday, October 5, 2016

Something For Your Mind, Polymath Podcast episode 2

A is for Anomaly

In this episode, "A is for Anomaly", our first of the alphabetical episodes, we cover financial fraud, the Roman quaestores, outliers, PDFs and EKGs. Bleep... Bleep... Bleep...
"so perhaps this is not the ideal way of keeping track of 15 individuals..."

Something for your mind is available on



art·chiv.es

/'ärt,kīv/



Francois Dion
@f_dion
P.S. There is a bit more detail on this podcast as a whole, on linkedin.

Friday, September 30, 2016

5 music things

5 in 5

I like to cover 5 things in 5 minutes for lightning talks. Or one thing. At the local
Python user group, sometimes questions or other circumstances turn these 5
in 5 more into a 5 in 10-15...

5 Music Things

Eventually, after a year or two, I'll revisit a subject. I recently noticed that I had
not talked about music related things in almost two and a half years, so I did
5 quick Jupyter notebooks and presented that. Interestingly enough, none of
these 5 things were covered back then. The github repo includes edited versions
of the notebooks, based on the interactions at the meeting during my presentation.
Requirements: All require the following
pip install jupyter
Alphabetically...

1 - Audio

2 - libROSA

Here we will need to pip install matplotlib and numpy, and of course librosa.

3 - music21

pip install music21
You'll need some external programs: Lilypond and Musescore
You also need launch scripts for each of them. On a mac, use the provided
launch scripts in the mac/ folder of this repo. Make sure you chmod a+x them.
Change the path in the notebook to reflect your own user path.

4 - python-sonic

pip install python-sonic
You'll need one external program: Sonic Pi and to start it before running through
the notebook.

5 - pyKnon

pip install pyknon
You'll need one external program: timidity

easily installed:

  • in Linux with apt-get install timidity
  • on a Mac with brew install timidity
This was mostly an excuse to demo that external command line tools like timidity
or sox can be used here.


Have fun!
@f_dion - francois(dot)dion(at)gmail(dot)com

P.S.: Github repo at: https://github.com/fdion/5_music_things but for some strange reason, github will not render the first (0-StartHere) notebook. This blog post is basically that notebook, putting things in context.

Sunday, September 25, 2016

Something for your mind: Polymath Podcast Episode 001

Two topics will be covered:

Chipmusic, limitations and creativity

Numfocus (Open code = better science)


The numfocus interview was recorded at PyData Carolinas 2016. There will be a future episode covering the keynotes, tutorials, talks and lightning talks later this year. This interview was really more about open source and less about PyData.

The episode concludes with Learn more, on Claude Shannon and Harry Nyquist.

Something for your mind is available on

art·chiv.es
/'ärt,kīv/



Francois Dion
@f_dion

Friday, June 14, 2013

Pygame sound play

Música de fondo

Image

En la lista Python tutor (en ingles) se hizo la pregunta de como añadir música en un vídeo-juego con pygame. Pueden leer mi respuesta en ingles en los archivos, o aquí en español. Es muy sencillo:

4 lineas, nada mas


Podemos hacerlo con python directamente en modo interactivo. La primera es incluir pygame.

>>> import pygame


Como es un juego pygame, es siempre presente, asi que en realidad hay que añadir solo 3 lineas mas.

>>> pygame.mixer.init(22050,-16,2,4096)

Las opciones del init, es según lo que uno desea (44100KHz o 22050KHz etc) o solo un init()

>>> snd = pygame.mixer.Sound("bach-cello-suite-1.wav")
>>> music = snd.play()
Ahora empieza la música. music.get_busy() nos dará un cero cuando es el fin de la música.

>>> music.get_busy()
1
>>> music.get_busy()
1
>>> music.get_busy()
0

Obviamente, el fichero .wav debe ser con el script .py o donde se ejecuta python.

François
@f_dion

Saturday, November 24, 2012

It's more fun to compute

Image
last track  - "It's more fun to compute"


Ah, Computer World, by Kraftwerk. The last track is titled "It's more fun to compute". I'm thinking Hutter, Schneider and Bartos must have written this song in November, after raking and blowing leaves for a few days... All joking aside, I hope you have this album on your ipod.

So what is it exactly that makes computing more fun? More fun than what, I hear you ask... What do you think, is it more fun to compute?

Also, either tomorrow or Monday, I'll post the bitbucket Mercurial repository for the web.py presentation at PYPTUG that I'll be doing on Monday. In the interim, go ahead and install web.py. I have the instructions on the sidekick page. Basically:

pi@raspberrypi ~/Desktop $ sudo easy_install web.py
Searching for web.py
Best match: web.py 0.37
Processing web.py-0.37-py2.7.egg
web.py 0.37 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg
Processing dependencies for web.py
Finished processing dependencies for web.py


If you've gone through the PyHack workshop #01, you already installed mercurial (hg). If not, you will need to install it on your Raspberry Pi before you can get the code:


pi@raspberrypi ~/Desktop $ sudo apt-get install mercurial

Friday, November 23, 2012

Python: de débutant a expert

Série de tutoriels 

 Je vais commencer une série de tutoriels pour Python, en français. On va couvrir l'ABC du langage. Python est parfait comme premier langage de programmation, car il est relativement facile a apprendre pour faire ce que l'on veut. De plus, c'est un langage sérieux qui est partout en industrie.

Donc, non seulement on peut s'amuser, mais on peut être payés pour cela!

Débutants

On va commencer bien sur par la sélection d'un éditeur. Comme la majorité des lecteurs vont faire les tutoriels sur leur Raspberry Pi, on va surtout parler de geany. Mais je vais aussi mentionner d'autres en mode graphique, et aussi quelques configurations pour vim, pour ceux qui veulent rester en mode texte, ou qui préfèrent la console.

Intermédiaireset experts

Pour le moment, je vous conseille les articles du blog sur Python qui sont en anglais, et de suivre en simultané avec google translate.

Je vais introduire de temps a autres, un thème pour intermédiaires et experts. Par exemple, aujourd'hui, je vous laisse sur un sujet intéressant, mais pas pour débutants. René Bastien, a écrit un module pour faire de la composition de musique électronique. Un lien, une présentation de PyConFR et un module:

site officiel de Pythoneon

Présentation PyConFR 2012: PDF

L'installation de pythoneon (il faut avoir easy_install au minimum):
$ sudo easy_install pythoneon
 ou
$ sudo pip install pythoneon
Je vous conseille de voir les diapos de PyConFR (le PDF).

Je vous laisse vous amuser avec cela, et on y revient plus tard. La musique, c'est un autre de mes domaines d'expertise.