
-----README pDM version 1.9.2-------

pDM is a MIDI score player that is using the KTH rule system for control of the musical expressivity. pDM is an abstraction (patch) in pd (pure-data) and has been tested using pd 'vanilla' v50.1 and pd-extended v0.43.4 on Mac. It should work on Linux and Windows using corresponding versions but this has not been thoroughly tested. It is released under GPL license, see included license file.
 
The principles and ideas behind the program are described in the papers
 
Friberg, A. (2006). pDM: an expressive sequencer with real-time control of the KTH music performance rules. Computer Music Journal, 30(1), 37-48.

Friberg, A. (2005). Home conducting – Control the overall musical expression with gestures. Proceedings of the 2005 International Computer Music Conference, San Francisco: International Computer Music Association. (pp. 479-482). http://www.speech.kth.se/prod/publications/files/1347.pdf

The melody lead rule was implemented by Johan Bjurling and is described in

Bjurling, J.(2007). Timing in Piano Music - A Model of Melody Lead. Master Thesis at Speech, Music and Hearing, KTH, Stockholm. http://www.speech.kth.se/prod/publications/files/3095.pdf

pDM has been used in several studies including

Bresin, R., Elblaus, L., Falkenberg Hansen, K., Månsson, L., & Tardat, B. (2014). Musikcyklarna/music bikes: An installation for enabling children to investigate the relationship between expressive music performance and body motion. In Sound and Music Computing Sweden, Stockholm, December 4-5 2014 (pp. 1-2).

Giraldo, S., & Ramirez, R. (2013). Brain-activity-driven real-time music emotive control. In The 3rd International Conference on Music & Emotion, Jyväskylä, Finland, June 11-15, 2013. 

Hansen, K. F., Dravins, C., & Bresin, R. (2012). Active listening and expressive communication for children with hearing loss using getatable environments for creativity. Journal of New Music Research, 41(4), 365-375.

Bresin, R., & Friberg, A. (2011). Emotion rendering in music: range and characteristic values of seven musical variables. Cortex, 47(9), 1068-1081.

Castellano, G., Bresin, R., Camurri, A., & Volpe, G. (2007, September). User-centered control of audio and visual expressive feedback by full-body movements. In International Conference on Affective Computing and Intelligent Interaction (pp. 501-510). Springer, Berlin, Heidelberg.

----Installation-----------

Alternative 1 (preferred)
Get the latest release of pd 'vanilla' from
http://puredata.info/downloads/pure-data
Then using the menu command Help/find externals load the libraries 'maxlib', 'zexy', and 'unauthorized' (also oscx and hidin if you want to get rid of the error mess.) by typing in their names in the search box.
Make sure all three have a search path in Pd/Settings/Path.. and add 'zexy' to the startup in Pd/Settings/Startup..

Alternative 2 (easier but may not work in the future)
Download and install pd-extended for your platform from 
http://puredata.info/downloads/pd-extended
Make sure to follow the instructions for the installation. For example, for Windows there is one file to execute after the installation.
No further libraries are needed but the release is quite old and may not work properly.


----Getting started-------

Load the file pDM-192.pd
Load a score file by clicking the "Open.." button. It should be a file with the ".pdm" extension found in the "pdm_scores" directory. 
When the music is played there are several interaction windows that can be used (see comments in program). 
If there is no sound - check that MIDI out is connected to your synthesizer (menu Media/Midi settings...).

-- Gesture interface in EyesWeb----- (OLD)

For using gestural control you need a web cam and the program EyesWeb that is free for download at www.eyesweb.org. Eyesweb is only running in Windows. Download and install EyesWeb 3.3.0 including all updates and the motion library. Then it is only to load and run the file "home_conductor_simple2D_light.eyw". The two programs will automatically connect and your Home conducting can start!.

There is a minimum amount of movement necessary for the score to start playing and continue. The gesture interface is connected to the emotional activity-valence space so that a lot of movement gives high activity, movements in the bottom of the screen low valence (sadness and anger), and movements in the top of the screen high valence (happiness and tenderness)

-- Creating new scores ---

The score files have to be preprocessed in Director Musices (DM) by saving it in the ".pdm" format. Thus, you need to download Director Musices at http://www.speech.kth.se/music/performance/
A MIDI file can be used directly but a version with few performance variations is preferred. In order for the phrasing to work you need to insert phrase marks manually in the score (Instructions in the DM manual).

--------

Please send any comments and questions to 
Anders Friberg
afriberg@kth.se
https://www.kth.se/profile/afriberg/

For more info about the rule system see:
http://www.speech.kth.se/music/performance/

------------Changes in version 1.9.2 -----------------------
-Adapted to run in pd 'vanilla' according to instructions above

------------Changes in version 1.9.1 -----------------------
-Fixed a problem with stack overflow on windows (hopefully) by Kjetil Falkenberg Hansen
-added mapping for Disklavier

------------Changes in version 1.8.1 -----------------------
-New rule for melody lead modelled after measurements from real pianos.
-Added scaling of tempo and sound level for the 2D control panels
-Some cosmetic changes and patch cleaning
-Removed the send variables connecting software synthesizers in pd.