tag:blogger.com,1999:blog-44194191966747845372024-03-05T13:33:49.644+00:00My progress barRandom musings about my work and hobbies (High Performance Computing, Music Software, Classical Guitar, Flying Simulators, Swimming,...)angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.comBlogger146125tag:blogger.com,1999:blog-4419419196674784537.post-25982756893236515962019-01-06T22:48:00.002+00:002019-01-08T11:49:19.407+00:00Downloading YouTube videos with hardcoded subtitlesI recently bought a <a href="https://store.google.com/product/chromecast">Chromecast device</a>, and I use <a href="https://www.videolan.org/vlc/index.html">VLC</a> in my Linux computer to stream videos to our TV. Though not always, sometimes these videos come from YouTube, and I would like to be able to see the video subtitles in the TV, but as the time of writing this, VLC+Chromecast and subtitles don't seem to play along nicely (see <a href="https://code.videolan.org/videolan/vlc-android/issues/502">https://code.videolan.org/videolan/vlc-android/issues/502</a>).
While a future version of VLC is likely to include this feature, in the meantime I figured out the way to hardcode the subtitles. It is very easy, but time consuming, since we have to encode the video again. The following commands are an example of what needs to be done:<br />
<br />
(useful to see the different available formats, and get the one that corresponds to 1280x720)<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">youtube-dl --list-formats https://www.youtube.com/watch?v=AW138ZTKioM</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
(and the available subtitles)<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">youtube-dl --list-subs https://www.youtube.com/watch?v=AW138ZTKioM</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> </span></span> <br />
(download the video in the required format, -f, and convert the subtitles to the .srt format)<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">youtube-dl -f 22 --convert-subs srt --write-sub --sub-lang en https://www.youtube.com/watch?v=AW138ZTKioM</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> </span></span> <br />
(use ffmpeg to reencode with the downloaded subtitles hardcoded) <br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">ffmpeg -i The\ Anthropocene\ -\ The\ age\ of\ mankind\ -\ Docu\ -\ 2017-AW138ZTKioM.mp4 -vf "subtitles='The Anthropocene - The age of mankind - Docu - 2017-AW138ZTKioM.en.srt'" The_age_of_mankind.mp4</span></span><br />
<br />
Done!<br />
<br />
[update: 8/1/2019. Hardcoding the subtitles might be handy in several situations, but for watching YouTube videos via Chromecast, it is actually much easier to use Chromium (I'm using ArchLinux where Chrome is not in the official repositories), which comes with the option of casting YouTube, a given tab, or even the whole desktop).angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-3453274970922422017-12-09T14:31:00.000+00:002017-12-09T14:31:10.709+00:00Speeding up / down audio files<span style="font-family: Arial, Helvetica, sans-serif;">My children want to have some of the songs they listen on the radio in their MP3s.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">This is a no-brainer. After they find the videos they want in YouTube, I put all the URLs in a file ('bajar.txt') and can get all the MP3 files with the following command.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">youtube-dl -a bajar.txt -x --audio-format mp3 -o '%(title)s.%(ext)s'</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">But the second step is a bit more fun. One of the MP3s is wrong and it plays the songs a bit slower than it should. Instead of buying a new one, I just speed up the MP3 files in the computer before uploading them to the player. This script will just get all the *mp3 files in a directory, speed them up according to the SP factor, and copy them to the directory 'emma_mp3s', ready to upload to my daughter's player (modifying the IFS variable allows having white spaces in the file names)</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#!/bin/bash</span><br />
<span style="font-family: "Courier New", Courier, monospace; font-size: x-small;"># mp3speed.sh </span><span style="font-family: "Courier New", Courier, monospace; font-size: x-small;"># Adapted from https://ubuntuforums.org/showthread.php?t=1259851 </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">SAVEIFS=$IFS</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">IFS=$(echo -en "\n\b")</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">FILES="*.mp3"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mkdir -p emma_mp3s</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">for f in $FILES</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">do</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> AR=96k</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> SP=1.08897 # Speed up: ini_length * (1/speedup) = final_length</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> echo Encoding $f</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> mplayer -af scaletempo -speed $SP $f -vc null -vo null -ao pcm:fast:waveheader:file=$f.wav</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> ffmpeg -i $f.wav -acodec libmp3lame -ab $AR emma_mp3s/$f</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> rm $f.wav</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">done</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">IFS=$SAVEIFS</span><br />
<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com4tag:blogger.com,1999:blog-4419419196674784537.post-78435318948862900552017-11-19T15:37:00.002+00:002017-11-19T18:06:57.456+00:00Parental control in LinuxHaving small children, I needed to find a way to control how much time they spent daily using the computer.<br />
<br />
The page <a href="https://wiki.archlinux.org/index.php/Parental_Control">https://wiki.archlinux.org/index.php/Parental_Control</a> suggests <i>timekpr</i> and <i>timoutd </i>but both seem to be obsolete, since I couldn't make them work properly.<br />
<br />
In the end, the solution that fits me is to use both PAM and Workrave.<br />
<br />
<br />
<ul>
<li>PAM (<a href="http://www.linux-pam.org/">http://www.linux-pam.org/</a>) "is a suite of shared libraries that enable the local system administrator to choose how applications authenticate users", and there is a module called <i>pam_time</i> that "restricts access to a system and or specific applications at various times of the day and on specific days". So, with this I can limit access to the computer to only, for example, the weekends.</li>
</ul>
<br />
<ul>
<li>Workrave (<a href="http://www.workrave.org/">http://www.workrave.org/</a>). Workrave is originally designed to assist "in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit." </li>
</ul>
<br />
<br />
PAM is easy to configure and the children cannot stop it, but Workrave is not meant as a parental control software, so by default it shows a window, which the children could easily close in order to avoid the prescribed time limit. In order to fix this, I just make Workrave not to show in the Icon Tray, and just to open as a regular window, which then I hide from the taskbar with <i><a href="http://tripie.sweb.cz/utils/wmctrl/">wmctrl</a></i>. I create the following minimal script, which I configure to start up automatically with each session, so Workrave starts in the background, and the children cannot easily close it (when they learn a bit more about Linux they will easily figure out how to stop it, but I still have a few years until that happens!).<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#!/bin/bash</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">/usr/sbin/workrave --sm-client-disable &</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">sleep 1</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">wmctrl -r "Workrave" -b add,skip_taskbar</span><br />
<br />
When they reach the daily limit, Workrave will show them a warning and give them 30 seconds before the session is blocked (I would like to give them perhaps 5 minutes before the session is blocked, but for the moment I didn't figure out how to change this).<br />
<br />
The Workrave configuration I used can be seen in the following images:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxP6VblaGjOCybi1Ny3V6_Ys4zGiWIxucGTN9tm2AH7m19TZUXQTjwd9OHf-nxKv6ZiA0ZB8r2ulwzBOFbG03qHzpY09wbeSR77XgnsQINchBKeUn8SlkboDjs3aSLSsjc5Fh3JYddlE4/s1600/workrave1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="1056" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxP6VblaGjOCybi1Ny3V6_Ys4zGiWIxucGTN9tm2AH7m19TZUXQTjwd9OHf-nxKv6ZiA0ZB8r2ulwzBOFbG03qHzpY09wbeSR77XgnsQINchBKeUn8SlkboDjs3aSLSsjc5Fh3JYddlE4/s400/workrave1.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWj5CbQp9XnK2j5VeB1XqYsURMWi51wur4sJTwJ9OL2Wve6ajWhhiZZzfO5i_dE3nQe6uysfHz6VhkW0vtWDVhwGR2Z9VVt274K5v9WSd8SijOdDRXvVf6t9ghR9sulnoAJDhK57vNADo/s1600/workrave2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="1056" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWj5CbQp9XnK2j5VeB1XqYsURMWi51wur4sJTwJ9OL2Wve6ajWhhiZZzfO5i_dE3nQe6uysfHz6VhkW0vtWDVhwGR2Z9VVt274K5v9WSd8SijOdDRXvVf6t9ghR9sulnoAJDhK57vNADo/s400/workrave2.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu8uDRHU62jGKzyTw-LKHA91nx3b8ZGUKkR0R8BLR71Ywwxf-ZbFPOV0QlUEagJr17fUFr0XcHu2elO_hDAHRTU_MVPUueb-gA5jZwxZPE2M-woogmNokAAiK6Sux_4bduV4O7grO5i8k/s1600/workrave3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="1056" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu8uDRHU62jGKzyTw-LKHA91nx3b8ZGUKkR0R8BLR71Ywwxf-ZbFPOV0QlUEagJr17fUFr0XcHu2elO_hDAHRTU_MVPUueb-gA5jZwxZPE2M-woogmNokAAiK6Sux_4bduV4O7grO5i8k/s400/workrave3.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWaKxeIiFpHccK977cSEdRSi9f4M9u2pgq3h2YDk7uKpV72E23CQF5fQsgvdGy1rqoxgArptAQa3CGaJQIi8nV-YfEgY2YLiIEqi-J8frHSEqHNiVNy5qfpQ3kEURxVhmbvdRk6C61jJw/s1600/workrave4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="1056" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWaKxeIiFpHccK977cSEdRSi9f4M9u2pgq3h2YDk7uKpV72E23CQF5fQsgvdGy1rqoxgArptAQa3CGaJQIi8nV-YfEgY2YLiIEqi-J8frHSEqHNiVNy5qfpQ3kEURxVhmbvdRk6C61jJw/s400/workrave4.png" width="400" /></a></div>
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-56759144713760238902017-11-17T21:07:00.000+00:002017-11-17T21:11:02.746+00:00Emacs interface to RecollLately I'm using Recoll (a desktop full-text search tool), <a href="https://www.lesbonscomptes.com/recoll/">https://www.lesbonscomptes.com/recoll/</a>, which comes with a GUI, but it also can be used from a terminal. I wanted to be able to use it from within Emacs and I found two existing ways:<br />
<br />
<br />
<ol>
<li>helm-recoll <a href="https://github.com/emacs-helm/helm-recoll">https://github.com/emacs-helm/helm-recoll</a></li>
<li>counsel-recoll, bundled with swiper <a href="https://github.com/abo-abo/swiper">https://github.com/abo-abo/swiper</a></li>
</ol>
<div>
I already use Ivy/Swiper/Counsel, which is very nice, so route 1) didn't appeal much to me: I would have to install Helm just to get Emacs-Recoll interaction and perhaps suffer some problems by having Helm and Ivy together.</div>
<div>
<br /></div>
<div>
Route 2) was not very nice either because counsel-recoll will interactively search the database for matches and it will show in the mini-buffer the names of the files whose contents match the given search so you can quickly open them, but you can not see any context in the files around the search you are trying to do.</div>
<div>
<br /></div>
<div>
So I ended up writing a small functon (<b><i>ag-recoll</i></b>), that suits me better. I can give a number of words, which recoll will use to do a search, and then only on those files matching, I will call <b><i>ag</i></b>, which will create a buffer with all the places in the files where the given words match. The given buffer is a "compilation" buffer, so the lines are hyperlinks, which can be easily followed to open the file at the place of interest.</div>
<div>
<br /></div>
<div>
The function is as simple as:</div>
<div>
<br /></div>
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">(defun ag-recoll (string directory)</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> "Search using ag based on the findings of recoll. Search will be done in a given DIRECTORY, </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">and the STRING will be interpreted as concatenated by ANDs for recoll and with ORs for ag.</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> The idea is that when I search, for example, for 'openacc mpi', recoll will give me all the </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">files that have those two words somewhere in the file, and ag will find lines that match </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">any of the terms.</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> For the moment this is very crude, and most options to recoll and ag are hard-coded in the </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">ag-recoll.sh script, most notably that ag will look for a maximum of 10 matches in each file </span><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">to avoid huge lists with common searches."</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> (interactive (list (ag/read-from-minibuffer "Search string")</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> (read-directory-name "Directory: ")))</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> (setq command-string (format "%s %s %s" "/home/angelv/localhacks/ag-recoll.sh" directory string))</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> (setq regexp nil)</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> (compilation-start</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> command-string</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> #'ag-mode</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> `(lambda (mode-name) ,(ag/buffer-name string directory regexp))))</span><br />
<br />
which uses the ag-recoll.sh script:<br />
<div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#!/bin/bash</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">dir=$1; shift</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">ors=$(printf '%s|' address@hidden)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">recoll -t -b $@ dir:$dir | sed -e "s/file:\/\///" | xargs -d '\n' ag --max-count 10 --group --line-number column --color --color-match 30\;43 --color-path 1\;32 --smart-case ${ors%|}</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
So, as an example, when I call <b><i>ag-recoll</i></b> with STRING 'openacc pgi' and DIRECTORY /home/angelv/Learning in my workstation, the result is like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMrxamghGNbh7IWCOmchfA9hx4AADoPgLz-psok_tb3U2R7fTf6oh1Nq7MGb5eS1zRSDncsmZiS37BtjeafvWbux5RuHFHf5HLaJ0O0Mtw6xiIFD_1LaH8d_M9bartCn7vIbcnmRQQheY/s1600/ag-recoll.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="955" data-original-width="1167" height="522" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMrxamghGNbh7IWCOmchfA9hx4AADoPgLz-psok_tb3U2R7fTf6oh1Nq7MGb5eS1zRSDncsmZiS37BtjeafvWbux5RuHFHf5HLaJ0O0Mtw6xiIFD_1LaH8d_M9bartCn7vIbcnmRQQheY/s640/ag-recoll.png" width="640" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
where each line is a hyperlink to the corresponding match in the file and you can use the common grep-mode commands to open a file, go to the next match C-x `, etc.</div>
<div>
<br /></div>
<div>
This is useful already as it is, but I will try to make it more flexible (being able to pass arguments to <b><i>recoll</i></b> and <b><i>ag</i></b>, etc. [I'm a total noob with Emacs Lisp, so any suggestions on how to improve the code are very welcome].</div>
<div>
<br /></div>
</div>
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com2tag:blogger.com,1999:blog-4419419196674784537.post-89229333940386063112017-06-09T09:01:00.001+00:002017-06-09T09:18:31.531+00:00Oxfam Trailwalker Madrid 2017I have been a member of Oxfam for several years now, but only last summer I learnt about the Trailwalker. As you can read in their <a href="http://trailwalker.oxfamintermon.org/en/about-trailwalker">webpage</a>:<br />
<br />
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">Trailwalker is the greatest team challenge of the world fight against
poverty. The challenge consists of four member teams walking 100km in
less than 32 hours. The members of the team must start together, stay
together and finish together.<br />The aim? To fight poverty and injustice
around the world. That is why the teams commit themselves to obtain
donations for Oxfam Intermón. Each contribution improves many lives, so
encourage your family and friends to help. </span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">[...]</span></div>
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"></span></div>
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">Trailwalker was originally a military training exercise for the
Gurkha Regiment in Hong Kong. In 1986, it became an Oxfam event for
fundraising and since then it has grown to become one of the most
important sport challenges, held annually in different countries around
the world.</span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
100km in less than 32 hours and obtaining at least 1500€ in donations requires some work, so after talking with my family and convincing a group of colleagues at work and friends, we managed to set up a team around November 2016 for the Trailwalker Madrid 2017. Below is the team webpage (as per June 2017, after having finished the race and having obtained 1830€ in donations).<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsxj9qQvkoKDMOBXIkO2TnaorA99_z5lXGp-L5b8DgsYW48n_gYyT3fBu6_GQkND1aTKVlBkIpf6g7fPDNpWTzxs8vqmg5JNY7aWOenpW_2_MKopKqLWFzMZSc0_QUNjBlD4b0yV3PyHs/s1600/team.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="910" data-original-width="1035" height="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsxj9qQvkoKDMOBXIkO2TnaorA99_z5lXGp-L5b8DgsYW48n_gYyT3fBu6_GQkND1aTKVlBkIpf6g7fPDNpWTzxs8vqmg5JNY7aWOenpW_2_MKopKqLWFzMZSc0_QUNjBlD4b0yV3PyHs/s640/team.png" width="640" /></a> <br />
<br />
The Trailwalker Madrid 2017 webpage is very well organized, with loads of tips on training and fund raising. We tried to read all of it and get organized as soon as possible.<br />
<br />
<h2>
Fund raising </h2>
<br />
For fund raising we didn't organize any events, and mainly we just created a poster to put up at work and to distribute it via:<br />
<ul>
<li>e-mails to work colleagues and friends</li>
<li>WhatsApp messages</li>
<li>word of mouth </li>
</ul>
The poster looked like this (version in Spanish):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTRVY8gr6YbpgUWMz6mi14eYO5xU9ohaxiYL6ubdp65y1QiXD4-O8wPVIURpsd3EgMv1nOBmBdR10VTaDLsalPDqS8fAtAL8OPogTfNMF255V2KFmDDkrcj1iwiH8JkDz-XW6M9dCz9-k/s1600/astro_poster%25281%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1132" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTRVY8gr6YbpgUWMz6mi14eYO5xU9ohaxiYL6ubdp65y1QiXD4-O8wPVIURpsd3EgMv1nOBmBdR10VTaDLsalPDqS8fAtAL8OPogTfNMF255V2KFmDDkrcj1iwiH8JkDz-XW6M9dCz9-k/s640/astro_poster%25281%2529.jpg" width="452" /></a></div>
<br />
<br />
We also created a Facebook page (<a href="https://www.facebook.com/astrowalkers/">https://www.facebook.com/astrowalkers/</a>), so that people could follow our training and fund raising progress.<br />
<br />
I have to say that fund raising was more difficult than we had anticipated and full of surprises (in some cases total strangers donating large sums of money, while no money coming from people we were 'sure' would help us). In any case, at the end we managed to go well past the minimum required of 1500€ and collected for Oxfam a total of 1830€.<br />
<br />
<h2>
Training</h2>
<br />
All the members being quite busy at work, we decided that we would train individually most of the time, but try to meet once per month to do a team session together. That would mean six training sessions together (December - May). Simone had some trips and could not join all the sessions, but he is the fittest of the group, so he was going to cope well anyway. The six training sessions were:<br />
<br />
<h3>
Training 1: </h3>
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=15743472&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<h4>
</h4>
<h3>
Training 2:</h3>
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=16256046&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<h4>
</h4>
<h3>
Training 3:</h3>
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=16475134&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<h4>
</h4>
<h3>
Training 4:</h3>
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=17033686&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<h4>
</h4>
<h3>
Training 5:</h3>
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=17407704&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<h4>
</h4>
<h3>
Training 6:</h3>
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=17864671&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<br />
<br />
<h2>
Race day</h2>
<br />
After all these preparations, we were quite ready for the Trailwalker, but we were always assuming that the weather was going to be hot and dry (which suits us nice, living in Tenerife). But as the race day got closer, the forecast was of rain (a lot of rain and storms), which made me quite anxious and concerned about blisters, my main issue in all the previous training days.<br />
<br />
As it turned out, the weather was quite good throughout the race, except for some rain and hail in the first hours (there was also quite a heavy storm the following day, more or less about 30 hours after the starting time, but we managed to avoid this one completely, having finished in about 27.5 hours). <br />
<br />
The race started on June 3rd, at 09:00. Not being a competitive race, the atmosphere was really friendly and supportive of each other. In total there were six intermediate stops, where everything was very well organized and Oxfam provided water, fruits, coffee, etc. plus physiotherapy and feet care services, and our support team was always ready to prepare us some meal or get us anything that we might need.<br />
<br />
In total it took us some 27.5 hours to complete the 100km. Our original plan was to try and do it in 24 hours, but in the end our stops were a bit longer than planned, and towards the end we started having some serious blister issues, which forced us to go much slower. Here it is the final route (more detailed stats can be seen at: <a href="https://www.endomondo.com/users/10020566/workouts/939149852">https://www.endomondo.com/users/10020566/workouts/939149852</a>)<br />
<br />
<iframe frameborder="0" height="480" scrolling="no" src="https://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=18121929&measures=on&title=off&near=off&images=off&maptype=S" width="600"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="https://es.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<br />
<br />
<br />
Some memories from the day:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjY9whzT4DZxgC5_0fguVYV6nhTETLFtU-Wey_YT2uZx0j_DInhbA6HjN8q1YL84HQIniwsacOlWJewzFG6oW83ojn40Hvv1TdiFL4YI1Ka2l0YsFDEQrdT5CZzFxyw2HBiYFNDm7rMlE/s1600/WhatsApp+Image+2017-06-03+at+08.56.18.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjY9whzT4DZxgC5_0fguVYV6nhTETLFtU-Wey_YT2uZx0j_DInhbA6HjN8q1YL84HQIniwsacOlWJewzFG6oW83ojn40Hvv1TdiFL4YI1Ka2l0YsFDEQrdT5CZzFxyw2HBiYFNDm7rMlE/s640/WhatsApp+Image+2017-06-03+at+08.56.18.jpeg" width="640" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kI04PGgaN9__x_ILD_nD554QpoUlLsJXT3Ty7m1YDbd5J8qjUgRgxBuE-lm2BWmA05WJFXXLYNfo05OJDh2QNqgt2CtMCwa3rfZ9b9WNccrGS-J9PUpNPtQJNMC2nhYjBA-AQK2pAkc/s1600/18836815_10155179237895999_2632180566478366057_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="800" data-original-width="1200" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kI04PGgaN9__x_ILD_nD554QpoUlLsJXT3Ty7m1YDbd5J8qjUgRgxBuE-lm2BWmA05WJFXXLYNfo05OJDh2QNqgt2CtMCwa3rfZ9b9WNccrGS-J9PUpNPtQJNMC2nhYjBA-AQK2pAkc/s640/18836815_10155179237895999_2632180566478366057_o.jpg" width="640" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-M8qoO3jH99fuuOe2UIx-Ffc8sJtvYbUzjhn9WX2CwwWbm0wdKUlNgAcHGy6t8mSQ_LGN9dRZnJEFcdXN0MtlBVUMk2Wn2VYEkoIpeGJnozoMGcwEhyJuJ0GU9eaJ9WTG6YNUuWOWUBg/s1600/18891667_10155182645785999_2398987488947182620_o.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1080" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-M8qoO3jH99fuuOe2UIx-Ffc8sJtvYbUzjhn9WX2CwwWbm0wdKUlNgAcHGy6t8mSQ_LGN9dRZnJEFcdXN0MtlBVUMk2Wn2VYEkoIpeGJnozoMGcwEhyJuJ0GU9eaJ9WTG6YNUuWOWUBg/s640/18891667_10155182645785999_2398987488947182620_o.jpg" width="640" /></a></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="337" src="https://www.youtube.com/embed/y5D4dQyI8-4" width="600"></iframe>
</div>
<br />
<br />
<br />
Overall, this was a fantastic experience, even more when we know that all the effort we made was for a good cause. For the Trailwalker'17 edition (consisting of three races: Girona, Euskadi and Madrid), all together we were able to raise for Oxfam Intermón a total of<span class="_mh6 _wsc" id="cch_f2e83a8670a04e"><span class="_3oh- _58nk"> 1059384.53€, which will be used to help improve the quality of life of many people around the world (<a href="https://l.facebook.com/l.php?u=http%3A%2F%2Ftrailwalker.oxfamintermon.org%2Fen%2Fabout-trailwalker&h=ATPx6oY5nOUIiQDUOuwXyq3e1QS8QGaXPmEElzP_OOJfX1MvED_mNZmWtT9dOE86q3DD1D72eEHzhCk2-4sPnE3JtF-9j3vtmsO8BiAmparYLXtaCdftSXqXc_Yu6QyfhHM" rel="nofollow" target="_blank">http://trailwalker.oxfamintermon.org/en/about-trailwalker</a>).</span></span><br />
<br />
<span class="_mh6 _wsc" id="cch_f2e83a8670a04e"><span class="_3oh- _58nk">Well done everyone involved and many thanks to all our supporters!! </span></span><br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-75649734698511000622016-05-31T15:28:00.002+00:002016-05-31T20:37:53.927+00:00Open source Fortran parallel debuggingIf you develop parallel code in Fortran, your options for parallel debuggers are not that many. There are a some very good commercial parallel debuggers (mainly <a href="http://www.roguewave.com/products-services/totalview">TotalView</a> and <a href="http://www.allinea.com/products/ddt">DDT</a>), and if you are using any decent-size supercomputer to run your code, chances are that these are already installed in the machine.<br />
<br />
But from time to time I need to be able to debug code on my Linux workstation while developing new Fortran code. We do have a license for the Intel Fortran Compiler, and in previous versions this shipped with a graphical debugger (IDB) which was very nice for serial applications, but they stopped shipping it around 2013, so I decided to look for an alternative, with GDB.<br />
<br />
Before we go for parallel debugging, let's go first for serial code debugging.<br />
<br />
<h2>
<b>Fortran + GDB (serial code) </b></h2>
<br />
The issue with GDB is that it doesn't play nicely with Fortran. Let's see an example with the following code:<br />
<script src="https://gist.github.com/anonymous/910d08ba0effeace169b65ba8f7a61b9.js"></script>
<br />
My current setting is:<br />
* Distribution: Linux 4.2.3-200.fc22.x86_64<br />
* gfortran: GNU Fortran (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4) <br />
* gdb: GNU gdb (GDB) Fedora 7.9.1-20.fc22<br />
<br />
<br />
I'm able to look at the array datos, put I cannot look for subarrays, like datos(1,:,:), the pointer pdatos is OK if viewed in full, but I can't again look for subarrays of it, like pdatos(1,:)<br />
<script src="https://gist.github.com/anonymous/27492dba16d81f13e28ca9cee83c440d.js"></script>
<br />
<br />
<br />
So we will need some modified version of gdb that plays nicely with Fortran. One possible solution is to use a gdb obtained from Archer (git) <a href="http://sourceware.org/gdb/wiki/ArcherBranchManagement" rel="nofollow">http://sourceware.org/gdb/wiki/ArcherBranchManagement</a>, branch archer-jankratochvil-vla, though I haven't used that one and I don't know how it plays along with Fortran.<br />
<br />
Another solution is to use the modified version of gdb that comes with the Intel compiler: gdb-ia (I'm not sure if one can get gdb-ia as a standalone download, without the need to get an Intel compiler license).<br />
<br />
With our current Intel Compiler version (2016.1.150), the versions of ifort and gdb-ia are:<br />
<br />
* ifort: ifort (IFORT) 16.0.1 20151021<br />
* gdb-ia: GNU gdb (GDB) 7.8-16.0.558<br />
<br />
With these settings, if we try to use the Intel compiler provided and then debug with gdb-ia, things don't work poperly. Access to the array "datos" seems OK, but if we try to access it via the pointer "pdatos" we don't get it to work:<br />
<br />
<br />
<script src="https://gist.github.com/anonymous/2af663ee7a89118e90e6f5ee61584bf7.js"></script>
In principle you can access to any data if you know your way around pointers and you could use syntax like<br />
<br />
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">(gdb) p *((real *)my_heap + 2)</span></div>
</div>
<br />
(see
<a href="http://numericalnoob.blogspot.com.es/2012/08/fortran-allocatable-arrays-and-pointers.html">http://numericalnoob.blogspot.com.es/2012/08/fortran-allocatable-arrays-and-pointers.html</a>
for examples and explanations), but this quickly becomes very cumbersome.<br />
<br />
But if we compile with gfortran and then use gdb-ia to debug the code, then allocatable arrays, pointer to them, and subarrays of them seem to work no problem:<br />
<br />
<script src="https://gist.github.com/anonymous/a477c2e985e43f321141003365e8496b.js"></script>
<br />
<br />
<h2>
<b>Fortran + GDB (parallel code)</b></h2>
<br />
So now that we have a working environment for serial code, we need the jump to be able to debug parallel code. GDB is not designed to work in parallel, so we need some workaround to make it a viable platform to debug in parallel.<br />
<br />
The usual advice is to run a variant of the following:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">mpirun -np <np> xterm -e gdb ./program </np></span><br />
<br />
so, for example, if we are running our program with 4 processors, then 4 xterms will open, and in each of them we will have a gdb session debugging one of the MPI rank processes. The problem with this is, obviously, that we will have to go through each xterm to advance through the code, and soon this will become very cumbersome, due to having to change from window to window all the time and also because all the xterms will take up too much screen space.<br />
<br />
So I wanted to find a solution that is more convenient (in terms of not having to replicate all the gdb commands in all windows) and also that can make better use of the available screen space.<br />
<br />
<h3>
First attempt</h3>
<div>
<br /></div>
My first attempt involved the many xterms method above, but then with two improvements:<br />
<br />
<ol>
<li>I would use x-tile (<a href="http://www.giuspen.com/x-tile/">http://www.giuspen.com/x-tile/</a>) to automatically tile all the xterms and maximize their use of screen space.</li>
<li>I would use keyboardcast (<a href="https://launchpad.net/keyboardcast">https://launchpad.net/keyboardcast</a>) in order to control all the xterms from one single application.</li>
</ol>
<br />
This was more ore less OK as I was testing this on a PC with Ubuntu on it, but for other distributions keyboardcast seems to have a lot of dependencies (the source code can be downloaded from <a href="http://archive.ubuntu.com/ubuntu/pool/universe/k/keyboardcast/keyboardcast_0.1.1.orig.tar.gz">archive.ubuntu.com/ubuntu/pool/universe/k/keyboardcast/keyboardcast_0.1.1.orig.tar.gz</a>), and also I could not use it for remote machines, since keyboardcast only knows about X applications running locally (or at least I couldn't find a way to control terminals launched in a remote server to which I had connected with ssh -X)<br />
<br />
<h3>
Second attempt</h3>
<div>
<br /></div>
So I looked for another solution, one which I could use remotely and which didn't depend on installing packages with many external dependencies. A semi-decent solution that I found was to submit the mpirun job in a remote server where every process is sent to its own screen running gdb-ia (screen as in <a href="http://linux.die.net/man/1/screen">http://linux.die.net/man/1/screen</a>) and then remotely use terminator (<a href="https://launchpad.net/terminator/">https://launchpad.net/terminator/</a>, <a href="http://gnometerminator.blogspot.com.es/p/introduction.html">http://gnometerminator.blogspot.com.es/p/introduction.html</a>) to connect to those running screens, with the added benefit that I can control all the gdb sessions simultaneously and, thanks to screen, I can even stop debugging in one machine, go to another one and continue debugging in the place where I left it off.<br />
<br />
So, let's see the details. Let's assume the following simple Fortran+MPI code, a variation on the serial code above:<br />
<br />
<script src="https://gist.github.com/anonymous/191b4c2f4533502ccdd689452a2d06f6.js"></script>
Which I compile with gfortran_5.1.1 and its derived mpif90 (with library version OpenMPI openmpi-1.10.2 in this case, though that version of MPI should not matter in principle) in remote server "duna", which is the same FC22 machine where I was doing the serial tests above.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">mpif90 -g -o test_mpi_gfortran test_mpi.F90</span><br />
<br />
And (as suggested in <a href="https://bfroehle.com/2011/09/14/debugging-mpi-python/">https://bfroehle.com/2011/09/14/debugging-mpi-python/</a>), I launch it as:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">mpirun -np 4 screen -L -m -D -S mpi env LD_LIBRARY_PATH=$LD_LIBRARY_PATH gdb-ia -tui ./test_mpi_gfortran</span><br />
<br />
(you can include the & in the end if you want to get back the terminal at the remote server, but I prefer it like this, so when I finish the debugging session I can just Ctrl-C this terminal and I will not leave any leftover processes hanging around).<br />
<br />
That line has created 4 screens sessions, and in each one a <i>gdb-ia</i> process will be running. So now it is time to connect to them, and I can easily do it from my client workstation (in this particular case running Ubuntu 14.04).<br />
<br />
<br />
<ul>
<li>I start terminator, and create 4 tabs. Then, from the dropdown menu I select "Broadcast all", and then ssh to the remote server (just doing it in one of the tabs will replicate all the keystrokes to the other tabs, so the four terminals will connect to the remote server). </li>
</ul>
<ul>
<li>Then we need to connect each of the terminals to one of the screen sessions. </li>
<ul>
<li>If I use (as suggested in <a href="https://bfroehle.com/2011/09/14/debugging-mpi-python/">https://bfroehle.com/2011/09/14/debugging-mpi-python/</a>) <i>gnome-terminal</i>, then I have the same issue as before, that I will not be able to control all of them at the same time. </li>
<li>If from <i>terminator</i> (while "broadcasting all" is still active) I type "screen -RR -p mpi" in one of the terminals, then it looks like all of them connect to the same screen session, which we obviously don't want.</li>
<li>For the moment, an ugly hack (let me know if you have a better idea) is to make each of the terminals wait some random seconds, which we can do in <i>bash</i> with:</li>
</ul>
</ul>
<span style="font-family: "courier new" , "courier" , monospace;"> sleep $[ ( $RANDOM % 20 ) + 1 ] ; screen -RR -p mpi</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
This is obviously not very robust, so I should look for a better way, but for the moment it will make sure that each of the terminal tabs will connect to the screen session with some interval of time between them, which works most of the time (if when you start typing anything you see that a keystroke shows more than once, then it means that some terminals tried to connect simultaneously to the same screen session giving trouble, so you should redo, perhaps with a longer sleep time.<br />
<br />
Now, terminator is very powerful, and if you prefer to have dettached tabs to see simultaneously what is going on in each processor, you can definitely do it. For example see <a href="http://unix.stackexchange.com/questions/89339/how-do-i-run-the-same-linux-command-in-more-than-one-tab-shell-simultaneously">http://unix.stackexchange.com/questions/89339/how-do-i-run-the-same-linux-command-in-more-than-one-tab-shell-simultaneously</a> for an example of running a grid of 8x4 terminals using terminator.<br />
<br />
So now, if you know your way around the TUI interface, you can just control all the processors at once, or just one by one (by selecting "Broadcast none"), and you will be able to inspect properly allocatable arrays, pointers, etc.<br />
<br />
<h3>
With Emacs + GDB integration</h3>
<div>
<br /></div>
I don't like the TUI interface that much, and I would like to use Emacs GDB mode instead, but this version of gdb-ia doesn't play very nicely with Emacs, and on calling <i>gdb</i> from within Emacs, I get the following error:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">~$ Error: you did not specify -i=mi on GDB's command line!</span><br />
<br />
To solve the issue (I've been told that this won't be necessary in future releases of gdb-ia) we need to create a wrapper script (let's call it gdb_wrap.sh):<br />
<script src="https://gist.github.com/anonymous/2a0240627a52982abd2861ab569fbd35.js"></script>
<br />
And now, for the final touch, in the remote server we just define another script (let's call it edbg):<br />
<br />
<script src="https://gist.github.com/anonymous/614e4efe326abfbacf584ab4fae059be.js"></script>
<br />
So now in the remote server we can do:<br />
<span style="font-family: "courier new" , "courier" , monospace;">mpirun -np 4 screen -L -m -D -S mpi env LD_LIBRARY_PATH=$LD_LIBRARY_PATH edbg ./test_mpi_gfortran</span><br />
<br />
This will do the same as before, but instead of launching 4 gdb's in the remote server with the TUI interface, we will have four Emacs (one for each MPI process) and each one with its GDB interface (which is quite a usable interface if we run <i>gdb-many-windows</i>).<br />
<br />
As an example, you can see a very simple debugging session in the following video, where I start a 4-processor job with mpirun in the remote server "duna", and then at my "carro" workstation I launch terminator with 4 terminals, which I control all at the same time thanks to "Broadcast all" option, and as we can see towards the end, each terminal is running a different process, and you can see that when I print "my_id" or the contents of the "pdatos(1,:)" pointer array each process shows its own contents.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="372" src="https://www.youtube.com/embed/Bc3H1fhh9ho" width="660"></iframe>
<br />
Any comments/suggestions to make the debugging session more comfortable/useful are very welcome.angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com1tag:blogger.com,1999:blog-4419419196674784537.post-72162154531515421332016-05-08T16:17:00.002+00:002016-05-09T07:06:42.836+00:00Solo Teide climb (from sea level, route 0-4)Mount Teide is the highest point in Spain (3718m), and although I have climbed it several times, this was my first attempt from sea level.<br />
<br />
My original plan was to do it on March 5, 2016, but just two weeks before that date it started to snow very heavily and by March 5 the roads and paths were still closed and had to postpone it, though Teide looked very beautiful covered by snow. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2y7MViXaOxxfUODLPxJnoNyzHJm7sw2XIkGWJoqA8bOwfBqB31ZzKrIJijMaxJoMZlNUSVN_Gj_4VegE9VWvV3GmTC4xpeIu8y8bw-q9iS464cAoQILJTENPksVULxXirE2vFmBp1DeQ/s1600/nieve-teide-viernes-febrero-2016-154_g.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2y7MViXaOxxfUODLPxJnoNyzHJm7sw2XIkGWJoqA8bOwfBqB31ZzKrIJijMaxJoMZlNUSVN_Gj_4VegE9VWvV3GmTC4xpeIu8y8bw-q9iS464cAoQILJTENPksVULxXirE2vFmBp1DeQ/s400/nieve-teide-viernes-febrero-2016-154_g.jpg" width="400" /></a></div>
<blockquote class="tr_bq">
Picture from "La Opinión de Tenerife" (<a href="http://www.laopinion.es/multimedia/fotos/sociedad/2016-02-21-41226-nieve-teide-febrero-2016.html">http://www.laopinion.es/multimedia/fotos/sociedad/2016-02-21-41226-nieve-teide-febrero-2016.html</a>)</blockquote>
<br />
My second attempt was for April 9, 2016. But the paths were still closed, so I had to postpone it again.<br />
<br />
The third attempt was for May 7, 2016. Paths were open, and everything looked fine for that date, but just the day before I read this at the Teide National Park Facebook page:<br />
<br />
<blockquote class="tr_bq">
<i>LES RECORDAMOS QUE HOY SE REALIZARÁ LA PRIMERA (1/13) JORNADA DE CONTROL
DE MUFLÓN EN EL PARQUE NACIONAL DEL TEIDE y por razones de seguridad, y
mientras se desarrollan, se ha establecido la PROHIBICIÓN DE ACCESO Y
PERMANENCIA EN ALGUNOS SENDEROS Y SECTORES DEL PARQUE NACIONAL.</i></blockquote>
<br />
which basically means that there will be hunters in the paths that I had to use, in order to control the muflon population.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1qrqEgCR1M_6CkbOtrYAiNiawheNZh-lSth_ei8yoFVqFddl4OdNSXE8vI1sg__aru9_rfohpzzWwh4nSAOXAulu3By11zk1HAEjiWLJPtwGAOx8yvXl9i3LXgjxJxF_4xfTj7tAfkw/s1600/muflon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="375" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1qrqEgCR1M_6CkbOtrYAiNiawheNZh-lSth_ei8yoFVqFddl4OdNSXE8vI1sg__aru9_rfohpzzWwh4nSAOXAulu3By11zk1HAEjiWLJPtwGAOx8yvXl9i3LXgjxJxF_4xfTj7tAfkw/s400/muflon.jpg" width="400" /></a></div>
<blockquote class="tr_bq">
I'm not sure what would scare me more, a hunter shooting near me or a close encounter with a muflon...</blockquote>
<br />
Luckily for me the hunting would be only on Friday (May 6), so I could go ahead on May 7. <br />
<br />
<br />
<u><b><span style="font-size: large;">Preparations</span></b></u><br />
<br />
This is a long route and my plan was to do it on my own all the way to
the peak, then take the cable car down to the main road where my family
would pick me up to go back home. So before attempting the climb, there were some preparations to be done:<br />
<br />
* In order to climb Mt. Teide all the way to the top, you need a permit, which you can get online at: <a href="https://www.reservasparquesnacionales.es/real/parquesnac/usu/html/detalle-actividad-oapn.aspx?ii=6ENG&cen=2&act=1">https://www.reservasparquesnacionales.es/real/parquesnac/usu/html/detalle-actividad-oapn.aspx?ii=6ENG&cen=2&act=1</a><br />
<br />
* It is obviously wise to check the weather. All was looking very good for May 7 (from <a href="http://www.meteoexploration.com/forecasts/Teide/?lang=en">http://www.meteoexploration.com/forecasts/Teide/?lang=en</a>)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGmwe-61zyTeL7zITdyZGpWREczp1_sksCaCGOz-NJ5-aO7RxqIN3OFEWoxW4fzUcyLrrRjWj13n8WLKjkVM31yPTvVSeUzdLh4Gwkf9Vwa_qvF6xQYYYfsByf1F7RIgN_uwmOpCvSxwg/s1600/tiempo_teide.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGmwe-61zyTeL7zITdyZGpWREczp1_sksCaCGOz-NJ5-aO7RxqIN3OFEWoxW4fzUcyLrrRjWj13n8WLKjkVM31yPTvVSeUzdLh4Gwkf9Vwa_qvF6xQYYYfsByf1F7RIgN_uwmOpCvSxwg/s640/tiempo_teide.png" width="640" /></a></div>
<br />
<br />
* I didn't want to go down on foot, so it is also wise to check whether the cable car is working, and I even bought a ticket online just in case. This can be done at: <a href="https://www.volcanoteide.com/en/teide_cable_car/prices_and_opening_times">https://www.volcanoteide.com/en/teide_cable_car/prices_and_opening_times</a><br />
<br />
* The last cable car on the way down departs the station at 16:45, so I had to make sure I would reach the station before that time. To estimate how long I would need to do the whole route I looked at Wikiloc and based my estimates on these two: <a href="http://www.wikiloc.com/wikiloc/view.do?id=5483810">http://www.wikiloc.com/wikiloc/view.do?id=5483810</a>, <a href="http://www.wikiloc.com/wikiloc/view.do?id=3235182">http://www.wikiloc.com/wikiloc/view.do?id=3235182</a>. Based on these routes and my statistics for previous hikes, I estimated I would need about 11 hours to do the whole climb. That meant to start walking at 05:00 to be at the peak at 16:00.<br />
<br />
* Blisters have been a serious issue for me in previous hikes, and this was going to be a long one, so I got extra prepared and I bought: special socks (two pairs, so I could change the wet ones for dry ones en route), blister prevention cream, blister prevention tape, and band-aids. I dind't want blisters to stop me, so the plan was to stop every two-three hours and inspect the feet for possible signs of blisters and try to stop them before they could grow.<br />
<br />
* The day before the climb I packed everything, with special attention for water (5 liters, about 50cl/hour, plus about another liter to drink just before starting). <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJnFYSvGIko9hLafDsJTkvaHphcQ7jj4AeY_I4X6Wnb4sxJQfLQTis4Xm95F3F_mEnjNE0oSuzDllTq0gdTxvLsL4SLCadyGb0XH8h883f79o83rxzJD8jqSFMg_dy07JpXWiITD-vshE/s1600/IMG_2203.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJnFYSvGIko9hLafDsJTkvaHphcQ7jj4AeY_I4X6Wnb4sxJQfLQTis4Xm95F3F_mEnjNE0oSuzDllTq0gdTxvLsL4SLCadyGb0XH8h883f79o83rxzJD8jqSFMg_dy07JpXWiITD-vshE/s640/IMG_2203.JPG" width="640" /></a></div>
<br />
<br />
<br />
<u><b><span style="font-size: large;">D-Day</span></b></u> <br />
<br />
Kids didn't let me go to sleep until about 22:45 on Friday and, I guess due to anxiety, I was awake already by 03:00 on Saturday. My original plan was to wake up at 04:00, but it was clear I would not be able to sleep any more, so I got out of bed at 03:15. In the long run this was very lucky, because breakfast and my anti-blisters preparations took me longer than I thought. I had to force myself to have a decent breakfast at that time, then drove to <a href="http://www.webtenerife.co.uk/what-see/beaches/el+socorro.htm">Playa de El Socorro</a> where the route starts, and I started walking at around 05:10, just a few minutes after the original plan.<br />
<br />
The whole route took me just below 11 hours, and the Wikiloc tracking can be seen at <a href="http://es.wikiloc.com/wikiloc/view.do?id=13233788">http://es.wikiloc.com/wikiloc/view.do?id=13233788</a>: <br />
<br />
<br />
<iframe frameborder="0" height="450" scrolling="no" src="http://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=13233788&measures=on&title=off&near=off&images=off&maptype=S" width="660"></iframe><br />
<div style="background-color: white; color: #777777; font-size: 11px; line-height: 16px;">
Powered by <a href="http://www.wikiloc.com/" style="color: #0066dd; font-size: 11px; line-height: 16px;" target="_blank">Wikiloc</a></div>
<br />
<br />
<br />
<br />
Some pictures taken during the climb:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgkKA19tQ6junDH6_4kJtsNSEDKhXFbj4EIHh4blbxYum1djz1EFJ2jpHpkxFIUqEx1JVA1r1zGnUqA_PoZucdO05SAsC67WOCHrefYNCcT0zN6b7Qm9xRX4-Itjj_gagxMVd604TeD4I/s1600/IMG_2206.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgkKA19tQ6junDH6_4kJtsNSEDKhXFbj4EIHh4blbxYum1djz1EFJ2jpHpkxFIUqEx1JVA1r1zGnUqA_PoZucdO05SAsC67WOCHrefYNCcT0zN6b7Qm9xRX4-Itjj_gagxMVd604TeD4I/s640/IMG_2206.JPG" width="640" /></a></div>
<div style="text-align: center;">
<blockquote class="tr_bq">
<div>
Time to start...</div>
</blockquote>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHfxZkhfdtGYaMWPF5gclNB_jET6CcEngqvS18pBQ6ptJOcOVCSIAEp0Dbb3d2dq52VlFK6PWls7Eab1CZFabjyKC-mDPtV7RV11dFuiEKYQhY_AOPiXY5fZmejY0mE4SogcEAfIIQFWw/s1600/IMG_2210.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHfxZkhfdtGYaMWPF5gclNB_jET6CcEngqvS18pBQ6ptJOcOVCSIAEp0Dbb3d2dq52VlFK6PWls7Eab1CZFabjyKC-mDPtV7RV11dFuiEKYQhY_AOPiXY5fZmejY0mE4SogcEAfIIQFWw/s640/IMG_2210.JPG" width="640" /></a></div>
<div style="text-align: center;">
<blockquote class="tr_bq">
By dawn I was at the beautiful "Mirador El Asomadero"</blockquote>
<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54Al3o2s29PHnM2smv2EMs2ISFTFRHepoJjdFqneEwjQHH2CKh1Y8ZVLSAjPppxEFtYAwBwYbvbCpNQmtR_f_jIgoc45_KQWIsIfg2Gf7sr7fERDsvZ-srqkTHcotBerHcnwIaVKTTbY/s1600/IMG_2215.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi54Al3o2s29PHnM2smv2EMs2ISFTFRHepoJjdFqneEwjQHH2CKh1Y8ZVLSAjPppxEFtYAwBwYbvbCpNQmtR_f_jIgoc45_KQWIsIfg2Gf7sr7fERDsvZ-srqkTHcotBerHcnwIaVKTTbY/s640/IMG_2215.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
The goal still looking pretty far!</div>
</blockquote>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoOGAORzUZV3rz-q72xN9NbGd8Rt9fJx7Yp_RwLxAM2iJdzHdR_LeEw2GNzomIGAE5gOmy0ysGuqvrVR5BhbZw1w4ua2DRMb84S-lIrqSKa8X-m62x3pep5ywESJSOLK2nwdTMW9ntwqc/s1600/IMG_2216.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoOGAORzUZV3rz-q72xN9NbGd8Rt9fJx7Yp_RwLxAM2iJdzHdR_LeEw2GNzomIGAE5gOmy0ysGuqvrVR5BhbZw1w4ua2DRMb84S-lIrqSKa8X-m62x3pep5ywESJSOLK2nwdTMW9ntwqc/s640/IMG_2216.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div style="text-align: center;">
Flowering season (1)</div>
</blockquote>
<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrc_8MPmsDG2qEY3k4zrh2HkEn4siCBUWGhRki2vDxCA1YVR97J3scbyax9eutzWGpB8LAiM8_ertrsj8qwwCg-ciyE07oha-ifoqD6rc_Dfpv9ajo6vno8Pj2UwlbKm4KBZZRMaPSjOY/s1600/IMG_2228.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrc_8MPmsDG2qEY3k4zrh2HkEn4siCBUWGhRki2vDxCA1YVR97J3scbyax9eutzWGpB8LAiM8_ertrsj8qwwCg-ciyE07oha-ifoqD6rc_Dfpv9ajo6vno8Pj2UwlbKm4KBZZRMaPSjOY/s640/IMG_2228.JPG" width="640" /> </a>Flowering season (2)</div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXroi52MTFGZVuBpgZ5ZLxPrUiAuV9MOrw3KkA7wwcx_rAFJBCx7NzmH_Ly38m0xqVYMzgV0wj_GuLDciH5ettjIaAB4klOdsLD648NCKpmrCSKtej1YpsxQ-v7Cm3qAQuMmRe-xaxts8/s1600/IMG_2219.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXroi52MTFGZVuBpgZ5ZLxPrUiAuV9MOrw3KkA7wwcx_rAFJBCx7NzmH_Ly38m0xqVYMzgV0wj_GuLDciH5ettjIaAB4klOdsLD648NCKpmrCSKtej1YpsxQ-v7Cm3qAQuMmRe-xaxts8/s640/IMG_2219.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div style="text-align: center;">
La Fortaleza</div>
</blockquote>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_I3EK5QUMmonfSZXbha2Dbu6UKhVnm3YsLHiFGGpMqZNGael4Z3Em_-6mgVmjQkwm0DGNN4rB9WAevVI3TTo6P3Itoy3S3QHi088pQ-Yo6VVLXusXodspC4uBnCygjIm2Z5En6yk95bY/s1600/IMG_2220.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_I3EK5QUMmonfSZXbha2Dbu6UKhVnm3YsLHiFGGpMqZNGael4Z3Em_-6mgVmjQkwm0DGNN4rB9WAevVI3TTo6P3Itoy3S3QHi088pQ-Yo6VVLXusXodspC4uBnCygjIm2Z5En6yk95bY/s640/IMG_2220.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div style="text-align: center;">
The view at around lunch time</div>
</blockquote>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-NXOzRJGd6Y3hs0GxwmMt9XYISD8iJ-a0cexEWE_tIlYRvya-6aQV4dW5HLAvAVOni4-WZoY2mz6GP-YegNsQGZzv9cNZuiPLS7Y4w7Hk1GiDoX5c4p-H4JlKJJMc5vYFK5ZZF0kz5Sg/s1600/IMG_2222.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-NXOzRJGd6Y3hs0GxwmMt9XYISD8iJ-a0cexEWE_tIlYRvya-6aQV4dW5HLAvAVOni4-WZoY2mz6GP-YegNsQGZzv9cNZuiPLS7Y4w7Hk1GiDoX5c4p-H4JlKJJMc5vYFK5ZZF0kz5Sg/s640/IMG_2222.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div style="text-align: center;">
Down there it was pretty cloudy, but very sunny up here!</div>
</blockquote>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicgm6Jh7-CNYRGUX_L8oaSdbCm93Kr5e8dhmUnRl7U2afi2Amma14tIGR1vSPP_0V2WWDIQJ9yKvi3nsLNrC9wqk8LNv4D2sVLY5ISF3UUED9O_gH2ZfzJISt0fEr6cb9DCLWn5h0thRQ/s1600/IMG_2225.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicgm6Jh7-CNYRGUX_L8oaSdbCm93Kr5e8dhmUnRl7U2afi2Amma14tIGR1vSPP_0V2WWDIQJ9yKvi3nsLNrC9wqk8LNv4D2sVLY5ISF3UUED9O_gH2ZfzJISt0fEr6cb9DCLWn5h0thRQ/s640/IMG_2225.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div style="text-align: center;">
All lava rocks when getting closer to the peak.</div>
</blockquote>
<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WAKrNOR65rqzK8x3AYjFgBP3NrZQ8HLJ7CRu-dfImL2KkvzTcfvfSMhyphenhyphenXNl9wshcLXfXjqHDnKxPDiPdBlIKAnFqWXXJ0muoxiypCfUkH9UUZd0fJ9f7QU56UqN86jFdafoQ0Rm24fY/s1600/IMG_20160507_160242593.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WAKrNOR65rqzK8x3AYjFgBP3NrZQ8HLJ7CRu-dfImL2KkvzTcfvfSMhyphenhyphenXNl9wshcLXfXjqHDnKxPDiPdBlIKAnFqWXXJ0muoxiypCfUkH9UUZd0fJ9f7QU56UqN86jFdafoQ0Rm24fY/s640/IMG_20160507_160242593.jpg" width="640" /></a></div>
<blockquote class="tr_bq">
<div style="text-align: center;">
And finally the summit! </div>
</blockquote>
<br />
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxRSvePHFIbcz9VubyHzQ7WGH6xLgxGDj2oLQDrLf-uXf7FF4loQXIK7pAl_uTMxagqLKdtLuAp5s-YkcH9c8XgMAdZPZgC3iR7Ejl3GKDd3H3Qss67psJbTQDBh9tQ5lL-drROK66xLU/s1600/IMG_2227.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxRSvePHFIbcz9VubyHzQ7WGH6xLgxGDj2oLQDrLf-uXf7FF4loQXIK7pAl_uTMxagqLKdtLuAp5s-YkcH9c8XgMAdZPZgC3iR7Ejl3GKDd3H3Qss67psJbTQDBh9tQ5lL-drROK66xLU/s640/IMG_2227.JPG" width="640" /></a></div>
<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
The cable car on the way down. </div>
</blockquote>
<br />
<br />
<br />
If you like the scenery, but don't want to do the hard work, you can see the whole route in the following video (available also at: <a href="https://youtu.be/bvaJrf7CqT4">https://youtu.be/bvaJrf7CqT4</a>), made by uploading the GPS generated track to Google Earth, as explained in a <a href="http://angel-de-vicente.blogspot.com.es/2015/04/creating-visual-tour-of-hiking-tour.html">previous post</a> (the mobile phone crashed at least three times during the climb, so the GPS data had some gaps, and this shows in the video as some jumps, sorry!). Music track: Kostbar, from the album Lux by Afenginn (<a href="https://afenginn.bandcamp.com/album/lux">https://afenginn.bandcamp.com/album/lux</a>)<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WAKrNOR65rqzK8x3AYjFgBP3NrZQ8HLJ7CRu-dfImL2KkvzTcfvfSMhyphenhyphenXNl9wshcLXfXjqHDnKxPDiPdBlIKAnFqWXXJ0muoxiypCfUkH9UUZd0fJ9f7QU56UqN86jFdafoQ0Rm24fY/s1600/IMG_20160507_160242593.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<iframe allowfullscreen="" frameborder="0" height="372" src="https://www.youtube.com/embed/bvaJrf7CqT4" width="660"></iframe>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This is obviously a hard route, and in my case I would have been happier going a bit slower, specially towards the end, when my legs were getting a bit tired, but I had to force myself to almost walk non-stop for the last few hours in order to be at the cable car station on time. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Overall it was a perfect day: the weather was very good, so I didn't need to worry about rain and it was not so cold that I had to take extra layers of clothing, just a t-shirt and a wind-proof jacket for the coldest parts. My main worries were blisters and boredom (since I did this on my own). All my anti-blisters preventions paid off, and surprisingly I had almost no blisters at all (only a couple of small ones in the little toes). Prevention for boredom was provided by my son, who lent me his MP3 player, which I filled with BBC podcasts to keep me entertained. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
A friend is teasing me with going now for the 0-4-0 route (i.e. the same I did here, but then going all the way back to the starting point again). Let's see.... stay tuned!</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrc_8MPmsDG2qEY3k4zrh2HkEn4siCBUWGhRki2vDxCA1YVR97J3scbyax9eutzWGpB8LAiM8_ertrsj8qwwCg-ciyE07oha-ifoqD6rc_Dfpv9ajo6vno8Pj2UwlbKm4KBZZRMaPSjOY/s1600/IMG_2228.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<br />
<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com1tag:blogger.com,1999:blog-4419419196674784537.post-22643814006713527032015-06-29T22:36:00.003+00:002015-06-29T22:36:44.772+00:00Stabilizing and slowing down videosThose of us with a regular camera and no tripod are used to shaky videos. To fight this disease, we can use software to help <b>stabilizing</b> it. In my current system, Ubuntu 14.04, the software 'transcode' already has everything you need, and it is extremely easy to get it working. Assuming you have a shaky video, just issue the following two commands:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">transcode -J stabilize -i ORIGINAL.MOV</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">transcode -J transform -i ORIGINAL.MOV -y xvid -o STABILIZED.MOV</span></span><br />
<br />
The result can be pretty good. As a comparison, see below (left: original; right: after stabilizing).<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/EvkYUuKudMk" width="560"></iframe>
<br />
<br />
Another nice thing to be able to do with videos is to <b>slow them down</b> in certain parts, but creating interpolated frames between the original ones to allow for smooth transition between frames. This can be accomplished with '<a href="https://draft.blogger.com/%3Ciframe%20width=%22560%22%20height=%22315%22%20src=%22https://www.youtube.com/embed/EvkYUuKudMk%22%20frameborder=%220%22%20allowfullscreen%3E%3C/iframe%3E">slowmoVideo</a>'. The user interface allows you to select which parts you want faster or slower by changing the slope of the line describing the relative speed of the rendered video vs. the original one. As an example of how the GUI looks like:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcNMEI3yB1U5UYXwHheWPyl-qsBLPutSnnJuxAKXamUrX44pnGOBRXMcUl4Tpdx0HdpkXgFCib1Di2cZjXndb64BigMBOfOsq53DGvrgcKAobyH7vFbq5fnfIK7cVAOIuI5U4gZRaPn8/s1600/slow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="558" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcNMEI3yB1U5UYXwHheWPyl-qsBLPutSnnJuxAKXamUrX44pnGOBRXMcUl4Tpdx0HdpkXgFCib1Di2cZjXndb64BigMBOfOsq53DGvrgcKAobyH7vFbq5fnfIK7cVAOIuI5U4gZRaPn8/s640/slow.png" width="640" /></a></div>
<br />
And a demo of the resulting video, where we slow down the part from second 2 to 5 approximately (again left: original; right: modified video).<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/XxRl3cZ7MnA" width="560"></iframe>
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-2497207589189958832015-05-07T00:12:00.001+00:002015-05-14T07:44:43.134+00:00GPX hyperlapse In the last post I described how to create a virtual hiking tour (<a href="http://angel-de-vicente.blogspot.com.es/2015/04/creating-visual-tour-of-hiking-tour.html">http://angel-de-vicente.blogspot.com.es/2015/04/creating-visual-tour-of-hiking-tour.html</a>), and then I wondered if I could do something similar, but at street level, taking images from Google Street View. The goal was to take GPS data (either from a route that I have followed myself on foot, on bike, etc. or from data points generated by the driving directions of Google maps).<br />
<br />
If we want <b>driving directions from Google Maps</b>, one easy way to generate GPS data points in a .GPX file is to:<br />
<br />
<ul>
<li>use google maps to generate a route </li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVPTz_vQsp4W9ys1hJtlHWcDJT4FRae7RhMSMJqu3peMoklDQ9gYn7d5h8jqgnb3vR2c1dLSmJq-RGORaXewrz_TqXVYaeH17Ei0KrxyYbGQOouyMBTybWrwHWC37e9wBpVx0cejurlw/s1600/ruta.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxVPTz_vQsp4W9ys1hJtlHWcDJT4FRae7RhMSMJqu3peMoklDQ9gYn7d5h8jqgnb3vR2c1dLSmJq-RGORaXewrz_TqXVYaeH17Ei0KrxyYbGQOouyMBTybWrwHWC37e9wBpVx0cejurlw/s640/ruta.png" width="640" /></a></div>
<br />
<ul>
<li>grab the URL generated above in Google Maps and feed it to <a href="http://www.gpsvisualizer.com/">GPS Visualizer</a> to get a .gpx file with the GPS data points following the given route</li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLBp2JvPHMEO_oavRiY4YocFHQx__KRBxQKrJVYS9hwmvXGkumfSL7iKGNt3FTfh5PykfSj7YTsXZlRH1KUeYr504dkVJYX5Mj0Xh9ir8gRAZqhbOiZ_YGcThSHCuHgRV_Pfuladp7iuM/s1600/visualizer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLBp2JvPHMEO_oavRiY4YocFHQx__KRBxQKrJVYS9hwmvXGkumfSL7iKGNt3FTfh5PykfSj7YTsXZlRH1KUeYr504dkVJYX5Mj0Xh9ir8gRAZqhbOiZ_YGcThSHCuHgRV_Pfuladp7iuM/s640/visualizer.png" width="640" /></a></div>
<br />
If, instead, we want <b>GPS points from a route that we did previously</b>, we can just, for example, download the GPX file directly from Endomondo.<br />
<br />
At these point, we can try our luck with sites like <a href="http://gpxhyperlapse.com/">http://gpxhyperlapse.com/</a> or <a href="http://alban.atchoum.fr/hyperlapse/">http://alban.atchoum.fr/hyperlapse/</a> but if we want finer control, we will need to do some extra work. <br />
<br />
If we use the .gpx files above, the results will not be very good, since there will be not many data points and/or due to the GPS receiver limitations, the points can be outside roads, resulting in shaky and jumpy street view images. So, we can do two things to improve this.<br />
<br />
First, we are going to generate more data points by interpolating, with <a href="http://www.gpsbabel.org/">GPSbabel</a> (see
<a href="http://www.gpsbabel.org/htmldoc-development/filter_interpolate.html">http://www.gpsbabel.org/htmldoc-development/filter_interpolate.html</a>) For example, to get data points every 5 meters:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">gpsbael -i gpx -f track.gpx -x interpolate,distance=0.005k -o gpx -F newtrack.gpx</span></span></b><br />
<br />
Second, we can try to fit those GPS points to a proper road (assuming we were on a bike tour, running, etc. on roads). To do this, we can use the site <a href="https://mapmatching.3scale.net/">https://mapmatching.3scale.net/</a>. You need to apply for an API key. Once you do that, we can convert our original shaky GPS data with<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">curl -X POST -H 'Content-Type: application/gpx+xml' --data-binary @newtrack.gpx "http://test.roadmatching.com/rest/mapmatch/?app_id=YOUR_APP_ID&app_key=YOUR_APP_KEY&output.waypoints=true" -o output.xml </span></span></b><br />
<br />
This works OK with the GPX file from Endomondo, which has time stamps, but it will break (the developer knows about this, so perhaps it is fixed when you try it) for the Google Maps generated GPX file, which doesn't have time stamps. To fix it, we just have to add timestamps to the GPX file before accessing <i>test.roadmatching.com</i>. So I turn all the <i>trkpt</i> from something like:<br />
<br />
<script src="https://gist.github.com/angel-devicente/e5391390847b71a4a499.js"></script>
to something like (you can just put the same timestamp for all the <i>trkpt</i>'s):<br />
<br />
<script src="https://gist.github.com/angel-devicente/f40d3558d13c795f60ce.js"></script>
The output from TrackMatching matches the roads much better, hopefully, than the original GPX data, but it comes in an unfamiliar format that I have not been able to convert easily to a GPX file (if you know how to do it with some GPS conversion software, please let me know). I was too lazy to write a script to do the necessary transformations automatically, and instead I used search/replace in my text editor, so that from the output.xml file I extract all the <i>wpt ....=""</i> stuff and modify each waypoint of the form <i>wpt y="28.465961" x="-16.269638"</i> to (if you don't know how to do search/replace with regular expressions, this is a good time to learn!):<br />
<script src="https://gist.github.com/angel-devicente/5a9cd0f6ce174795f1f7.js"></script>
<br />
Now in the .gpx file obtained with GPSBabel, delete all the <i>trkpt</i> entries (so there will be an empty <trkseg></trkseg> section, and in their place put all these new <i>trkpt</i> definitions.
<br />
<br />
With the help of GPS Visualizer again, you can<trkpt><trkseg> verify that the new .gpx file is matched to roads better than the original one. Just use the options to convert a .gpx file to Google Maps as follows:</trkseg></trkpt><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV0sndbWHD_FeA7WXGYFEh3VT5EIsmFMjx6VfL5nnCNkf5xGsfpVaYglTAI8wpUx9vCh9ikiE_pz5c8QRexDvMRWihRHo0W-fgwZCeemHmK4vzCH4nq2y6GTyiENlNbzMMTkk3GPTcgno/s1600/convert_to_maps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV0sndbWHD_FeA7WXGYFEh3VT5EIsmFMjx6VfL5nnCNkf5xGsfpVaYglTAI8wpUx9vCh9ikiE_pz5c8QRexDvMRWihRHo0W-fgwZCeemHmK4vzCH4nq2y6GTyiENlNbzMMTkk3GPTcgno/s640/convert_to_maps.png" width="640" /></a></div>
<br />
<br />
<trkpt><trkseg>As an example, this is how the track looks like with the .gpx file directly downloaded from Endomondo:</trkseg></trkpt><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKflkoVZ5Haw3Nd08a6NQhPo_zSo8Asem-CO5IqXK4bHciZuUuQ49DO4oB6m9ag5puFSRPxCr6XG2zRDHi4uRobv0v7Jeo_jkGBhs1eZo5Ujdk7LVoCQdtmWkmMgRb7thj6KMb9pTjS9g/s1600/input.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKflkoVZ5Haw3Nd08a6NQhPo_zSo8Asem-CO5IqXK4bHciZuUuQ49DO4oB6m9ag5puFSRPxCr6XG2zRDHi4uRobv0v7Jeo_jkGBhs1eZo5Ujdk7LVoCQdtmWkmMgRb7thj6KMb9pTjS9g/s1600/input.png" width="640" /></a></div>
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg><br /></trkseg></trkpt></wpt></wpt>
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg><br /></trkseg></trkpt></wpt></wpt>
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg>And this after massaged by TrackMatching: </trkseg></trkpt></wpt></wpt><br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg><br /></trkseg></trkpt></wpt></wpt>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjscZkkmvab_nTM6nQngopnl6XrRlHwmTDCOkuPAN3AtEAjC9fyYfKFeKBq9cOKQZ4fIxd4sfBHtU9NMlj82DBViZ0iNYrbakN8E-3at7neixqBkFdJtLNRypYt42uOR_lZ5QgjWnrNlHc/s1600/output.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjscZkkmvab_nTM6nQngopnl6XrRlHwmTDCOkuPAN3AtEAjC9fyYfKFeKBq9cOKQZ4fIxd4sfBHtU9NMlj82DBViZ0iNYrbakN8E-3at7neixqBkFdJtLNRypYt42uOR_lZ5QgjWnrNlHc/s1600/output.png" width="640" /></a></div>
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg><br /></trkseg></trkpt></wpt></wpt><wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt>
Now that we have .gpx files with many data points and nicely following roads, it is time to get the Google Street View images to put everything together. The code I used is a minimal variation of the code available at <a href="http://pastebin.com/FnsY8QFR">http://pastebin.com/FnsY8QFR</a> (discovered at <a href="http://www.cyclechat.net/threads/my-cycling-video-c-o-python-strava-google.135566/">http://www.cyclechat.net/threads/my-cycling-video-c-o-python-strava-google.135566/</a>). In case the pastebin expires, I uploaded the code to GitHub (<a href="https://gist.github.com/cac3a4434c4bd5b756ea.git">https://gist.github.com/cac3a4434c4bd5b756ea.git</a>). You can download it with:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">git clone https://gist.github.com/cac3a4434c4bd5b756ea.git</span></span></b><br />
<br />
<br />
The file<i> gpxhyper.py</i> is still very crude, so you will have to change things by hand. It will work by default on a file called <i>input.gpx</i> (either change that or make a symbolic link named <i>input.gpx</i> pointing to the file you want to work with). Next, leave uncommented the appropriate line: for the .gpx file coming from Endomondo:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">gpx_trackseg = gpx_file.getroot()[1][3] # For Endomondo .gpx</span></span></b><br />
<br />
For the .gpx file coming from Google Maps:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">gpx_trackseg = gpx_file.getroot()[3][1] # For GPSBABEL .gpx</span></span></b><br />
<br />
You should also have a Google Street View Image API Key (if you don't have one, you can get instructions at <a href="https://developers.google.com/maps/documentation/streetview/#api_key">https://developers.google.com/maps/documentation/streetview/#api_key</a>). Put it in <i>gpxhyper.py</i> (in place of YOUR_GOOGLE_API_KEY) and execute it as:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">python gpxhyper.py</span></span></b><br />
<br />
and all the corresponding images will be downloaded from Google Street View.<br />
<br />
From these images use your favourite method to create a video. For example:<br />
<br />
<b><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">avconv -r 10 -i %5d.jpeg -b:v 1000k input.mp4</span></span></b><br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt><br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt>(Downloading the images takes a while, so make sure you calculate the appropriate rates beforehand. I found that around 10 FPS is a good number above (the images are taken at intervals, and if you try a normal video rate of 24FPS, the video will be too shaky). Assuming the 5 meters interval given to GPSBabel above, this will mean a virtual speed of 50 m/s or 180 km/h. Depending on the effect you want to create and the place where the images are taken (for example a city vs. a very open road with nothing near), this might be too fast or too slow. You will have to experiment a bit).<br />
<br />
As an example, here it is the result for an Endomondo generated track (a bicycle route):<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/eKLnOCznn_E" width="420"></iframe><br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt><br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt><br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg>And here for a .gpx file generated via Google Maps as explained above (for this one, at the beginning there were some 'bad' frames that I removed by hand with Kdenlive video editor):</trkseg></trkpt></wpt></wpt><br />
<br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/DfY9eBTbV58" width="560"></iframe><br />
<br />
<wpt ....=""><wpt x="-16.269638" y="28.465961"><trkpt><trkseg></trkseg></trkpt></wpt></wpt><br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-43828442071351996002015-04-30T21:33:00.000+00:002015-05-06T22:49:32.545+00:00Creating a virtual hiking tourLately I'm back to hiking and when I do a route I use my mobile phone with a GPS application (at the moment I use <a href="http://www.wikiloc.com/">Wikiloc</a>) to record the track. Last week I climbed Teide, and Wikiloc offers the possibility of easily embedding the data from their site, which is nice:
<br />
<br />
<iframe frameborder="0" height="500" src="http://www.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=9490011&measures=on&metricunits=on&title=on&near=off&images=off&maptype=S" width="670"></iframe>
<br />
<br />
But you shouldn't stop there and you can also create a guided tour of the route. Doing it is quite simple, and I list below the steps I took to create the video tour of the Teide climb:<br />
<br />
<ul>
<li>First, download the file from Wikiloc in KML format, and open it with Google Earth. Then, select the route and you can see an icon in the right part of the left panel that says "Play Tour" (play it a couple of times first to cache all the necessary images). Options to modify the speed, camera angles, etc. are available at Tools::Options::Touring. </li>
<li>Then, when we are ready, we just play it and at the same time record it with, for example, Kazam (30 FPS gives pretty good quality). </li>
<li>The resulting file is pretty big. To make it smaller we can use WinFF with output as MPEG-4 (very high quality). As an example, from 656MB this turns the file into 71MB, which can now be mildly edited with Kdenlive, and we render it all together for Web site::YouTube 1280x720. The resulting video is now 51MB, and we can upload it directly to YouTube: <a href="https://youtu.be/HgzXkAG7XjM">https://youtu.be/HgzXkAG7XjM</a> </li>
</ul>
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="372" src="https://www.youtube.com/embed/HgzXkAG7XjM" width="660"></iframe>
<br />
<br />
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com2tag:blogger.com,1999:blog-4419419196674784537.post-16108384129005383092015-02-12T12:40:00.000+00:002015-02-12T12:40:10.095+00:00Classical guitar progress logging (Feb'15) With many obvious mistakes... plenty to improve yet, but I want to move on... (This time I did found the webcam, but synchronizing audio and video is really tough sometimes...) :<br />
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/190749019&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com1tag:blogger.com,1999:blog-4419419196674784537.post-2228163733031346402014-12-16T13:45:00.002+00:002014-12-16T13:45:51.087+00:00Classical guitar progress logging (Dec'14)After almost a year without playing the guitar. For this one, I couldn't find the webcam, so only audio, at SoundCloud:<br />
<br />
<iframe frameborder="no" height="450" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/181770304&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" width="100%"></iframe>
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com1tag:blogger.com,1999:blog-4419419196674784537.post-59789783104851569702013-12-01T21:31:00.000+00:002013-12-01T21:40:23.289+00:00Introduction to Music Production (Coursera)I just finished another course at <a href="https://www.coursera.org/">Coursera</a>: Introduction to Music Production by Loudon Stearns of <a href="http://www.berklee.edu/">Berklee College of Music</a>.<br />
<br />
The most demanding stuff from this course were the assignments, in which we had to create short lessons explaining some of the concepts that we learned each week. I went for the screencast mode of teaching, and these are the assignments for each week. Doing the assignments was hard work, but I learned a lot that way, and I hope I can take another music-related course from Coursera in the near future...<br />
<br />
<b>Week 1:</b> <i>Topic:</i> "Typical recording signal flow using your own equipment"<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/FjYo-MATopE?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<br />
<b>Week 2: </b><i>Topic: </i>"Efficiently create a compile from multiple audio recordings in your DAW."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/JM9KgYaNOy8?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<b>Week 3: </b><i>Topic: </i><b>"Submix practical:</b> Demonstrate the configuration of a Submix in a
DAW or physical mixing board and <b>Parallel effects practical</b>: Demonstrate the configuration of parallel
effects in a DAW or physical mixing board."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/FzdPQIWw3RU?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<b>Week 4: </b><i>Topic: "</i>Demonstrate how to use a specific compression plugin, including
threshold, ratio, attack, and release. Describe what visuals the device
has, including gain reduction meters, transfer functions, and gain
reduction traces if any."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/kfqlttIwTK0?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<b>Week 5: </b><i>Topic: </i>"Demonstrate the delay spectrum with examples of comb filtering, creating
pitches with delays, slapback delays, and synchronized long delays."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/zBf4K9vGkD4?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<b>Week 6: </b><i>Topic: </i>"On a synthesizer of your choice demonstrate the usage of these controls:
Oscillator waveform, oscillator frequency, filter type, filter frequency,
filter resonance, and amplitude envelope ADSR. How are they similar and
how are they different from the simple synthesizer used in the video demonstrations?"
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/kSnBFRhOuSg?feature=player_embedded' frameborder='0'></iframe></div>
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-60411074140040886022013-11-14T14:39:00.001+00:002013-11-14T14:40:45.793+00:00Classical guitar progress logging (Nov'13)Soon I'll have a decent microphone, but for the moment another recording with the crappy one. This month a very nice piece by Julio Sagreras: "Maria Luisa: Mazurka".<br />
<br />
<br />
<br />
<iframe src="//player.vimeo.com/video/79393678" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/79393678">Maria Luisa: Mazurka (by Julio Sagreras)</a> from <a href="http://vimeo.com/user3661996">Angel de Vicente</a> on <a href="https://vimeo.com">Vimeo</a>.</p><br />
The video is <a href="https://vimeo.com/79393678">here</a>.<br />
<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com1tag:blogger.com,1999:blog-4419419196674784537.post-77414659123449349762013-11-04T01:59:00.003+00:002013-11-04T02:01:22.588+00:00Screencasts with Ubuntu Studio 13.10For a course I am taking on Music Production at <a href="https://www.coursera.org/">Coursera</a>, I need to do screencasts and upload them to YouTube or similar. Before I forget what I found, I put it here. Some details about my settings:<br />
<ul>
<li>I'm running UbuntuStudio 13.10 with the <a href="http://www.xfce.org/">XFCE4 Desktop Environment</a></li>
<li>The screencast recording application I'm using is <a href="https://launchpad.net/kazam">Kazam</a> (during my first attempts there was an issue with libx264-123 which was causing Kazam to crash, but luckily for me the bug was solved just a couple of days ago).</li>
<li>The video editing software I'm using is <a href="http://www.openshot.org/">OpenShot Video editor</a>.</li>
<li>My display has a resolution of 1920x1080. </li>
</ul>
<br />
So, first I just use Kazam to record my screencast. For this course I'm mostly interested in recording the Ardour application, which has lots of information, so I will be recording the whole screen.<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzbYCves4p-8HQ2cWKLpzzVMow5kLlCU63N3GiEWboOCtlyvxmzC7T8gZDCYFG6t664nP8CHTTkSIdyu2bZsSES7JeppoOjn6w6dc5zhrVn_A1Ws-8g4sC0TiJltI5l-jNieLpIwGqhXY/s1600/kazam.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzbYCves4p-8HQ2cWKLpzzVMow5kLlCU63N3GiEWboOCtlyvxmzC7T8gZDCYFG6t664nP8CHTTkSIdyu2bZsSES7JeppoOjn6w6dc5zhrVn_A1Ws-8g4sC0TiJltI5l-jNieLpIwGqhXY/s320/kazam.png" width="313" /></a></div>
<br />
<br />
The resulting video has a very good quality, and I can edit it with Openshot (though remember first to stop Ardour and to stop <a href="http://jackaudio.org/">JACK</a>, since Openshot is not JACK-friendly). Once ready I can export it with the following settings (just by modifying a couple of things after choosing the Vimeo-HD profile given by Openshot):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtY7V_RS3-iV0c-_VNx45D9Q_Ip4F6EVEAeeTjS2cVCObbNRpNiTfHKZkXba4-fDWWJ7xvdyxI3kbiN_s32G5ST8lG6jaZXT86-5KH_ObCgkZCBQ_6PZee4gD4aRl7jY2OenixjsMl-wE/s1600/openshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="522" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtY7V_RS3-iV0c-_VNx45D9Q_Ip4F6EVEAeeTjS2cVCObbNRpNiTfHKZkXba4-fDWWJ7xvdyxI3kbiN_s32G5ST8lG6jaZXT86-5KH_ObCgkZCBQ_6PZee4gD4aRl7jY2OenixjsMl-wE/s640/openshot.png" width="640" /></a></div>
<br />
The resulting video is of very good quality, and I can upload it to YouTube. In YouTube the quality is still very good, but you have to view it at the right resolution. As far as I know you cannot give a link to the video to stream at 1080p, but you can at least force 720p by adding &hd=1 to the YouTube link.<br />
<br />
<a href="https://www.youtube.com/watch?v=QGChX3eJ4Zc&hd=1">https://www.youtube.com/watch?v=QGChX3eJ4Zc&hd=1</a><br />
<br />
So that gives a quite nice video quality, and you could have it almost perfect by making sure that your viewers will use 1080p, but this might not be possible due to their bandwith, and in any case there is a lot of information in a full screen, so it is nice to add a little help to focus minds (i.e. zooming).<br />
<br />
Zooming looks like it should be quite basic, but I couldn't find any other satisfactory way of doing it than by running <a href="http://www.compiz.org/">Compiz</a>. I certainly don't want to run Compiz in a regular basis, but I installed it and learnt how to activatate/desactivate it just for the recording session. Basically, to install it (taken with changes from <a href="http://www.webupd8.org/2012/11/how-to-set-up-compiz-in-xubuntu-1210-or.html">http://www.webupd8.org/2012/11/how-to-set-up-compiz-in-xubuntu-1210-or.html</a>), I just did:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install compiz compiz-plugins compiz-plugins-extra compizconfig-settings-manager</span></span> <br />
<br />
<code><span style="font-size: small;"></span></code>I didn't have to do any of the other stuff suggested in that page. With that in place, I start Compiz by running in a terminal:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">compiz --replace </span></span><br />
<br />
Then I open the CompizConfig Settings Manager and configure the magnifier as per the images below (it was important to de-select the "Enhanced Zoom Desktop", as otherwise this seems to override my preferred Magnifier effect):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZgyVIU33HlovxERAXvSI_7DwQMmtRRN5rUnZkovn4pEojA2a6EGAFEB8RqcYbZXKnWwpCK8K9CgSZ7LXFIvkN7f3tDlJL0IP-exACDtpkqpR5SgG3z9Cg5RZBYabi43nUPUnAledaMnA/s1600/compiz.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="390" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZgyVIU33HlovxERAXvSI_7DwQMmtRRN5rUnZkovn4pEojA2a6EGAFEB8RqcYbZXKnWwpCK8K9CgSZ7LXFIvkN7f3tDlJL0IP-exACDtpkqpR5SgG3z9Cg5RZBYabi43nUPUnAledaMnA/s640/compiz.png" width="640" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguwz3EuitW7P4r4thyo6w515TOOP7KXT7Ou3d6THJNadRmsymnpVQad3efmyhEIe1829ZuolhE-onu3XkWst6GnIrA5u_FU4XCqzNv-zoVzJJmqNsWyIUydMSPDNx9rsIGlpzPVZdeMUY/s1600/magnifier.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguwz3EuitW7P4r4thyo6w515TOOP7KXT7Ou3d6THJNadRmsymnpVQad3efmyhEIe1829ZuolhE-onu3XkWst6GnIrA5u_FU4XCqzNv-zoVzJJmqNsWyIUydMSPDNx9rsIGlpzPVZdeMUY/s640/magnifier.png" width="640" /></a></div>
<br />
<br />
Now, when I'm done with the recording, if I want my resources back and I want to get rid of Compiz, from another terminal I type (which I can killl with Control-C after the command has done its magic):<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">xfwm4 --replace</span></span><br />
<br />
This will kill Compiz and give me my XFCE4 desktop back.<br />
<br />
With all this in place, I can have a very nice indeed screencast. As an example:<br />
<a href="http://www.youtube.com/watch?v=6Tts9ob5Dlk&hd=1">http://www.youtube.com/watch?v=6Tts9ob5Dlk&hd=1</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-3379944610828079562013-10-22T08:55:00.001+00:002013-10-22T08:55:45.050+00:00Classical guitar progress logging (October'13)October log is a continuation of the September one (another exercises for the Coursera course "Survey of Music
Technology". In this case we were experimenting with algorithmic composition. So I came up with this program that creates random (in a controlled fashion) music. The program will create
different music every time is run, and this is just an "incarnation" of the
algorithm.<br />
<br />
<br />
<iframe frameborder="no" height="166" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/112014949" width="100%"></iframe>
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-34546529342928276152013-09-18T21:24:00.000+00:002013-09-18T21:32:19.209+00:00Music production with Linux (part I). Routing sound with Pulseaudio & JACKI have decided to document some of the stuff that one needs to know in order to make music with Linux and the idea is to write a number of posts covering different aspects of music creation.<br />
<br />
The platform I'll be using throughout these posts is Ubuntu Studio 13.04 (64 bits), and first of all I wanted to write here the settings to properly and easily route all the sound generated in the computer.<br />
<br />
Many standard applications use Pulseaudio, and only the more musically oriented ones (and not all) use JACK (JACK Audio Connection Kit), so it is interesting to know how to mix all of them together, so let's see some examples:<br />
<br />
<b>* Route pulseaudio stuff to JACK</b>, so that we can, for example, listen to YouTube videos while making music with JACK-aware applications.<br />
<br />
In UbuntuStudio, JACK Sink and JACK Source module are already installed, so the whole thing is very simple. We can start the JACK server with QJackCtl, and we will see that by default a connection from <i>PulseAudio JACK Sink</i> to <i>system</i> is already done, so JACK will route the audio of any application that goes to PulseAudio JACK Sink to the <i>system</i> for playback.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzrdyW56uRrXt6BcldFnW1rQ9KKphtpyoq-gBoV42VmiLSdretGvYkhmOt4Weo0Qbl11EUrFuXbKJLf2jpcPbHdioiSfq1-1QsJPCzgU4O6vPKP-xWqtcDQNpNEXkyCl8S1ajC-KCBgHI/s1600/jack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzrdyW56uRrXt6BcldFnW1rQ9KKphtpyoq-gBoV42VmiLSdretGvYkhmOt4Weo0Qbl11EUrFuXbKJLf2jpcPbHdioiSfq1-1QsJPCzgU4O6vPKP-xWqtcDQNpNEXkyCl8S1ajC-KCBgHI/s640/jack.png" width="640" /></a></div>
<br />
So now we just have to make sure that PulseAudio application will send their audio to the JACK Sink and all should be set. We do this with <i>pavucontrol </i>(PulseAudio Volume Control), and just select PulseAudio JACK Sink as the fallback output device.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcl9r2EXtMr8UiaX2IVHfP7cfnUOqmPgM1-PCH3_OTWqFCgVx12uv_IIzUmacdgBPMwHHEID1vFoFENxp5T5Ok3VMlb3pnKNYVnsawX0SEd2ROu8JeuhyxgL9WAefu9ScxSdQQFcrs7w/s1600/pavucontrol.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjcl9r2EXtMr8UiaX2IVHfP7cfnUOqmPgM1-PCH3_OTWqFCgVx12uv_IIzUmacdgBPMwHHEID1vFoFENxp5T5Ok3VMlb3pnKNYVnsawX0SEd2ROu8JeuhyxgL9WAefu9ScxSdQQFcrs7w/s640/pavucontrol.png" width="468" /></a></div>
<br />
<br />
With that in place, we both PulseAudio and JACK applications can live together happily.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i1.ytimg.com/vi/8wL_c3_wbuE/0.jpg" height="399" width="480"><param name="movie" value="http://www.youtube.com/v/8wL_c3_wbuE?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="480" height="399" src="http://www.youtube.com/v/8wL_c3_wbuE?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<b>* Routing audio input, </b>for example to record a Skype call<br />
<br />
In order to record a Skype call we also need to change the fallback input device in <i>pavucontrol </i>to be <i>PulseAudio JACK Source. </i>With the <i>system -> PulseAudio JACK Source</i> connection in QJackCtl, the microphone data will be sent to JACK Source, and after setting <i>JACK Source</i> as the fallback input device, Skype will get that as the input for the Microphone. At the same time we can record the whole conversation for example with Audacity by also connecting <i>JACK Sink -> JACK Source</i> (<i>JACK Sink</i> will give us the audio coming from skype, otherwise we would only record what is coming from our microphone). As an example:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i1.ytimg.com/vi/GJe_HWSLLQo/0.jpg" height="399" width="480"><param name="movie" value="http://www.youtube.com/v/GJe_HWSLLQo?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="480" height="399" src="http://www.youtube.com/v/GJe_HWSLLQo?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>
<br />
<br />
<br />
When this is correctly set, we can add all sorts of extra routing to our audio. For example, in the previous example with Skype, perhaps we would like to add some filters to our voice? We only need to change the routing in QJackCtl, so we do not send the <i>system</i> directly to <i>JACK Source</i>, but we route it through some other module. In the following example, I route it through the application <i>jack_rack</i> in order to apply some basic distortion to it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='480' height='399' src='https://www.youtube.com/embed/rdMbyvoz0YE?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
I think you get the idea by now...<br />
<br />
By the way, in order to get the previous screencasts, I just used Kazam, and again selecting JACK Sink and JACK Source as the devices to record from, as can be seen below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLk4pTSdQfzx7KdABZZmsmojliaE79RE7jgVsrQr_Hwhp7mp6lZGIfl7f9wvXXfonIgMxQ0WctfGJV2mMLVSVSHDCQ1LaHb-NsBxFZWcjHKOJ232rQwzHsjR-AZjq2L1jj_mgeGU6accc/s1600/kazam.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLk4pTSdQfzx7KdABZZmsmojliaE79RE7jgVsrQr_Hwhp7mp6lZGIfl7f9wvXXfonIgMxQ0WctfGJV2mMLVSVSHDCQ1LaHb-NsBxFZWcjHKOJ232rQwzHsjR-AZjq2L1jj_mgeGU6accc/s640/kazam.png" width="640" /></a></div>
<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-46824583961055726592013-09-12T21:27:00.000+00:002013-09-16T21:02:44.508+00:00Rooting and unlocking my new Android mobile phone: LG-E400<div style="text-align: justify;">
Last week I got an <a href="http://www.gsmarena.com/lg_optimus_l3_e400-4461.php">LG-E400</a> for free because her owner was not really taking advantage of all its features. The phone was locked to her phone network, so I had to unlock it and root it in order to make it usable. Since I will likely need again this information in the future, I write down some of the resources used.</div>
<div style="text-align: justify;">
<br />
First thing was to hard reset it, thanks to<a href="http://www.hard-reset.com/lg-optimus-l3-e400-hard-reset.html"> this page</a>, and then root it. To root it I tried with <a href="http://forum.xda-developers.com/showthread.php?t=803682">SuperOneClick</a>, but I was having troubles. As it turns out the firmware of my phone was V10P, and so the version of SuperOneClick I was using was not able to root it. But thanks to <a href="http://www.htcmania.com/archive/index.php/t-511030.html">this post</a> by AlexPS I got it rooted without problems (it didn't work using "mono" in Linux or in a Windows virtual machine, so I had to borrow a real Windows PC just for this). </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
To unlock the phone from its network, I was looking at pages like <a href="http://forum.xda-developers.com/showthread.php?t=1693491">http://forum.xda-developers.com/showthread.php?t=1693491</a> and <a href="http://www.emudesc.com/threads/como-liberar-tu-movil-con-sistema-android-100-funciona.413513/">http://www.emudesc.com/threads/como-liberar-tu-movil-con-sistema-android-100-funciona.413513/</a>, but the method in the second link didn't work, and the first one was for another model and I was not sure it would work, so in the end I went the easy way: just went to <a href="http://www.codesimeis.com/index.php">CodesIMEIS page</a>, and by using the promotional code "GSM" (I got that info from some Forum I can't remember anymore), the phone was unlocked for 1€ in about 10 minutes. Then to access the Internet, I followed the instructions from my network provider to configure the phone properly.<br />
<br />
The next thing was to increase the very small system memory (157MB, where all the applications would go by default), so that I could install more applications. For some reason the installed SuperUser app was giving me trouble, so I updated it before continuing. The next thing was to prepare a MicroSD card to hold the installed apps. Despite what it is said in some guides, I had to partition my 2GB card as 999MB FAT32 (Logical) and 898MB ext2 (Primary), following the advice at <a href="http://www.htcmania.com/archive/index.php/t-449048.html">http://www.htcmania.com/archive/index.php/t-449048.html</a> (pictures, etc. go to the FAT32 partition, and the installed applications go to the ext2 partition).<br />
<br />
Then, the next thing was to download Link2SD, so I followed Part C of the instructions at <a href="http://rootlord.blogspot.com.es/2013/06/how-to-increase-memory-on-lg-l3-e400.html">http://rootlord.blogspot.com.es/2013/06/how-to-increase-memory-on-lg-l3-e400.html</a><br />
<br />
After that, I installed a number of applications (Angry Birds, Endomondo K-9 Mail, ...), and the internal memory status is quite healthy, while I see that 181MB of application data have gone to the MicroSD card. Bingo!<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUZ4R3ofRYaRcn_NhBRNpZ5vzDMNctPjNpKGv5UZE-Q6UB81kd2lW4DIdfX_Gq_8TYIH578JkTm6aka2dsFu5bVW5vvqIVCfWMv6Omerdqew7jHmFwFZ6Lk2VuF7rwf8diaPHP5onNJGM/s1600/20130916213557.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUZ4R3ofRYaRcn_NhBRNpZ5vzDMNctPjNpKGv5UZE-Q6UB81kd2lW4DIdfX_Gq_8TYIH578JkTm6aka2dsFu5bVW5vvqIVCfWMv6Omerdqew7jHmFwFZ6Lk2VuF7rwf8diaPHP5onNJGM/s1600/20130916213557.png" /></a></div>
</div>
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-79947195627970179532013-09-12T21:08:00.002+00:002013-09-12T21:31:04.602+00:00Classical guitar progress logging (September'13)August was too hot to play, so I skipped that recording.
In September instead of a guitar recording I present this little exercise that I had to do for the Coursera course "Survey of Music Technology" (here I'm not really playing the guitar at all, but learning to mix audio (July's recording and some other sound clips) with MIDI in a DAW, this time Reaper).<br />
<br />
<iframe frameborder="no" height="166" scrolling="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F109959623" width="100%"></iframe>
angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-46401503654685097542013-09-12T21:02:00.001+00:002013-09-12T21:31:38.916+00:00Classical guitar progress logging (July'13)I forgot to update it in July, but this was the piece for July: Summer Souvenir (by Giorgio Signorile):<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="375" mozallowfullscreen="" src="//player.vimeo.com/video/69591361" webkitallowfullscreen="" width="500"></iframe> <br />
<a href="http://vimeo.com/69591361">Summer Souvenir (by Giorgio Signorile)</a> from <a href="http://vimeo.com/user3661996">Angel de Vicente</a> on <a href="https://vimeo.com/">Vimeo</a>.angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com1tag:blogger.com,1999:blog-4419419196674784537.post-41733116848145810302013-06-27T10:33:00.000+00:002013-06-27T10:47:08.854+00:00Classical guitar progress logging (June'13)This month we had the Music school guitar concert, so I uploaded a part of it. The original sound recorded with my crappy camera was horrible. After massaging it a bit with Audacity it is now just audible, but couldn't get any better. Next time I will try to get a proper microphone...<br /><br />
<iframe src="http://player.vimeo.com/video/69227807" width="500" height="375" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <p><a href="http://vimeo.com/69227807">Music school June'13 Concert (part)</a> from <a href="http://vimeo.com/user3661996">Angel de Vicente</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-72623480006946173102013-05-07T11:34:00.000+00:002013-05-07T11:34:32.898+00:00Classical guitar progress logging (May'13)For this month I'm playing Amor Flamengo, by Laurindo Almeida. I think it is the first time that I play something non-classical. Should work on getting it a bit faster and with more rhythm, but here it is what I get so far:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="375" mozallowfullscreen="" src="http://player.vimeo.com/video/65633551" webkitallowfullscreen="" width="500"></iframe> <br />
<a href="http://vimeo.com/65633551">Amor Flamengo, by Laurindo Almeida</a> from <a href="http://vimeo.com/user3661996">Angel de Vicente</a> on <a href="http://vimeo.com/">Vimeo</a>.<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com2tag:blogger.com,1999:blog-4419419196674784537.post-41263249681478107452013-04-23T13:56:00.000+00:002013-04-23T15:14:33.221+00:00Classical guitar progress logging (Apr'13)For this month I'm playing Andaluza (Danza española, n.5), by Enrique Granados (1867 - 1916), with a YouTube partner.<br />
<br />
The video used is: <a href="http://www.youtube.com/watch?v=suTKOmmoBtw">http://www.youtube.com/watch?v=suTKOmmoBtw</a>. With the help of youtube-dl (<a href="http://angel-de-vicente.blogspot.com.es/search?q=youtube-dl">http://angel-de-vicente.blogspot.com.es/search?q=youtube-dl</a>) I get the mp3 file:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">angelv@pilas:~/GUITAR-APRIL$ youtube-dl --extract-audio --audio-format=mp3 http://www.youtube.com/watch?v=suTKOmmoBtw</span><br />
<br />
Then I use that one for practice, with the help of <a href="http://audacity.sourceforge.net/">audacity</a>. With it, I can use this track nicely for practice by:<br />
<br />
<ul>
<li>splitting the stereo track and muting the right channel, which has mostly the sound of the first guitar, which I'm playing. I also normalize the audio, as it has some saturation in a couple of places.</li>
<li>using the "Change Tempo" effect, so that I can practice slower, but maintaining the right pitch.</li>
</ul>
<br />
For creating the final video, I created a stereo track and put the YouTube recording in the left channel (after removing its right channel, which is where most of the first guitar was recorded), and myself in the right channel (so it is more or less like I'm playing a duet with Marisa Gomez). The result is <a href="https://vimeo.com/64637791">here</a>:<br />
<br />
<iframe src="http://player.vimeo.com/video/64637791" width="500" height="375" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <p><a href="http://vimeo.com/64637791">Andaluza (Danza española, n.5), by Enrique Granados (1867 - 1916)</a> from <a href="http://vimeo.com/user3661996">Angel de Vicente</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<br />
<br />
<i>As an aside</i>: For this piece I wanted to try with my <a href="http://angel-de-vicente.blogspot.com.es/2011/01/aria-sinsonido-as-100c.html">Aria Silent guitar</a> but I just found out that the line-in jack in my Dell Latitude E6530 is one of these combined in/out connections. By mistake I bought just an <a href="http://www.amazon.es/gp/product/B001EZIJ76/ref=oh_details_o00_s00_i01?ie=UTF8&psc=1">audio splitter</a> where in reality I needed a <a href="http://www.everbatim.net/store/index.php/headphone-microphone-jack-splitter.html">Headphone and Microphone Jack Audio Splitter</a>, so I had to do it with the Acer Aspire 1810T netbook.<br />
<br />
<br />
<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-82866656024893107132013-04-17T20:33:00.001+00:002013-04-17T20:48:31.176+00:00Presentations with org-mode + beamerI decided to give a try to creating presentations with Org-mode (and Beamer). In the end I got something that looks nice (though further tweaking will be required).<br />
<br />
Webs that helped me to get it:<br />
<ul>
<li>For a nice template: <a href="http://projects.iq.harvard.edu/rtc/event/introduction-r">http://projects.iq.harvard.edu/rtc/event/introduction-r</a></li>
<li>To get movie playbacks in PDFs in Linux: </li>
<ul>
<li><a href="http://abarry.org/the-complete-guide-to-embedded-videos-in-beamer-under-linux/">http://abarry.org/the-complete-guide-to-embedded-videos-in-beamer-under-linux/</a></li>
<li> <a href="http://tug.ctan.org/macros/latex/contrib/flashmovie/flashmovie.sty">http://tug.ctan.org/macros/latex/contrib/flashmovie/flashmovie.sty</a></li>
<li> <a href="https://groups.google.com/forum/?fromgroups=#!topic/comp.text.tex/VLg2UE3kpLA[1-25-false]">https://groups.google.com/forum/?fromgroups=#!topic/comp.text.tex/VLg2UE3kpLA[1-25-false]</a> </li>
</ul>
<li> To shorten the titles, etc. in the footer:</li>
<ul>
<li> <a href="http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg00177.html">http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg00177.html</a></li>
<li> <a href="http://www.uncg.edu/cmp/reu/presentations/Charles%20Batts%20-%20Beamer%20Tutorial.pdf">http://www.uncg.edu/cmp/reu/presentations/Charles%20Batts%20-%20Beamer%20Tutorial.pdf</a></li>
</ul>
<li> To get rid of navigation symbols:</li>
<ul>
<li><a href="http://stackoverflow.com/questions/1435837/how-to-remove-footers-of-latex-beamer-templates">http://stackoverflow.com/questions/1435837/how-to-remove-footers-of-latex-beamer-templates</a></li>
</ul>
<li>For semi-transparency:</li>
<ul>
<li><a href="http://comments.gmane.org/gmane.editors.lyx.general/72441">http://comments.gmane.org/gmane.editors.lyx.general/72441</a></li>
</ul>
<li>To scale images: </li>
<ul>
<li><a href="http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01554.html">http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01554.html</a></li>
</ul>
<li> Greying-out images: in the TO-DO list</li>
</ul>
<br />
I also had to do a couple of small changes to the file flashmovie.sty (which is in the <a href="https://docs.google.com/uc?export=download&id=0BwjvJuuWbgNlam1HdUVqcDJrbWs">in this tar file</a>). The basic theme of the presentation can be seen below and the resulting PDF (in Linux I think the embedded video will work only with Acroread 9.4.1) is <a href="https://docs.google.com/uc?export=download&id=0BwjvJuuWbgNlZWE1c2dXMW11N3M">this</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLJ6EcbWfklQT_AyPU_Vv60uE5pRZZfMIzIHh18uJyepX7JUEgtGpWiwNhDZbinwpyvOIGMM8dXNSvHcrKmdd4QYspJYIVpWAG7jrioNP2q4q0NgxXBDf1XFgtLIInKfnldYW0fkNrnEU/s1600/org-mode-beamer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLJ6EcbWfklQT_AyPU_Vv60uE5pRZZfMIzIHh18uJyepX7JUEgtGpWiwNhDZbinwpyvOIGMM8dXNSvHcrKmdd4QYspJYIVpWAG7jrioNP2q4q0NgxXBDf1XFgtLIInKfnldYW0fkNrnEU/s320/org-mode-beamer.png" width="320" /></a></div>
<br />
<br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0tag:blogger.com,1999:blog-4419419196674784537.post-68170421135995996402013-03-19T23:27:00.001+00:002013-03-19T23:27:17.297+00:00Settings for recording classical guitar A few days after I wrote <a href="http://angel-de-vicente.blogspot.com.es/2013/01/settings-for-recording-guitar.html">Settings for recording a guitar performance</a> I got a new computer, so those settings don't work anymore, so let's write here my present settings for recording my classical guitar in my Dell Latitude E6530, running Xubuntu 12.10.<br />
<br />
For the moment I use the internal webcam and the internal microphone. I have the following settings in PulseAudio Volume Control:<br />
<br />
<br />
<ul>
<li>Output Devices: set as fallback "Built-in Audio Analogue Stereo"</li>
<li>Input Devices: "Internal Microphone"</li>
<li>Configuration: GF108 High Definition Audio Controller: Digital Stereo (HDMI) Output; Built-in Audio: Analogue Stereo Duplex</li>
</ul>
<br />
<br />
I follow these steps:<br />
<br />
<br />
<ol>
<li>I record video+audio with VLC:</li>
<ul>
<li>To avoid echo when recording, we put output volume muted. (PA Volume Control, Output Devices). </li>
<li>To avoid saturation, we put input volume at 20%.</li>
<li>We "Open Capture Device", with hardware set as /dev/video0 and hw:0,0</li>
<li>The video goes to /home/angelv/Videos</li>
</ul>
<li>To massage the audio:</li>
<ul>
<li>I open the .avi file generated by VLC directly in Audacity.</li>
<li>We amplify the signal (Effects -> Amplify) if needed.</li>
<li>We do "Click removal" (in Effects)</li>
<li>We do some reverb, using GVerb. Based on<a href="http://draft.blogger.com/%C2%A0http://wiki.audacityteam.org/index.php?title=GVerb"> http://wiki.audacityteam.org/index.php?title=GVerb</a> I end up with these settings:</li>
<ul>
<li>Roomsize:<span class="Apple-tab-span" style="white-space: pre;"> </span> 50 m²</li>
<li>Reverb time:<span class="Apple-tab-span" style="white-space: pre;"> </span> 7 s</li>
<li>Damping:<span class="Apple-tab-span" style="white-space: pre;"> </span> 0.70</li>
<li>Input bandwidth:<span class="Apple-tab-span" style="white-space: pre;"> </span> 0.75</li>
<li>Dry signal level:<span class="Apple-tab-span" style="white-space: pre;"> </span> 0 dB</li>
<li>Early reflection level:<span class="Apple-tab-span" style="white-space: pre;"> </span> -22 dB</li>
<li>Tail level: -30</li>
</ul>
<li>We export the audio as .ogg</li>
</ul>
<li>We then create the video (with OpenShot):</li>
<ul>
<li>open .avi and .ogg files</li>
<li>create two titles and put them on the top tracks (one for the title, with style <i>Gold2</i>, and another one for the date, with style <i>Gold Bottom). </i>The size of the text, and its position can be set to whatever suits us with the title advanced options.</li>
<li>in the third track, I put the backgroupd image for the title. Right now, I'm using a picture of Mount Teide (<i>MEDIA/Pictures/Izana/pa300001.jpg</i>). We can set the duration of the title, by right-clicking to access their properties.</li>
<li>In the fourth track we put the .avi file (muted).</li>
<li>In the fifth track we put the .ogg audio file.</li>
<li>We add a <i>dissolve </i>transition between the background picture and the .avi file.</li>
<li>We add fade outs to the .avi and to the .ogg tracks.</li>
<li>Once this is done, we export the video, with the following settings: <i>profile: web; target: vimeo-SD, quality: high</i>.</li>
<li>This generates a .mp4 file, ready to upload to <a href="https://vimeo.com/">Vimeo</a>.</li>
</ul>
</ol>
<div>
<br /></div>
Enjoy!<br /><br />
<br />angelvhttp://www.blogger.com/profile/11372350548155510934noreply@blogger.com0