Csound Csound-dev Csound-tekno Search About

[Csnd] Time Travel

Date2007-12-24 18:18
FromJacob Joaquin
Subject[Csnd] Time Travel
Hello everybody!

Are you tired of having to manually re-enter a bunch of start times when
moving sections of score code?  Fret no more!  I have a perl script that
saves time and keyboard clicks.  All for the low, low price of free!

http://www.thumbuki.com/csound/files/mailinglist/timetravel.pl.zip


All joking aside, I've been using this script for awhile now, and it truly
saves me a *lot* of time and hassle when moving large sections of score
code, or duplicating sections of score code.  Working with Csound has never
felt this liquid to me.

In a nutshell, one pipes score data to timetravel.pl (a perl script) while
specifying the amount of time the code should be shifted by.  For every
i-event, p-field 2 is shifted by the user specified time.

For example, let's say the following score code is piped to the script:

i 1 0 4 1.0 440 
i $sine 4 4 1.0 440 
i "kick" 8 4 1.0 440 


The script returns:

i 1 16 4 1.0 440 
i $sine 20 4 1.0 440 
i "kick" 24 4 1.0 440 


The following is the command-line call to active the script (OS X centric):

$ pbpaste | ./timetravel.pl 16 | pbcopy


More information on how to use it can be found in the header portion of the
script.

Though jEdit is currently my text editor of choice, I was able to create a
bundle function with timetravel.pl in TextMate where one highlights a region
of score code, run the bundle, enter a number into a dialog box, and have
the highlighted code shifted.  All from within TextMate.  

Anyways, I hope this script will save time for others in the community.

Happy Holidays,
Jake
 
---- 
The Csound Blog 
http://www.thumbuki.com/csound/blog  

-- 
View this message in context: http://www.nabble.com/Time-Travel-tp14490167p14490167.html
Sent from the Csound - General mailing list archive at Nabble.com.